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>
相关推荐
我是好小孩7 小时前
【Android】布局优化:include、merge、ViewStub以及Inflate()源码浅析
android
GISer_Jing8 小时前
2025年Flutter与React Native对比
android·flutter·react native
MasterLi80238 小时前
我的读书清单
android·linux·学习
怪兽20149 小时前
fastjson在kotlin不使用kotlin-reflect库怎么使用?
android·开发语言·kotlin
彭同学学习日志9 小时前
Kotlin Fragment 按钮跳转报错解决:Unresolved reference ‘floatingActionButton‘
android·开发语言·kotlin
Gracker10 小时前
Android Perfetto 系列 9 - CPU 信息解读
android
Gracker10 小时前
Android Perfetto 系列 8:深入理解 Vsync 机制与性能分析
android
Gracker10 小时前
Android Perfetto 系列 07 - MainThread 和 RenderThread 解读
android
Gracker10 小时前
Android Perfetto 系列 5:Android App 基于 Choreographer 的渲染流程
android
Gracker10 小时前
Android Perfetto 系列 6:为什么是 120Hz?高刷新率的优势与挑战
android