struts关于spring的奇怪问题
在web的lib下,加了struts2-spring-plugin-2.0.6。jar包文件,我只用struts,没有配置与spring有关的任何内容,结果显示错误信息:
FATAL [org.apache.struts2.spring.StrutsSpringObjectFactory:74] ********** FATAL ERROR STARTING UP SPRING-STRUTS INTEGRATION **********
Looks like the Spring listener was not configured for your web app!
Nothing will work until WebApplicationContextUtils returns a valid ApplicationContext.
You might need to add the following to web.xml:
严重: Exception starting filter struts2
java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:188)
把struts2-spring-plugin-2.0.6.jar从lib中删除一切都正常,说明只要有这个包,则必须配置spring监听。
欢迎转载,请注明出处:亲亲宝宝