spring文档,可以好好读读:
http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/validation.html#format-configuring-formatting-mvc
还有涛哥写的一些教程文章:
http://jinnianshilongnian.iteye.com/blog/1723270
这篇博客中介绍得也不错:(还有formatter/httpmessageconvert的介绍)
http://b-l-east.iteye.com/blog/1705872
另外上详注2点:
1、在spring MVC中,从前台绑定转换类型时调用的顺序:
CustomEditor(在PropertyEditorRegistry中手工注册)->可用的Converter->BeanWrapperImpl's default editors->standard JavaBean editor(以Editor结尾的同包类)
见类:org.springframework.beans.TypeConverterDelegate.convertIfNecessary(String, Object, Object, Class<T>, TypeDescriptor)
2、与1反向操作,即从后台向前台传递时的顺序:
CustomEditor(在PropertyEditorRegistry中手工注册)->BeanWrapperImpl's default editors->standard JavaBean editor(以Editor结尾的同包类)->可用的Converter