-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Parse strategy | ||
## Data mapping | ||
[Learn more](../getstarted/dataMapping.md) | ||
|
||
## How to ignore the field | ||
Way 1: Use one of the following 2 annotations. | ||
|
||
``` | ||
com.fasterxml.jackson.annotation.JsonIgnore | ||
com.alibaba.fastjson.annotation.JSONField(serialize = false) | ||
``` | ||
|
||
Way 2: Add the `static` modifier to the field. | ||
|
||
Way 3: Add `@fastRequestParseIgnore` in comment | ||
|
||
```java | ||
/** | ||
* xxx description | ||
* @fastRequestParseIgnore | ||
*/ | ||
private String someIgnoreField; | ||
``` | ||
|
||
Way 4: Ignore field name | ||
 | ||
|
||
Only need to add field names in the configuration to ignore target fields in the entity class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 字段解析 | ||
## 类型映射 | ||
[了解详情](../getstarted/dataMapping.md) | ||
|
||
## 忽略字段 | ||
方式 1: 给字段使用如下 2 种注解中的一种 | ||
|
||
``` | ||
com.fasterxml.jackson.annotation.JsonIgnore | ||
com.alibaba.fastjson.annotation.JSONField(serialize = false) | ||
``` | ||
|
||
方式 2: 给字段增加 `static` 修饰符 | ||
|
||
方式 3:注释上加@fastRequestParseIgnore | ||
|
||
```java | ||
/** | ||
* xxx description | ||
* @fastRequestParseIgnore | ||
*/ | ||
private String someIgnoreField ; | ||
``` | ||
方式 4: 忽略字段名解析配置 | ||
|
||
 | ||
|
||
只需要在配置中增加字段名,即可将实体类中的特定字段忽略生成 | ||
|
||
|
||
|
||
|