java.lang.IllegalStateException: Failed to load ApplicationContext

学习仿牛客网社区开发项目

问题

java.lang.IllegalStateException: Failed to load ApplicationContext

	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123)
	at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
	at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)

分析

无法装载 ApplicationContext 容器,第一反应路径写错了,查看user-mapper.xml,这里已经改过来了
java.lang.IllegalStateException: Failed to load ApplicationContext_第1张图片

解决

还是不对的话,看看application.properties文件的路径对不对

java.lang.IllegalStateException: Failed to load ApplicationContext_第2张图片
我就错在这,改了就行了

你可能感兴趣的:(报错,#,java,java,spring,jvm)