Does anyone have experience creating a GenericDaoHibernate without using XML or subclassing and just using Spring annotations?
So I think I want to be able to do something like: private GenericDao<Person,Long> personDao; @Autowired setPersonDao(GenericDao<Person,Long> personDao){ this.personDao = personDao; } You can't just slap a @Repository annotation on GenericDaoHibernate since it doesn't know how to resolve the Class constructor argument. You need to be able to inject the Model class you want at runtime. I saw Matt's blog post about how he manually created the GenericDao. Is it recommended to do that in your Actions? in Prepare? Don't you want it to be a singleton? To be honest most "grown-up" applications I have rarely use the GenericDaoHibernate without subclassing, but my lack of understanding of Spring makes me wonder if its possible to do this with autowiring. -- View this message in context: http://www.nabble.com/Create-GenericDaoHibernate-with-no-XML-tp21119151s2369p21119151.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net