BeanUtils工具包下载及应用
?
?BeanUtils工具包下载及应用
?
?
?
Sun公司的内省API过于繁琐,所以Apache组织结合很多实际开发中的应用场景开发了一套简单、易用的API操作Bean的属性——BeanUtils,在Beanutil中可以直接进行类型的自动转换。
?
BeanUtil工具包下载:
??1,登录http://commons.apache.org/beanutils/
??2,??点击Download
??3,?点击Commons?BeanUtils?1.8.3-bin.tar.gz进行下载就OK了
使用BeanUtil
在项目中导入commons-beanutils-1.8.3.jar包即可
BeanUtil的应用
????Beanutils工具包的常用类:
?????????1,BeanUtils
?????????2,PropertyUtils
?????????3,ConvertUtils.regsiter(Converter?convert,?Class?clazz)
?????????4,自定义转换器
???在这里我举了几个不同的实例:
??
??
?
?
?
????BeanUtils工具包下载:下载附件。????
??
??
<!--EndFragment-->