2014年6月18日
摘要: 方法一:在初始化时保存ApplicationContext对象方法二:通过Spring提供的工具类获取ApplicationContext对象方法三:继承自抽象类ApplicationObjectSupport方法四:继承自抽象类WebApplicationObjectSupport方法五:实现接口 阅读全文
posted @ 2014-06-18 10:16 duanxz 阅读(31740) 评论(1) 推荐(1)
摘要: 一、Spring定义bean,@Component、@Repository、@Service 和 @Controller Spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository、@Service 和 @Controller。 阅读全文
posted @ 2014-06-18 09:38 duanxz 阅读(3224) 评论(0) 推荐(1)