测试Application启动问题

来源:10-14 商品服务接口可用性测试

Koi777

2021-11-10

我得那个启动类测试如果我得@SpringBootTest后面没有指定GoodsApplication的话我报错跑不起来
提示:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test

我加了的话就能正常运行@SpringBootTest(class=GoodsAppilication.class)
这是为什么呢

写回答

1回答

张勤一

2021-11-10

这样的几句描述,没办法判断是哪里出现了问题

0
0

Spring Cloud / Alibaba 微服务架构实战

从架构设计到开发实践,手把手实现

1210 学习 · 674 问题

查看课程