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>
相关推荐
巴博尔5 小时前
UNIAPP中NVUE页面 动画
android·前端·javascript·ios·uni-app
JAVA面经实录9177 小时前
MyBatis学习体系
java·mybatis
墨_风8 小时前
MyBatis时间区间查询异常排查(达梦数据库)
数据库·mybatis·达梦
abc_ABC123A9 小时前
flutter开发安卓APP所需搭建的环境
android
xq952710 小时前
Google 授权登录 V2 接入文档 王者归来
android
李少兄11 小时前
MySQL分页重复问题深度剖析
android·数据库·mysql
_李小白12 小时前
【android opencv学习笔记】Day 24: 最大稳定极值区域
android·opencv·学习
霸道流氓气质13 小时前
MyBatis 分页查询 + Feign 数据补充实战指南
数据库·oracle·mybatis
问心无愧051313 小时前
ctf show web入门257
android·前端·笔记
隐退山林14 小时前
JavaEE进阶:MyBatis操作数据库(进阶)
数据库·java-ee·mybatis