【YashanDB 知识库】Mybatis-Plus 适配崖山配置
本文内容来自 YashanDB 官网,原文内容请见 https://www.yashandb.com/newsinfo/7281300.html?templateId=1718516
问题:
较早版本 mybatis-plus 识别数据库类型是通过 jdbc url 识别的,访问崖山数据库就会出现报数据库类型不支持的错误:java.lang.IllegalStateException: dbType not support : null, url jdbc:jdbc:yasdb://192.168.0.1:1688/yashandb
解决办法:
增加数据类型配置
1、application.yml 格式配置文件‘#mybatis-plus 全局数据库类型配置
mybatis-plus:
global-config:
复制代码
’#增加分页插件 pagehelper 的数据库模式配置
pagehelper:
helperDialect: oracle
2、application.properties 格式配置文件
‘#mybatis-plus 全局数据库类型配置
mybatis-plus.global-config.db-config.db-type=oracle
’#增加分页插件 pagehelper 的数据库模式配置
pagehelper.helperDialect=oracle
版权声明: 本文为 InfoQ 作者【YashanDB】的原创文章。
原文链接:【http://xie.infoq.cn/article/9b3be644e6759e5af0b68fc8d】。文章转载请联系作者。
评论