From 2d2d3cdc28670baf82ac25c4d81bbef592490cae Mon Sep 17 00:00:00 2001 From: kings <963987632@qq.com> Date: Sun, 7 Jan 2024 17:20:18 +0800 Subject: [PATCH] some doc --- docs/.vuepress/config.ts | 2 +- docs/en/guide/faq.md | 5 ++++ docs/en/guide/features/README.md | 3 ++- docs/en/guide/features/parseStrategy.md | 29 ++++++++++++++++++++++ docs/guide/faq.md | 7 +++++- docs/guide/features/README.md | 1 + docs/guide/features/parseStrategy.md | 33 +++++++++++++++++++++++++ 7 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 docs/en/guide/features/parseStrategy.md create mode 100644 docs/guide/features/parseStrategy.md diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 71446e799..546f72018 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -19,7 +19,7 @@ export default defineUserConfig({ ], [ "script", - { src: "//at.alicdn.com/t/c/font_2601581_d17fm4nxa97.js", async: true }, + { src: "//at.alicdn.com/t/c/font_2601581_t3nhtojpu4l.js", async: true }, ], // ["script", { src: "/js/baidu.js" ,"async":true}], ["script", { src: "/js/gtag.js", async: true }], diff --git a/docs/en/guide/faq.md b/docs/en/guide/faq.md index e9a36f4b2..748af4789 100644 --- a/docs/en/guide/faq.md +++ b/docs/en/guide/faq.md @@ -77,6 +77,11 @@ Way 3: Add `@fastRequestParseIgnore` in comment private String someIgnoreField; ``` +Way 4: Ignore field name +![ignoreFiled](/img/2024.1.1/ignoreFiled_en.png) + +Only need to add field names in the configuration to ignore target fields in the entity class. + ## S: Quick locate After getting the focus of the window or pop-up box, enter the letters to position, then use the `↑` arrow or the `↓` arrow for jump position diff --git a/docs/en/guide/features/README.md b/docs/en/guide/features/README.md index 6490e50c0..223911cd2 100644 --- a/docs/en/guide/features/README.md +++ b/docs/en/guide/features/README.md @@ -72,7 +72,8 @@ The icon in the document corresponds to the button icon in the plugin - [ Project-level domain quick config](./projectLevelDomainConfig.md) - [ API list preview](./apiPreview.md) - [ Api comment preview](./apiCommentPreview.md) - +- [ Parse strategy](./parseStrategy.md) +- ## Script - [ Script](./script.md) diff --git a/docs/en/guide/features/parseStrategy.md b/docs/en/guide/features/parseStrategy.md new file mode 100644 index 000000000..e62f1e07f --- /dev/null +++ b/docs/en/guide/features/parseStrategy.md @@ -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 +![ignoreFiled](/img/2024.1.1/ignoreFiled_en.png) + +Only need to add field names in the configuration to ignore target fields in the entity class. diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 1153db785..8368fcde0 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -56,7 +56,7 @@ icon: faq ## S: 解析如何忽略某个字段 -方式 1: 使用如下 2 种注解中的一种 +方式 1: 给字段使用如下 2 种注解中的一种 ``` com.fasterxml.jackson.annotation.JsonIgnore @@ -75,6 +75,11 @@ com.alibaba.fastjson.annotation.JSONField(serialize = false) */ private String someIgnoreField ; ``` +方式 4: 忽略字段名解析配置 + +![ignoreFiled](/img/2024.1.1/ignoreFiled.png) + +只需要在配置中增加字段名,即可将实体类中的特定字段忽略生成 ## S: 快速定位 diff --git a/docs/guide/features/README.md b/docs/guide/features/README.md index d5ddb75e3..0874dfa40 100644 --- a/docs/guide/features/README.md +++ b/docs/guide/features/README.md @@ -72,6 +72,7 @@ icon: featuresNew - [ 项目域名快速配置](./projectLevelDomainConfig.md) - [ API 一览表预览](./apiPreview.md) - [ Api 注释预览](./apiCommentPreview.md) +- [ 解析策略](./parseStrategy.md) ## Script diff --git a/docs/guide/features/parseStrategy.md b/docs/guide/features/parseStrategy.md new file mode 100644 index 000000000..af2c4821b --- /dev/null +++ b/docs/guide/features/parseStrategy.md @@ -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: 忽略字段名解析配置 + +![ignoreFiled](/img/2024.1.1/ignoreFiled.png) + +只需要在配置中增加字段名,即可将实体类中的特定字段忽略生成 + + + +