背景
Spring cloud 项目编写 单元测试时,报错如下:
you need to use @ContextConfiguration or @SpringBootTest(classes=...)
方法
spring cloud 项目编写单元测试需要指定 启动类。
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CrmServerApplication.class)
微信扫一扫
Spring cloud 项目编写 单元测试时,报错如下:
you need to use @ContextConfiguration or @SpringBootTest(classes=...)
spring cloud 项目编写单元测试需要指定 启动类。
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CrmServerApplication.class)
相关推荐