1

I'm using spring 4.1 version in my project. I have a bean with data which i want to copy to another bean with some fields ignored. I tried to copy like this...

BeanUtils.copyProperties(product, ecmProduct, String productName);

Here productName is the field which i want to ignore while copying. But by giving Ctrl+Space i'm getting suggestion as BeanUtils.copyProperties(Object, Object). ie, i'm unable to pass the field which is to be ignored, which results in error.

Can anyone please help me to solve this issue. Many thanks in advance...

1 Answer 1

5

BeanUtils of Spring 4.1 supports the feature of ignoring fields during copying the properties. Take a look here for details of the method.

Just confirm that you are using correct BeanUtils from Spring dependency itself.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.