How to use BeanUtils.copyProperties?

前端 未结 3 1644
臣服心动
臣服心动 2020-12-24 08:14

I am trying to copy properties from one bean to another. Here are the signature of two beans:

SearchContent:

public cla         


        
3条回答
  •  一生所求
    2020-12-24 08:40

    There are two BeanUtils.copyProperties(parameter1, parameter2) in Java.

    One is

    org.apache.commons.beanutils.BeanUtils.copyProperties(Object dest, Object orig)

    Another is

    org.springframework.beans.BeanUtils.copyProperties(Object source, Object target)

    Pay attention to the opposite position of parameters.

提交回复
热议问题