在 web.xml中进行配置一下就可以了;

解决方案 »

  1.   

    检查一下你的web.xml,需要声明一个listener
      

  2.   

    在web.xml的web-app标记内增加:
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
    </context-param>
    <servlet>
      <servlet-name>SpringContextServlet</servlet-name>
      <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>   
      <load-on-startup>1</load-on-startup>
    </servlet>