PhantomThief / model-view-builder

Other
93 stars 16 forks source link

mode对view支持1对多就更好了 #1

Closed hai046 closed 8 years ago

hai046 commented 8 years ago

mode对view支持1对多就更好了 搞起来,天船老师。😄😄😄😄

hai046 commented 8 years ago

感觉重写这个太多了,后来我就重写了MappingJackson2HttpMessageConverter 设置不同的ObjectMapper,其中有一个过滤自定义Annotation的method

simpleViewtMapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector() {

            @Override
            protected boolean _isIgnorable(Annotated a) {
                if (a.hasAnnotation(SimpleField.class)) {
                    return true;
                }
                return super._isIgnorable(a);
            }
        });
PhantomThief commented 8 years ago

model->view的映射现在想想是做了多余的事情,这块也没做太好的规划和实现。回头想以Function<T,R>的工场方法形式重新实现下。