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>
相关推荐
__Witheart__8 小时前
Android编译错误:Soong阶段因缺失res目录导致panic (Iwlan模块)
android
酿情师9 小时前
逆向exe文件:CRT 初始化流程详细分析
android·软件构建·逆向·re·crt‘
问心无愧051311 小时前
ctf show web入门71
android·前端·笔记
夜勤月11 小时前
AQS 与 ThreadPoolExecutor 深度拆解:JDK 高并发底层设计精髓
android·java·开发语言
Yeyu11 小时前
Android 卡顿诊断 SDK:从痛点出发的设计思考
android
上天_去_做颗惺星 EVE_BLUE12 小时前
Ubuntu Android 虚拟机安装使用教程
android·linux·测试工具·ubuntu·安卓
Mahir0812 小时前
MyBatis 延迟加载深度解密:从使用方式到底层动态代理原理全解
java·后端·面试·mybatis
我命由我1234512 小时前
Android 开发问题:Could not find com.github.PicnicSupermarket:FingerPaintView:1.2.
android·github·android studio·安卓·android jetpack·android-studio·android runtime
黄林晴14 小时前
Google Play 全面进化:AI 驱动增长,从上架到收入全链路重构
android·google