问题:java.lang.IllegalStateException: Failed to load ApplicationContext
看Caused by后面的内容:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.boot.test.context.ImportsContextCustomizer$ImportsConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [com/example/demo2/TestSelect.class] cannot be opened because it does not exist
主要是没有找到.class文件
class path resource [com/example/demo2/TestSelect.class] cannot be opened because it does not exist
解决方法
重新构建项目,在此测试就发现好啦!