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

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -