Fork me on GitHub

Springboot进行junit测试报错Found multiple @SpringBootConfiguration annotated classes

可能由于微服务原因,找不到启动类(之前测试OK,后来随着微服务逐渐增加就报错了)

解决方法如下:加主启动类的类名.class

@SpringBootTest(classes = {主启动类.class})
posted @ 2020-08-27 15:39  亲爸爸  阅读(2686)  评论(0编辑  收藏  举报