首页 > 编程语言 > 详细

Spring4 customEditors

时间:2016-06-17 20:53:42      阅读:197      评论:0      收藏:0      [点我收藏+]

Spring4.0版本以后customEditors属性为Map<Class<?>, Class<? extends PropertyEditor>>,所以用key(对应要编辑的属性类别,即要编辑类的全称,含包名)、value(该类对应的属性编辑器bean)在applicationcontext.xml中进行配置

<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
	<property name="customEditors">
		<map>
			<entry key="Chapter5.Car" value="Chapter5.CustomCarEditor">
			</entry>
		</map>
	</property>
</bean>

  

Spring4 customEditors

原文:http://www.cnblogs.com/SaraMoring/p/5594990.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!