Injecting derived property for @Repository bean without @Autowired in super class?

Public class AutowiringSqlMapClientDaoSupport extends SqlMapClientDaoSupport { @Autowired injectSqlMapClient(SqlMapClient sqlMapClient) { setSqlMapClient(sqlMapClient); } } and then @Repository("userDao") public class UserDaoMybatis extends AutoringSqlMapClientDaoSupport implements UserDao { // ... } Yes, it's abuse of inheritance, but no worse than the existing SqlMapClientDaoSupport, and if you're desperate to avoid the injection hook in the DAO class itself, I can't think of a better way.

I also thought about having such a class (I have more than one DAO, so it definitely better than have this injectSqlMapClient in every DAO), but it looks ugly for me because I need to introduce new class which I really don't need - I remove one thing (bean definitions) but get another instead (new class). But anyway, thanks for your thoughts – Jozic Oct 1 '10 at 15:21.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions