package com.xzx.gc.util; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.experimental.UtilityClass; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import java.util.HashSet; import java.util.Set; @UtilityClass public class BeanUtils { /** * @Description
获取到对象中属性不为空的属性名
* @param object 对象 * @return */ public String[] getNotNullPropertyNames(Object object) { final BeanWrapper src = new BeanWrapperImpl(object); java.beans.PropertyDescriptor[] pds = src.getPropertyDescriptors(); Set