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>
相关推荐
余额瞒着我当琳5 分钟前
C++模板初阶与STL初探
android·java·c++
知行合一。。。3 小时前
DeepAgents--01--Agent和OpenClaw的相关概念
android·数据库
汪海游龙4 小时前
告别 Play Console 手动上传:从模拟器截图到自动发版的完整流水线
android·ci/cd·github
weixin_440784114 小时前
【IntentSeivice实现原理】
android·java·开发语言·intentservice
delta_hell4 小时前
【阅读源码--Android】动画之ValueAnimator--2
android·源码·valueanimator
delta_hell4 小时前
【阅读源码--Android】动画之辅助类
android·源码·animator
砍材农夫7 小时前
物联网实战|Spring Boot MQTT平台 |emqx broker实战
spring boot·spring·spring cloud·mybatis
delta_hell8 小时前
【阅读源码--Android】动画之ValueAnimator--1
android·源码·valueanimator
Crazy________8 小时前
Redis02:库切换、监控与安全配置
linux·redis·云原生·mybatis
消失的旧时光-19438 小时前
第 2 篇:Android 控制屏为什么与机器人主控使用 TCP 长连接?
android·tcp/ip·机器人