OpenSessionInView

xiaoxiao2022-06-12  36

<!--web.xml处加入--> <!-- OpenSessionmInView过滤器 --> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter </filter-class> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <!-- 装载spring上下文 --> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/classes/applicationContext.xml </param-value> </context-param> SSH整合时,struts-config忽加入 <!-- Spring上下文插件 --> <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property value="/WEB-INF/classes/applicationContext.xml,/WEB-INF/classes/action-servlet.xml" property="contextConfigLocation" /> </plug-in>
转载请注明原文地址: https://www.6miu.com/read-4933132.html

最新回复(0)