配置属性编辑器:
在springmvc.xml中配置: <!-- 注解驱动 -->
<mvc:annotation-driven conversion-service="conversionService"> </mvc:annotation-driven> <!-- 自定义注册属性编辑器 -->
<bean id="conversionService"
class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
<property name="converters">
<list>
<bean class="yycg.base.action.converters.StringTrimConverter" />
<bean class="yycg.base.action.converters.DateConverter" />
<bean class="yycg.base.action.converters.DatetimeConverter" />
</list>
</property>
</bean>
05-11 22:17
查看更多