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>
相关推荐
霸道流氓气质30 分钟前
SpringBoot中调用mybatis方法提示映射文件未找到Invalid bound statement(not found)的奇葩解决
spring boot·后端·mybatis
半条-咸鱼1 小时前
基于安卓的 WAV 音频采集方案_含工具
android·音视频
一只大袋鼠1 小时前
MyBatis 从入门到实战(二):代理 Dao 开发与多表关联查询
java·开发语言·数据库·mysql·mybatis
九皇叔叔1 小时前
MySQL8.0 版本安装部署
android·adb
OneLIMS2 小时前
OneLIMS 安卓 APK 一键打包说明文档
android
阿亮爱学代码5 小时前
初识Android界面布局
android·xml·view·viewgroup
tycooncool5 小时前
Spring Boot中集成MyBatis操作数据库详细教程
数据库·spring boot·mybatis
zopple5 小时前
Laravel 9.x核心特性全解析
android
黑牛儿5 小时前
PHP 8.3性能暴涨实测|对比8.2,接口响应提速30%,配置无需大幅修改
android·开发语言·后端·php
被开发耽误的大厨6 小时前
2、基本类型和引用类型的执行存储流程是怎样的?
android·哈希算法