Spring mvc 自定义时间转换器
<!-- 自定义转换器 --> <bean id="conversionService" class="org.springframework.format.support.DefaultFormattingConversionService"> <property name="converters"> <list> <bean class="org.converter.DateConverter"></bean> </list> </property> </bean> <!-- 注册转化器 --> <mvc:annotation-driven conversion-service="conversionService" /> 注意:class 也可以为: org.springframework.context.support.ConversionServiceFactoryBean package org.converter; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.springframework.core.convert