Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest

Posted 树上的疯子^

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest相关的知识,希望对你有一定的参考价值。

需要在注解上加上

@SpringBootTest(classes = VisionApplicationTests.class)

或者使用
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = JPAConfig.class)
or

@RunWith(SpringRunner.class)
@ContextConfiguration(classes = JPAConfig.class)
or

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value="myJPAConfig.xml")
or

@RunWith(SpringRunner.class)
@ContextConfiguration(value="myJPAConfig.xml")

以上是关于Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest的主要内容,如果未能解决你的问题,请参考以下文章

Unable to find a @SpringBootConfiguration

Error: Unable to find a match: lrzsz的解决方法

windows下Python扩展问题error: Unable to find vcvarsall.bat

关于Unable to find vcvarsall.bat

Android:Unable to find explicit activity class

Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest