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>
相关推荐
taWSw5OjU35 分钟前
MyBatis-plus进阶之映射与条件构造器
数据库·oracle·mybatis
Ln5x9qZC22 小时前
Laravel AI SDK 正式发布
android·人工智能·laravel
huwuhang3 小时前
跨平台电子书阅读器 | Readest最新版 安卓版+PC版全平台
android·前端·javascript
身如柳絮随风扬4 小时前
Mybatis分页实现原理与PageHelper插件深度解析
mybatis
Gse0a362g4 小时前
推荐 PHP 属性(Attributes) 简洁读取 API 扩展包
android·开发语言·php
十六年开源服务商5 小时前
WordPress服务器响应时间优化终极指南2026
android·运维·服务器
jwn9995 小时前
PHP vs Go:后端开发选谁更胜一筹?
android
希望永不加班5 小时前
SpringBoot 缓存注解:@Cacheable/@CacheEvict 使用
java·spring boot·spring·缓存·mybatis
oYD3FlT325 小时前
MyBatis-缓存与注解式开发
java·缓存·mybatis
Vfw3VsDKo5 小时前
Android设备搭建本地RTSP服务器(基于live555)
android·运维·服务器