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>
相关推荐
李艺为8 小时前
根据apk包名动态修改Android品牌与型号
android·开发语言
侠客行03179 小时前
Mybatis二级缓存实现详解
java·mybatis·源码阅读
Tom4i10 小时前
【网络优化】Android 如何监听系统网络连接成功
android·网络
FrameNotWork10 小时前
HarmonyOS 与 Android 架构对比:从“写页面”到“设计系统”的差异
android·架构·harmonyos
TAEHENGV11 小时前
基本设置模块 Cordova 与 OpenHarmony 混合开发实战
android·java·数据库
爱丽_13 小时前
MyBatis动态SQL完全指南
服务器·sql·mybatis
屏息13 小时前
Android 低延迟流媒体播放器实战:基于 FFmpeg 6.1.1 的 RTSP/RTMP 解决方案
android
ZLZQ_Yuan14 小时前
MyBatis、MyBatis-Plus
数据库·mybatis
TeleostNaCl14 小时前
Kodi | 如何使用 ADB 无 root 备份 Android 版本 Kodi 的数据并导入到另一台设备中
android·经验分享·adb·电视盒子·智能电视·tv·智能tv
csj5014 小时前
安卓基础之《(10)—中级控件(4)对话框》
android