findbetter.me

Just to find a better me

摘要: 1、init-method方法,初始化bean的时候执行,可以针对某个具体的bean进行配置。init-method需要在applicationContext.xml配置文档中bean的定义里头写明。例如:<bean id="TestBean" class="nju.software.xkxt.ut 阅读全文
posted @ 2019-09-15 16:45 FindBetterMe 阅读(5009) 评论(0) 推荐(0) 编辑
摘要: void afterPropertiesSet() throws Exception; 这个方法将在所有的属性被初始化后调用。 但是会在init前调用。 但是主要的是如果是延迟加载的话,则马上执行。 所以可以在类上加上注解: import org.springframework.context.an 阅读全文
posted @ 2019-09-15 16:44 FindBetterMe 阅读(1153) 评论(0) 推荐(0) 编辑