List of usage examples for org.springframework.validation DataBinder setIgnoreInvalidFields
public void setIgnoreInvalidFields(boolean ignoreInvalidFields)
From source file:com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.java
@Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (beanName.equals(this.beanName)) { DataBinder dataBinder = new DataBinder(bean); // TODO ignore invalid fields by annotation attribute dataBinder.setIgnoreInvalidFields(true); dataBinder.bind(propertyValues); if (log.isInfoEnabled()) { log.info("The properties of bean [name : " + beanName + "] have been binding by values : " + Arrays.asList(propertyValues.getPropertyValues())); }/* w ww. j a v a2s .c om*/ } return bean; }