Set default value for a field while populating POJO using Bean Utils
问题 I am trying to populate the fields of a POJO using BeanUtilsBean.populate(object, fieldNameVSfieldValueMap) method. My POJO looks like : class POJO{ Integer intField; Double doubleField String str; } Currently I have a HashMap that contains a map between the field name and field value. Now with the following code: POJO obj = new POJO(); Map<String,String> map = new HashMap<>(); map.put("intField", "1"); map.put("doubleField", "1.1"); BeanUtilsBean.populate(obj, map) With the above code in my