java.lang.IllegalStateException Unable to find a @SpringBootConfiguration error Solution

问题描述:
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test

Screenshot question:

 

 


The reason:
During unit testing I'm too lazy, just built a test package to be tested, resulting in the problem
solution:
the package with the same name was changed to the other branch path. On it!
As shown below:

 

 

And then perform to be all right, pro-test effective !!
----------------
Disclaimer: This article is the original article CSDN bloggers "Chen beans", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq_28643817/article/details/88063251

Guess you like

Origin www.cnblogs.com/xing-nb/p/12147304.html