当前位置:网站首页>Druid 集成 ShardingSphere 出现 xxMapper.xml 报错的原因与解决方案
Druid 集成 ShardingSphere 出现 xxMapper.xml 报错的原因与解决方案
2022-07-21 15:21:00 【Roc.Chang】
项目环境:
druid: 1.1.21
sharding-jdbc:4.1.0
一般是不会报错的,之所以出现这样的原因是依赖出现了冲突
,导致找不到 xxMapper.xml
文件。出现报错时引入的依赖为:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.21</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.1.0</version>
</dependency>
druid-spring-boot-starter
与 sharding-jdbc-spring-boot-starter
会产生冲突,如果想要用 sharding-jdbc-spring-boot-starter
的话,这里的 druid
就不能使用 starter
版本的,必须使用完整版本的,修改后如下:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.21</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.1.0</version>
</dependency>
这样就可以正常的运行项目了。
个人博客:Roc’s Blog
边栏推荐
- ZBar源码分析——img_scanner.c | [email protected]
- 观察者模式与发布/订阅模式
- Recursive implementation of Hanoi Tower problem
- 资金紧张,长电科技1.2亿美元出售星科金朋部分资产!
- Splay completion plan
- [caused by: com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: SQL statement parameters are different from methods]
- 如何在页面中添加地图
- Observer mode and publish / subscribe mode
- Educational Codeforces Round 100 (Rated for Div. 2) B. Find The Array 题解
- Assembler Instructions with C Expression Operands
猜你喜欢
随机推荐
Educational Codeforces Round 100 (Rated for Div. 2) B. Find The Array 题解
Matlab写入excel-字符串与数字合并
Matlab GUI programming skills (VII): matlablistbox operation - common operations of listbox and uilistbox
Foundation of Mathematics: Lagrangian optimization and duality
ECCV 2022 | 修正FPN带来的大目标性能损害:You Should Look at All Objects
sprintf(pointer + offset, “format“, value)形式的含义
Recursive implementation of Hanoi Tower problem
VLOOKUP函数
Matlab GUI编程技巧(十一):axes/geoaxes/polaraxes绘图创建 GUI 坐标区
[in writing entity classes, why should int use integer type instead of int]
Love running every day [noip2016 T4]
魅族大换血:阿里退出?珠海国资委入局,黄章交出控股权!李楠从主要人员中移除!
Strategy mode
自定义view之----自定义button
如何在页面中添加地图
零碎知识——业务
请问开户对年龄有限制么?请问,手机开户股票开户安全吗?
ps小白從0開始……
Rewriting and overloading
敬伟PS教程:基础篇A