Why do I need a setter for autowired / injected field?
问题 I have a bean: <bean id="BasketLogic" class="efco.logic.EfcoBasketLogic" autowire="byType"> <property name="documentLogic" ref="DocumentLogic" /> <property name="stateAccess" ref="StateAccess" /> <property name="contextAccess" ref="ContextAccess" /> </bean> <bean id="EfcoErpService" autowire="byType" class="efco.erp.service.EfcoErpServiceImpl"> <constructor-arg ref="ErpConnector"/> </bean> documentLogic , stateAccess and contextAccess are fields on BasketLogicImpl And I do not have <context