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>
相关推荐
Mintopia4 分钟前
🎙️ React Native(RN)语音输入场景全解析
android·react native·aigc
centor14 分钟前
国际版 UnitySetup-Android-Support 安装 Mac 设备
android·macos
城东米粉儿30 分钟前
compose 中的附带效应笔记一
android
STCNXPARM1 小时前
Android14显示系统 - VSYNC机制
android·surfaceflinger·vsync
say_fall1 小时前
C++ 类与对象易错点:初始化列表顺序 / 静态成员访问 / 隐式类型转换
android·java·开发语言·c++
落羽凉笙1 小时前
Python基础(4)| 详解程序选择结构:单分支、双分支与多分支逻辑(附代码)
android·服务器·python
携欢1 小时前
portswigger靶场之修改序列化数据类型通关秘籍
android·前端·网络·安全
super_lzb1 小时前
mybatis拦截器ResultSetHandler详解
java·spring·mybatis·springboot
·云扬·2 小时前
MySQL四大系统库详解:作用、核心表与实用SQL查询
android·sql·mysql
普马萨特2 小时前
移动网络信号指标与单位整理(2G/3G/4G/5G Android vs IoT)
android·网络·物联网