解决办法:
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
因在Spring3.0中去掉了ContextLoaderServlet和Log4jConfigServlet,所以会出现找不到类的异常错误。
Spring3.0下可以采用另外两种启动方式:ContextLoaderListener和ContextLoaderPlugIn。建议使用ContextLoaderListener,具体实现就是在web.xml中添加:
<context-param><param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>