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>
相关推荐
csj5021 分钟前
安卓基础之《(18)—内容提供者(4)在应用之间共享文件》
android
尤老师FPGA38 分钟前
使用ZYNQ芯片和LVGL框架实现用户高刷新UI设计系列教程(第四十五讲)
android·java·ui
北辰当尹2 小时前
xml基础
android·xml
龙之叶2 小时前
【Android Monkey源码解析四】- 异常捕获/页面控制
android·windows·adb·monkey
进击的CJR3 小时前
redis cluster 部署
java·redis·mybatis
_F_y3 小时前
MySQL表的操作
android·数据库·mysql
yngsqq4 小时前
AndroidStudio汉化步骤
android
HyEISN5 小时前
Android 9 开启远程adb
android·adb
2501_944526425 小时前
Flutter for OpenHarmony 万能游戏库App实战 - 抽牌游戏实现
android·开发语言·python·flutter·游戏
大大祥6 小时前
穿山甲广告sdk接入
android·kotlin·音视频·视频播放器·广告sdk