Java – declare the date object within the prop tag in the application context

I'm trying to do the following:

<bean id="someBean" class="path.to.some.class">
  <property name="config">
    <prop key="startDate"> a java.sql Date object </prop>
  </property>
</bean>

How to instantiate a date object in the prop tag?

thank you

Solution

I don't know why you want a Java sql. Date instance – AFAIK is used for JDBC mapping If you use Java util. I suspect you are

Then the example here is useful to me

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>