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>
相关推荐
yueqc110 小时前
Android 渲染(三):掉帧监控
android·渲染·apm·掉帧
Mico1810 小时前
MySQL 8.0.35 基于GTID 主从复制安装增强半同步复制
android·mysql·adb
Kapaseker10 小时前
你是不是还没用过 select?实战 Kotlin select
android·kotlin
__Witheart__11 小时前
适用于Android内核boot.img生成流程
android·rockchip
木易 士心11 小时前
Jetpack Compose 深度解析:初始组合与重组的底层奥秘
android
GitLqr20 小时前
Flutter 无障碍开发实战:玩转 Semantics 解决视障用户使用痛点
android·flutter·dart
雨白1 天前
掌握 NestedScrolling 嵌套滑动:手写仿知乎折叠主页
android
Xzaveir1 天前
别把所有“认证”都塞进 AuthService:实名、一键登录与号码身份的领域拆分
android·人工智能
BerrySen1781 天前
KMP全栈开发:从Android到AI Agent的技术演进与实践
android·人工智能
AFinalStone1 天前
Android 7系统休眠唤醒(一)电源管理架构全景图
android·powermanager·电源管理