开发者

Declaring a Date object within the prop tag in application context

开发者 https://www.devze.com 2023-01-28 21:10 出处:网络
I am trying to do the following: <bean id=\"someBean\" class=\"path.to.some.class\"> <property name=开发者_开发问答\"config\">

I am 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 can I instantiate a Date object within the prop tag?

Thanks


I don't know why you would want to have an instance of java.sql.Date - afaik that is for JDBC mapping. If you are using java.util.Date (which I suspect you are).

Then the example here works for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号