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>
相关推荐
空中海21 分钟前
安卓逆向03. 动态调试、抓包分析与 Frida Hook
android
一起搞IT吧1 小时前
相机Camera日志实例分析之二十:相机Camx【照片后置4800/5000/6400万拍照】单帧流程日志详解
android·嵌入式硬件·数码相机·智能手机
jinanwuhuaguo2 小时前
(第三十三篇)五月的文明奠基:OpenClaw 2026.5.2版本的文明级解读
android·java·开发语言·人工智能·github·拓扑学·openclaw
千码君20164 小时前
Trae:一些关于flutter和 go前后端开发构建的分享
android·flutter·gradle·android-studio·trae·vibe code
Nicander6 小时前
理解 mybatis 源码:vibe-coding一个mini-mybatis
后端·mybatis
重生之我是Java开发战士7 小时前
【MySQL】事务 & 用户与权限管理
android·数据库·mysql
怣疯knight9 小时前
Windows不安装 Android Studio如何打包安卓软件
android·windows·android studio
ke_csdn9 小时前
从Java演变到Kotlin下的jet pack
android
wenzhangli710 小时前
在低代码设计中践行 Harness Engineering
android·低代码·rxjava
xingpanvip11 小时前
星盘接口开发文档:组合三限盘接口指南
android·开发语言·前端·python·php·lua