当前使用版本(必填,否则不予处理)
mybatis-plus-boot-starter-test-3.5.0.jar
该问题是如何引起的?(确定最新版也有问题再提!!!)
1.项目中存在多数据源,执行官网的测试案例报错
重现步骤(如果有就写完整)
1.https://baomidou.com/pages/b7dae0/ 按照官网配置代码及依赖
2.执行测试案例,自动注入的mapper对象一直为null
报错信息
Fail to replace DataSource with an embedded database for tests. If you want an enbedded database please put a supported on on the class path or tune the replace attribute of @AutoConfigreTestDataBase
Comment From: GGFocus
已解决,添加@ImportAutoConfiguration(value = {***DataSourceConfig.class}, exclude = DataSourceAutoConfiguration.class )