啓動服務器時出現異常:
Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
原因兩個:
1.lib中多導入包的大原因:去掉struts2-spring-plugin-2.1.8包即可,因爲沒有用到spring。
2.還有的原因是用spring了,卻沒加監聽器,在web.xml裏面加上
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>