
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
主要问题没有找到对应的启动类
配置附加到应用程序类
@RunWith(SpringRunner.class)
@SpringBootTest(classes= AdminApplication.class) //指定对应的启动类就可以了
public abstract class BaseTest {
protected final Logger logger= LoggerFactory.getLogger(this.getClass());
}
就可以解决
487



被折叠的 条评论
为什么被折叠?



