项目作者: markiewb

项目描述 :
Custom PropertyEditor for Spring which resolves beans by their name
高级语言: Java
项目地址: git://github.com/markiewb/springcustomeditorreferencingabean.git


springcustomeditorreferencingabean

A sample how to implement a custom propertyeditor for Spring 2.x which allows you to configure bean references with string literals.
The propertyeditor tries to resolve the referenced beans given by their id.

Example

  1. <bean id="foo" class="com.sample.Foo">
  2. <property name="list" value="barA,barB"></property>
  3. </bean>
  4. <bean id="barA" class="com.sample.Bar"></bean>
  5. <bean id="barB" class="com.sample.Bar"></bean>

Inspired by http://www.mkyong.com/spring/spring-how-to-pass-a-date-into-bean-property-customdateeditor/