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>
相关推荐
时间的拾荒人1 小时前
MySQL C语言连接 - 从入门到实战
android·c语言·mysql
Meteors.1 小时前
Android性能优化:01. 指标体系 + 分析工具链
android
jike_20263 小时前
安卓平台免费录音转文字工具深度测评:5 款 APP 功能对比与选型指南
android·智能电视
Code Man3 小时前
Windows 下使用 Appium
android·windows·appium
码农coding3 小时前
android 12 中的VSYNC接收
android
GitLqr3 小时前
Flutter 3.44 性能飞跃:深度解析 Android Platform View 的 HCPP 新特性
android·flutter·性能优化
码农coding3 小时前
android 12 SurfaceFlinger中的CompositionEngine
android
Mem0rin5 小时前
[MySQL] 聚合函数、分组查询、连接查询
android·mysql
码龙-DragonCoding5 小时前
一键批量提取音频、提取视频
android·音视频·提取
祉猷并茂,雯华若锦5 小时前
Win下完美解决Allure报错,生成Web自动化测试报告
android·python·selenium·自动化