---
title: "copyProperties no value specified"
author: "linjiacheng"
date: "2009-04-24T09:53:06Z"
tags: []
slug: "copyproperties-no-value-specified"
draft: false
lastmod: "2009-04-24T09:53:06Z"
id: 373760
url: "https://linjiacheng.iteye.com/blog/373760"
---

BeanUtils.copyProperties 与 PropertyUtils.copyProperties 都是拷贝对象属性的方法.

 

BeanUtils 支持类型转换，而 PropertyUtils 不支持。但是 BeanUtils 不允许对象的属性值为 null，PropertyUtils 可以拷贝属性值 null 的对象。

 

如果对象属性值为 null，

BeanUtils.copyProperties 方法会报 **commons.beanutils.ConversionException: No value specified** 错误。