肥宅兜

导航

随笔分类 -  Spring

上一页 1 2

关于Spring中的<context:annotation-config/>配置(开启注解)
摘要:当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredAnnotationBeanPostProcessor的Bean: 使用 @Required注解,就必 阅读全文

posted @ 2016-07-18 15:48 肥宅兜 阅读(28784) 评论(1) 推荐(7)

SSH中设置字符编码防止乱码
摘要:1.在web.xml中加入一个过滤器和过滤范围的配置 <filter><filter-name>encoding</filter-name><filter-class>com.guet.cab.base.Filter.EncodingFilter</filter-class></filter><fi 阅读全文

posted @ 2016-07-14 13:16 肥宅兜 阅读(5160) 评论(0) 推荐(0)

SSH框架中配置log4j的方法
摘要:SSH框架中使用log4j的方便之处 1. 动态的改变记录级别和策略,即修改log4j.properties,不需要重启Web应用,这需要在web.xml中设置一下。2. 把log文件定在 /WEB-INF/logs/ 而不需要写绝对路径。3. 可以把log4j.properties和其他prope 阅读全文

posted @ 2016-07-14 13:14 肥宅兜 阅读(288) 评论(0) 推荐(0)

Spring声明式事务配置管理方法
摘要:环境配置 项目使用SSH架构,现在要添加Spring事务管理功能,针对当前环境,只需要添加Spring 2.0 AOP类库即可。添加方法: 点击项目右键->Build Path->Add librarys: 打开Add Libraries对话框,然后选定 MyEclipse Libraries: 点 阅读全文

posted @ 2016-07-14 13:12 肥宅兜 阅读(239) 评论(0) 推荐(0)

上一页 1 2