Results 1 to 1 of 1
- 09-26-2007, 08:35 PM #1
How to set null value in Springs configuration file
This example shows the way to set the null value in the Spring configuration file.
Results in the name property being set to "", equivalent to the java code: sampleBean.setName("").Java Code:<bean class="SampleBean"> <property name="name"><value></value></property> </bean>
The special <null> element may be used to indicate a null value, so that:
The above configuration is equivalent to the java code:Java Code:<bean class="ExampleBean"> <property name="email"><null/></property> </bean>
Java Code:exampleBean.setEmail(null).
Similar Threads
-
How to set null value in Springs configuration file
By Java Tip in forum Java TipReplies: 0Last Post: 03-29-2008, 12:44 PM -
How to use XML-based configuration metadata shortcuts
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:38 PM -
How to use Collection in Springs
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:36 PM -
easy way to study the java springs concept
By kumar84 in forum New To JavaReplies: 1Last Post: 07-17-2007, 03:53 PM -
save configuration
By Peter in forum XMLReplies: 2Last Post: 07-04-2007, 07:40 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks