关于Spring中的property editor及converter的一些资料
2013-06-18 14:04
375 查看
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
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
相关文章推荐
- 一些关于spring modelAndView的资料
- 关于SpringMvc + JaspersoftIReport 工具的一些资料
- 关于spring+springMVC+myBatis的一些基础配置以及整合
- 俺网站Android及Ophone开发,全系列上手资料,关于环境搭建遇见的一些问题,包1天能上手。
- Springmvc PropertyEditor实现绑定时的类型转换
- 关于spring+springMVC+myBatis的一些基础配置以及整合
- 一些关于AngularJS和ReactJS的资料
- 关于AD编程的一些资料 zz
- 关于PHPExcel的一些资料
- 关于哈希表的一些资料
- LINQ to SQL关于TTD一些资料
- 关于Spring整合发现的一些问题。
- 关于spring 的一些常见中手动获取bean 的 操作
- RangeArrayPropertyEditor for Spring batch
- 有关于JSON的一些资料
- 关于一些UI的property应该使用retain、strong还是weak的问题
- Spring 中关于资料上传与 MultipartResolver
- 关于hold-out data的一些资料
- springboot关于application的一些配置
- 关于CUDA的一些学习资料