3
를 autowiring에 나는 동적으로 다음 코드를 사용하여 응용 프로그램 컨텍스트에 컨텍스트를 추가하고있다. 그러나 @Autowired는 이러한 새로운 bean에 대해 작동하지 않습니다. 빈 같이 새로운 문맥에서 정의 예컨대동적 컨텍스트
:
public class ContractMapper implements RowMapper<ContractFile> {
@Autowired
IIntegrationDao integrationDao;
@Override
public ContractFile mapRow(ResultSet rs, int rowNum) throws SQLException {
......
}
}
런타임시 outboundContractJdbcFileMapper 속성 integrationDao가 null :
<bean id="outboundContractJdbcFileMapper" class="com.......integration.model.contract.ContractMapper"/>
는 다음에서 autowiring있다.
빈이 만들어 질 때 autowiring을 강제로 수행하는 방법이 있습니까? ctx.refresh()가이 작업을 수행하기를 바랬습니다.
위대한 작품입니다. 감사! – alan