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>
相关推荐
梦幻通灵9 小时前
Mysql字段判空实用技巧
android·数据库·mysql
龘龍龙11 小时前
Python基础(九)
android·开发语言·python
gjc59212 小时前
MySQL隐蔽 BUG:组合条件查询无故返回空集?深度排查与规避方案
android·数据库·mysql·bug
千百元12 小时前
限制网段访问服务器端口63790
java·网络·mybatis
梨落秋霜12 小时前
Python入门篇【元组】
android·数据库·python
zh_xuan12 小时前
kotlin定义函数和变量
android·开发语言·kotlin
Caarlossss12 小时前
mybatis
java·数据库·tomcat·maven·mybatis·mybatis-spring
liuc031713 小时前
AI下调用redis并调用deepseek
数据库·redis·mybatis
Digitally14 小时前
Android 上的联系人备份和恢复:5 种可靠且方便的方法
android
默|笙15 小时前
【Linux】进程控制(3)进程程序替换
android·linux·运维