背景
Spring cloud 项目编写 单元测试时,报错如下:
you need to use @ContextConfiguration or @SpringBootTest(classes=...)
方法
spring cloud 项目编写单元测试需要指定 启动类。
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CrmServerApplication.class)
解决,you need to use @ContextConfiguration or @SpringBootTest(classes=...)
阅读 125
2023-05-14
Spring cloud 项目编写 单元测试时,报错如下:
you need to use @ContextConfiguration or @SpringBootTest(classes=...)
spring cloud 项目编写单元测试需要指定 启动类。
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CrmServerApplication.class)
相关推荐
精彩评论(0)