Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-runtime
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
model-driver
gjjs-bd-runtime
Commits
f092fd87
Commit
f092fd87
authored
Jan 17, 2023
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉AbstractModule Modules ModuleList中的@JsonFilter("fieldFilter")
parent
6319f3ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
AbstractModule.java
...a/com/brilliance/mda/runtime/mda/impl/AbstractModule.java
+1
-1
ModuleList.java
.../java/com/brilliance/mda/runtime/mda/impl/ModuleList.java
+1
-1
Modules.java
...ain/java/com/brilliance/mda/runtime/mda/util/Modules.java
+6
-6
No files found.
src/main/java/com/brilliance/mda/runtime/mda/impl/AbstractModule.java
View file @
f092fd87
...
...
@@ -17,7 +17,7 @@ import java.lang.reflect.Field;
import
java.lang.reflect.Method
;
import
java.util.*
;
@JsonFilter
(
"fieldFilter"
)
//
@JsonFilter("fieldFilter")
@Module
public
abstract
class
AbstractModule
implements
IModule
,
IModuleRoot
{
...
...
src/main/java/com/brilliance/mda/runtime/mda/impl/ModuleList.java
View file @
f092fd87
...
...
@@ -13,7 +13,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.Map
;
@JsonFilter
(
"fieldFilter"
)
//
@JsonFilter("fieldFilter")
public
class
ModuleList
<
T
extends
IModule
>
extends
ArrayList
<
T
>
implements
IModuleList
<
T
>
{
/**
*
...
...
src/main/java/com/brilliance/mda/runtime/mda/util/Modules.java
View file @
f092fd87
...
...
@@ -63,11 +63,11 @@ public class Modules {
public
static
ObjectMapper
getObjectMapper
()
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
SimpleFilterProvider
filterProvider
=
new
SimpleFilterProvider
();
// 在存盘的时候,不需要过滤字段,故 serializeAllExcept 不传参数
SimpleBeanPropertyFilter
fieldFilter
=
SimpleBeanPropertyFilter
.
serializeAllExcept
();
filterProvider
.
addFilter
(
"fieldFilter"
,
fieldFilter
);
objectMapper
.
setFilterProvider
(
filterProvider
);
//
SimpleFilterProvider filterProvider = new SimpleFilterProvider();
//
// 在存盘的时候,不需要过滤字段,故 serializeAllExcept 不传参数
//
SimpleBeanPropertyFilter fieldFilter = SimpleBeanPropertyFilter.serializeAllExcept();
//
filterProvider.addFilter("fieldFilter", fieldFilter);
//
objectMapper.setFilterProvider(filterProvider);
return
objectMapper
;
}
...
...
@@ -77,7 +77,7 @@ public class Modules {
String
dataString
=
mapper
.
writeValueAsString
(
moduleOrList
);
return
dataString
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment