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

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

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -