2016年3月25日
摘要: 关于在spring 容器初始化 bean 和销毁前所做的操作定义方式有三种: 第一种:通过@PostConstruct 和 @PreDestroy 方法 实现初始化和销毁bean之前进行的操作 第二种是:通过 在xml中定义init-method 和 destory-method方法 第三种是: 通 阅读全文
posted @ 2016-03-25 17:33 崔宏伟 阅读(572) 评论(0) 推荐(0) 编辑
摘要: web.xml中webAppRootKey 1、 web.xml配置 <context-param><param-name>webAppRootKey</param-name><param-value>webapp.root</param-value></context-param>"webapp. 阅读全文
posted @ 2016-03-25 15:18 崔宏伟 阅读(239) 评论(0) 推荐(0) 编辑
摘要: ContextLoaderListener的作用就是启动Web容器时,自动装配ApplicationContext的配置信息。因为它实现了ServletContextListener这个接口,在web.xml配置这个监听器,启动容器时,就会默认执行它实现的方法。至于ApplicationContex 阅读全文
posted @ 2016-03-25 15:03 崔宏伟 阅读(148) 评论(0) 推荐(0) 编辑