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)