## springBoot整合Junt Failed to load ApplicationContext问题解决**
详细报错信息:java.lang.IllegalStateException: Failed to load ApplicationContext;
Caused by:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.tengxiang.pts.EpmsApplication]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/application.yml];
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/application.yml]
解决办法:
将上图中@SpringBootTest(classes = EpmsApplication.class) 改为
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = EpmsApplication.class)