Commit bc828e13 authored by soul's avatar soul

修复formatter初始化未传参bug

parent e8abc280
......@@ -115,7 +115,11 @@ class PageModelExtractor {
}
private ObjectFormatter getObjectFormatter(Field field, Class<?> fieldClazz, Formatter formatter) {
return initFormatter(ObjectFormatters.get(fieldClazz));
ObjectFormatter objectFormatter = initFormatter(ObjectFormatters.get(fieldClazz));
if(formatter != null && formatter.value() != null){
objectFormatter.initParam(formatter.value());
}
return objectFormatter;
}
private ObjectFormatter initFormatter(Class<? extends ObjectFormatter> formatterClazz) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment