<filter>
<filter-name>Spring character encoding filter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Spring character encoding filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Spring 控制字符 和 控制session 的两个接口
最新推荐文章于 2025-05-21 15:52:31 发布
本文介绍如何配置Spring框架中的字符编码过滤器以指定GBK编码,并设置Hibernate的OpenSessionInView过滤器来管理持久化会话,确保事务一致性。
5万+

被折叠的 条评论
为什么被折叠?



