Say you need to inject null value to a property. How would you do it? Let me guess.
<bean id="youclassid"class="yourclass">
<property name="distance" value="null" />
</bean>
Sorry to disappoint you. The above code will not work. The correct way is shown below.
<bean id="youclassid"class="yourclass">
<property name="distance" /><null/></property>
</bean>
<bean id="youclassid"class="yourclass">
<property name="distance" value="null" />
</bean>
Sorry to disappoint you. The above code will not work. The correct way is shown below.
<bean id="youclassid"class="yourclass">
<property name="distance" /><null/></property>
</bean>
No comments:
Post a Comment