I have a spring mvc application that I have broken up into separate maven modules.
Now in my datalayer module, I seem to be stuck as I need to use HibernateDaoSupport.
Now I don’t need to use it, but that is what i have used in the past.
I have a genericDaoImpl that looks like:
public class GenericDaoImpl<T, K extends Serializable> extends HibernateDaoSupport
implements GenericDao<T, K> {
@Override
public T get(Class<T> type, K id) {
return super.getHibernateTemplate().get(type, id);
}
}
How can I do this now when my datalayer is in a seperate module that isn’t (and shouldn’t) be dependant on spring?
I dealt with the same situation by learning from:
HibernateDaoSupport is not recommended, why?
and Hibernate Generic DAO