Is it possible to annotate an inherited end property with @Autowire?

Resolution: None. I no longer extend the original parent.

Original:
Is there a way to annotate the inherited set method final? I am extending a class that has a set finalthat I would like @Autowirewith Spring. The parent class is from the library and cannot be changed.

The workaround I found is to write a proxy method, but this seems like more work than necessary.

public abstract class SqlMapClientDaoSupport ... {
    public final void setSqlMapClient(SqlMapClient smc) {
        ...
    }
}

@Component
public class AccountDao extends SqlMapClientDaoSupport {
    // all this just to annotate an existing method?
    @Autowire
    public final void setSqlMapClientWorkaround(SqlMapClient smc) {
        super.setSqlMapClient(smc);
    }
}

1:. , :
DAO Ibatis/Spring . DAO , bean. , applicationContext.xml.

<bean id="accountDAO" 
  class="com.example.proj.dao.h2.AccountDAOImpl"
  p:sqlMapClient-ref="sqlMapClient" />
<bean id="companyDAO" 
  class="com.example.proj.dao.h2.CompanyDAOImpl"
  p:sqlMapClient-ref="sqlMapClient" />
<!-- etc... -->

DAO , / botch.

<context:component-scan base-package="com.example.proj.dao.h2" />

, /, . , - .

2: SqlMapClientDaoSupport, AccountDao - POJO, , . @Autowire .

+5
4

, .

(SqlMapClientDaoSupport) ( ), , DAO .

0

xml? , , , xml. autowire " xml.

+2

, .

, .

SqlMapClientFactoryBean?

0

@Autowired , .

0

All Articles