How to initialize a Java Date object in Spring xml configuration file?

mr0no

New Member
Consider this simple example - \[code\]public class Person { private String name; private Date dateOfBirth; // getters and setters here... }\[/code\]In order to initialize Person as a Spring bean, I can write the following. \[code\]<bean id = "Michael" class = "com.sampleDomainName.Person"><property name = "name" value = "http://stackoverflow.com/questions/11198297/Michael" /></bean>\[/code\]But in the above bean definition, how can I set the dateOfBirth?For eg. I want to set the dateOfBirth as \[code\]1998-05-07\[/code\]
 
Back
Top