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>
相关推荐
alexhilton1 小时前
深入理解withContext和launch的真正区别
android·kotlin·android jetpack
TDengine (老段)5 小时前
TDengine 转换函数 TO_JSON 用户手册
android·大数据·数据库·json·时序数据库·tdengine·涛思数据
q***42825 小时前
SpringCloudGateWay
android·前端·后端
卫生纸不够用5 小时前
Appium-锁屏-Android
android·appium
阿拉斯攀登5 小时前
安卓工控机 OTA 升级方案(SpringBoot+MQTT)
android·spring boot·物联网·iot
顾林海6 小时前
从0到1搭建Android网络框架:别再让你的请求在"路上迷路"了
android·面试·架构
花花鱼6 小时前
android room中实体类变化以后如何迁移
android
Jomurphys7 小时前
设计模式 - 适配器模式 Adapter Pattern
android
雨白7 小时前
电子书阅读器:解析 EPUB 底层原理与实战
android·html
g***B7387 小时前
Kotlin协程在Android中的使用
android·开发语言·kotlin