java - Null value for private member even after spring wiring is correct -
java - Null value for private member even after spring wiring is correct -
consider next code:
public class machineusagenode{ private machineopjmxbean machineopjmxbean; @required public void setmachineopjmxbean(machineopjmxbean machineopjmxbean) { this.machineopjmxbean = machineopjmxbean; } } my spring wiring goes this:
<bean id="machineusagenode" class="com.mincom.works.cc.personnel.node.machineusagenode" scope="singleton" lazy-init="true" init-method="init"> <property name="machineopjmxbean" ref="machineopjmxbean"/> </bean> <bean id="machineopjmxbean" class="com.mincom.works.cc.personnel.node.machineopjmxbeanimpl"/> machineopjmxbean interface:
public interface machineopjmxbean { public void addoperator(person operator); } the problem when run code gives machineopjmxbean null. have not written total code. please sense free comment if have more questions.
java spring
Comments
Post a Comment