Spring中DaoSupport源码
来源:互联网 发布:广东继续教育网络平台 编辑:程序博客网 时间:2024/04/29 23:09
DaoSupport源码
package org.springframework.dao.support;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.springframework.beans.factory.BeanInitializationException;import org.springframework.beans.factory.InitializingBean;public abstract class DaoSupport implements InitializingBean { protected final Log logger = LogFactory.getLog(this.getClass()); public DaoSupport() { } public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException { this.checkDaoConfig(); try { this.initDao(); } catch (Exception var2) { throw new BeanInitializationException("Initialization of DAO failed", var2); } } protected abstract void checkDaoConfig() throws IllegalArgumentException; protected void initDao() throws Exception { }}
package org.springframework.beans.factory;/** * Interface to be implemented by beans that need to react once all their * properties have been set by a BeanFactory: for example, to perform custom * initialization, or merely to check that all mandatory properties have been set. * * <p>An alternative to implementing InitializingBean is specifying a custom * init-method, for example in an XML bean definition. * For a list of all bean lifecycle methods, see the BeanFactory javadocs. * * @author Rod Johnson * @see BeanNameAware * @see BeanFactoryAware * @see BeanFactory * @see org.springframework.beans.factory.support.RootBeanDefinition#getInitMethodName * @see org.springframework.context.ApplicationContextAware */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;}
0 0
- Spring中DaoSupport源码
- Spring DaoSupport class reference missing
- Spring中,在继承JdbcDaoSupport时,出现The type org.springframework.dao.support.DaoSupport cannot be resolved.
- Spring Chapter 4 jdbc/hibernate DaoSupport的使用攻略
- Spring的HibernateDaoSupport DaoSupport用HibernateTemplate,JdbcTemplate详解
- Spring的HibernateDaoSupport DaoSupport用HibernateTemplate,JdbcTemplate详解
- Spring的HibernateDaoSupport DaoSupport用HibernateTemplate,JdbcTemplate详解 .
- Spring中HandlerInterceptor源码
- Spring中ModelAndView源码
- Eclipse中导入spring源码
- Spring-boot中ApplicationRunner源码
- Spring中DispatcherServlet类源码
- spring中ApplicationListener源码分析
- Spring源码导入Eclipse中
- spring中BeanFactory源码解读
- eclipse中导入spring源码
- 自己动手写代码,整合Spring和Hibernate(三)之DAOSupport和DAOTemplate
- spring已经不再为hibernate4提供daoSupport,.hibernate4.SessionHolder cannot be cast to org.springfra
- unity中连接Xbox手柄设置及按键检测
- 牛B的java程序员博客
- tornado小功能API实现
- VS设置为多线程编译
- 找不到请求的 .Net Framework Data Provider。可能没有安装
- Spring中DaoSupport源码
- spark——pairRDD的简单操作(一)
- JavaScript创建对象的四种方式
- 配置本地yum源(http与镜像方式)
- svn 常用命令
- Changing the password on the RHEL 7 kvm qcow2 download (links updated 3/15/2016)
- Android 快速开发框架————————致力于让Android开发更简单
- eclipse maven打包ssm项目,漏掉mapper.xml文件解决方法
- Android 系列 1.13程序:一个简单的CountDownTimer示例