I would like to know how to copy the properties from an Object Source to an Object Dest ignoring null values using Spring Framework.
I actually use Apache beanutil
public static List getNullProperties(Object source) {
final BeanWrapper wrappedSource = new BeanWrapperImpl(source);
return Stream.of(wrappedSource.getPropertyDescriptors())
.map(FeatureDescriptor::getName)
.filter(propertyName -> Objects.isNull(wrappedSource.getPropertyValue(propertyName)))
.collect(Collectors.toList());