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>
相关推荐
2501_9160088931 分钟前
苹果上架工具怎么选 不用 Mac 上架 App Store 的几种方案
android·macos·ios·小程序·uni-app·iphone·webview
jijihusong0062 小时前
KMP全栈开发教程:从Android到AI Agent
android·人工智能
_祝你今天愉快4 小时前
Android Binder 驱动 - 内核驱动层源码初探
android
stevenzqzq4 小时前
【无标题】
android
醉城夜风~4 小时前
MyBatis 基础CRUD全套实战学习笔记
笔记·学习·mybatis
梦幻通灵5 小时前
Notepad++格式化Json两种方案【持续更新】
android·json·notepad++
万亿少女的梦1685 小时前
基于微信小程序、Spring Boot与Vue3的智慧养老管理系统设计与实现
spring boot·redis·微信小程序·mybatis·vue3
1024+6 小时前
YOLO 转 RKNN 识别率降低调优操作手册(新手篇)
android·yolo·kotlin
木易 士心6 小时前
深度解析 Android 音频焦点处理与实战开发
android·音视频
祉猷并茂,雯华若锦7 小时前
Appium 3.x安卓APP企业级安装实战
android·appium