InitializingBean 接口作用
来源:互联网 发布:php msgpack unpack 编辑:程序博客网 时间:2024/06/07 07:03
public interface InitializingBean {
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
* <p>This method allows the bean instance to perform initialization only
* possible when all bean properties have been set and to throw an
* exception in the event of misconfiguration.
* @throws Exception in the event of misconfiguration (such
* as failure to set an essential property) or if initialization fails.
*/
void afterPropertiesSet() throws Exception;
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
* <p>This method allows the bean instance to perform initialization only
* possible when all bean properties have been set and to throw an
* exception in the event of misconfiguration.
* @throws Exception in the event of misconfiguration (such
* as failure to set an essential property) or if initialization fails.
*/
void afterPropertiesSet() throws Exception;
}
实现此接口的类,在数据注入完成后,将执行afterPropertiesSet()方法,因此我们可以再这个方法中执行一些校验工作
- InitializingBean 接口作用
- InitializingBean接口的作用
- Spring InitializingBean接口的作用
- InitializingBean接口
- InitializingBean接口
- InitializingBean的作用
- Spring InitializingBean的作用
- Spring InitializingBean的作用
- Spring InitializingBean的作用
- Spring: InitializingBean的作用
- InitializingBean的作用
- InitializingBean的作用
- spring InitializingBean接口
- spring InitializingBean接口问题
- spring InitializingBean接口
- spring InitializingBean接口
- spring InitializingBean接口
- zt spring InitializingBean接口
- 基本算法实现小结(一)—— 单链表
- 卡尔曼滤波算法原理
- malloc_stats---检查内存泄露的神器
- 个性化推荐系统
- C语言指针数组和数组指针
- InitializingBean 接口作用
- yii session 的使用方法
- 总结:复合数据对象
- 二维码和相片在SQLite中的图片保存和查询
- Struts标签库详解 .
- java 排序 Collections
- 油条为什么必须要两根一起炸?科普知识普及
- 浅析PageRank算法
- C语言中单引号双引号