mybatis generator 表名多了个点

csdn有一个,要收费,研究后原因如下,是 mysql不支持 SQL catalogs and schema, 解决方式就是去掉 这两个字段,同时在jdbcConnection中设置nullCatalogMeansCurrent属性为true。 手册如下

MySql does not properly support SQL catalogs and schema. If you run the create schema command in MySql, it actually creates a database - and the JDBC driver reports it back as a catalog. But MySql syntax does not support the standard catalog..table SQL syntax.

For this reason, it is best to not specify either catalog or schema in generator configurations. Just specify table names and specify the database in the JDBC URL.

If you are using version 8.x of Connector/J you may notice that the generator attempts to generate code for tables in the MySql information schemas (sys, information_schema, performance_schema, etc.) This is probably not what you want! To disable this behavior, add the property "nullCatalogMeansCurrent=true" to your JDBC URL.

For example:

复制代码
    <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost/my_schema"
            userId="my_user" password="my_password">
        <property name="nullCatalogMeansCurrent" value="true" />
    </jdbcConnection>
相关推荐
StarsGreen2 小时前
Android 12 中的“域“与“权限“介绍
android
恋猫de小郭4 小时前
Android Keep Rules 解读,直接影响 Google Play 上架和曝光
android·前端·flutter
FlightYe4 小时前
音视频修炼之容器与协议(六):HTTP 协议
android·linux·网络·网络协议·算法·http·音视频
SongRenShuo5 小时前
三年 MyBatis 排查史:从我翻日志,到让 SQL 自己浮现
sql·mybatis·idea·日志·调试
CoderYanger6 小时前
Java EE 进阶:11. SpringBoot 统一功能处理(第二弹):DispatcherServlet 源码分析+适配器模式
java·数据库·hive·spring boot·面试·java-ee·mybatis
StarsGreen20 小时前
Android中的seccomp相关信息介绍
android
阿杰m1 天前
Android源码第二十四章:OTA 与 APEX——重启后换了什么?
android
用户081268037411 天前
差点格式化一台 Redmi K80:一次 WebView 翻车的无损救援实录
android·debug·webview
阿杰m1 天前
Android源码第二十五章:WebView 与 Chromium——网页何时画上屏?
android·android studio
StarsGreen1 天前
Android中特殊文件的相关说明
android