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 小时前
OpenAPITools使用——FAQ
android·java·缓存
ljt27249606617 小时前
Compose笔记(六十五)--插槽模式
android·笔记·android jetpack
6666v67 小时前
Android Kotlin(3) Flow异步流
android·kotlin
三少爷的鞋7 小时前
为什么你的 SharedFlow 不工作?深挖这 3 个关键参数
android
凛_Lin~~8 小时前
安卓 面试八股文整理(原理与性能篇)
android·java·面试·安卓
花花鱼8 小时前
android 更新后安装app REQUEST_INSTALL_PACKAGES 权限受限 + FileProvider 元数据异常
android
2501_946233899 小时前
Flutter与OpenHarmony大师详情页面实现
android·javascript·flutter
z9209810239 小时前
ZTE 中兴 高通 安卓手机 一键改串 一键新机 IMEI MEID 写号 硬改 手机修改参数 视频教程演示
android·智能手机
idealzouhu10 小时前
【Android Framework】Intent 运行机制
android
2501_9462338910 小时前
Flutter与OpenHarmony Tab切换组件开发详解
android·javascript·flutter