baomidou Mabatis plus引入异常

1

主要异常信息 Error creating bean with name 'dataSource'

但是有个重要提示

dynamic-datasource Please check the setting of primary

解决方法:

复制代码
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
    <version>4.3.1</version>
</dependency>

2

java.lang.NullPointerException: Cannot invoke "com.tencent.wxcloudrun.dao.UserMapper.selectList(com.baomidou.mybatisplus.core.conditions.Wrapper)" because "this.userMapper" is null

如果你在单元测试中遇到这个错误,确保在测试类上使用了正确的注解来模拟Spring容器,如@RunWith(SpringRunner.class)和@SpringBootTest。

3

java.util.LinkedHashSet org.springframework.util.CollectionUtils.newLinkedHashSet(int)

相关推荐
xcl092543 分钟前
北京24小时自助健身房系统软件开发实战:从架构到部署全流程指南
java·spring boot·架构
一 乐2 小时前
动漫书销售商城|基于springboot + vue动漫书销售商城(源码+数据库+文档)
java·数据库·vue.js·spring boot·毕业设计
卓怡学长3 小时前
w214基于jsp知道特产网
java·intellij-idea
步行cgn3 小时前
Spring 注解使用详解
java·spring
一条小小yu3 小时前
Spring IoC的理解
java·后端·spring
落魄实习生3 小时前
Agent Scope Java 2.x 系列【7】工具使用
java·开发语言·ai
旺仔学长 哈哈4 小时前
springboot钓鱼爱好者交流平台APP设计与实现
java·spring boot·mysql·充电桩管理系统
茉莉玫瑰花茶4 小时前
GO [ 方法 ]
开发语言·后端·golang
狗凯之家源码网4 小时前
微博图床 PHP 系统搭建与实战应用指南
android·开发语言·php
钝挫力PROGRAMER5 小时前
开发踩坑记:MyBatis selectKey、空 SQL
数据库·sql·mybatis