请问这是什么错误
来源:2-7 验证Dao
Shenla
2018-02-14
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: WebApplicationObjectSupport instance [ResourceHttpRequestHandler [locations=[class path resource [resources/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@19976a65]]] does not run in a WebApplicationContext but in: org.springframework.context.support.GenericApplicationContext@457e2f02: startup date [Wed Feb 14 17:13:46 CST 2018]; root of context hierarchy
二月 14, 2018 5:13:47 下午 org.springframework.test.context.TestContextManager prepareTestInstance
严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@3a03464] to prepare test instance [com.sel.o2o.dao.AreaDaoTest@4bc222e]
java.lang.IllegalStateException: Failed to load ApplicationContext
1回答
-
翔仔
2018-02-14
同学好,看错误感觉是1.xml文件配置错误导致spring容器启动不起来 2.测试的时候资源文件没有读进来,翔仔这些天在老家电脑不方便上网需要同学上网把错误贴出来查一下 按照上面可能的两点进行排查 祝同学新年快乐:)
012018-02-15
相似问题