Categories
Mastering Development

List mapping of two different beans using MapStruct

How can I do the bean mapping using MapStruct for the below scenario. The entitlements property in both the classes is another bean with their own enum values. @Mappings({ @Mapping(target = "email", source = "entity.email"), @Mapping(target = "displayName", source = "entity.displayName"), @Mapping(target = "entitlements", source = "entity.entitlements") }) UserRequest userBeanToUserRequest(UserBean entity); class UserRequest { private […]