Spring customEditor

CustomEditorConfigurer

java.beans.PropetyEditorSupport

 

omEditor 등록하기 [간단 ver.]

CustomCollectionEditor

 

 

 

  <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
  <property name="customEditors">
   <map>
    <entry key="int[]">
     <bean class="org.springframework.batch.support.IntArrayPropertyEditor" />
    </entry>
    <entry key="org.springframework.batch.item.file.transform.Range[]">
     <bean class="org.springframework.batch.item.file.transform.RangeArrayPropertyEditor" />
    </entry>
    <entry key="java.util.Date">
     <bean class="org.springframework.beans.propertyeditors.CustomDateEditor">
      <constructor-arg>
       <bean class="java.text.SimpleDateFormat">
        <constructor-arg value="yyyyMMdd" />
       </bean>
      </constructor-arg>
      <constructor-arg value="false" />
     </bean>
    </entry>
   </map>
  </property>
 </bean>