继承daoSupport中覆盖initDao方法不执行
我的BaseHibernateDao通用类继承了HibernateDaoSupport,重写了initDao方法,但是测试过后发现,initDao方法不执行,请问,我哪里做错了?
public abstract class BaseHibernateDao<M extends Serializable, PK extends Serializable> extends HibernateDaoSupport implements IBaseDao<M, PK> {
@SuppressWarnings("unchecked")
@Override
protected void initDao() throws Exception {
// TODO Auto-generated method stub
System.out.println("init success!");
}
}