摘要: 可用来修改bean对象的BeanPostProcessor 11.1 简介 BeanPostProcessor是Spring中定义的一个接口,其与之前介绍的InitializingBean和DisposableBean接口类似,也是供Spring进行回调的。Spring将在初始化bean前后对Bea 阅读全文
posted @ 2018-07-21 11:47 沫小淘 阅读(524) 评论(0) 推荐(0) 编辑
摘要: 从Spring3.0,@Configuration用于定义配置类,可替换xml配置文件,被注解的类内部包含有一个或多个被@Bean注解的方法,这些方法将会被AnnotationConfigApplicationContext或AnnotationConfigWebApplicationContext 阅读全文
posted @ 2018-07-21 11:16 沫小淘 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 1、有时候需要从properties文件中加载配置,以前的方式是这样的: [html] view plain copy <bean id="jdbcProperties" class="org.springframework.beans.factory.config.PropertyPlacehol 阅读全文
posted @ 2018-07-21 10:37 沫小淘 阅读(938) 评论(0) 推荐(0) 编辑