摘要:当我们需要使用BeanPostProcessor时,直接在Spring配置文件中定义这些Bean显得比较笨拙,例如: 使用@Autowired注解,必须事先在Spring容器中声明AutowiredAnnotationBeanPostProcessor的Bean: 使用 @Required注解,就必
阅读全文
摘要:1.在web.xml中加入一个过滤器和过滤范围的配置 <filter><filter-name>encoding</filter-name><filter-class>com.guet.cab.base.Filter.EncodingFilter</filter-class></filter><fi
阅读全文
摘要:SSH框架中使用log4j的方便之处 1. 动态的改变记录级别和策略,即修改log4j.properties,不需要重启Web应用,这需要在web.xml中设置一下。2. 把log文件定在 /WEB-INF/logs/ 而不需要写绝对路径。3. 可以把log4j.properties和其他prope
阅读全文
摘要:环境配置 项目使用SSH架构,现在要添加Spring事务管理功能,针对当前环境,只需要添加Spring 2.0 AOP类库即可。添加方法: 点击项目右键->Build Path->Add librarys: 打开Add Libraries对话框,然后选定 MyEclipse Libraries: 点
阅读全文