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>
相关推荐
用户41659673693551 小时前
nextlib 项目架构与深度技术指南 (Architecture & Technical Master Guide)
android
aq55356001 小时前
Laravel10.x重磅升级,新特性一览
android·java·开发语言
Trouvaille ~2 小时前
【MySQL篇】数据类型:存储数据的基础
android·数据库·mysql·adb·字符集·数据类型·基础入门
2401_885885043 小时前
开发视频短信接口好开发吗?图文视频短信接口对接教程
android·音视频
千码君20164 小时前
kotlin:Jetpack Compose 给APP添加声音(点击音效/背景音乐)
android·开发语言·kotlin·音效·jetpack compose
Fᴏʀ ʏ꯭ᴏ꯭ᴜ꯭.4 小时前
MySQL半同步复制与GTID实战详解
android·mysql·adb
用户41659673693555 小时前
深度解码:记一次视频时间戳(PTS)异常导致的播放故障排查
android
大白菜和MySQL7 小时前
linux系统环境常用命令
android·linux·adb
Ehtan_Zheng7 小时前
彻底告别 AndroidX 依赖:如何在 KMP 中构建 100% 复用的 UI 逻辑层?
android
Hello小赵7 小时前
C语言如何自定义链接库——编译与调用
android·java·c语言