Commit ac94c103 by s_guodong

去掉fieldFilter

parent 7ea45f15
...@@ -4,8 +4,6 @@ import com.fasterxml.jackson.databind.DeserializationFeature; ...@@ -4,8 +4,6 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
...@@ -36,11 +34,6 @@ public class JsonConfig { ...@@ -36,11 +34,6 @@ public class JsonConfig {
// 日期格式处理 // 日期格式处理
// objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); // objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
SimpleFilterProvider filterProvider = new SimpleFilterProvider();
SimpleBeanPropertyFilter fieldFilter = SimpleBeanPropertyFilter.serializeAllExcept("attrMaps", "pageSize", "page");
filterProvider.addFilter("fieldFilter", fieldFilter);
objectMapper.setFilterProvider(filterProvider);
return objectMapper; return objectMapper;
} }
......
package com.brilliance.mda.runtime.mda; package com.brilliance.mda.runtime.mda;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -36,6 +38,7 @@ public interface IModule extends IBaseObject { ...@@ -36,6 +38,7 @@ public interface IModule extends IBaseObject {
; ;
@JsonIgnore
default String getTableName() { default String getTableName() {
return null; return null;
} }
...@@ -44,8 +47,10 @@ public interface IModule extends IBaseObject { ...@@ -44,8 +47,10 @@ public interface IModule extends IBaseObject {
void assignSerialNum(); void assignSerialNum();
@JsonIgnore
String getSerialNum(); String getSerialNum();
@JsonIgnore
Map<String, Object> getAttrMaps(); Map<String, Object> getAttrMaps();
void setPageSize(int paramInt); void setPageSize(int paramInt);
...@@ -54,8 +59,10 @@ public interface IModule extends IBaseObject { ...@@ -54,8 +59,10 @@ public interface IModule extends IBaseObject {
void setPage(int paramInt); void setPage(int paramInt);
@JsonIgnore
int getPageSize(); int getPageSize();
@JsonIgnore
int getPage(); int getPage();
int getRealIndex(int paramInt); int getRealIndex(int paramInt);
......
...@@ -7,7 +7,6 @@ import com.brilliance.mda.runtime.mda.IModule; ...@@ -7,7 +7,6 @@ import com.brilliance.mda.runtime.mda.IModule;
import com.brilliance.mda.runtime.mda.IModuleRoot; import com.brilliance.mda.runtime.mda.IModuleRoot;
import com.brilliance.mda.runtime.mda.driver.MdaDriver; import com.brilliance.mda.runtime.mda.driver.MdaDriver;
import com.brilliance.mda.runtime.mda.util.MdaUtils; import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -17,7 +16,7 @@ import java.lang.reflect.Field; ...@@ -17,7 +16,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.*; import java.util.*;
@JsonFilter("fieldFilter")
@Module @Module
public abstract class AbstractModule implements IModule, IModuleRoot { public abstract class AbstractModule implements IModule, IModuleRoot {
......
...@@ -5,7 +5,6 @@ import com.brilliance.mda.runtime.mda.IDatafield; ...@@ -5,7 +5,6 @@ import com.brilliance.mda.runtime.mda.IDatafield;
import com.brilliance.mda.runtime.mda.IModule; import com.brilliance.mda.runtime.mda.IModule;
import com.brilliance.mda.runtime.mda.IModuleList; import com.brilliance.mda.runtime.mda.IModuleList;
import com.brilliance.mda.runtime.mda.driver.MdaEnv; import com.brilliance.mda.runtime.mda.driver.MdaEnv;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import oracle.sql.TIMESTAMP; import oracle.sql.TIMESTAMP;
...@@ -14,7 +13,7 @@ import java.util.ArrayList; ...@@ -14,7 +13,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@JsonFilter("fieldFilter")
public class ModuleList<T extends IModule> extends ArrayList<T> implements IModuleList<T> { public class ModuleList<T extends IModule> extends ArrayList<T> implements IModuleList<T> {
/** /**
* *
......
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