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>
相关推荐
-指短琴长-2 小时前
MySQL快速入门——基本查询(下)
android·mysql·adb
stevenzqzq3 小时前
android lambda回调
android
林北北的霸霸5 小时前
django初识与安装
android·mysql·adb
Java 码农7 小时前
MySQL EXPLAIN 详解与优化指南
android·mysql·adb
小马爱打代码9 小时前
MyBatis:入门到实战 - 配置与CRUD
mybatis
stevenzqzq11 小时前
Android Hilt 入门教程_传统写法和Hilt写法的比较
android
wuwu_q11 小时前
用通俗易懂方式,详细讲讲 Kotlin Flow 中的 map 操作符
android·开发语言·kotlin
_李小白12 小时前
【Android FrameWork】第五天:init加载RC文件
android
2501_9160074712 小时前
手机使用过的痕迹能查到吗?完整查询指南与步骤
android·ios·智能手机·小程序·uni-app·iphone·webview
黄毛火烧雪下13 小时前
React Native (RN)项目在web、Android和IOS上运行
android·前端·react native