Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have a source class Entity having some params and a target class Dto class.
- Now, Entity class is having params of some other class but in dto class i'm using those params directly not using the other class referene in dto.
- Problem is : while doing BeanUtils.copyProperties(source,target) those properties having reference to other class doeesnot get copies to dto class.
- Public class Entity{
- private A a;
- private String add;
- }
- Public class A{
- private String name;
- }
- Dto class :
- public class Dto{
- private String add;
- private String name; // here instead of class A i directly took the param of class A as per requirement.
- }
- How can i do
- BeanUtils.copyProperties(Entity,Dto);
- So that all properties get copied.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement