使用了注解JSONField, 指定了format=""
com.alibaba.fastjson.serializer.FieldSerializer
public Object getPropertyValue(Object object) throws InvocationTargetException, IllegalAccessException {
Object propertyValue = fieldInfo.get(object);
if (format != null && propertyValue != null) {
//line 155 未对 java 8 date进行支持
if (fieldInfo.fieldClass == java.util.Date.class || fieldInfo.fieldClass == java.sql.Date.class) {
SimpleDateFormat dateFormat = new SimpleDateFormat(format, JSON.defaultLocale);
dateFormat.setTimeZone(JSON.defaultTimeZone);
return dateFormat.format(propertyValue);
}
}
return propertyValue;
}