使用SpringBoot整合MybatisPlus出现 : java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

解决方案一:

将测试类的包路径改为和主启动类的一致

解决方法二:

不想改测试类的路径

就在测试类上添加要测试的类的classes

posted @ 2022-01-12 19:35  我也有梦想呀  阅读(122)  评论(0)    收藏  举报