1.jdbc
@Repository("jdbcFeeDAO")
@Scope("prototype")
public class JdbcFeeDAO extends JdbcDaoSupport implements FeeDAO {
//注入dataSource
@Resource
public void setMyDataSource(DataSource ds){
super.setDataSource(ds);
}
............................
}
2.hibernate
@Repository("hibernateFeeDAO")
@Scope("prototype")
public class HibernateFeeDAO extends HibernateDaoSupport implements FeeDAO{
//注入sessionFactory
@Resource
public void setMySessionFactory(SessionFactory sf){
super.setSessionFactory(sf);
}