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 小时前
【Exception】CONDITIONS EVALUATION REPORT条件评估报告
java·开发语言·mybatis
测试工坊7 小时前
Android CPU 使用率采集入门:从原理到公式
android
恋猫de小郭7 小时前
iOS + AI ,国外一个叫 Rork Max 的项目打算替换掉 Xcode
android·前端·flutter
systeminof9 小时前
从静态到实时对抗:首例安卓Runtime AI病毒解析
android·人工智能
福大大架构师每日一题11 小时前
ComfyUI v0.14.2 发布:修复 Gemini/Nano banana 节点空白图像问题,全新 MIME 匹配机制登场
android·comfyui
fengci.11 小时前
ctfshow大牛杯
android
Android系统攻城狮12 小时前
Android tinyalsa深度解析之pcm_format_to_bits调用流程与实战(一百二十三)
android·pcm·tinyalsa·音频进阶·音频性能实战
树码小子13 小时前
图书管理系统(2)图书列表接口
spring boot·mybatis·图书管理系统
tuokuac13 小时前
MyBatis-Plus调用getEntity()触发异常
java·mybatis
城东米粉儿13 小时前
Android Okhttp ConnectionPool 笔记
android