spring 几个很实用功能 介绍
来源:互联网 发布:java 哈希与map 编辑:程序博客网 时间:2024/06/03 16:54
首先说明这些都是在WEB.xml里面配置的
1. 用来做编码过滤 java代码和jsp代码编码存在不同,乱码问题都可以通过这个得到解决俄!
<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>UTF-8</param-value>
</init-param>
2. 这个配置是用来指定spring配置文件所在的位置的
<context-param>
<description>spring init </description>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/bean.xml</param-value>
</context-param>
3.这个是用来对spring容器进行初始化,做为监听器的
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
4.这是Spring封装hibernate后提供的一个过滤器,这个过滤器的作用是:每一次请求来的时候都打开一个session每次请求结束后关闭session,解析hibernat延迟加载产生的异常。
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
- spring 几个很实用功能 介绍
- Junit几个实用功能
- Spring实用功能--Profile、WebService、缓存、消息、ORM
- Spring AOP其他几个注解介绍
- PowerDesigner实用功能介绍1—设置视图显示列
- pycharm 使用心得(七)一些实用功能介绍
- HTML实用功能
- printk实用功能
- iphone 实用功能
- awk实用功能
- awk实用功能
- awk实用功能
- xcode实用功能
- pycharm实用功能
- webstorm实用功能
- 介绍几个曲线图
- STL -几个容器介绍
- 介绍几个搜索引擎
- android开源项目
- Thread-Specific Storage 模式
- 常用命令linux下vi编辑器命令大全
- mysql命令收集
- 共享内存API函数 shmat() shmdt() shmctl()
- spring 几个很实用功能 介绍
- 通过 dbms_job.submit 定时调用存储过程
- oracle函数大全
- PHP 连接MySQL 的单态类
- 操作系统试验七——模拟虚拟存储管理(上)
- hibernate3中出现 could not initialize proxy - no Session 错误的解决办法以及lazy load的介绍
- Linux操作系统下C++编程初探
- C++中的空类,默认产生哪些类成员函数? 转
- onNewIntent调用时机