diff --git a/knife4j-doc/gitee/404.html b/knife4j-doc/gitee/404.html index c44c1dfed..5435d7b67 100644 --- a/knife4j-doc/gitee/404.html +++ b/knife4j-doc/gitee/404.html @@ -10,16 +10,15 @@ - -找不到页面 | Knife4j - - +找不到页面 | Knife4j + +
-
跳到主要内容

找不到页面

我们找不到您要找的页面。

请联系原始链接来源网站的所有者,并告知他们链接已损坏。

- - +
跳到主要内容

找不到页面

我们找不到您要找的页面。

请联系原始链接来源网站的所有者,并告知他们链接已损坏。

+ + diff --git a/knife4j-doc/gitee/__docusaurus/debug.html b/knife4j-doc/gitee/__docusaurus/debug.html index 2b12c690a..d6120fe1c 100644 --- a/knife4j-doc/gitee/__docusaurus/debug.html +++ b/knife4j-doc/gitee/__docusaurus/debug.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Site config

- - + + diff --git a/knife4j-doc/gitee/__docusaurus/debug/config.html b/knife4j-doc/gitee/__docusaurus/debug/config.html index ac2aa0a71..3d8cc6786 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/config.html +++ b/knife4j-doc/gitee/__docusaurus/debug/config.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Site config

- - + + diff --git a/knife4j-doc/gitee/__docusaurus/debug/content.html b/knife4j-doc/gitee/__docusaurus/debug/content.html index 2fba55e2d..36040d95e 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/content.html +++ b/knife4j-doc/gitee/__docusaurus/debug/content.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Plugin content

docusaurus-plugin-content-docs

default

docusaurus-plugin-content-blog

default

docusaurus-plugin-content-pages

default
- - + + diff --git a/knife4j-doc/gitee/__docusaurus/debug/globalData.html b/knife4j-doc/gitee/__docusaurus/debug/globalData.html index dede62084..39aaac3b8 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/globalData.html +++ b/knife4j-doc/gitee/__docusaurus/debug/globalData.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Global data

- - + + diff --git a/knife4j-doc/gitee/__docusaurus/debug/metadata.html b/knife4j-doc/gitee/__docusaurus/debug/metadata.html index 9ddba9585..48227f890 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/metadata.html +++ b/knife4j-doc/gitee/__docusaurus/debug/metadata.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Site Metadata

Docusaurus Version: 2.0.1
Site Version: No version specified

Plugins and themes

  • 2.0.1
    docusaurus-plugin-content-docs
    Type: package
  • 2.0.1
    docusaurus-plugin-content-blog
    Type: package
  • 2.0.1
    docusaurus-plugin-content-pages
    Type: package
  • 2.0.1
    docusaurus-plugin-debug
    Type: package
  • 2.0.1
    docusaurus-plugin-sitemap
    Type: package
  • 2.0.1
    docusaurus-theme-classic
    Type: package
  • 2.0.1
    docusaurus-theme-search-algolia
    Type: package
  • 2.0.1
    docusaurus-plugin-client-redirects
    Type: package
  • 0.0.2
    docusaurus-plugin
    Type: package
- - + + diff --git a/knife4j-doc/gitee/__docusaurus/debug/registry.html b/knife4j-doc/gitee/__docusaurus/debug/registry.html index bbe3138b6..6652fa44b 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/registry.html +++ b/knife4j-doc/gitee/__docusaurus/debug/registry.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +
-

Registry

  • Aliased Path: @site/docs/changelog/2.x/2021-06-28-knife4j-2.0.9-issue.md
    Resolved Path: 27695
  • Aliased Path: @theme/DocItem
    Resolved Path: 23388
  • Aliased Path: @site/docs/features/gitVersion.md
    Resolved Path: 89452
  • Aliased Path: @site/docs/community/joinus.md
    Resolved Path: 18671
  • Aliased Path: @site/docs/action/aggregation-eureka.md
    Resolved Path: 91737
  • Aliased Path: @site/docs/action/index.mdx
    Resolved Path: 65483
  • Aliased Path: @site/docs/features/i18n.md
    Resolved Path: 5957
  • Aliased Path: @site/docs/faq/swagger-des-not-found.md
    Resolved Path: 58422
  • Aliased Path: @site/docs/oas/annotation-introduction.md
    Resolved Path: 72521
  • Aliased Path: /Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json
    Resolved Path: 83769
  • Aliased Path: @site/docs/community/sourcecode.md
    Resolved Path: 30609
  • Aliased Path: @site/docs/middleware-sources/desktop-use.md
    Resolved Path: 74191
  • Aliased Path: @site/docs/features/host.md
    Resolved Path: 44635
  • Aliased Path: @site/docs/changelog/1.x/2017-07-05-swagger-bootstrap-ui-1.3-issue.md
    Resolved Path: 90224
  • Aliased Path: @site/docs/action/springfox/springfox2.md
    Resolved Path: 49254
  • Aliased Path: @site/docs/action/dotnetcore-knife4j-how.md
    Resolved Path: 82685
  • Aliased Path: @site/docs/middleware-sources/knife4jCloud.md
    Resolved Path: 32054
  • Aliased Path: @site/docs/community/contributing.mdx
    Resolved Path: 61545
  • Aliased Path: @site/docs/features/selfdocument.md
    Resolved Path: 34157
  • Aliased Path: @site/docs/features/index.mdx
    Resolved Path: 77556
  • Aliased Path: @site/docs/features/exportDocument.md
    Resolved Path: 40233
  • Aliased Path: @site/docs/action/dotnetcore-knife4j-guid.md
    Resolved Path: 84686
  • Aliased Path: @site/docs/middleware-sources/cloud-openapi.md
    Resolved Path: 2901
  • Aliased Path: @site/docs/action/aggregation-disk.md
    Resolved Path: 35945
  • Aliased Path: @theme/DocCategoryGeneratedIndexPage
    Resolved Path: 32422
  • Aliased Path: @site/docs/features/forbidDebug.md
    Resolved Path: 31273
  • Aliased Path: @site/src/pages/versions.js
    Resolved Path: 40351
  • Aliased Path: @theme/SearchPage
    Resolved Path: 56475
  • Aliased Path: @site/docs/features/apiSort.md
    Resolved Path: 96270
  • Aliased Path: @theme/DocPage
    Resolved Path: 81551
  • Aliased Path: @site/docs/middleware/index.mdx
    Resolved Path: 12982
  • Aliased Path: @site/docs/features/jsr303.md
    Resolved Path: 59660
  • Aliased Path: @theme/DebugConfig
    Resolved Path: 6074
  • Aliased Path: ~debug/default/docusaurus-debug-all-content-673.json
    Resolved Path: 26267
  • Aliased Path: @site/docs/changelog/1.x/2017-05-14-swagger-bootstrap-ui-1.2-issue.md
    Resolved Path: 95010
  • Aliased Path: @site/docs/action/springcloud-gateway.md
    Resolved Path: 28438
  • Aliased Path: @site/docs/faq/swaggerResourceInvalid.md
    Resolved Path: 54241
  • Aliased Path: @site/docs/v4/index.mdx
    Resolved Path: 68353
  • Aliased Path: @site/docs/action/springfox/springfox3.md
    Resolved Path: 41156
  • Aliased Path: @site/docs/action/oauth2-password.md
    Resolved Path: 79372
  • Aliased Path: @site/docs/faq/format-exception.md
    Resolved Path: 16900
  • Aliased Path: @site/docs/middleware-sources/knife4jAggregation.md
    Resolved Path: 2303
  • Aliased Path: @site/docs/solution/knife4j-admin-deploy.md
    Resolved Path: 21548
  • Aliased Path: @site/docs/middleware-sources/cloud-function.md
    Resolved Path: 77523
  • Aliased Path: @site/docs/action/aggregation-nacos.md
    Resolved Path: 80088
  • Aliased Path: @site/docs/changelog/1.x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.md
    Resolved Path: 69975
  • Aliased Path: @site/docs/community/donate.mdx
    Resolved Path: 52403
  • Aliased Path: @site/docs/changelog/2.x/2020-03-08-knife4j-2.0.2-issue.md
    Resolved Path: 43920
  • Aliased Path: /Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json
    Resolved Path: 7085
  • Aliased Path: @site/docs/features/dynamicResponseDescription.md
    Resolved Path: 60795
  • Aliased Path: @site/docs/features/postman.md
    Resolved Path: 96852
  • Aliased Path: @site/docs/changelog/1.x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.md
    Resolved Path: 21486
  • Aliased Path: @site/docs/middleware-sources/spring-webflux/spring-webflux-introduction.mdx
    Resolved Path: 99756
  • Aliased Path: @site/docs/middleware-sources/aggregation-eureka.md
    Resolved Path: 12763
  • Aliased Path: @site/docs/changelog/2.x/2019-12-16-knife4j-2.0.0-issue.md
    Resolved Path: 99656
  • Aliased Path: @site/docs/faq/springmvc-notshow.md
    Resolved Path: 44346
  • Aliased Path: @site/docs/changelog/1.x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.md
    Resolved Path: 8188
  • Aliased Path: /Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json
    Resolved Path: 15745
  • Aliased Path: @site/docs/action/springfox/springfox20.md
    Resolved Path: 15459
  • Aliased Path: @site/docs/middleware/knife4jCloud.md
    Resolved Path: 71836
  • Aliased Path: @site/docs/action/springcloud-zuul.md
    Resolved Path: 37932
  • Aliased Path: @site/docs/features/includeRequestParameter.md
    Resolved Path: 17789
  • Aliased Path: @site/docs/features/author.md
    Resolved Path: 6593
  • Aliased Path: @site/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.md
    Resolved Path: 91940
  • Aliased Path: @site/docs/action/springfox/springfox13.md
    Resolved Path: 89707
  • Aliased Path: @site/docs/action/springfox/springfox16.md
    Resolved Path: 46001
  • Aliased Path: @site/docs/changelog/1.x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.md
    Resolved Path: 9920
  • Aliased Path: @site/docs/changelog/2.x/2020-06-28-knife4j-2.0.4-issue.md
    Resolved Path: 41834
  • Aliased Path: @site/docs/features/filterRequestParameter.md
    Resolved Path: 98275
  • Aliased Path: @site/docs/oas/openapi2-annotation.md
    Resolved Path: 63497
  • Aliased Path: @site/docs/middleware/knife4jAggregationDesktop.md
    Resolved Path: 69518
  • Aliased Path: @site/docs/changelog/1.x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.md
    Resolved Path: 42836
  • Aliased Path: @site/docs/changelog/2.x/2019-12-23-knife4j-2.0.1-issue.md
    Resolved Path: 63475
  • Aliased Path: @site/docs/changelog/1.x/2017-07-11-swagger-bootstrap-ui-1.4-issue.md
    Resolved Path: 77473
  • Aliased Path: @site/docs/changelog/1.x/2017-04-19-swagger-bootstrap-ui-open.md
    Resolved Path: 63406
  • Aliased Path: @site/docs/action/simple.mdx
    Resolved Path: 71307
  • Aliased Path: @site/docs/changelog/1.x/2017-04-27-swagger-bootstrap-ui-1.1-issue.md
    Resolved Path: 77050
  • Aliased Path: @site/docs/features/springSecurity.md
    Resolved Path: 54731
  • Aliased Path: @site/docs/features/dynamicRequestDescription.md
    Resolved Path: 94980
  • Aliased Path: @generated/docusaurus.config
    Resolved Path: 36809
  • Aliased Path: @site/docs/changelog/1.x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.md
    Resolved Path: 76688
  • Aliased Path: @site/docs/action/springfox/springfox5.md
    Resolved Path: 3379
  • Aliased Path: @site/docs/changelog/index.mdx
    Resolved Path: 45792
  • Aliased Path: @site/docs/changelog/1.x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.md
    Resolved Path: 26401
  • Aliased Path: @theme/DebugRegistry
    Resolved Path: 28165
  • Aliased Path: @site/docs/oas/openapi-spe.mdx
    Resolved Path: 37675
  • Aliased Path: @theme/DebugSiteMetadata
    Resolved Path: 13767
  • Aliased Path: @site/docs/changelog/1.x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.md
    Resolved Path: 43600
  • Aliased Path: @site/docs/middleware-sources/desktop/service-introduction.md
    Resolved Path: 57475
  • Aliased Path: @site/docs/introduction/support.md
    Resolved Path: 68725
  • Aliased Path: @site/docs/community/apache.md
    Resolved Path: 64702
  • Aliased Path: @site/docs/features/enhance.mdx
    Resolved Path: 65837
  • Aliased Path: @site/docs/action/springfox/springfox7.md
    Resolved Path: 63264
  • Aliased Path: @site/docs/introduction/index.mdx
    Resolved Path: 16048
  • Aliased Path: @site/docs/features/search.md
    Resolved Path: 30345
  • Aliased Path: @site/docs/community/simple-demo.mdx
    Resolved Path: 55600
  • Aliased Path: @site/docs/faq/v4/knife4j-base64-response.md
    Resolved Path: 33068
  • Aliased Path: @site/docs/changelog/1.x/2019-05-20-knife4j-admin-1.0-issue.md
    Resolved Path: 44253
  • Aliased Path: @site/docs/middleware-sources/desktop/config-introduction.md
    Resolved Path: 19205
  • Aliased Path: @site/docs/upgrading/upgrading_v4.md
    Resolved Path: 14685
  • Aliased Path: @site/docs/community/get_help.mdx
    Resolved Path: 86720
  • Aliased Path: @site/docs/solution/service.md
    Resolved Path: 88899
  • Aliased Path: @site/docs/oas/OpenAPI3-specification.md
    Resolved Path: 16932
  • Aliased Path: @site/docs/middleware-sources/desktop/config-disk.md
    Resolved Path: 60490
  • Aliased Path: @site/docs/introduction/background.mdx
    Resolved Path: 64314
  • Aliased Path: @site/docs/middleware/aggregation.mdx
    Resolved Path: 25698
  • Aliased Path: @site/docs/middleware-sources/cloud-use.md
    Resolved Path: 70308
  • Aliased Path: @site/docs/solution/ui-front-nginx.md
    Resolved Path: 61478
  • Aliased Path: @site/docs/faq/sp-nmerror.md
    Resolved Path: 55522
  • Aliased Path: @site/docs/features/afterScript.md
    Resolved Path: 24799
  • Aliased Path: @site/docs/middleware-sources/aggregation-cloud.md
    Resolved Path: 91531
  • Aliased Path: @site/docs/changelog/2.x/2020-11-22-knife4j-2.0.8-issue.md
    Resolved Path: 44016
  • Aliased Path: @site/docs/middleware-sources/aggregation-nacos.md
    Resolved Path: 55799
  • Aliased Path: @site/docs/changelog/1.x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.md
    Resolved Path: 45194
  • Aliased Path: @site/docs/middleware-sources/desktop/config-nacos.md
    Resolved Path: 49837
  • Aliased Path: @site/docs/quick-start/index.mdx
    Resolved Path: 89323
  • Aliased Path: @site/docs/features/dynamicRequestParameter.md
    Resolved Path: 68038
  • Aliased Path: @site/docs/changelog/1.x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.md
    Resolved Path: 60529
  • Aliased Path: @site/docs/changelog/4.x/4.1.md
    Resolved Path: 17464
  • Aliased Path: @site/docs/action/springmvc.md
    Resolved Path: 47735
  • Aliased Path: @site/docs/action/springfox/springfox10.md
    Resolved Path: 99842
  • Aliased Path: @site/docs/faq/springboot-404.md
    Resolved Path: 54202
  • Aliased Path: @site/docs/action/springfox/springfox4.md
    Resolved Path: 64395
  • Aliased Path: @site/docs/introduction/ui.md
    Resolved Path: 44163
  • Aliased Path: @site/docs/action/oauth2-client_credentials.md
    Resolved Path: 49002
  • Aliased Path: @site/docs/features/clearCache.md
    Resolved Path: 83181
  • Aliased Path: @site/docs/changelog/1.x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.md
    Resolved Path: 45742
  • Aliased Path: ~docs/default/version-current-metadata-prop-751.json
    Resolved Path: 1109
  • Aliased Path: @theme/DebugRoutes
    Resolved Path: 77327
  • Aliased Path: @site/docs/features/swaggermodels.md
    Resolved Path: 91634
  • Aliased Path: @site/docs/solution/admin.md
    Resolved Path: 96511
  • Aliased Path: @site/docs/oas/index.mdx
    Resolved Path: 72871
  • Aliased Path: @site/docs/action/springfox/springfox21.md
    Resolved Path: 71931
  • Aliased Path: @site/docs/middleware-sources/desktop-introduction.md
    Resolved Path: 77012
  • Aliased Path: @site/docs/upgrading/upgrading_v2.x.md
    Resolved Path: 86124
  • Aliased Path: @site/docs/action/springfox/springfox8.md
    Resolved Path: 30157
  • Aliased Path: @site/docs/action/springfox/springfox1.md
    Resolved Path: 43245
  • Aliased Path: @site/docs/middleware-sources/desktop-test.mdx
    Resolved Path: 73613
  • Aliased Path: ~docs/default/category-docs-docs-category-升级-e5e.json
    Resolved Path: 43283
  • Aliased Path: @site/docs/middleware-sources/aggregation-disk.md
    Resolved Path: 72235
  • Aliased Path: @site/docs/solution/README.md
    Resolved Path: 86788
  • Aliased Path: @site/docs/changelog/1.x/2017-12-18-swagger-bootstrap-ui-1.7-issue.md
    Resolved Path: 14287
  • Aliased Path: @site/docs/changelog/1.x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.md
    Resolved Path: 23463
  • Aliased Path: @site/docs/faq/index.mdx
    Resolved Path: 70662
  • Aliased Path: @site/docs/changelog/1.x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.md
    Resolved Path: 52542
  • Aliased Path: @site/docs/changelog/1.x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.md
    Resolved Path: 61909
  • Aliased Path: @site/docs/oas/openapi2.mdx
    Resolved Path: 70899
  • Aliased Path: @site/docs/changelog/1.x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.md
    Resolved Path: 18982
  • Aliased Path: @site/docs/middleware-sources/index.mdx
    Resolved Path: 34282
  • Aliased Path: @site/docs/changelog/1.x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.md
    Resolved Path: 90971
  • Aliased Path: @site/docs/oas/test.mdx
    Resolved Path: 17941
  • Aliased Path: @site/docs/middleware/knife4jAggregation.md
    Resolved Path: 20521
  • Aliased Path: @site/docs/action/springfox/springfox11.md
    Resolved Path: 99660
  • Aliased Path: @site/docs/action/springfox/springfox15.md
    Resolved Path: 70368
  • Aliased Path: @site/docs/changelog/1.x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.md
    Resolved Path: 33455
  • Aliased Path: @site/docs/community/index.mdx
    Resolved Path: 96597
  • Aliased Path: @site/docs/faq/upload-error.md
    Resolved Path: 61572
  • Aliased Path: @site/docs/features/globalParameter.md
    Resolved Path: 21158
  • Aliased Path: @site/docs/features/customHome.md
    Resolved Path: 18285
  • Aliased Path: @site/docs/faq/springmvc-404.md
    Resolved Path: 23203
  • Aliased Path: @site/docs/action/springfox/index.mdx
    Resolved Path: 87010
  • Aliased Path: @site/docs/action/mavenbom.md
    Resolved Path: 34435
  • Aliased Path: @site/docs/changelog/2.x/2020-05-24-knife4j-2.0.3-issue.md
    Resolved Path: 93757
  • Aliased Path: @theme/DebugContent
    Resolved Path: 50793
  • Aliased Path: @site/docs/features/forbidOpenApi.md
    Resolved Path: 61273
  • Aliased Path: @site/docs/middleware-sources/knife4jAggregationDesktop.md
    Resolved Path: 15512
  • Aliased Path: @site/docs/features/accessControl.md
    Resolved Path: 64038
  • Aliased Path: @site/docs/donate/index.mdx
    Resolved Path: 95707
  • Aliased Path: @site/docs/changelog/2.x/2020-11-02-knife4j-2.0.7-issue.md
    Resolved Path: 5795
  • Aliased Path: @site/docs/middleware-sources/desktop-mode.md
    Resolved Path: 1091
  • Aliased Path: @site/docs/features/forbidSearch.md
    Resolved Path: 22656
  • Aliased Path: @site/docs/action/oauth2-implicit.md
    Resolved Path: 8596
  • Aliased Path: @site/docs/action/springfox/springfox6.md
    Resolved Path: 49759
  • Aliased Path: @site/docs/changelog/1.x/2017-09-01-swagger-bootstrap-ui-1.5-issue.md
    Resolved Path: 44051
  • Aliased Path: @site/docs/action/springfox/springfox12.md
    Resolved Path: 42574
  • Aliased Path: @site/docs/changelog/2.x/2020-09-14-knife4j-2.0.5-issue.md
    Resolved Path: 25888
  • Aliased Path: @site/src/pages/index.js
    Resolved Path: 94875
  • Aliased Path: @site/docs/changelog/1.x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.md
    Resolved Path: 73099
  • Aliased Path: @site/docs/changelog/2.x/2020-10-26-knife4j-2.0.6-issue.md
    Resolved Path: 61336
  • Aliased Path: @site/docs/action/oauth2-authorization_code.md
    Resolved Path: 13517
  • Aliased Path: @site/docs/introduction/milestone.mdx
    Resolved Path: 46352
  • Aliased Path: @site/docs/middleware/desktop.mdx
    Resolved Path: 22794
  • Aliased Path: @site/docs/features/requestCache.md
    Resolved Path: 84001
  • Aliased Path: @site/docs/features/oauth2.md
    Resolved Path: 67000
  • Aliased Path: @site/docs/solution/ui-front.md
    Resolved Path: 97692
  • Aliased Path: @site/docs/faq/v4/knife4j-parameterobject-flat-param.md
    Resolved Path: 90522
  • Aliased Path: @site/docs/solution/ui-front-static.md
    Resolved Path: 74058
  • Aliased Path: @site/docs/changelog/1.x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.md
    Resolved Path: 55966
  • Aliased Path: @site/docs/features/tagSort.md
    Resolved Path: 27230
  • Aliased Path: @site/docs/action/aggregation-cloud.md
    Resolved Path: 71663
  • Aliased Path: @site/docs/features/customFooter.md
    Resolved Path: 10487
  • Aliased Path: @site/docs/changelog/1.x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.md
    Resolved Path: 6372
  • Aliased Path: @site/docs/oas/openapi3.md
    Resolved Path: 86925
  • Aliased Path: @site/docs/middleware-sources/cloud-introduction.md
    Resolved Path: 94539
  • Aliased Path: @site/docs/changelog/1.x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.md
    Resolved Path: 35672
  • Aliased Path: @site/docs/changelog/1.x/2017-09-06-swagger-bootstrap-ui-1.6-issue.md
    Resolved Path: 25432
  • Aliased Path: @site/docs/changelog/4.x/4.0.md
    Resolved Path: 14987
  • Aliased Path: @site/docs/faq/v4/knife4j-no-openapi.md
    Resolved Path: 10157
  • Aliased Path: @site/docs/oas/openapi3-annotation.md
    Resolved Path: 58796
  • Aliased Path: @site/docs/faq/knife4j-exception.md
    Resolved Path: 51125
  • Aliased Path: @site/docs/faq/md-format-error.md
    Resolved Path: 99853
  • Aliased Path: @theme/DebugGlobalData
    Resolved Path: 82507
  • Aliased Path: @site/docs/action/springfox/springfox18.md
    Resolved Path: 21756
  • Aliased Path: @site/docs/action/springboot.md
    Resolved Path: 45044
  • Aliased Path: @site/docs/action/springfox/springfox9.md
    Resolved Path: 35798
  • Aliased Path: @site/docs/middleware-sources/desktop-install.md
    Resolved Path: 11403
  • Aliased Path: @site/docs/middleware-sources/desktop-service-mode.md
    Resolved Path: 60289
  • Aliased Path: @site/docs/solution/extension.md
    Resolved Path: 58610
  • Aliased Path: /Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/.docusaurus/docusaurus-plugin-debug/default/plugin-route-context-module-100.json
    Resolved Path: 3984
  • Aliased Path: @site/docs/changelog/1.x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.md
    Resolved Path: 3255
  • Aliased Path: @site/docs/action/aggregation-docker.md
    Resolved Path: 67801
  • Aliased Path: @site/docs/community/changelog.md
    Resolved Path: 66883
  • Aliased Path: @site/docs/changelog/1.x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.md
    Resolved Path: 17658
  • Aliased Path: @site/docs/solution/ui-front-gateway.md
    Resolved Path: 83531
  • Aliased Path: @site/docs/action/springfox/springfox14.md
    Resolved Path: 71838
  • Aliased Path: @site/docs/changelog/1.x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.md
    Resolved Path: 62556
  • Aliased Path: @site/docs/introduction/gvp.md
    Resolved Path: 87807
  • Aliased Path: @site/docs/middleware-sources/aggregation-introduction.md
    Resolved Path: 75891
  • Aliased Path: @site/docs/solution/knife4j-admin-download.md
    Resolved Path: 70113
  • Aliased Path: @site/docs/action/springfox/springfox19.md
    Resolved Path: 95812
  • Aliased Path: @site/docs/solution/ui-front-zuul.md
    Resolved Path: 15352
  • Aliased Path: @site/docs/action/springfox/springfox17.md
    Resolved Path: 23843
- - +

Registry

+ + diff --git a/knife4j-doc/gitee/__docusaurus/debug/routes.html b/knife4j-doc/gitee/__docusaurus/debug/routes.html index fe0b8e021..83490c676 100644 --- a/knife4j-doc/gitee/__docusaurus/debug/routes.html +++ b/knife4j-doc/gitee/__docusaurus/debug/routes.html @@ -10,16 +10,15 @@ - -Docusaurus debug panel - - +Docusaurus debug panel + +

Routes

  • /__docusaurus/debug
    Is exact: true
  • /__docusaurus/debug/config
    Is exact: true
  • /__docusaurus/debug/content
    Is exact: true
  • /__docusaurus/debug/globalData
    Is exact: true
  • /__docusaurus/debug/metadata
    Is exact: true
  • /__docusaurus/debug/registry
    Is exact: true
  • /__docusaurus/debug/routes
    Is exact: true
  • /search
    Is exact: true
  • /versions
    Is exact: true
  • /docs
    Is exact: false
    Child Routes:
  • /
    Is exact: true
  • *
    Is exact: false
- - + + diff --git a/knife4j-doc/gitee/assets/css/styles.66359a73.css b/knife4j-doc/gitee/assets/css/styles.66359a73.css deleted file mode 100644 index ad8468b34..000000000 --- a/knife4j-doc/gitee/assets/css/styles.66359a73.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700&display=swap);.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.DocSearch-Button,.button{-webkit-user-select:none;-moz-user-select:none}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.close,.menu__caret:before,.menu__link--sublist:after,.version_eAdG{float:right}.toggleButton_yw5v span,html{-webkit-tap-highlight-color:transparent}.button,code{vertical-align:middle}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.cardContainer_fWXF,:root{--ifm-link-hover-decoration:none}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base)}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.contributorsHeader_VXgX,.sidebar_donate,.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_tbUL,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{-webkit-text-decoration-color:var(--ifm-alert-border-color);text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area.breadcrumbs__link[href]:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-webkit-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color)}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{margin-left:.3em;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_c0TR article>:first-child,.docItemContainer_c0TR header+*,.footer__item,article .card h2{margin-top:0}.admonitionContent_S0QG>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q>:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.docsWrapper_BCFX,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.contributos_eJg6:hover,.pills__item,.sidebar_sponsor:hover,.tabs__item{cursor:pointer}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-duration:.25s;transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-duration:.1s;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.container_UJDL,html.plugin-pages .main-wrapper{overflow-x:hidden}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--ifm-navbar-background-color:#1a1b23;--ifm-background-color:#1a1b23;--ifm-background-surface-color:#242736;--ifm-font-color-base:#f2f3fb;--ifm-pre-background:#242736;--ifm-color-primary:#5d9df1;--ifm-link-color:#5d9df1;--ifm-heading-color:#f2f3fb;--ifm-navbar-link-color:#f2f3fb;--docusaurus-highlighted-code-line-bg:hsla(0,0%,100%,.1);--docsearch-text-color:#8d92af;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-font-family-base:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--ifm-heading-font-family:"Lota Grotesque",sans-serif;--ifm-font-weight-semibold:600;--ifm-font-color-base:#242736;--ifm-navbar-item-padding-horizontal:1.75rem;--ifm-navbar-link-color:#41465d;--ifm-navbar-shadow:none;--ifm-heading-margin-top:var(--ifm-heading-margin-bottom);--ifm-hero-background-color:transparent;--ifm-code-background:var(--ifm-pre-background)!important;--ifm-code-padding-horizontal:0.4rem;--ifm-code-padding-vertical:0.2rem;--ifm-color-primary-lightest:#5d9df1;--ifm-color-primary-lighter:#3a87ee;--ifm-color-primary-light:#2e80ed;--ifm-color-primary:#1672eb;--ifm-color-primary-dark:#1266d5;--ifm-color-primary-darker:#1161c9;--ifm-color-primary-darkest:#0e50a6;--ifm-link-color:#1471eb;--ifm-link-hover-color:#5b9cf1;--ifm-footer-background-color:#272c3d;--ifm-footer-title-color:#f2f3fb;--ifm-footer-link-color:#f2f3fb;--max-layout-width:1680px;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.1);--ifm-heading-color:#242736;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Lota Grotesque;font-weight:600;src:url(/assets/fonts/lota-77309eabb95901e7d9f4b36926b04ff4.woff2) format("woff2"),url(/assets/fonts/lota-31ef040823d4b74f60d31b865f7ed5b4.woff) format("woff")}.footer__title{font-size:1.25rem;font-weight:600}.footer__bottom a{opacity:.75}.footer__copyright{color:var(--ifm-footer-title-color)}#docusaurus-base-url-issue-banner-container,.collapseSidebarButton_PEFL,.docSidebarContainer_b6E3,.navbar svg[class*=iconExternalLink],.navbar__title,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_SFTY,[data-theme=light] .darkToggleIcon_ekgs,aside svg[class*=iconExternalLink],aside>div>a>b,h1#change-log,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.navbar__inner{max-width:calc(var(--max-layout-width) - 32px);padding:0 var(--ifm-spacing-horizontal);width:100%}.DocSearch-Button-Placeholder{font-size:14px!important}html .DocSearch-Button{background:#f9fafd;border:1px solid #c1c6dd;border-radius:6px!important;font-family:inherit;font-weight:400!important}html .DocSearch-Button .DocSearch-Search-Icon,html[data-theme=dark] .DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-muted-color)}html[data-theme=dark] .DocSearch-Button{background:none;border:1px solid var(--docsearch-muted-color)}.DocSearch-Button:hover{box-shadow:none!important}.main-wrapper,.navbar{justify-content:center}.main-wrapper>div{max-width:var(--max-layout-width)}aside>div>a{padding-left:16px}.dropdown>.navbar__link:after{border-color:currentcolor;border-style:solid;border-width:.1em .1em 0 0;content:"";display:inline-block;height:.4em;left:.3em;position:relative;top:9px;transform:rotate(135deg);vertical-align:top;width:.4em}.navbar .icon{font-size:0;line-height:0;margin-left:20px;padding:4px}.navbar .icon:before{background-size:cover;content:"";display:block;height:24px;width:24px}.navbar .icon[href*=github]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyBkYXRhLXByZWZpeD0iZmFiIiBkYXRhLWljb249ImdpdGh1YiIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWdpdGh1YiBmYS13LTE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OTYgNDk2Ij48cGF0aCBmaWxsPSIjNTg1RTc2IiBkPSJNMTY1LjkgMzk3LjRjMCAyLTIuMyAzLjYtNS4yIDMuNi0zLjMuMy01LjYtMS4zLTUuNi0zLjYgMC0yIDIuMy0zLjYgNS4yLTMuNiAzLS4zIDUuNiAxLjMgNS42IDMuNnptLTMxLjEtNC41Yy0uNyAyIDEuMyA0LjMgNC4zIDQuOSAyLjYgMSA1LjYgMCA2LjItMnMtMS4zLTQuMy00LjMtNS4yYy0yLjYtLjctNS41LjMtNi4yIDIuM3ptNDQuMi0xLjdjLTIuOS43LTQuOSAyLjYtNC42IDQuOS4zIDIgMi45IDMuMyA1LjkgMi42IDIuOS0uNyA0LjktMi42IDQuNi00LjYtLjMtMS45LTMtMy4yLTUuOS0yLjl6TTI0NC44IDhDMTA2LjEgOCAwIDExMy4zIDAgMjUyYzAgMTEwLjkgNjkuOCAyMDUuOCAxNjkuNSAyMzkuMiAxMi44IDIuMyAxNy4zLTUuNiAxNy4zLTEyLjEgMC02LjItLjMtNDAuNC0uMy02MS40IDAgMC03MCAxNS04NC43LTI5LjggMCAwLTExLjQtMjkuMS0yNy44LTM2LjYgMCAwLTIyLjktMTUuNyAxLjYtMTUuNCAwIDAgMjQuOSAyIDM4LjYgMjUuOCAyMS45IDM4LjYgNTguNiAyNy41IDcyLjkgMjAuOSAyLjMtMTYgOC44LTI3LjEgMTYtMzMuNy01NS45LTYuMi0xMTIuMy0xNC4zLTExMi4zLTExMC41IDAtMjcuNSA3LjYtNDEuMyAyMy42LTU4LjktMi42LTYuNS0xMS4xLTMzLjMgMi42LTY3LjkgMjAuOS02LjUgNjkgMjcgNjkgMjcgMjAtNS42IDQxLjUtOC41IDYyLjgtOC41czQyLjggMi45IDYyLjggOC41YzAgMCA0OC4xLTMzLjYgNjktMjcgMTMuNyAzNC43IDUuMiA2MS40IDIuNiA2Ny45IDE2IDE3LjcgMjUuOCAzMS41IDI1LjggNTguOSAwIDk2LjUtNTguOSAxMDQuMi0xMTQuOCAxMTAuNSA5LjIgNy45IDE3IDIyLjkgMTcgNDYuNCAwIDMzLjctLjMgNzUuNC0uMyA4My42IDAgNi41IDQuNiAxNC40IDE3LjMgMTIuMUM0MjguMiA0NTcuOCA0OTYgMzYyLjkgNDk2IDI1MiA0OTYgMTEzLjMgMzgzLjUgOCAyNDQuOCA4ek05Ny4yIDM1Mi45Yy0xLjMgMS0xIDMuMy43IDUuMiAxLjYgMS42IDMuOSAyLjMgNS4yIDEgMS4zLTEgMS0zLjMtLjctNS4yLTEuNi0xLjYtMy45LTIuMy01LjItMXptLTEwLjgtOC4xYy0uNyAxLjMuMyAyLjkgMi4zIDMuOSAxLjYgMSAzLjYuNyA0LjMtLjcuNy0xLjMtLjMtMi45LTIuMy0zLjktMi0uNi0zLjYtLjMtNC4zLjd6bTMyLjQgMzUuNmMtMS42IDEuMy0xIDQuMyAxLjMgNi4yIDIuMyAyLjMgNS4yIDIuNiA2LjUgMSAxLjMtMS4zLjctNC4zLTEuMy02LjItMi4yLTIuMy01LjItMi42LTYuNS0xem0tMTEuNC0xNC43Yy0xLjYgMS0xLjYgMy42IDAgNS45IDEuNiAyLjMgNC4zIDMuMyA1LjYgMi4zIDEuNi0xLjMgMS42LTMuOSAwLTYuMi0xLjQtMi4zLTQtMy4zLTUuNi0yeiIvPjwvc3ZnPg==)}html[data-theme=dark] .navbar .navbar__link[href*=github]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyBkYXRhLXByZWZpeD0iZmFiIiBkYXRhLWljb249ImdpdGh1YiIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWdpdGh1YiBmYS13LTE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OTYgNDk2Ij48cGF0aCBmaWxsPSIjQjNCOEQyIiBkPSJNMTY1LjkgMzk3LjRjMCAyLTIuMyAzLjYtNS4yIDMuNi0zLjMuMy01LjYtMS4zLTUuNi0zLjYgMC0yIDIuMy0zLjYgNS4yLTMuNiAzLS4zIDUuNiAxLjMgNS42IDMuNnptLTMxLjEtNC41Yy0uNyAyIDEuMyA0LjMgNC4zIDQuOSAyLjYgMSA1LjYgMCA2LjItMnMtMS4zLTQuMy00LjMtNS4yYy0yLjYtLjctNS41LjMtNi4yIDIuM3ptNDQuMi0xLjdjLTIuOS43LTQuOSAyLjYtNC42IDQuOS4zIDIgMi45IDMuMyA1LjkgMi42IDIuOS0uNyA0LjktMi42IDQuNi00LjYtLjMtMS45LTMtMy4yLTUuOS0yLjl6TTI0NC44IDhDMTA2LjEgOCAwIDExMy4zIDAgMjUyYzAgMTEwLjkgNjkuOCAyMDUuOCAxNjkuNSAyMzkuMiAxMi44IDIuMyAxNy4zLTUuNiAxNy4zLTEyLjEgMC02LjItLjMtNDAuNC0uMy02MS40IDAgMC03MCAxNS04NC43LTI5LjggMCAwLTExLjQtMjkuMS0yNy44LTM2LjYgMCAwLTIyLjktMTUuNyAxLjYtMTUuNCAwIDAgMjQuOSAyIDM4LjYgMjUuOCAyMS45IDM4LjYgNTguNiAyNy41IDcyLjkgMjAuOSAyLjMtMTYgOC44LTI3LjEgMTYtMzMuNy01NS45LTYuMi0xMTIuMy0xNC4zLTExMi4zLTExMC41IDAtMjcuNSA3LjYtNDEuMyAyMy42LTU4LjktMi42LTYuNS0xMS4xLTMzLjMgMi42LTY3LjkgMjAuOS02LjUgNjkgMjcgNjkgMjcgMjAtNS42IDQxLjUtOC41IDYyLjgtOC41czQyLjggMi45IDYyLjggOC41YzAgMCA0OC4xLTMzLjYgNjktMjcgMTMuNyAzNC43IDUuMiA2MS40IDIuNiA2Ny45IDE2IDE3LjcgMjUuOCAzMS41IDI1LjggNTguOSAwIDk2LjUtNTguOSAxMDQuMi0xMTQuOCAxMTAuNSA5LjIgNy45IDE3IDIyLjkgMTcgNDYuNCAwIDMzLjctLjMgNzUuNC0uMyA4My42IDAgNi41IDQuNiAxNC40IDE3LjMgMTIuMUM0MjguMiA0NTcuOCA0OTYgMzYyLjkgNDk2IDI1MiA0OTYgMTEzLjMgMzgzLjUgOCAyNDQuOCA4ek05Ny4yIDM1Mi45Yy0xLjMgMS0xIDMuMy43IDUuMiAxLjYgMS42IDMuOSAyLjMgNS4yIDEgMS4zLTEgMS0zLjMtLjctNS4yLTEuNi0xLjYtMy45LTIuMy01LjItMXptLTEwLjgtOC4xYy0uNyAxLjMuMyAyLjkgMi4zIDMuOSAxLjYgMSAzLjYuNyA0LjMtLjcuNy0xLjMtLjMtMi45LTIuMy0zLjktMi0uNi0zLjYtLjMtNC4zLjd6bTMyLjQgMzUuNmMtMS42IDEuMy0xIDQuMyAxLjMgNi4yIDIuMyAyLjMgNS4yIDIuNiA2LjUgMSAxLjMtMS4zLjctNC4zLTEuMy02LjItMi4yLTIuMy01LjItMi42LTYuNS0xem0tMTEuNC0xNC43Yy0xLjYgMS0xLjYgMy42IDAgNS45IDEuNiAyLjMgNC4zIDMuMyA1LjYgMi4zIDEuNi0xLjMgMS42LTMuOSAwLTYuMi0xLjQtMi4zLTQtMy4zLTUuNi0yeiIvPjwvc3ZnPg==)}.navbar .icon[href*=discord]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzU4NUU3NiIgZD0iTTUwMCAwQzIyNCAwIDAgMjI0IDAgNTAwczIyNCA1MDAgNTAwIDUwMCA1MDAtMjI0IDUwMC01MDBTNzc2IDAgNTAwIDBNMzg2IDIwM2gybDcgOWMtMTI4IDM2LTE4NiA5Mi0xODYgOTJzMTUtOCA0MS0yMGM3Ni0zNCAxMzYtNDMgMTYxLTQ1IDQtMSA4LTEgMTItMSA0My02IDkyLTcgMTQzLTIgNjcgOCAxMzkgMjggMjEzIDY4IDAgMC01Ni01My0xNzYtOTBsOS0xMXM5Ny0yIDE5OSA3NGMwIDAgMTAyIDE4NSAxMDIgNDEyIDAgMC02MCAxMDMtMjE2IDEwOCAwIDAtMjYtMzAtNDctNTcgOTMtMjYgMTI4LTg0IDEyOC04NC0yOSAxOS01NyAzMi04MSA0MS0zNiAxNS03MCAyNS0xMDMgMzEtNjggMTItMTMwIDktMTgzLTEtNDAtOC03NS0xOS0xMDQtMzAtMTYtNy0zNC0xNS01Mi0yNC0yLTItNC0zLTYtNC0xLTEtMi0xLTMtMi0xMy03LTIwLTEyLTIwLTEyczM0IDU2IDEyNCA4M2MtMjEgMjctNDcgNTktNDcgNTktMTU3LTUtMjE2LTEwOC0yMTYtMTA4IDAtMjI3IDEwMi00MTIgMTAyLTQxMiA5NS03MSAxODYtNzQgMTk3LTc0bS0xOCAyNjRjLTQxIDAtNzIgMzUtNzIgNzhzMzIgNzkgNzIgNzkgNzItMzYgNzItNzljMS00My0zMi03OC03Mi03OG0yNTggMGMtNDAgMC03MiAzNS03MiA3OHMzMiA3OSA3MiA3OSA3Mi0zNiA3Mi03OS0zMi03OC03Mi03OCIvPjwvc3ZnPg==)}html[data-theme=dark] .navbar .navbar__link[href*=discord]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0IzQjhEMiIgZD0iTTUwMCAwQzIyNCAwIDAgMjI0IDAgNTAwczIyNCA1MDAgNTAwIDUwMCA1MDAtMjI0IDUwMC01MDBTNzc2IDAgNTAwIDBNMzg2IDIwM2gybDcgOWMtMTI4IDM2LTE4NiA5Mi0xODYgOTJzMTUtOCA0MS0yMGM3Ni0zNCAxMzYtNDMgMTYxLTQ1IDQtMSA4LTEgMTItMSA0My02IDkyLTcgMTQzLTIgNjcgOCAxMzkgMjggMjEzIDY4IDAgMC01Ni01My0xNzYtOTBsOS0xMXM5Ny0yIDE5OSA3NGMwIDAgMTAyIDE4NSAxMDIgNDEyIDAgMC02MCAxMDMtMjE2IDEwOCAwIDAtMjYtMzAtNDctNTcgOTMtMjYgMTI4LTg0IDEyOC04NC0yOSAxOS01NyAzMi04MSA0MS0zNiAxNS03MCAyNS0xMDMgMzEtNjggMTItMTMwIDktMTgzLTEtNDAtOC03NS0xOS0xMDQtMzAtMTYtNy0zNC0xNS01Mi0yNC0yLTItNC0zLTYtNC0xLTEtMi0xLTMtMi0xMy03LTIwLTEyLTIwLTEyczM0IDU2IDEyNCA4M2MtMjEgMjctNDcgNTktNDcgNTktMTU3LTUtMjE2LTEwOC0yMTYtMTA4IDAtMjI3IDEwMi00MTIgMTAyLTQxMiA5NS03MSAxODYtNzQgMTk3LTc0bS0xOCAyNjRjLTQxIDAtNzIgMzUtNzIgNzhzMzIgNzkgNzIgNzkgNzItMzYgNzItNzljMS00My0zMi03OC03Mi03OG0yNTggMGMtNDAgMC03MiAzNS03MiA3OHMzMiA3OSA3MiA3OSA3Mi0zNiA3Mi03OS0zMi03OC03Mi03OCIvPjwvc3ZnPg==)}header.hero div[class^=heroButtons]{justify-content:inherit}.menu__link,.table-of-contents__link,.tsd-kind-icon{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.table-of-contents__link{height:20px}nav.navbar .dropdown__menu{min-width:6rem}.main-wrapper a[class*=sidebarLogo] img,.navbar__logo{height:3rem}html.plugin-docs .theme-doc-markdown,html.plugin-pages{font-size:18px;line-height:32px}html.plugin-docs .theme-doc-markdown h2,html.plugin-pages h2{font-size:36px;line-height:48px}html.plugin-docs .theme-doc-markdown h1{color:#000;font-size:48px;font-weight:600;line-height:64px}html[data-theme=dark].plugin-docs .theme-doc-markdown h1,html[data-theme=dark].plugin-typedoc-api .theme-doc-markdown h1{color:#fff}html.plugin-typedoc-api .theme-doc-markdown h1{color:#000}html.plugin-docs .theme-doc-markdown h3{font-size:28px;line-height:36px}.theme-doc-toc-desktop .table-of-contents{font-size:16px;line-height:24px}.theme-doc-sidebar-menu .menu__link,.theme-doc-toc-desktop .table-of-contents .toc-highlight{background:none;color:#6f7490;height:auto}.theme-doc-sidebar-menu .menu__link:hover{background:inherit}.theme-doc-sidebar-menu .menu__link{font-weight:400}.theme-doc-sidebar-menu .menu__link--active,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active{font-weight:700}.theme-doc-sidebar-menu .menu__list-item-collapsible,.theme-doc-sidebar-menu .menu__list-item-collapsible--active{background:none}html[data-theme=dark] .features_cAfv,html[data-theme=dark] .features_r5tH,html[data-theme=dark] .heroBanner_qdFl h2,html[data-theme=dark] .theme-doc-sidebar-menu .menu__link,html[data-theme=dark] .theme-doc-toc-desktop .table-of-contents .toc-highlight,html[data-theme=dark] .try_iMNP{color:#b3b8d2}.heroBanner_qdFl code span,html[data-theme=dark] .theme-doc-sidebar-menu .menu__link--active,html[data-theme=dark] .theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active{color:#f2f3fb}.theme-doc-sidebar-menu .menu__link--active,.theme-doc-sidebar-menu .menu__link:hover,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link:hover{color:#242736}.hero,.relative_WWZZ{position:relative}html .theme-doc-sidebar-container{border:0}html .theme-doc-sidebar-container button{border:0;border-radius:10px}html .table-of-contents{border-left:0}html .table-of-contents ul{border-left:2px solid #dfe2f5}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:first-child:before,html.plugin-typedoc-api .theme-doc-sidebar-menu>li:nth-child(6):before{color:#6f7490;font-size:18px;line-height:28px;padding:20px 12px;text-transform:uppercase}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:first-child:before{content:"Core";display:block}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:nth-child(6):before{content:"Advanced";display:block;padding-top:60px}#giscus-comments{display:block;margin-top:50px}.sidebar_sponsor{height:60px;line-height:60px}.sidebar_sponsor_sec{margin-top:2px}.sidebar_sponsor_submit{border-bottom:2px solid #878282}.sidebar_sponsor_submit a{color:red;font-size:16px;font-weight:700}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px;line-height:0;padding:0}.announcementBarContent_xLdY{flex:1 1 auto;font-size:85%;padding:5px 0;text-align:center}.announcementBarContent_xLdY a{color:inherit;text-decoration:underline}.DocSearch-Container a,.navlink_fkkq:hover,.tag_zVej:hover{text-decoration:none}.toggle_MW0i{padding:3px}.toggleButton_yw5v{align-items:center;background:#cfd4eb;border-radius:160px;display:flex;height:26px;transition:all var(--ifm-transition-fast);width:52px}.tagWithCount_h2kH,.toggleButton_yw5v span{align-items:center;display:flex;position:relative}[data-theme=dark] .toggleButton_yw5v{background:#585e76}.toggleButton_yw5v span{background:#fff;border-radius:50%;color:#585e76;height:20px;justify-content:center;left:0;margin:3px;transition:all var(--ifm-transition-fast);vertical-align:middle;width:20px}[data-theme=dark] .toggleButton_yw5v span{background:#1a1b23;color:#b3b8d2;left:25px}.toggleButton_yw5v:hover span{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_BJd7{cursor:not-allowed}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.footerLogoLink_DDai{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_DDai:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_z2l0{flex:1 0 auto}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 rgba(0,0,0,.15);transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 rgba(0,0,0,.2)}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_sFm0{border-radius:.5rem;font-size:90%;padding:.3rem .5rem}.tagWithCount_h2kH{border-left:0;padding:0 .5rem 0 1rem}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.docMainContainer_gTbr,.docPage__5DB,.nav_uyzg{display:flex;width:100%}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{-webkit-animation:1s linear infinite a;animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@-webkit-keyframes a{to{transform:rotate(1turn)}}@keyframes a{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.container_UJDL{background-color:#18191a;color:#fff;min-height:100vh;padding:80px 20px 20px}.container_UJDL code{background-color:#444950;color:#fff}.nav_uyzg{align-items:center;background-color:#242526;height:3.75rem;justify-content:space-evenly;position:fixed;z-index:1}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.navlink_fkkq{border-radius:4px;color:#fff;font-size:clamp(12px,4vw,16px);font-weight:500;padding:6px;text-align:center}.name_omfq,.routeName_Q1Ui{color:#e06b6b}.navlink_fkkq:hover{background-color:#292a2b}.active_YJyX{background-color:#363739}.listItem_Ild6,.listItem_KhP1,.listItem_UIrj{background-color:#242526;border-radius:4px;margin-bottom:20px;padding:10px}.sectionTitle_gpPX{margin-top:20px}.name_omfq{font-weight:800}.route_NfVu{margin-bottom:10px}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;font:inherit}.DocSearch-Footer,.DocSearch-Help{-webkit-user-select:none;-moz-user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;-moz-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{-webkit-animation:.1s ease-in forwards b;animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:focus{outline:0}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a,.featureLine_xeBu{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@-webkit-keyframes b{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity .2s ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:.15s;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_LlT9{margin-bottom:1em}.admonitionHeading_tbUL{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_tbUL code{text-transform:none}.admonitionIcon_kALy{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_kALy svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.breadcrumbHomeIcon_OVgt{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.docItemContainer_c0TR,.heroButtons_r52D{margin-bottom:50px}.buttons_AeoN{align-items:center;display:flex;justify-content:center}.tagline_Bqj_{font-family:Lota Grotesque,sans-serif;font-size:64px;font-weight:600;letter-spacing:0;line-height:80px;text-align:left;transition:all var(--ifm-transition-fast)}.tagline_Bqj_ span{color:transparent!important;color:var(--ifm-color-primary)}.codeBlock_NVHr{max-width:400px;position:absolute;top:40%;width:100%}.heroBanner_qdFl{padding-bottom:4rem;padding-top:100px}.giteeStar_axBj,.giteeStar_axBj img{height:32px;line-height:32px}.heroBanner_qdFl h1:first-child{-webkit-text-fill-color:transparent;background:linear-gradient(225deg,#ffb200 .1%,#ffb100 8.15%,#ffaf02 15.6%,#feab04 22.55%,#fda606 29.08%,#fca00a 35.28%,#fb980e 41.26%,#fa9013 47.1%,#f98618 52.89%,#f77b1e 58.73%,#f56f24 64.71%,#f3632b 70.91%,#f25532 77.44%,#ef473a 84.39%,#ed3842 91.84%,#eb284b 99.9%),linear-gradient(0deg,#41465d,#41465d);-webkit-background-clip:text;background-clip:text}.heroBanner_qdFl h1:nth-child(2){position:absolute;top:0;width:calc(100% - 2rem);z-index:1}html .heroBanner_qdFl h2{color:#41465d;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:24px;font-style:normal;font-weight:400;line-height:40px;margin-bottom:24px;margin-top:8px}.heroBanner_qdFl code{background:#272c3d;padding:10px 20px}.heroBanner_qdFl button{margin-top:-2px;opacity:.4;padding:5px 8px}.heroBanner_qdFl button span{height:16px;margin:0;padding:0;width:16px}.logoBlur_PmTz{height:680px;left:-100px;position:absolute;top:-120px;width:680px;z-index:-1}.heroButtons_r52D{align-items:center;display:flex;gap:1rem}.getStarted_D36F{background:#ed3545;border-radius:8px;color:#fff;font-size:18px;font-weight:600;line-height:28px;padding:12px 24px}.getStarted_D36F:hover{background:#ad1934;color:#fff}html[data-theme=dark] .getStarted_D36F{border-color:#585e76}.try_iMNP{padding-top:20px}.features_cAfv,.try_iMNP{color:#41465d}.features_cAfv>*{margin:2em 0}.bottomLogo_ktCI path:first-child{fill:url(#gradient-1)!important;stroke:url(#gradient-1)!important;width:100px}.contributos_eJg6{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin-top:20px}.contributos_eJg6 img{border-radius:60%;height:100px;margin:5px;max-width:150px;width:100px}.contributor_eqdp{height:110px;text-align:center;width:110px}.features_r5tH{align-items:center;color:#41465d;display:flex;font-size:18px;line-height:32px;width:100%}.feature_YKcz svg{height:60px;width:60px}.features_r5tH svg path:first-child{fill:url(#gradient-1)!important}.features_r5tH svg path:nth-child(n+1){fill:url(#gradient-2)!important}html[data-theme=dark] .featureIcon_pR2E{background:#272c3d}.featureIcon_pR2E{align-items:center;background-color:#f2f3fb;border-radius:8px;display:flex;height:48px;justify-content:center;margin-bottom:24px;width:48px}.features_r5tH h3{font-size:24px;font-weight:700;line-height:20px;margin-left:15px}@media screen and (min-width:800px){.nav_uyzg{align-items:center;background-color:#18191a;border-right:1px solid #606770;flex-direction:column;float:left;height:100vh;justify-content:flex-start;padding-top:20px;width:200px}.navlink_fkkq{margin-top:20px;text-align:left;width:80%}.container_UJDL{float:right;padding-top:40px;width:calc(100% - 200px)}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;max-height:100vh;padding-top:var(--ifm-navbar-height);position:-webkit-sticky;position:sticky;top:0;transition:opacity 50ms;width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{height:0;opacity:0;overflow:hidden;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;max-height:100vh;position:-webkit-sticky;position:sticky;top:0;transition:background-color var(--ifm-transition-fast) ease}[dir=rtl] .expandButtonIcon_BlDH{transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.docItemCol_z5aJ,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media (min-width:997px) and (max-width:1130px){.navbar__link.changelog{display:none}}@media (min-width:997px) and (max-width:1250px){.navbar__items--right a.icon{display:none}}@media (min-width:997px) and (max-width:1439px){footer .col--offset-9{--ifm-col-width:33.33333%;margin-left:66.66667%}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media only screen and (min-device-width:997px) and (max-device-width:1100px){.tagline_Bqj_{font-size:48px;line-height:64px}}@media only screen and (min-device-width:1101px) and (max-device-width:1440px){.tagline_Bqj_{font-size:56px;line-height:78px}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_x44X,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-device-width:996px){.codeBlock_NVHr{position:relative;top:50px}.logoBlur_PmTz{display:none}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}}@media only screen and (max-device-width:736px){.heroBanner_qdFl{padding-bottom:2rem;padding-top:20px}.tagline_Bqj_{font-size:32px;line-height:48px}.hideSmall__p9W,.tagline_Bqj_ br{display:none}.codeBlock_NVHr{top:0}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media only screen and (max-device-width:450px){.codeBlock_NVHr code{font-size:.8em}.heroButtons_r52D{align-items:flex-start!important;flex-direction:column}.heroBanner_qdFl button{opacity:0}}@media only screen and (max-device-width:350px){.codeBlock_NVHr code{font-size:.7em}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);-webkit-animation:none;animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/css/styles.a0cea5e9.css b/knife4j-doc/gitee/assets/css/styles.a0cea5e9.css new file mode 100644 index 000000000..f26700c9d --- /dev/null +++ b/knife4j-doc/gitee/assets/css/styles.a0cea5e9.css @@ -0,0 +1 @@ +@import url(https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700&display=swap);.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.DocSearch-Button,.button{-webkit-user-select:none;-moz-user-select:none}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.close,.menu__caret:before,.menu__link--sublist:after,.version_eAdG{float:right}.toggleButton_yw5v span,html{-webkit-tap-highlight-color:transparent}.button,code{vertical-align:middle}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.cardContainer_fWXF,:root{--ifm-link-hover-decoration:none}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:transparent;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.contributorsHeader_VXgX,.sidebar_donate,.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_tbUL,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area.breadcrumbs__link[href]:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color)}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{margin-left:.3em;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_c0TR article>:first-child,.docItemContainer_c0TR header+*,.footer__item,article .card h2{margin-top:0}.admonitionContent_S0QG>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q>:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.docsWrapper_BCFX,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.contributos_eJg6:hover,.pills__item,.sidebar_sponsor:hover,.tabs__item{cursor:pointer}.navbar__search-input::-moz-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-duration:.25s;transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-duration:.1s;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.container_UJDL,html.plugin-pages .main-wrapper{overflow-x:hidden}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--ifm-navbar-background-color:#1a1b23;--ifm-background-color:#1a1b23;--ifm-background-surface-color:#242736;--ifm-font-color-base:#f2f3fb;--ifm-pre-background:#242736;--ifm-color-primary:#5d9df1;--ifm-link-color:#5d9df1;--ifm-heading-color:#f2f3fb;--ifm-navbar-link-color:#f2f3fb;--docusaurus-highlighted-code-line-bg:hsla(0,0%,100%,.1);--docsearch-text-color:#8d92af;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-font-family-base:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--ifm-heading-font-family:"Lota Grotesque",sans-serif;--ifm-font-weight-semibold:600;--ifm-font-color-base:#242736;--ifm-navbar-item-padding-horizontal:1.75rem;--ifm-navbar-link-color:#41465d;--ifm-navbar-shadow:none;--ifm-heading-margin-top:var(--ifm-heading-margin-bottom);--ifm-hero-background-color:transparent;--ifm-code-background:var(--ifm-pre-background)!important;--ifm-code-padding-horizontal:0.4rem;--ifm-code-padding-vertical:0.2rem;--ifm-color-primary-lightest:#5d9df1;--ifm-color-primary-lighter:#3a87ee;--ifm-color-primary-light:#2e80ed;--ifm-color-primary:#1672eb;--ifm-color-primary-dark:#1266d5;--ifm-color-primary-darker:#1161c9;--ifm-color-primary-darkest:#0e50a6;--ifm-link-color:#1471eb;--ifm-link-hover-color:#5b9cf1;--ifm-footer-background-color:#272c3d;--ifm-footer-title-color:#f2f3fb;--ifm-footer-link-color:#f2f3fb;--max-layout-width:1680px;--docusaurus-highlighted-code-line-bg:rgba(0,0,0,.1);--ifm-heading-color:#242736;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}@font-face{font-family:Lota Grotesque;font-weight:600;src:url(/assets/fonts/lota-77309eabb95901e7d9f4b36926b04ff4.woff2) format("woff2"),url(/assets/fonts/lota-31ef040823d4b74f60d31b865f7ed5b4.woff) format("woff")}.footer__title{font-size:1.25rem;font-weight:600}.footer__bottom a{opacity:.75}.footer__copyright{color:var(--ifm-footer-title-color)}#docusaurus-base-url-issue-banner-container,.collapseSidebarButton_PEFL,.docSidebarContainer_b6E3,.navbar svg[class*=iconExternalLink],.navbar__title,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_SFTY,[data-theme=light] .darkToggleIcon_ekgs,aside svg[class*=iconExternalLink],aside>div>a>b,h1#change-log,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.navbar__inner{max-width:calc(var(--max-layout-width) - 32px);padding:0 var(--ifm-spacing-horizontal);width:100%}.DocSearch-Button-Placeholder{font-size:14px!important}html .DocSearch-Button{background:#f9fafd;border:1px solid #c1c6dd;border-radius:6px!important;font-family:inherit;font-weight:400!important}html .DocSearch-Button .DocSearch-Search-Icon,html[data-theme=dark] .DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-muted-color)}html[data-theme=dark] .DocSearch-Button{background:none;border:1px solid var(--docsearch-muted-color)}.DocSearch-Button:hover{box-shadow:none!important}.main-wrapper,.navbar{justify-content:center}.main-wrapper>div{max-width:var(--max-layout-width)}aside>div>a{padding-left:16px}.dropdown>.navbar__link:after{border-color:currentcolor;border-style:solid;border-width:.1em .1em 0 0;content:"";display:inline-block;height:.4em;left:.3em;position:relative;top:9px;transform:rotate(135deg);vertical-align:top;width:.4em}.navbar .icon{font-size:0;line-height:0;margin-left:20px;padding:4px}.navbar .icon:before{background-size:cover;content:"";display:block;height:24px;width:24px}.navbar .icon[href*=github]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyBkYXRhLXByZWZpeD0iZmFiIiBkYXRhLWljb249ImdpdGh1YiIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWdpdGh1YiBmYS13LTE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OTYgNDk2Ij48cGF0aCBmaWxsPSIjNTg1RTc2IiBkPSJNMTY1LjkgMzk3LjRjMCAyLTIuMyAzLjYtNS4yIDMuNi0zLjMuMy01LjYtMS4zLTUuNi0zLjYgMC0yIDIuMy0zLjYgNS4yLTMuNiAzLS4zIDUuNiAxLjMgNS42IDMuNnptLTMxLjEtNC41Yy0uNyAyIDEuMyA0LjMgNC4zIDQuOSAyLjYgMSA1LjYgMCA2LjItMnMtMS4zLTQuMy00LjMtNS4yYy0yLjYtLjctNS41LjMtNi4yIDIuM3ptNDQuMi0xLjdjLTIuOS43LTQuOSAyLjYtNC42IDQuOS4zIDIgMi45IDMuMyA1LjkgMi42IDIuOS0uNyA0LjktMi42IDQuNi00LjYtLjMtMS45LTMtMy4yLTUuOS0yLjl6TTI0NC44IDhDMTA2LjEgOCAwIDExMy4zIDAgMjUyYzAgMTEwLjkgNjkuOCAyMDUuOCAxNjkuNSAyMzkuMiAxMi44IDIuMyAxNy4zLTUuNiAxNy4zLTEyLjEgMC02LjItLjMtNDAuNC0uMy02MS40IDAgMC03MCAxNS04NC43LTI5LjggMCAwLTExLjQtMjkuMS0yNy44LTM2LjYgMCAwLTIyLjktMTUuNyAxLjYtMTUuNCAwIDAgMjQuOSAyIDM4LjYgMjUuOCAyMS45IDM4LjYgNTguNiAyNy41IDcyLjkgMjAuOSAyLjMtMTYgOC44LTI3LjEgMTYtMzMuNy01NS45LTYuMi0xMTIuMy0xNC4zLTExMi4zLTExMC41IDAtMjcuNSA3LjYtNDEuMyAyMy42LTU4LjktMi42LTYuNS0xMS4xLTMzLjMgMi42LTY3LjkgMjAuOS02LjUgNjkgMjcgNjkgMjcgMjAtNS42IDQxLjUtOC41IDYyLjgtOC41czQyLjggMi45IDYyLjggOC41YzAgMCA0OC4xLTMzLjYgNjktMjcgMTMuNyAzNC43IDUuMiA2MS40IDIuNiA2Ny45IDE2IDE3LjcgMjUuOCAzMS41IDI1LjggNTguOSAwIDk2LjUtNTguOSAxMDQuMi0xMTQuOCAxMTAuNSA5LjIgNy45IDE3IDIyLjkgMTcgNDYuNCAwIDMzLjctLjMgNzUuNC0uMyA4My42IDAgNi41IDQuNiAxNC40IDE3LjMgMTIuMUM0MjguMiA0NTcuOCA0OTYgMzYyLjkgNDk2IDI1MiA0OTYgMTEzLjMgMzgzLjUgOCAyNDQuOCA4ek05Ny4yIDM1Mi45Yy0xLjMgMS0xIDMuMy43IDUuMiAxLjYgMS42IDMuOSAyLjMgNS4yIDEgMS4zLTEgMS0zLjMtLjctNS4yLTEuNi0xLjYtMy45LTIuMy01LjItMXptLTEwLjgtOC4xYy0uNyAxLjMuMyAyLjkgMi4zIDMuOSAxLjYgMSAzLjYuNyA0LjMtLjcuNy0xLjMtLjMtMi45LTIuMy0zLjktMi0uNi0zLjYtLjMtNC4zLjd6bTMyLjQgMzUuNmMtMS42IDEuMy0xIDQuMyAxLjMgNi4yIDIuMyAyLjMgNS4yIDIuNiA2LjUgMSAxLjMtMS4zLjctNC4zLTEuMy02LjItMi4yLTIuMy01LjItMi42LTYuNS0xem0tMTEuNC0xNC43Yy0xLjYgMS0xLjYgMy42IDAgNS45IDEuNiAyLjMgNC4zIDMuMyA1LjYgMi4zIDEuNi0xLjMgMS42LTMuOSAwLTYuMi0xLjQtMi4zLTQtMy4zLTUuNi0yeiIvPjwvc3ZnPg==)}html[data-theme=dark] .navbar .navbar__link[href*=github]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyBkYXRhLXByZWZpeD0iZmFiIiBkYXRhLWljb249ImdpdGh1YiIgY2xhc3M9InN2Zy1pbmxpbmUtLWZhIGZhLWdpdGh1YiBmYS13LTE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OTYgNDk2Ij48cGF0aCBmaWxsPSIjQjNCOEQyIiBkPSJNMTY1LjkgMzk3LjRjMCAyLTIuMyAzLjYtNS4yIDMuNi0zLjMuMy01LjYtMS4zLTUuNi0zLjYgMC0yIDIuMy0zLjYgNS4yLTMuNiAzLS4zIDUuNiAxLjMgNS42IDMuNnptLTMxLjEtNC41Yy0uNyAyIDEuMyA0LjMgNC4zIDQuOSAyLjYgMSA1LjYgMCA2LjItMnMtMS4zLTQuMy00LjMtNS4yYy0yLjYtLjctNS41LjMtNi4yIDIuM3ptNDQuMi0xLjdjLTIuOS43LTQuOSAyLjYtNC42IDQuOS4zIDIgMi45IDMuMyA1LjkgMi42IDIuOS0uNyA0LjktMi42IDQuNi00LjYtLjMtMS45LTMtMy4yLTUuOS0yLjl6TTI0NC44IDhDMTA2LjEgOCAwIDExMy4zIDAgMjUyYzAgMTEwLjkgNjkuOCAyMDUuOCAxNjkuNSAyMzkuMiAxMi44IDIuMyAxNy4zLTUuNiAxNy4zLTEyLjEgMC02LjItLjMtNDAuNC0uMy02MS40IDAgMC03MCAxNS04NC43LTI5LjggMCAwLTExLjQtMjkuMS0yNy44LTM2LjYgMCAwLTIyLjktMTUuNyAxLjYtMTUuNCAwIDAgMjQuOSAyIDM4LjYgMjUuOCAyMS45IDM4LjYgNTguNiAyNy41IDcyLjkgMjAuOSAyLjMtMTYgOC44LTI3LjEgMTYtMzMuNy01NS45LTYuMi0xMTIuMy0xNC4zLTExMi4zLTExMC41IDAtMjcuNSA3LjYtNDEuMyAyMy42LTU4LjktMi42LTYuNS0xMS4xLTMzLjMgMi42LTY3LjkgMjAuOS02LjUgNjkgMjcgNjkgMjcgMjAtNS42IDQxLjUtOC41IDYyLjgtOC41czQyLjggMi45IDYyLjggOC41YzAgMCA0OC4xLTMzLjYgNjktMjcgMTMuNyAzNC43IDUuMiA2MS40IDIuNiA2Ny45IDE2IDE3LjcgMjUuOCAzMS41IDI1LjggNTguOSAwIDk2LjUtNTguOSAxMDQuMi0xMTQuOCAxMTAuNSA5LjIgNy45IDE3IDIyLjkgMTcgNDYuNCAwIDMzLjctLjMgNzUuNC0uMyA4My42IDAgNi41IDQuNiAxNC40IDE3LjMgMTIuMUM0MjguMiA0NTcuOCA0OTYgMzYyLjkgNDk2IDI1MiA0OTYgMTEzLjMgMzgzLjUgOCAyNDQuOCA4ek05Ny4yIDM1Mi45Yy0xLjMgMS0xIDMuMy43IDUuMiAxLjYgMS42IDMuOSAyLjMgNS4yIDEgMS4zLTEgMS0zLjMtLjctNS4yLTEuNi0xLjYtMy45LTIuMy01LjItMXptLTEwLjgtOC4xYy0uNyAxLjMuMyAyLjkgMi4zIDMuOSAxLjYgMSAzLjYuNyA0LjMtLjcuNy0xLjMtLjMtMi45LTIuMy0zLjktMi0uNi0zLjYtLjMtNC4zLjd6bTMyLjQgMzUuNmMtMS42IDEuMy0xIDQuMyAxLjMgNi4yIDIuMyAyLjMgNS4yIDIuNiA2LjUgMSAxLjMtMS4zLjctNC4zLTEuMy02LjItMi4yLTIuMy01LjItMi42LTYuNS0xem0tMTEuNC0xNC43Yy0xLjYgMS0xLjYgMy42IDAgNS45IDEuNiAyLjMgNC4zIDMuMyA1LjYgMi4zIDEuNi0xLjMgMS42LTMuOSAwLTYuMi0xLjQtMi4zLTQtMy4zLTUuNi0yeiIvPjwvc3ZnPg==)}.navbar .icon[href*=discord]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzU4NUU3NiIgZD0iTTUwMCAwQzIyNCAwIDAgMjI0IDAgNTAwczIyNCA1MDAgNTAwIDUwMCA1MDAtMjI0IDUwMC01MDBTNzc2IDAgNTAwIDBNMzg2IDIwM2gybDcgOWMtMTI4IDM2LTE4NiA5Mi0xODYgOTJzMTUtOCA0MS0yMGM3Ni0zNCAxMzYtNDMgMTYxLTQ1IDQtMSA4LTEgMTItMSA0My02IDkyLTcgMTQzLTIgNjcgOCAxMzkgMjggMjEzIDY4IDAgMC01Ni01My0xNzYtOTBsOS0xMXM5Ny0yIDE5OSA3NGMwIDAgMTAyIDE4NSAxMDIgNDEyIDAgMC02MCAxMDMtMjE2IDEwOCAwIDAtMjYtMzAtNDctNTcgOTMtMjYgMTI4LTg0IDEyOC04NC0yOSAxOS01NyAzMi04MSA0MS0zNiAxNS03MCAyNS0xMDMgMzEtNjggMTItMTMwIDktMTgzLTEtNDAtOC03NS0xOS0xMDQtMzAtMTYtNy0zNC0xNS01Mi0yNC0yLTItNC0zLTYtNC0xLTEtMi0xLTMtMi0xMy03LTIwLTEyLTIwLTEyczM0IDU2IDEyNCA4M2MtMjEgMjctNDcgNTktNDcgNTktMTU3LTUtMjE2LTEwOC0yMTYtMTA4IDAtMjI3IDEwMi00MTIgMTAyLTQxMiA5NS03MSAxODYtNzQgMTk3LTc0bS0xOCAyNjRjLTQxIDAtNzIgMzUtNzIgNzhzMzIgNzkgNzIgNzkgNzItMzYgNzItNzljMS00My0zMi03OC03Mi03OG0yNTggMGMtNDAgMC03MiAzNS03MiA3OHMzMiA3OSA3MiA3OSA3Mi0zNiA3Mi03OS0zMi03OC03Mi03OCIvPjwvc3ZnPg==)}html[data-theme=dark] .navbar .navbar__link[href*=discord]:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI0IzQjhEMiIgZD0iTTUwMCAwQzIyNCAwIDAgMjI0IDAgNTAwczIyNCA1MDAgNTAwIDUwMCA1MDAtMjI0IDUwMC01MDBTNzc2IDAgNTAwIDBNMzg2IDIwM2gybDcgOWMtMTI4IDM2LTE4NiA5Mi0xODYgOTJzMTUtOCA0MS0yMGM3Ni0zNCAxMzYtNDMgMTYxLTQ1IDQtMSA4LTEgMTItMSA0My02IDkyLTcgMTQzLTIgNjcgOCAxMzkgMjggMjEzIDY4IDAgMC01Ni01My0xNzYtOTBsOS0xMXM5Ny0yIDE5OSA3NGMwIDAgMTAyIDE4NSAxMDIgNDEyIDAgMC02MCAxMDMtMjE2IDEwOCAwIDAtMjYtMzAtNDctNTcgOTMtMjYgMTI4LTg0IDEyOC04NC0yOSAxOS01NyAzMi04MSA0MS0zNiAxNS03MCAyNS0xMDMgMzEtNjggMTItMTMwIDktMTgzLTEtNDAtOC03NS0xOS0xMDQtMzAtMTYtNy0zNC0xNS01Mi0yNC0yLTItNC0zLTYtNC0xLTEtMi0xLTMtMi0xMy03LTIwLTEyLTIwLTEyczM0IDU2IDEyNCA4M2MtMjEgMjctNDcgNTktNDcgNTktMTU3LTUtMjE2LTEwOC0yMTYtMTA4IDAtMjI3IDEwMi00MTIgMTAyLTQxMiA5NS03MSAxODYtNzQgMTk3LTc0bS0xOCAyNjRjLTQxIDAtNzIgMzUtNzIgNzhzMzIgNzkgNzIgNzkgNzItMzYgNzItNzljMS00My0zMi03OC03Mi03OG0yNTggMGMtNDAgMC03MiAzNS03MiA3OHMzMiA3OSA3MiA3OSA3Mi0zNiA3Mi03OS0zMi03OC03Mi03OCIvPjwvc3ZnPg==)}header.hero div[class^=heroButtons]{justify-content:inherit}.menu__link,.table-of-contents__link,.tsd-kind-icon{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.table-of-contents__link{height:20px}nav.navbar .dropdown__menu{min-width:6rem}.main-wrapper a[class*=sidebarLogo] img,.navbar__logo{height:3rem}html.plugin-docs .theme-doc-markdown,html.plugin-pages{font-size:18px;line-height:32px}html.plugin-docs .theme-doc-markdown h2,html.plugin-pages h2{font-size:36px;line-height:48px}html.plugin-docs .theme-doc-markdown h1{color:#000;font-size:48px;font-weight:600;line-height:64px}html[data-theme=dark].plugin-docs .theme-doc-markdown h1,html[data-theme=dark].plugin-typedoc-api .theme-doc-markdown h1{color:#fff}html.plugin-typedoc-api .theme-doc-markdown h1{color:#000}html.plugin-docs .theme-doc-markdown h3{font-size:28px;line-height:36px}.theme-doc-toc-desktop .table-of-contents{font-size:16px;line-height:24px}.theme-doc-sidebar-menu .menu__link,.theme-doc-toc-desktop .table-of-contents .toc-highlight{background:none;color:#6f7490;height:auto}.theme-doc-sidebar-menu .menu__link:hover{background:inherit}.theme-doc-sidebar-menu .menu__link{font-weight:400}.theme-doc-sidebar-menu .menu__link--active,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active{font-weight:700}.theme-doc-sidebar-menu .menu__list-item-collapsible,.theme-doc-sidebar-menu .menu__list-item-collapsible--active{background:none}html[data-theme=dark] .features_cAfv,html[data-theme=dark] .features_r5tH,html[data-theme=dark] .heroBanner_qdFl h2,html[data-theme=dark] .theme-doc-sidebar-menu .menu__link,html[data-theme=dark] .theme-doc-toc-desktop .table-of-contents .toc-highlight,html[data-theme=dark] .try_iMNP{color:#b3b8d2}.heroBanner_qdFl code span,html[data-theme=dark] .theme-doc-sidebar-menu .menu__link--active,html[data-theme=dark] .theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active{color:#f2f3fb}.theme-doc-sidebar-menu .menu__link--active,.theme-doc-sidebar-menu .menu__link:hover,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link--active,.theme-doc-toc-desktop .table-of-contents .table-of-contents__link:hover{color:#242736}.hero,.relative_WWZZ{position:relative}html .theme-doc-sidebar-container{border:0}html .theme-doc-sidebar-container button{border:0;border-radius:10px}html .table-of-contents{border-left:0}html .table-of-contents ul{border-left:2px solid #dfe2f5}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:first-child:before,html.plugin-typedoc-api .theme-doc-sidebar-menu>li:nth-child(6):before{color:#6f7490;font-size:18px;line-height:28px;padding:20px 12px;text-transform:uppercase}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:first-child:before{content:"Core";display:block}html.plugin-typedoc-api .theme-doc-sidebar-menu>li:nth-child(6):before{content:"Advanced";display:block;padding-top:60px}#giscus-comments{display:block;margin-top:50px}.sidebar_sponsor{height:60px;line-height:60px}.sidebar_sponsor_sec{margin-top:2px}.sidebar_sponsor_submit{border-bottom:2px solid #878282}.sidebar_sponsor_submit a{color:red;font-size:16px;font-weight:700}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px;line-height:0;padding:0}.announcementBarContent_xLdY{flex:1 1 auto;font-size:85%;padding:5px 0;text-align:center}.announcementBarContent_xLdY a{color:inherit;text-decoration:underline}.DocSearch-Container a,.navlink_fkkq:hover,.tag_zVej:hover{text-decoration:none}.toggle_MW0i{padding:3px}.toggleButton_yw5v{align-items:center;background:#cfd4eb;border-radius:160px;display:flex;height:26px;transition:all var(--ifm-transition-fast);width:52px}.tagWithCount_h2kH,.toggleButton_yw5v span{align-items:center;display:flex;position:relative}[data-theme=dark] .toggleButton_yw5v{background:#585e76}.toggleButton_yw5v span{background:#fff;border-radius:50%;color:#585e76;height:20px;justify-content:center;left:0;margin:3px;transition:all var(--ifm-transition-fast);vertical-align:middle;width:20px}[data-theme=dark] .toggleButton_yw5v span{background:#1a1b23;color:#b3b8d2;left:25px}.toggleButton_yw5v:hover span{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_BJd7{cursor:not-allowed}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.footerLogoLink_DDai{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_DDai:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_z2l0{flex:1 0 auto}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 rgba(0,0,0,.15);transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 rgba(0,0,0,.2)}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_sFm0{border-radius:.5rem;font-size:90%;padding:.3rem .5rem}.tagWithCount_h2kH{border-left:0;padding:0 .5rem 0 1rem}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.docMainContainer_gTbr,.docPage__5DB,.nav_uyzg{display:flex;width:100%}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-moz-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.container_UJDL{background-color:#18191a;color:#fff;min-height:100vh;padding:80px 20px 20px}.container_UJDL code{background-color:#444950;color:#fff}.nav_uyzg{align-items:center;background-color:#242526;height:3.75rem;justify-content:space-evenly;position:fixed;z-index:1}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.navlink_fkkq{border-radius:4px;color:#fff;font-size:clamp(12px,4vw,16px);font-weight:500;padding:6px;text-align:center}.name_omfq,.routeName_Q1Ui{color:#e06b6b}.navlink_fkkq:hover{background-color:#292a2b}.active_YJyX{background-color:#363739}.listItem_Ild6,.listItem_KhP1,.listItem_UIrj{background-color:#242526;border-radius:4px;margin-bottom:20px;padding:10px}.sectionTitle_gpPX{margin-top:20px}.name_omfq{font-weight:800}.route_NfVu{margin-bottom:10px}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;font:inherit}.DocSearch-Footer,.DocSearch-Help{-webkit-user-select:none;-moz-user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;-moz-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a,.featureLine_xeBu{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity .2s ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:.15s;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_LlT9{margin-bottom:1em}.admonitionHeading_tbUL{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_tbUL code{text-transform:none}.admonitionIcon_kALy{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_kALy svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.breadcrumbHomeIcon_OVgt{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}.docItemContainer_c0TR,.heroButtons_r52D{margin-bottom:50px}.buttons_AeoN{align-items:center;display:flex;justify-content:center}.tagline_Bqj_{font-family:Lota Grotesque,sans-serif;font-size:64px;font-weight:600;letter-spacing:0;line-height:80px;text-align:left;transition:all var(--ifm-transition-fast)}.tagline_Bqj_ span{color:transparent!important;color:var(--ifm-color-primary)}.codeBlock_NVHr{max-width:400px;position:absolute;top:40%;width:100%}.heroBanner_qdFl{padding-bottom:4rem;padding-top:100px}.giteeStar_axBj,.giteeStar_axBj img{height:32px;line-height:32px}.heroBanner_qdFl h1:first-child{-webkit-text-fill-color:transparent;background:linear-gradient(225deg,#ffb200 .1%,#ffb100 8.15%,#ffaf02 15.6%,#feab04 22.55%,#fda606 29.08%,#fca00a 35.28%,#fb980e 41.26%,#fa9013 47.1%,#f98618 52.89%,#f77b1e 58.73%,#f56f24 64.71%,#f3632b 70.91%,#f25532 77.44%,#ef473a 84.39%,#ed3842 91.84%,#eb284b 99.9%),linear-gradient(0deg,#41465d,#41465d);-webkit-background-clip:text;background-clip:text}.heroBanner_qdFl h1:nth-child(2){position:absolute;top:0;width:calc(100% - 2rem);z-index:1}html .heroBanner_qdFl h2{color:#41465d;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:24px;font-style:normal;font-weight:400;line-height:40px;margin-bottom:24px;margin-top:8px}.heroBanner_qdFl code{background:#272c3d;padding:10px 20px}.heroBanner_qdFl button{margin-top:-2px;opacity:.4;padding:5px 8px}.heroBanner_qdFl button span{height:16px;margin:0;padding:0;width:16px}.logoBlur_PmTz{height:680px;left:-100px;position:absolute;top:-120px;width:680px;z-index:-1}.heroButtons_r52D{align-items:center;display:flex;gap:1rem}.getStarted_D36F{background:#ed3545;border-radius:8px;color:#fff;font-size:18px;font-weight:600;line-height:28px;padding:12px 24px}.getStarted_D36F:hover{background:#ad1934;color:#fff}html[data-theme=dark] .getStarted_D36F{border-color:#585e76}.try_iMNP{padding-top:20px}.features_cAfv,.try_iMNP{color:#41465d}.features_cAfv>*{margin:2em 0}.bottomLogo_ktCI path:first-child{fill:url(#gradient-1)!important;stroke:url(#gradient-1)!important;width:100px}.contributos_eJg6{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin-top:20px}.contributos_eJg6 img{border-radius:60%;height:100px;margin:5px;max-width:150px;width:100px}.contributor_eqdp{height:110px;text-align:center;width:110px}.features_r5tH{align-items:center;color:#41465d;display:flex;font-size:18px;line-height:32px;width:100%}.feature_YKcz svg{height:60px;width:60px}.features_r5tH svg path:first-child{fill:url(#gradient-1)!important}.features_r5tH svg path:nth-child(n+1){fill:url(#gradient-2)!important}html[data-theme=dark] .featureIcon_pR2E{background:#272c3d}.featureIcon_pR2E{align-items:center;background-color:#f2f3fb;border-radius:8px;display:flex;height:48px;justify-content:center;margin-bottom:24px;width:48px}.features_r5tH h3{font-size:24px;font-weight:700;line-height:20px;margin-left:15px}@media screen and (min-width:800px){.nav_uyzg{align-items:center;background-color:#18191a;border-right:1px solid #606770;flex-direction:column;float:left;height:100vh;justify-content:flex-start;padding-top:20px;width:200px}.navlink_fkkq{margin-top:20px;text-align:left;width:80%}.container_UJDL{float:right;padding-top:40px;width:calc(100% - 200px)}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg);position:sticky}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;max-height:100vh;padding-top:var(--ifm-navbar-height);position:sticky;top:0;transition:opacity 50ms;width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{height:0;opacity:0;overflow:hidden;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;max-height:100vh;top:0;transition:background-color var(--ifm-transition-fast) ease}[dir=rtl] .expandButtonIcon_BlDH{transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.docItemCol_z5aJ,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media (min-width:997px) and (max-width:1130px){.navbar__link.changelog{display:none}}@media (min-width:997px) and (max-width:1250px){.navbar__items--right a.icon{display:none}}@media (min-width:997px) and (max-width:1439px){footer .col--offset-9{--ifm-col-width:33.33333%;margin-left:66.66667%}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media only screen and (min-device-width:997px) and (max-device-width:1100px){.tagline_Bqj_{font-size:48px;line-height:64px}}@media only screen and (min-device-width:1101px) and (max-device-width:1440px){.tagline_Bqj_{font-size:56px;line-height:78px}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_x44X,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-device-width:996px){.codeBlock_NVHr{position:relative;top:50px}.logoBlur_PmTz{display:none}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}}@media only screen and (max-device-width:736px){.heroBanner_qdFl{padding-bottom:2rem;padding-top:20px}.tagline_Bqj_{font-size:32px;line-height:48px}.hideSmall__p9W,.tagline_Bqj_ br{display:none}.codeBlock_NVHr{top:0}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media only screen and (max-device-width:450px){.codeBlock_NVHr code{font-size:.8em}.heroButtons_r52D{align-items:flex-start!important;flex-direction:column}.heroBanner_qdFl button{opacity:0}}@media only screen and (max-device-width:350px){.codeBlock_NVHr code{font-size:.7em}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/images/Claude-a1-30b6406f717695e8ea9e57b43dca67c3.png b/knife4j-doc/gitee/assets/images/Claude-a1-30b6406f717695e8ea9e57b43dca67c3.png new file mode 100644 index 000000000..af60089bd Binary files /dev/null and b/knife4j-doc/gitee/assets/images/Claude-a1-30b6406f717695e8ea9e57b43dca67c3.png differ diff --git a/knife4j-doc/gitee/assets/images/Claude-a2-51bf23182408a2e5fb4e13c980cf5a86.png b/knife4j-doc/gitee/assets/images/Claude-a2-51bf23182408a2e5fb4e13c980cf5a86.png new file mode 100644 index 000000000..a624ce7d6 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/Claude-a2-51bf23182408a2e5fb4e13c980cf5a86.png differ diff --git a/knife4j-doc/gitee/assets/images/Knife4jInsight-1210a90b5ed9e1ae9a2704ec69d6e9c3.png b/knife4j-doc/gitee/assets/images/Knife4jInsight-1210a90b5ed9e1ae9a2704ec69d6e9c3.png new file mode 100644 index 000000000..359e0d2de Binary files /dev/null and b/knife4j-doc/gitee/assets/images/Knife4jInsight-1210a90b5ed9e1ae9a2704ec69d6e9c3.png differ diff --git "a/knife4j-doc/gitee/assets/images/LLM\345\244\247\346\250\241\345\236\213-936e2ce46c352d281f79b9ecb143aa48.png" "b/knife4j-doc/gitee/assets/images/LLM\345\244\247\346\250\241\345\236\213-936e2ce46c352d281f79b9ecb143aa48.png" new file mode 100644 index 000000000..38d9b6f6b Binary files /dev/null and "b/knife4j-doc/gitee/assets/images/LLM\345\244\247\346\250\241\345\236\213-936e2ce46c352d281f79b9ecb143aa48.png" differ diff --git a/knife4j-doc/gitee/assets/images/api-d4d5285cfad83f462df78e57cbcf66a5.jpg b/knife4j-doc/gitee/assets/images/api-d4d5285cfad83f462df78e57cbcf66a5.jpg new file mode 100644 index 000000000..a1638bf78 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/api-d4d5285cfad83f462df78e57cbcf66a5.jpg differ diff --git a/knife4j-doc/gitee/assets/images/api-info-b2a9d8e05123e9cc6a566096c6c02e75.png b/knife4j-doc/gitee/assets/images/api-info-b2a9d8e05123e9cc6a566096c6c02e75.png new file mode 100644 index 000000000..1618c299a Binary files /dev/null and b/knife4j-doc/gitee/assets/images/api-info-b2a9d8e05123e9cc6a566096c6c02e75.png differ diff --git a/knife4j-doc/gitee/assets/images/customer-api-preview-4d0f6fa683bc8ddf82201bf34378a819.jpg b/knife4j-doc/gitee/assets/images/customer-api-preview-4d0f6fa683bc8ddf82201bf34378a819.jpg new file mode 100644 index 000000000..fd7e9e958 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/customer-api-preview-4d0f6fa683bc8ddf82201bf34378a819.jpg differ diff --git a/knife4j-doc/gitee/assets/images/enum-common-835175c8546cc24e1693e7f89f5678a8.jpg b/knife4j-doc/gitee/assets/images/enum-common-835175c8546cc24e1693e7f89f5678a8.jpg new file mode 100644 index 000000000..4287bb3b6 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/enum-common-835175c8546cc24e1693e7f89f5678a8.jpg differ diff --git a/knife4j-doc/gitee/assets/images/enum-form-debug-807907368b18beee4f289fb26758ce39.jpg b/knife4j-doc/gitee/assets/images/enum-form-debug-807907368b18beee4f289fb26758ce39.jpg new file mode 100644 index 000000000..8bd1843d5 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/enum-form-debug-807907368b18beee4f289fb26758ce39.jpg differ diff --git a/knife4j-doc/gitee/assets/images/enum-form-fce0860443c836dd5bc7900e3ac5135f.png b/knife4j-doc/gitee/assets/images/enum-form-fce0860443c836dd5bc7900e3ac5135f.png new file mode 100644 index 000000000..e1af6c2ac Binary files /dev/null and b/knife4j-doc/gitee/assets/images/enum-form-fce0860443c836dd5bc7900e3ac5135f.png differ diff --git a/knife4j-doc/gitee/assets/images/enum-json-e1bb32bad52da2046aba8bd49c913695.jpg b/knife4j-doc/gitee/assets/images/enum-json-e1bb32bad52da2046aba8bd49c913695.jpg new file mode 100644 index 000000000..448bb0513 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/enum-json-e1bb32bad52da2046aba8bd49c913695.jpg differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531084614527-6dc019911e87075af7034f24b017d261.png b/knife4j-doc/gitee/assets/images/image-20230531084614527-6dc019911e87075af7034f24b017d261.png new file mode 100644 index 000000000..97e493a01 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531084614527-6dc019911e87075af7034f24b017d261.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531084806837-1f3e1732abf86c28677d723066281a5c.png b/knife4j-doc/gitee/assets/images/image-20230531084806837-1f3e1732abf86c28677d723066281a5c.png new file mode 100644 index 000000000..f697c4952 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531084806837-1f3e1732abf86c28677d723066281a5c.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531085415798-1a89f813ac03d73876166faaa12f4bae.png b/knife4j-doc/gitee/assets/images/image-20230531085415798-1a89f813ac03d73876166faaa12f4bae.png new file mode 100644 index 000000000..f85bc5c95 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531085415798-1a89f813ac03d73876166faaa12f4bae.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531085636057-57762d80230ee867ce9bdfad76b8ec72.png b/knife4j-doc/gitee/assets/images/image-20230531085636057-57762d80230ee867ce9bdfad76b8ec72.png new file mode 100644 index 000000000..a3be0f834 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531085636057-57762d80230ee867ce9bdfad76b8ec72.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531085907655-5900e5327bf01895562908ea0edd7ca8.png b/knife4j-doc/gitee/assets/images/image-20230531085907655-5900e5327bf01895562908ea0edd7ca8.png new file mode 100644 index 000000000..93590c114 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531085907655-5900e5327bf01895562908ea0edd7ca8.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531090016683-9064961a5af2d2dfecca2e5bb9c7c27f.png b/knife4j-doc/gitee/assets/images/image-20230531090016683-9064961a5af2d2dfecca2e5bb9c7c27f.png new file mode 100644 index 000000000..2d120fcdb Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531090016683-9064961a5af2d2dfecca2e5bb9c7c27f.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531090327502-0b516ecae8ef3ae40b4e721e925557c9.png b/knife4j-doc/gitee/assets/images/image-20230531090327502-0b516ecae8ef3ae40b4e721e925557c9.png new file mode 100644 index 000000000..7c78be8e5 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531090327502-0b516ecae8ef3ae40b4e721e925557c9.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531090727879-0ecd2bd1e6672c1f9184b87927e4bf5a.png b/knife4j-doc/gitee/assets/images/image-20230531090727879-0ecd2bd1e6672c1f9184b87927e4bf5a.png new file mode 100644 index 000000000..5ee059999 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531090727879-0ecd2bd1e6672c1f9184b87927e4bf5a.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531091127138-0bc64924034501e38faf5c34c0258176.png b/knife4j-doc/gitee/assets/images/image-20230531091127138-0bc64924034501e38faf5c34c0258176.png new file mode 100644 index 000000000..c28c775db Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531091127138-0bc64924034501e38faf5c34c0258176.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531093722644-f7b6f3879b6d3ac978e400b38fdec1d3.png b/knife4j-doc/gitee/assets/images/image-20230531093722644-f7b6f3879b6d3ac978e400b38fdec1d3.png new file mode 100644 index 000000000..4ee82d6d5 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531093722644-f7b6f3879b6d3ac978e400b38fdec1d3.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531093833450-59ba69b2b63dfb6bc2cf2346fe0ae521.png b/knife4j-doc/gitee/assets/images/image-20230531093833450-59ba69b2b63dfb6bc2cf2346fe0ae521.png new file mode 100644 index 000000000..dab4d1a58 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531093833450-59ba69b2b63dfb6bc2cf2346fe0ae521.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531094244587-e3b2154e3507eeffaad0a1a7b499d1ce.png b/knife4j-doc/gitee/assets/images/image-20230531094244587-e3b2154e3507eeffaad0a1a7b499d1ce.png new file mode 100644 index 000000000..bd282921c Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531094244587-e3b2154e3507eeffaad0a1a7b499d1ce.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531095255948-bdbfd183a9d8b73c5e7d71b130615410.png b/knife4j-doc/gitee/assets/images/image-20230531095255948-bdbfd183a9d8b73c5e7d71b130615410.png new file mode 100644 index 000000000..4be928a34 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531095255948-bdbfd183a9d8b73c5e7d71b130615410.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531095409479-d859905be7fb87fa666e16cf08ab6973.png b/knife4j-doc/gitee/assets/images/image-20230531095409479-d859905be7fb87fa666e16cf08ab6973.png new file mode 100644 index 000000000..88a2ff1bc Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531095409479-d859905be7fb87fa666e16cf08ab6973.png differ diff --git a/knife4j-doc/gitee/assets/images/image-20230531095906380-bc7396609ad174b0dd62d2b6f926b28c.png b/knife4j-doc/gitee/assets/images/image-20230531095906380-bc7396609ad174b0dd62d2b6f926b28c.png new file mode 100644 index 000000000..210145032 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/image-20230531095906380-bc7396609ad174b0dd62d2b6f926b28c.png differ diff --git a/knife4j-doc/gitee/assets/images/js-fun-bbe916ae5e4daeaaf64bc5484fe63c5c.jpg b/knife4j-doc/gitee/assets/images/js-fun-bbe916ae5e4daeaaf64bc5484fe63c5c.jpg new file mode 100644 index 000000000..3c6d0c438 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/js-fun-bbe916ae5e4daeaaf64bc5484fe63c5c.jpg differ diff --git a/knife4j-doc/gitee/assets/images/knife4j-gateway-service-5ecb52aeaac526d378aca862c8542fc7.png b/knife4j-doc/gitee/assets/images/knife4j-gateway-service-5ecb52aeaac526d378aca862c8542fc7.png new file mode 100644 index 000000000..aaae14bb3 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/knife4j-gateway-service-5ecb52aeaac526d378aca862c8542fc7.png differ diff --git a/knife4j-doc/gitee/assets/images/knife4j-gateway-service3-f9ef80b91b014a8490d9a910f2f34eaa.png b/knife4j-doc/gitee/assets/images/knife4j-gateway-service3-f9ef80b91b014a8490d9a910f2f34eaa.png new file mode 100644 index 000000000..a7d3d0791 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/knife4j-gateway-service3-f9ef80b91b014a8490d9a910f2f34eaa.png differ diff --git a/knife4j-doc/gitee/assets/images/llm2-98ed462e8e0c180a00fb19b0b9bdd759.png b/knife4j-doc/gitee/assets/images/llm2-98ed462e8e0c180a00fb19b0b9bdd759.png new file mode 100644 index 000000000..caba05c3b Binary files /dev/null and b/knife4j-doc/gitee/assets/images/llm2-98ed462e8e0c180a00fb19b0b9bdd759.png differ diff --git a/knife4j-doc/gitee/assets/images/namespace-b0c09760cea4f55d3e4e574ddc83a8c1.jpg b/knife4j-doc/gitee/assets/images/namespace-b0c09760cea4f55d3e4e574ddc83a8c1.jpg new file mode 100644 index 000000000..fedac523f Binary files /dev/null and b/knife4j-doc/gitee/assets/images/namespace-b0c09760cea4f55d3e4e574ddc83a8c1.jpg differ diff --git a/knife4j-doc/gitee/assets/images/namespace-show-14e3b4dd38ac86345de594ef9bc90e1c.jpg b/knife4j-doc/gitee/assets/images/namespace-show-14e3b4dd38ac86345de594ef9bc90e1c.jpg new file mode 100644 index 000000000..6a293bc8e Binary files /dev/null and b/knife4j-doc/gitee/assets/images/namespace-show-14e3b4dd38ac86345de594ef9bc90e1c.jpg differ diff --git a/knife4j-doc/gitee/assets/images/show-4f599d3946fca4371aa2a90d26f70c5f.jpg b/knife4j-doc/gitee/assets/images/show-4f599d3946fca4371aa2a90d26f70c5f.jpg new file mode 100644 index 000000000..741d604b1 Binary files /dev/null and b/knife4j-doc/gitee/assets/images/show-4f599d3946fca4371aa2a90d26f70c5f.jpg differ diff --git a/knife4j-doc/gitee/assets/images/source-property-70e4481a74afcb80f26253be1111826e.jpg b/knife4j-doc/gitee/assets/images/source-property-70e4481a74afcb80f26253be1111826e.jpg new file mode 100644 index 000000000..454b7794b Binary files /dev/null and b/knife4j-doc/gitee/assets/images/source-property-70e4481a74afcb80f26253be1111826e.jpg differ diff --git a/knife4j-doc/gitee/assets/js/02934c71.1a11fd7e.js b/knife4j-doc/gitee/assets/js/02934c71.1a11fd7e.js new file mode 100644 index 000000000..35e64e7f0 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/02934c71.1a11fd7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3031],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>k});var i=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=i.createContext({}),s=function(e){var n=i.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=s(e.components);return i.createElement(l.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},d=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=s(t),d=r,k=c["".concat(l,".").concat(d)]||c[d]||m[d]||a;return t?i.createElement(k,o(o({ref:n},u),{},{components:t})):i.createElement(k,o({ref:n},u))}));function k(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,o=new Array(a);o[0]=d;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[c]="string"==typeof e?e:r,o[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>k,frontMatter:()=>p,metadata:()=>s,toc:()=>c});var i=t(87462),r=t(63366),a=(t(67294),t(3905)),o=["components"],p={},l="3.2 i18n\u56fd\u9645\u5316",s={unversionedId:"features/i18n",id:"features/i18n",title:"3.2 i18n\u56fd\u9645\u5316",description:"\u5728Knife4j 2.0.3\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587",source:"@site/docs/features/i18n.md",sourceDirName:"features",slug:"/features/i18n",permalink:"/docs/features/i18n",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.1 \u589e\u5f3a\u6a21\u5f0f",permalink:"/docs/features/enhance"},next:{title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",permalink:"/docs/features/author"}},u={},c=[{value:"3.2.1 \u6587\u6863\u4e2d\u9009\u62e9",id:"321-\u6587\u6863\u4e2d\u9009\u62e9",level:2},{value:"3.2.2 \u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n",id:"322-\u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n",level:2},{value:"3.2.3 \u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a",id:"323-\u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a",level:2},{value:"3.2.4 \u63a5\u53e3\u3001\u6ce8\u91ca\u3001\u53c2\u6570\u5168\u90e8i18n",id:"324-\u63a5\u53e3\u6ce8\u91ca\u53c2\u6570\u5168\u90e8i18n",level:2}],m={toc:c},d="wrapper";function k(e){var n=e.components,p=(0,r.Z)(e,o);return(0,a.kt)(d,(0,i.Z)({},m,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"32-i18n\u56fd\u9645\u5316"},"3.2 i18n\u56fd\u9645\u5316"),(0,a.kt)("p",null,"\u5728Knife4j ",(0,a.kt)("inlineCode",{parentName:"p"},"2.0.3"),"\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587"),(0,a.kt)("p",null,"\u90a3\u4e48,\u5982\u4f55\u4f7f\u7528\u5462?"),(0,a.kt)("h2",{id:"321-\u6587\u6863\u4e2d\u9009\u62e9"},"3.2.1 \u6587\u6863\u4e2d\u9009\u62e9"),(0,a.kt)("p",null,"\u901a\u8fc7\u8bbf\u95ee",(0,a.kt)("inlineCode",{parentName:"p"},"doc.html"),"\u6253\u5f00\u6587\u6863\u754c\u9762,\u53ef\u4ee5\u5728\u6587\u6863\u7684\u53f3\u4e0a\u89d2\u770b\u5230\u8bed\u8a00\u7684\u9009\u62e9,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(92084).Z,width:"403",height:"235"})),(0,a.kt)("p",null,"\u76f4\u63a5\u9009\u62e9\u76f8\u5e94\u7684\u8bed\u8a00\u7248\u672c\u5373\u53ef"),(0,a.kt)("h2",{id:"322-\u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n"},"3.2.2 \u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n"),(0,a.kt)("p",null,"Knife4j\u4e5f\u63d0\u4f9b\u4e86\u901a\u8fc7\u5730\u5740\u680f\u76f4\u63a5\u5c06\u6587\u6863\u663e\u793a\u4e3a\u6307\u5b9a\u7684\u8bed\u8a00\u663e\u793a "),(0,a.kt)("p",null,"\u8bbf\u95ee\u5730\u5740\u89c4\u5219\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u4e2d\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/home/zh-CN")),(0,a.kt)("li",{parentName:"ul"},"\u82f1\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/home/en-US"))),(0,a.kt)("p",null,"\u53e6\u5916,\u5982\u679c\u4f60\u662f\u4f7f\u7528\u4e86",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j"),"\u63d0\u4f9b\u7684",(0,a.kt)("a",{parentName:"p",href:"/docs/features/enhance",target:null,rel:null},"\u589e\u5f3a\u529f\u80fd"),",\u4f60\u4e5f\u53ef\u4ee5\u8fd9\u6837\u8bbf\u95ee"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u4e2d\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/plus/zh-CN")),(0,a.kt)("li",{parentName:"ul"},"\u82f1\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/plus/en-US"))),(0,a.kt)("h2",{id:"323-\u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a"},"3.2.3 \u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a"),(0,a.kt)("p",null," \u5f53\u7136\uff0c\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u5728\u540e\u7aef\u63a7\u5236\u6587\u6863\u8bed\u8a00\u5448\u73b0\u65b9\u5f0f(\u81ea2.0.6\u7248\u672c\u5f00\u59cb)"),(0,a.kt)("p",null," yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n setting:\n # Knife4j\u9ed8\u8ba4\u663e\u793a\u4e2d\u6587(zh-CN),\u5982\u679c\u5f00\u53d1\u8005\u60f3\u76f4\u63a5\u663e\u793a\u82f1\u6587(en-US)\uff0c\u5728\u901a\u8fc7\u8be5\u914d\u7f6e\u8fdb\u884c\u8bbe\u7f6e\u5373\u53ef\n language: zh-CN\n")),(0,a.kt)("p",null,"\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u540e,\u8fd8\u9700\u8981\u5728\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7\u8c03\u7528Knife4j\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u4e00\u4e2aOpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u7ed3\u6784"),(0,a.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,a.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,a.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,a.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,a.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,a.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-setting"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("img",{src:t(39060).Z,width:"861",height:"184"}))),(0,a.kt)("h2",{id:"324-\u63a5\u53e3\u6ce8\u91ca\u53c2\u6570\u5168\u90e8i18n"},"3.2.4 \u63a5\u53e3\u3001\u6ce8\u91ca\u3001\u53c2\u6570\u5168\u90e8i18n"),(0,a.kt)("p",null," \u5982\u679c\u5f00\u53d1\u8005\u7ee7\u7eed\u4f7f\u7528\u7684\u662fOpenAPI2\u89c4\u8303\uff0c\u81eaKnife4j 4.0\u7248\u672c\uff0c\u63d0\u4f9b\u4e86\u9488\u5bf9\u63a5\u53e3\u3001\u53c2\u6570\u6ce8\u91ca\u7b49\u5168\u90e8i18n\u7684\u5904\u7406\u65b9\u6848"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"1\u3001\u5f15\u7528\u7684starter\u5fc5\u987b\u662f",(0,a.kt)("inlineCode",{parentName:"p"},"knfie4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\uff0c",(0,a.kt)("inlineCode",{parentName:"p"},"openapi3"),"\u6ca1\u6709\u6b64\u529f\u80fd\n2\u3001\u793a\u4f8b\u4ee3\u7801\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-boot27-demo",target:"_blank",rel:"noopener"},"knife4j-spring-boot27-demo"))),(0,a.kt)("p",null," \u7b2c\u4e00\u6b65\uff0c\u914d\u7f6e\u5f00\u542fSpring Boot \u6846\u67b6\u7684i18n\u529f\u80fd\uff0c\u589e\u52a0i18n\u7684\u914d\u7f6e\u5c5e\u6027\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"\nspring:\n messages:\n basename: i18n/message\n encoding: utf-8\n cache-duration: 3600\n\n")),(0,a.kt)("p",null," \u7b2c\u4e8c\u6b65,\u914d\u7f6e\u65b0\u589ei18n\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"src/main/resources"),"\u76ee\u5f55\u4e0b\uff0c\u65b0\u5efa",(0,a.kt)("inlineCode",{parentName:"p"},"i18n/message"),"\u6587\u4ef6\u5939,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(90261).Z,width:"1642",height:"388"})),(0,a.kt)("p",null,"\u7b2c\u4e09\u6b65\uff0c\u4fee\u6539\u4ee3\u7801\u4e2d\u7684\u6ce8\u91ca\u914d\u7f6e\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'\n\n@ApiOperation(value = "API_JOB_I18n",notes = "API_JOB_I18n_DESC")\n@PostMapping("/hidden3")\npublic ResponseEntity i18n3(@RequestBody ModelUser sysUser){\n return ResponseEntity.ok(sysUser);\n}\n\n')),(0,a.kt)("p",null,"\u7b2c\u56db\u6b65\uff0c\u8bbe\u7f6eKnife4j\u63d0\u4f9b\u7684\u589e\u5f3a\u914d\u7f6e\uff0c\u5f00\u53d1\u8005\u81ea\u884c\u9009\u62e9\u662f\u4e2d\u6587\u8fd8\u662f\u82f1\u6587\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"\nknife4j:\n enable: true\n setting:\n # Knife4j\u9ed8\u8ba4\u663e\u793a\u4e2d\u6587(zh-CN),\u5982\u679c\u5f00\u53d1\u8005\u60f3\u76f4\u63a5\u663e\u793a\u82f1\u6587(en-US)\uff0c\u5728\u901a\u8fc7\u8be5\u914d\u7f6e\u8fdb\u884c\u8bbe\u7f6e\u5373\u53ef\n language: zh-CN\n")))}k.isMDXComponent=!0},90261:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/i18n_message-4378be91dc01f99ea233bf9394f27ae0.png"},39060:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/language-5e48af754756f49bc6394d4023d3a0c5.png"},92084:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/i18n-053c43734959dac0a695233b6f830d34.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/02934c71.f6517f57.js b/knife4j-doc/gitee/assets/js/02934c71.f6517f57.js deleted file mode 100644 index e855afb2d..000000000 --- a/knife4j-doc/gitee/assets/js/02934c71.f6517f57.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3031],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>d});var i=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=i.createContext({}),s=function(e){var n=i.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=s(e.components);return i.createElement(l.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=s(t),d=r,k=m["".concat(l,".").concat(d)]||m[d]||c[d]||a;return t?i.createElement(k,o(o({ref:n},u),{},{components:t})):i.createElement(k,o({ref:n},u))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,o=new Array(a);o[0]=m;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>d,frontMatter:()=>p,metadata:()=>s,toc:()=>c});var i=t(87462),r=t(63366),a=(t(67294),t(3905)),o=["components"],p={},l="3.2 i18n\u56fd\u9645\u5316",s={unversionedId:"features/i18n",id:"features/i18n",title:"3.2 i18n\u56fd\u9645\u5316",description:"\u5728Knife4j 2.0.3\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587",source:"@site/docs/features/i18n.md",sourceDirName:"features",slug:"/features/i18n",permalink:"/docs/features/i18n",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.1 \u589e\u5f3a\u6a21\u5f0f",permalink:"/docs/features/enhance"},next:{title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",permalink:"/docs/features/author"}},u={},c=[{value:"3.2.1 \u6587\u6863\u4e2d\u9009\u62e9",id:"321-\u6587\u6863\u4e2d\u9009\u62e9",level:2},{value:"3.2.2 \u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n",id:"322-\u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n",level:2},{value:"3.2.3 \u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a",id:"323-\u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a",level:2},{value:"3.2.4 \u63a5\u53e3\u3001\u6ce8\u91ca\u3001\u53c2\u6570\u5168\u90e8i18n",id:"324-\u63a5\u53e3\u6ce8\u91ca\u53c2\u6570\u5168\u90e8i18n",level:2}],m={toc:c};function d(e){var n=e.components,p=(0,r.Z)(e,o);return(0,a.kt)("wrapper",(0,i.Z)({},m,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"32-i18n\u56fd\u9645\u5316"},"3.2 i18n\u56fd\u9645\u5316"),(0,a.kt)("p",null,"\u5728Knife4j ",(0,a.kt)("inlineCode",{parentName:"p"},"2.0.3"),"\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587"),(0,a.kt)("p",null,"\u90a3\u4e48,\u5982\u4f55\u4f7f\u7528\u5462?"),(0,a.kt)("h2",{id:"321-\u6587\u6863\u4e2d\u9009\u62e9"},"3.2.1 \u6587\u6863\u4e2d\u9009\u62e9"),(0,a.kt)("p",null,"\u901a\u8fc7\u8bbf\u95ee",(0,a.kt)("inlineCode",{parentName:"p"},"doc.html"),"\u6253\u5f00\u6587\u6863\u754c\u9762,\u53ef\u4ee5\u5728\u6587\u6863\u7684\u53f3\u4e0a\u89d2\u770b\u5230\u8bed\u8a00\u7684\u9009\u62e9,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(92084).Z,width:"403",height:"235"})),(0,a.kt)("p",null,"\u76f4\u63a5\u9009\u62e9\u76f8\u5e94\u7684\u8bed\u8a00\u7248\u672c\u5373\u53ef"),(0,a.kt)("h2",{id:"322-\u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n"},"3.2.2 \u901a\u8fc7\u6587\u6863\u5730\u5740\u76f4\u63a5\u9ed8\u8ba4i18n"),(0,a.kt)("p",null,"Knife4j\u4e5f\u63d0\u4f9b\u4e86\u901a\u8fc7\u5730\u5740\u680f\u76f4\u63a5\u5c06\u6587\u6863\u663e\u793a\u4e3a\u6307\u5b9a\u7684\u8bed\u8a00\u663e\u793a "),(0,a.kt)("p",null,"\u8bbf\u95ee\u5730\u5740\u89c4\u5219\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u4e2d\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/home/zh-CN")),(0,a.kt)("li",{parentName:"ul"},"\u82f1\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/home/en-US"))),(0,a.kt)("p",null,"\u53e6\u5916,\u5982\u679c\u4f60\u662f\u4f7f\u7528\u4e86",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j"),"\u63d0\u4f9b\u7684",(0,a.kt)("a",{parentName:"p",href:"/docs/features/enhance",target:null,rel:null},"\u589e\u5f3a\u529f\u80fd"),",\u4f60\u4e5f\u53ef\u4ee5\u8fd9\u6837\u8bbf\u95ee"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u4e2d\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/plus/zh-CN")),(0,a.kt)("li",{parentName:"ul"},"\u82f1\u6587\uff1a",(0,a.kt)("inlineCode",{parentName:"li"},"http://host:port/doc.html#/plus/en-US"))),(0,a.kt)("h2",{id:"323-\u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a"},"3.2.3 \u670d\u52a1\u7aefyml\u914d\u7f6e\u8bbe\u5b9a"),(0,a.kt)("p",null," \u5f53\u7136\uff0c\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u5728\u540e\u7aef\u63a7\u5236\u6587\u6863\u8bed\u8a00\u5448\u73b0\u65b9\u5f0f(\u81ea2.0.6\u7248\u672c\u5f00\u59cb)"),(0,a.kt)("p",null," yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n setting:\n # Knife4j\u9ed8\u8ba4\u663e\u793a\u4e2d\u6587(zh-CN),\u5982\u679c\u5f00\u53d1\u8005\u60f3\u76f4\u63a5\u663e\u793a\u82f1\u6587(en-US)\uff0c\u5728\u901a\u8fc7\u8be5\u914d\u7f6e\u8fdb\u884c\u8bbe\u7f6e\u5373\u53ef\n language: zh-CN\n")),(0,a.kt)("p",null,"\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u540e,\u8fd8\u9700\u8981\u5728\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7\u8c03\u7528Knife4j\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u4e00\u4e2aOpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u7ed3\u6784"),(0,a.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,a.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,a.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,a.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,a.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,a.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-setting"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("img",{src:t(39060).Z,width:"861",height:"184"}))),(0,a.kt)("h2",{id:"324-\u63a5\u53e3\u6ce8\u91ca\u53c2\u6570\u5168\u90e8i18n"},"3.2.4 \u63a5\u53e3\u3001\u6ce8\u91ca\u3001\u53c2\u6570\u5168\u90e8i18n"),(0,a.kt)("p",null," \u5982\u679c\u5f00\u53d1\u8005\u7ee7\u7eed\u4f7f\u7528\u7684\u662fOpenAPI2\u89c4\u8303\uff0c\u81eaKnife4j 4.0\u7248\u672c\uff0c\u63d0\u4f9b\u4e86\u9488\u5bf9\u63a5\u53e3\u3001\u53c2\u6570\u6ce8\u91ca\u7b49\u5168\u90e8i18n\u7684\u5904\u7406\u65b9\u6848"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"1\u3001\u5f15\u7528\u7684starter\u5fc5\u987b\u662f",(0,a.kt)("inlineCode",{parentName:"p"},"knfie4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\uff0c",(0,a.kt)("inlineCode",{parentName:"p"},"openapi3"),"\u6ca1\u6709\u6b64\u529f\u80fd\n2\u3001\u793a\u4f8b\u4ee3\u7801\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-boot27-demo",target:"_blank",rel:"noopener"},"knife4j-spring-boot27-demo"))),(0,a.kt)("p",null," \u7b2c\u4e00\u6b65\uff0c\u914d\u7f6e\u5f00\u542fSpring Boot \u6846\u67b6\u7684i18n\u529f\u80fd\uff0c\u589e\u52a0i18n\u7684\u914d\u7f6e\u5c5e\u6027\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"\nspring:\n messages:\n basename: i18n/message\n encoding: utf-8\n cache-duration: 3600\n\n")),(0,a.kt)("p",null," \u7b2c\u4e8c\u6b65,\u914d\u7f6e\u65b0\u589ei18n\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"src/main/resources"),"\u76ee\u5f55\u4e0b\uff0c\u65b0\u5efa",(0,a.kt)("inlineCode",{parentName:"p"},"i18n/message"),"\u6587\u4ef6\u5939,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(90261).Z,width:"1642",height:"388"})),(0,a.kt)("p",null,"\u7b2c\u4e09\u6b65\uff0c\u4fee\u6539\u4ee3\u7801\u4e2d\u7684\u6ce8\u91ca\u914d\u7f6e\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'\n\n@ApiOperation(value = "API_JOB_I18n",notes = "API_JOB_I18n_DESC")\n@PostMapping("/hidden3")\npublic ResponseEntity i18n3(@RequestBody ModelUser sysUser){\n return ResponseEntity.ok(sysUser);\n}\n\n')),(0,a.kt)("p",null,"\u7b2c\u56db\u6b65\uff0c\u8bbe\u7f6eKnife4j\u63d0\u4f9b\u7684\u589e\u5f3a\u914d\u7f6e\uff0c\u5f00\u53d1\u8005\u81ea\u884c\u9009\u62e9\u662f\u4e2d\u6587\u8fd8\u662f\u82f1\u6587\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"\nknife4j:\n enable: true\n setting:\n # Knife4j\u9ed8\u8ba4\u663e\u793a\u4e2d\u6587(zh-CN),\u5982\u679c\u5f00\u53d1\u8005\u60f3\u76f4\u63a5\u663e\u793a\u82f1\u6587(en-US)\uff0c\u5728\u901a\u8fc7\u8be5\u914d\u7f6e\u8fdb\u884c\u8bbe\u7f6e\u5373\u53ef\n language: zh-CN\n")))}d.isMDXComponent=!0},90261:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/i18n_message-4378be91dc01f99ea233bf9394f27ae0.png"},39060:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/language-5e48af754756f49bc6394d4023d3a0c5.png"},92084:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/i18n-053c43734959dac0a695233b6f830d34.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/02a66036.60274636.js b/knife4j-doc/gitee/assets/js/02a66036.60274636.js deleted file mode 100644 index 93a073a62..000000000 --- a/knife4j-doc/gitee/assets/js/02a66036.60274636.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2133],{3905:(A,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>u});var n=t(67294);function a(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}function r(A,e){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(A,e).enumerable}))),t.push.apply(t,n)}return t}function p(A){for(var e=1;e=0||(a[t]=A[t]);return a}(A,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(A);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(a[t]=A[t])}return a}var o=n.createContext({}),l=function(A){var e=n.useContext(o),t=e;return A&&(t="function"==typeof A?A(e):p(p({},e),A)),t},i=function(A){var e=l(A.components);return n.createElement(o.Provider,{value:e},A.children)},s={inlineCode:"code",wrapper:function(A){var e=A.children;return n.createElement(n.Fragment,{},e)}},c=n.forwardRef((function(A,e){var t=A.components,a=A.mdxType,r=A.originalType,o=A.parentName,i=g(A,["components","mdxType","originalType","parentName"]),c=l(t),u=a,k=c["".concat(o,".").concat(u)]||c[u]||s[u]||r;return t?n.createElement(k,p(p({ref:e},i),{},{components:t})):n.createElement(k,p({ref:e},i))}));function u(A,e){var t=arguments,a=e&&e.mdxType;if("string"==typeof A||a){var r=t.length,p=new Array(r);p[0]=c;var g={};for(var o in e)hasOwnProperty.call(e,o)&&(g[o]=e[o]);g.originalType=A,g.mdxType="string"==typeof A?A:a,p[1]=g;for(var l=2;l{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>o,default:()=>u,frontMatter:()=>g,metadata:()=>l,toc:()=>s});var n=t(87462),a=t(63366),r=(t(67294),t(3905)),p=["components"],g={},o="Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",l={unversionedId:"faq/swagger-des-not-found",id:"faq/swagger-des-not-found",title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",description:"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca.",source:"@site/docs/faq/swagger-des-not-found.md",sourceDirName:"faq",slug:"/faq/swagger-des-not-found",permalink:"/docs/faq/swagger-des-not-found",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",permalink:"/docs/faq/springmvc-notshow"},next:{title:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",permalink:"/docs/faq/swaggerResourceInvalid"}},i={},s=[],c={toc:s};function u(A){var e=A.components,g=(0,a.Z)(A,p);return(0,r.kt)("wrapper",(0,n.Z)({},c,g,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a"},"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a"),(0,r.kt)("p",null,"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca."),(0,r.kt)("p",null,"1.8.9\u7684\u529f\u80fd\u5c55\u793a\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(9806).Z,width:"1384",height:"617"})),(0,r.kt)("p",null,"\u6b63\u5e38\u60c5\u51b5\u4e0b,\u4e0d\u7ba1\u662f\u8c03\u8bd5\u8fd8\u662f\u6587\u6863\u8bf4\u660e\u90fd\u4f1a\u663e\u793a\u4ee5\u4e0a\u5b57\u6bb5\u8bf4\u660e(\u9664\u975e\u4f60\u6ca1\u5199\u6ce8\u89e3\u8bf4\u660e)"),(0,r.kt)("p",null,"\u8fd9\u91cc\u5f88\u591a\u670b\u53cb\u78b0\u89c1\u7684\u6700\u591a\u7684\u95ee\u9898\u4e3b\u8981\u67092\u4e2a\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u8fd4\u56deMap|Object\u4e3a\u4f55\u4e0d\u663e\u793a"),(0,r.kt)("li",{parentName:"ul"},"\u4f7f\u7528\u6cdb\u578bT\u8fd8\u662f\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u4e0d\u663e\u793a\u6548\u679c\u53ef\u80fd\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(72941).Z,width:"574",height:"199"})),(0,r.kt)("p",null,"\u8fd4\u56deObject\u4e0d\u663e\u793a\u5b57\u6bb5\u5c5e\u6027"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(41472).Z,width:"1028",height:"489"})),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u8fd4\u56deMap\u4e3a\u4f55\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u4e3a\u4f55\u8fd4\u56deMap\u4e0d\u663e\u793a,\u5927\u5bb6\u90fd\u77e5\u9053Map\u662fJava\u91cc\u9762\u7684\u96c6\u5408\u63a5\u53e3,\u4e0d\u7ba1\u662fMap\u672c\u8eab\u8fd8\u662f\u8bf8\u5982HashMap\u7b49\u5b50\u5b9e\u73b0,\u8fd9\u7c7b\u6570\u636e\u5bf9\u4e8eSwagger\u6765\u8bf4\u90fd\u662f\u672a\u5b9a\u4e49\u7ed3\u6784\u7684\u6570\u636e"),(0,r.kt)("p",null,"Swagger\u53ea\u8ba4\u8bc6\u5b9a\u4e49\u597d\u7684\u7c7b-\u5c5e\u6027\uff0c\u6240\u4ee5\u63a5\u53e3\u8fd4\u56deMap,\u5bf9\u4e8eSwagger\u6765\u8bf4\u662f\u6ca1\u6709\u5b57\u6bb5\u5c55\u793a\u7684,\u8fd9\u79cd\u60c5\u51b5\u540c\u6837\u9002\u7528\u4e0e\u8fd4\u56deObject\u8fd9\u4e2a\u9876\u7ea7\u7236\u7c7b.\u8fd9\u4e5f\u662f\u4e3a\u4f55\u8981\u9002\u7528\u6cdb\u578bT\u7684\u539f\u56e0"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u9002\u7528\u6cdb\u578bT\u8fd8\u662f\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u4f1a\u8bf4\u6211\u5df2\u7ecf\u4f7f\u7528\u6cdb\u578bT\u4e86,\u53ef\u662f\u6587\u6863\u4e0a\u8fd8\u662f\u4e0d\u663e\u793a,\u8fd9\u91cc\u4e3b\u8981\u7684\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u70b9"),(0,r.kt)("p",null,"\u5c5e\u6027\u5b9a\u4e49\u5fc5\u987b\u662f\u6cdb\u578bT\uff0c\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"private T data;//\u8fd4\u56de\u5c5e\u6027T\n")),(0,r.kt)("p",null,"\u8fd4\u56deT\u7c7b\u578b\u7684get\u65b9\u6cd5\u5fc5\u987b\u662f\u8fd4\u56deT\uff0c\u6709\u65f6\u5019\u81ea\u52a8\u751f\u6210get\u3001setter\u65b9\u6cd5\u63d2\u4ef6\u7b49\u4f1a\u5c06\u6211\u4eec\u7684\u4ee3\u7801\u751f\u6210\u8fd4\u56deObject\uff0c\u4f8b\u5982\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public Object getData(){\n return data;\n}\n")),(0,r.kt)("p",null,"\u4ee5\u4e0a\u662f\u9519\u8bef\u7684\u5f62\u5f0f,\u5c3d\u7ba1\u5c5e\u6027\u4e2d\u5df2\u7ecf\u5b9a\u4e49\u4e3aT\u4e86\uff0c\u6b63\u786e\u7684\u65b9\u5f0f\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public T getData(){\n return data;\n}\n")),(0,r.kt)("p",null,"\u6700\u91cd\u8981\u7684\u4e00\u6b65,\u4ee5\u4e0a\u6b65\u9aa4\u5b8c\u5168\u6b63\u786e,\u4ee3\u7801\u4e5f\u6ca1\u6709\u95ee\u9898,\u53ef\u662fui\u8fd8\u662f\u4e0d\u663e\u793a\u5c5e\u6027\uff0c\u5fc5\u987b\u5728\u63a5\u53e3\u5c42\u5f3a\u6307\u5b9a\u6cdb\u578b\u7c7b\u578b(\u53ef\u80fd\u662fSwagger\u8981\u6c42\u6211\u4eec\u5199\u4ee3\u7801\u8981\u89c4\u8303\u5427~~~),\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(64222).Z,width:"1039",height:"152"})),(0,r.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u57282.0.6\u7b49\u540e\u9762\u7684\u9ad8\u7248\u672c\u4e2d,\u7531\u4e8e\u5347\u7ea7\u4e86Springfox\u57fa\u7840\u7ec4\u4ef6\uff0c\u5982\u679c\u5f00\u53d1\u8005\u4f7f\u7528\u7c7b\u4f3cJRebel\u8fd9\u7c7b\u70ed\u52a0\u8f7d\u63d2\u4ef6\u7684\u65f6\u5019\uff0c\u4f1a\u51fa\u73b0\u7c7b\u5b57\u6bb5\u6ca1\u6709\u7684\u60c5\u51b5\uff0c\u76ee\u524d\u6ca1\u6709\u529e\u6cd5\u89e3\u51b3springfox\u9879\u76ee\u4e0eJRebel\u63d2\u4ef6\u7684\u51b2\u7a81\uff0c\u5efa\u8bae\u662f\u4e0d\u7528JRebel")),(0,r.kt)("p",null,"\u5982\u679c\u4ee5\u4e0a\u60c5\u51b5\u90fdok\uff0c\u8fd8\u662f\u4e0d\u663e\u793a\u8bf4\u660e,\u606d\u559c\u4f60\u53d1\u73b0\u4e86SwaggerBootstrapUi\u7684\u4e00\u4e2abug\uff0c\u6b22\u8fce\u63d0",(0,r.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues",target:"_blank",rel:"noopener"},"issue"),"\u53cd\u9988\u7ed9\u6211,\u6211\u4f1a\u641e\u5b9a\u5b83\u7684~~\uff01"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u53e6\u5916")),(0,r.kt)("p",null,"\u4e00\u822c\u5728\u5b8c\u6210\u4ee5\u4e0a\u60c5\u51b5\u540e,\u5b57\u6bb5\u8bf4\u660e\u90fd\u4f1a\u663e\u793a,\u8fd9\u91cc\u518d\u63d0\u9192\u4e00\u4e0b\u5927\u5bb6,\u5982\u679c\u5df2\u7ecf\u5728\u6cdb\u578b\u4e2d\u5f3a\u5236\u7ea6\u675f\u4e86\u8fd4\u56de\u7c7b\u578b\u540e,\u5c31\u65e0\u9700\u5728\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiOperation"),"\u4e2d\u8bbe\u7f6e",(0,r.kt)("inlineCode",{parentName:"p"},"response"),"\u5c5e\u6027\u503c\uff0c\u6bd4\u5982\u5982\u4e0b\u4ee3\u7801"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u67e5\u8be2\u6240\u6709",response=AlarmReponse.class)\n@GetMapping("/queryAll")\npublic Rest> queryAll(){\n //more..\n}\n')),(0,r.kt)("p",null,"\u4ee5\u4e0a\u4ee3\u7801\u8fd4\u56de\u4e86\u6cdb\u578b",(0,r.kt)("inlineCode",{parentName:"p"},"Rest"),"\u7c7b\u578b\u7684List-AlarmResponse\u96c6\u5408,\u4f46\u662f\u5374",(0,r.kt)("inlineCode",{parentName:"p"},"ApiOperation"),"\u6ce8\u89e3\u4e2d\u52a0\u4e86response\u5c5e\u6027\u4e3a",(0,r.kt)("inlineCode",{parentName:"p"},"AlarmResponse.class"),"\uff0c\u8fd9\u79cd\u60c5\u51b5\u4f1a\u9020\u6210Ui\u53ea\u663e\u793a",(0,r.kt)("inlineCode",{parentName:"p"},"AlarmReponse"),"\u7c7b\u7684\u5c5e\u6027\u8bf4\u660e\uff0c\u8fd9\u663e\u7136\u662f\u4e0d\u5bf9\u7684\uff0c\u56e0\u4e3a\u5b83\u628a",(0,r.kt)("inlineCode",{parentName:"p"},"Rest"),"\u7684\u5c5e\u6027\u7ed9\u5ffd\u7565\u4e86,\u6240\u4ee5:"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u4e00\u822c\u60c5\u51b5\u4e0b,\u662f\u4e0d\u5199\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"strong"},"@ApiOperation"),"\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"strong"},"response"),"\u5c5e\u6027\u503c,\u80fd\u5c11\u5199\u5c31\u5c11\u5199,\u5c06\u5269\u4e0b\u7684\u4ea4\u7ed9springfox-swagger\u8fd9\u4e2a\u6846\u67b6,\u7531\u5b83\u81ea\u52a8\u89e3\u6790\u751f\u6210\u63a5\u53e3\u8fd4\u56de\u7c7b\u578b")),(0,r.kt)("p",null,"\u6700\u540e\u8d34\u4e00\u4e2a\u7b80\u5355\u7684\u8fd4\u56de\u5c01\u88c5\u7c7b\u4f9b\u5927\u5bb6\u53c2\u8003(",(0,r.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/blob/master/swagger-bootstrap-ui-demo/src/main/java/com/swagger/bootstrap/ui/demo/common/Rest.java?tdsourcetag=s_pctim_aiomsg",target:"_blank",rel:"noopener"},"Rest.java"),")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class Rest {\n\n @ApiModelProperty(value = "\u662f\u5426\u6210\u529f")\n private boolean success=true;\n @ApiModelProperty(value = "\u8fd4\u56de\u5bf9\u8c61")\n private T data;\n @ApiModelProperty(value = "\u9519\u8bef\u7f16\u53f7")\n private Integer errCode;\n @ApiModelProperty(value = "\u9519\u8bef\u4fe1\u606f")\n private String message;\n\n public boolean isSuccess() {\n return success;\n }\n\n public void setSuccess(boolean success) {\n this.success = success;\n }\n\n public T getData() {\n return data;\n }\n\n public void setData(T data) {\n this.data = data;\n }\n\n public Integer getErrCode() {\n return errCode;\n }\n\n public void setErrCode(Integer errCode) {\n this.errCode = errCode;\n }\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n}\n')),(0,r.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u5728\u6cdb\u578b\u57fa\u7840\u5c01\u88c5\u7c7b\u4e2d,\u5f00\u53d1\u8005\u6709\u4e24\u70b9\u9700\u8981\u6ce8\u610f\uff1a"),(0,r.kt)("p",{parentName:"admonition"},"1\u3001\u57fa\u7840\u5c01\u88c5\u6cdb\u578b\u7c7b\u4e2d,\u4e0d\u80fd\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiModel"),"\u6ce8\u89e3\u6765\u7ea6\u675f\u8be5\u6cdb\u578b\u7c7b\u7684\u7c7b\u540d\u79f0\uff0c\u56e0\u4e3a\u6cdb\u578b\u7c7b\u4e00\u65e6\u7528\u8be5\u6ce8\u89e3\u8fdb\u884c\u7ea6\u675f\u540e,\u5728OpenAPI\u7684\u7ed3\u6784\u4e2d,\u7c7b\u540d\u79f0\u5c31\u53ea\u6709\u4e00\u4e2a\uff0c\u4f1a\u5bfc\u81f4\u5b57\u6bb5\u5c5e\u6027\u627e\u4e0d\u5230\u7684\u60c5\u51b5\u3002",(0,r.kt)("strong",{parentName:"p"},"\u9519\u8bef\u7684\u4ee3\u7801\u793a\u4f8b"),"\uff1a"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/*\n* \u6cdb\u578b\u7c7b\u4e2d\u4e0d\u80fd\u4f7f\u7528@ApiModel\u6ce8\u89e3\uff0c\u5e94\u8be5\u53bb\u6389\n*/\n@ApiModel("\u7ed3\u679c\u7c7b")\npublic class Rest {\n //....\n}\n')),(0,r.kt)("p",{parentName:"admonition"},"2\u3001\u9488\u5bf9\u6cdb\u578bT\u7684\u5c5e\u6027\uff0c\u4e0d\u5e94\u8be5\u5728\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiModelProperty"),"\u6ce8\u89e3\u65f6\uff0c\u8d4b\u4e88",(0,r.kt)("inlineCode",{parentName:"p"},"example"),"\u503c,",(0,r.kt)("strong",{parentName:"p"},"\u9519\u8bef\u7684\u4ee3\u7801\u793a\u4f8b"),"\uff1a"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class Rest {\n /*\n * \u6cdb\u578bT\u5c5e\u6027\u4e0d\u80fd\u8d4b\u4e88example\u503c\uff0c\u56e0\u4e3aT\u6709\u53ef\u80fd\u662f\u5b9e\u4f53\u7c7b\uff0c\u8fd9\u6837\u8d4b\u503c\u4f1a\u5bfc\u81f4\u751f\u6210\u7684\u793a\u4f8b\u503c\u4e0d\u4e00\u81f4\uff0c\u5e94\u8be5\u4ea4\u7ed9\u6846\u67b6\u53bb\u89e3\u6790\u7c7b\u7ed3\u6784\n */\n @ApiModelProperty(value = "\u8fd4\u56de\u5bf9\u8c61",example="Test")\n private T data; \n}\n'))))}u.isMDXComponent=!0},72941:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf1-1ee0f71b81456c62d4941e0fa3601b3c.jpg"},9806:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf2-40b4cbb5e01c0147fa7913ed6a1eba44.png"},41472:(A,e,t)=>{t.d(e,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAQAAAHpCAMAAAAiWx4mAAAAAXNSR0IArs4c6QAAAPxQTFRF7+/vgwAA/+SnAIPHRERE///JfgBU////3d3dAAAA56dSpeL+5///AFSl7+/bxO/v2/DvUarng8j9yv//TwMA/8iIc7Tq///n7fHHnQBUkkRKx4MAlc/1AABPo7zvrW5EREVu1aF0UESRUgBS77yTyZJFpVQAlJ3b8NWwudbvgE+wfgCVmU8ARGytAACFy3hVTJvZtHkAAE+asen/79WbgXPI569ub0pHAHi4RZHKAAB6AJ3RuE1W79mn2ZtM7rx6kgB27++5eZ3MlMvLtNzAhQBS58PPUgCFfgB2y9KgbLDQyKLAtn6nakRE4aL/KnD65+jnfnSp+fn5TAB6dZjBfgAAFetJREFUeNrt3WlbG0fahmEhiaUxYEBIYBZjiIWXAWxsk0C8TWInHi/MOJn//1/equpuIWzhOMkcr1H3eR2BlkD5cvPU1U9VyarGNIBa0xABQAIASAAACQAgAQAkAIAESr5v9waPJ9fbm0O/aJ9u73bCo+bu4vbB2vrj5tmpKIHqSCAM8var9Xbi1uP0o9Xt9un5b3vTd39Iv+q2320f7LR73w8pAsD4S+DW67NX67384eMw/s/pTfcHj29tTq8+exUkcJq/RDMAVFUCqfMfonl2MJc/Kozw6izI4dNXARhzCbwLt/eDnVICseGfXL/1uD/UFqQftYMQ+u3QDJRiAFAZCfT6hQR2djtx6S/vALppnaB5FtUQfpJPFg7W1s0GgMpKIK4FxH4gbReEVmAz3P97cb9gdftdahN2fth9e2ZpEKioBCbXw21+t9Nvb/bjsD/fMohbA6kN2O102z9YEgAqJIG0RViuCQQJzIUeoNs+WB8M9H5aEIhvHziYi5OE2BrIEqheJ5B2B7rtYjWgmzYBm2eFAPJmoH0a+oP4NoLiDQUAKiCB6XSPT7f2/q172+WQ7w+9Iyjc+tv5ymBoF+ZWt3fftu0OAJWTQBzpp9OTvz0ZerPQ5HqxDDA9vdoIDcBuJy4TnEYdmBAAVZIAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAYEwnMAKgPIyXQwNjgjyWfvw0JKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAUuXxIAIpcPiQARS4fEoAilw8J5LzIspP9H6+HR0/++3r/0U9Tm09WTvJfPVnZ2hy8Lj55kfXk+s2K/Ohho/Hy0WLjp4nw93mZBR6+iN+z9NeTz08TvUaq3RcPU1lHHh39GIp6kQS+JIGQ1cPG7bMsC8P9ZXa6/6gfK6tXDPusoNc4CqoIZTgkBfw/F3kY9icL++HP9TL/Yz18spL+VAv7JJD/4Cg7iRI4SlYM6URbksAfSuCoHObZ1rvGwvq7IIFYaFkc8i+yk+I1McQYaGkF7cC3udP9697iTxOPZvajiklgRFt79OPblZOikSWBPzEdeLJSZlQY4beVhyG66+Guv7D/MJRY7oIUaKy+utbclZjzFk1uagdIYHQ26Zb2aj9/8OM+CfyBBI6Gcgvl9NNEvOkfxa4z5fZicN/Pu4P2QxOCb1bk4Y9TLsq8TBKwJvAZL4uFgFi8oVJ1Al/XCaT5ZegG8lnUo9yfj9LSU74qcDJ44Umow0dHWx/MBr5NkS/sX5SATuDTljbYMM4F0r0sNrh5GS+QwB+uCfRCZmH2lPUW9k9TOW2fhZlV70J/lWYF2cNQeEdbr8q9A3wLCZgOfGm61BjsbN39YTPZIHyFtEjgUgnkTX7e4MetgaK3fJm1f7yeftcrJlsP00biUXhpkIA1gW8ngVDXwdDxzlZKwHTgkrltroQaNwFfPx0o0+ulWWfZReXuPDqXQGipJk7i7468WeAbSuCH0LI9ChJ4+91mkkBq3XQCF6YEpRKHnKAT+KIE0qZf73xZ5eQo9Zd5dzAkgcbOq4mTu/u9uNzyss6hflMJZDH86OK3Kw/TGtiteKcjgQHx9vUiO7/76wS+/m3Dcd6UrwzGldVQVDspyKNhlRZrhXYHvul0IK7ghsr+PutFFceVnLyBk09x8++Va90k8LUSiKO/mFMuzIQ7Tb4UcJLeaXGxE8gl8CLL6p7qNyzyozDyCzkXf4Unu4sva/vmrc/XBMrBH8r03f7wCsEJCfgHRJWZ80I+JKDIIR8SUOSQDwkocsiHBBS5fEACilw+IAFFLh+QgCKXD0hAkcsHJKDI5QMSUOTyAQkocvngjyQAoD6MlMA0xgZ/LPn8XUhAkcuHBOSmyOVDAnJT5PIhAbkpcvmQgNwUuXxIQG6KXD4kIDdFLh8SEIsilw8JQJHLhwSgyOVDAlDk8iEBKHL5kMAoNlqyU+RjmE/zu2vlw8lfwsPJiSxbDk9ms2zrGgmQAAnUKp8ogcmJpeSF2cPOdDd8kcBluTVXsmwpl+ZS/vTwKEigm+USBQmMUycw+ctOlh12Ug8QB/7q3lL4bzpcl0ngstwmJ5bjV5RmEufKchj/rSTOoeYKJDAmEpiYn1vda+XTgaEZQqxzErgkt9n5ucEljPx03Wjl3pw1LSCBsZPAcqrmXAKhIVi6UOckMCq3Yv6fLs03nXSdbcVuKkACJDDWEhgU+KyFwb8gAesBJFAJCaQVwfo64G9NB5aUGAmMuQTKop7eqOvWwPTXLwyGIV8uDManaWEwqJMJSGCsJZAvei+lLUIS+FJdxS3C1oUtwvm4RTibZRkHkMC4SmB6I1sqtr+LBa4lElBXJCAfEpCbIpcPCchNkcuHBMSiyOVDAlDk8iEBKHL5kAAUuXxIAIpcPiQARS4fEoAilw8JQJHLhwSgyOVDAlDk8qmDBADUB52AO518dAJyU+TyIQG5KXL5kIDcFLl8SEBuilw+JCA3RS4fEpCbIpcPCYhFkcuHBKDI5UMCUOTyIQEocvmQABS5fEgAilw+JDA4nzzSzU8phiIf33ya3+Unkc9+VsyzLRIgARKokQQ+hwRG5tZcyQ7jMcTdLMsOO934bXXPkcQkMI75FGdrN7/bTkdtx04g1vVyvNHFyp7Nsrrd5L5GAs2V5ZBTa7q7Fc9zb8VOYHUv5rd1TZGRwHjlMzmxlL6aK3kVBwl0DzupMYg+CF86gVG5pWlTOR3YaA2mA5d3VCCBK5pPKuYw7FPxhuvsfGNvOU0CJieWTQcuzS2N/xRNmBdkpQRC76QTIIFxyycVc/NNJ/yXbmOz82thfhBoDZYKSeALEggKWC47gY0wcdIJkEAlJLB8obElgS9NB1I6uQQmf7lmOkACFZkOLBWrBaYDl+cW04kLg2nhJJ8OxB9NTpgOkMC45XO+MNhK17gwGOp4dW8p3ygIWiCB6dFbhPNHrem4LdiaPezE0d/Nsq3XE/YISWDc8im3CN/0B1uEs8V2d77M1Vw57JCAuiKB2uRTv/s+CZCAfC6wQQIkQAJ1zse6FgmQgHxAAopcPiQgN0UuHxKQmyKXDwnITZHLhwTkpsjlQwJyU+TyIQG5KXL5kIDcFLl8SACKXD61lgCA+qATcKeTj05AbopcPiQgN0UuHxKQmyKXDwnITZHLhwTkpsjlQwJyU+TyIQGxKHL5kAAUuXxIAIpcPiQARS4fEoAilw8JQJHLhwSgyCuVTzpWO5JOKSYBdUUC9ZUAvk4CzTdvs6zVXMniaa3dLMuW00HF6WzX/BLPKy6eHvaDWuPJr854I4GrmM9GlsWDtUMVN3ePslboBGZP9gZV/PN310hgpARWWum85niGezeIoPndtcmJ5TDSl4vL6l4843nrWn7u+/xc/HF8MUjgquWTjiIPJfpLPIN8KT2fDXe17ta16Y35udW9LRIYLYFgxzSmZ1ure8sxyFYc5rGpyi/lq7pxfhWiTMc9N990lCAJXEUJFNOBWNdJAql3XU4zhC4JfEkCy/ngzyKt6dm8358t2/7QZG1dS4M/RLqRXnRIAiRw5fIJFRzH+QgJpLtW03TgKyQwuPV30zwqv2xk83PhVQMJWA8ggSubT5j6H3ZI4K9L4MJMv+isZufXYiM1PB2w7UICVzifovc3HfhrEkghBRMUS39Dl8mJ4YXBJRuwJHBl1wS6IzsBC4NfK4G4ChCnAd20MjB02XqdDJAd9lv5ziEHkMAVzCfuA8aBvpEtfSqBtEVYx+Xs//2bhWYtCJDA2ObTJIG/WVfxTQTDu4YggfHJJ1VuLde0/7edwEb+dkKQwBjmU8xtSUBdkYB8SEBuilw+JABFLh8SgCKXDwlAkcuHBKDI5UMCUOTyIQEocvmQABS5fEgAilw+tZEAgPqgE3Cnk49OQG6KXD4kIDdFLh8SkJsilw8JyE2Ry4cE5KbI5UMCclPk8iEBsShy+ZAAFLl8SACKXD4kAEUuHxKAIpcPCUCRy4cEoMirkc9lZ49vtEhAXZEACZDA5XW1kWWHnTy+jeLM4aXBZXIiHd508QISuKoS2M4rNFZqKN90onZR2LP5w1jY4Tr5y06qexKIxKObw1cpgXhwY/gauqzuLYX/hi5qjwSuqgRW5udW92IVL6Wvbhju8SsUdqzz7mGnuRIren5uciJ/JQmUEigbqSKr85+mk8ibbzr5yCcAEhiD6UAY6ql8wzUVbKjqjdbkL3GisLFU1nw6pbiochIIjVPqkgoJFLOn8pJFDjuhq0qx5heQwBWVwJtOKuWN/Ob1Oo70eCfbaMVZQDaY4ZLAp6zuhWF+iQRa541WmmsVF5DAmEmgWDIMCljSCYyqq5DIJdOBoZS6+TJKtxarKSRQtelA8kH4YfwNCYxYEwhxxWWU5kq+MBjm/oPLUnxFI4a50VrNL2qPBK6qBFbOFwU/XRgMN69Q1fEe1jUd+HwykBYF4ny/X2wRXryEpC5eQAJXdTrQv3SLMK5vLafL/MutayQAEpBPTSABRS4fEpCbIpcPCchNkcuHBOSmyOVDAnJT5PIhAbkpcvmQgNwUuXxIQCyKXD4kAEUuHxKAIpcPCUCRy4cEoMjlU0MJAKgPDR4EdAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAGD8JfB9uzd4PLne3ix/WnLrcfz5afGKfnwKoBISiOP81fr5SA+sbrdPR/3v3fZv8VU9EgAqJYFbr89erffyh4/D+D+n98lL+7ud8JLQEPRIAKiuBHY7l/3fk+u7neABEgCqKIF3oQM42Ckl8H17Mwz1W4/7Q21Be7Pb3l2MjcI7EgCqKIFev5DAzm6neXY63Tw7mCsagHzEh5nC7tuzoIJXJABUWQJxLSD2A/l2QXe3EyUQLkkC27FdeE0CQHUlMLl+sBan/u3NftwmnFxv94IE7oXBPzf9PswOfmi3d9dIAKiUBNIWYbkmECQwF3qAbvtgPb/5n6bpQL5pGFcFu+1TC4NANTuBtDsQxni+GtBNoz42AGlNoHkWGoMggdXtKAoSACokgchkvkXYj31/8V7BOBtYXbvfyXcGgyBOPwYJLBa/71++kQhgTCUQpv+x9//tycU3C30/9Kah/m5yQFw8PBUmUCUJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkACAcZHA7x9nANSEURL4feZjA0BdGCGBjxwA1FsCM1IBSAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAKC6Erh96568gBpLYGF7WVxAnSWwtq4RAEgAQH0l8Hz3uriAGktAIwDoBHQCgDUBACQAgAQA1FEC3iwE1FwC3jYM1F0CAEgAAAkAIAEAJACABACQAAASAEACAEgAAAkAIIGCu//8/N8YzBzfv39T2kBtJTBzfLPx67F/fwTUVgLvf240Fj7cETdQOQncvTE1dTO/3F8Mz29PTf3jbZRA8YucfPy/P16UN1AxCdy9EQb6+8Xbcbw/CBaID9Zu/Ote43b4Ch3BwvZpksDxTRIAKimBB8dpjD+Ll7UghPQ8CGDhWbz1P7hDAkC1JRDH/eASBn7+IHQAa2EyEDgupwMkANROAhf2Axc+JAn8LG6gYhLIu/7iEgZ+/mAnTgeOL7zQ7gBQ0TWBuBC48OF8YXAnrgemhcH0k3JhsDFzfK/x67ETjIDKSSBuCYYhHy/5AsBOuUUYHkRBFBJo/Hr/fnRA/53EgWpJ4M/h/BKg5hJ4/pv9AaDWEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAMCYSmDUOQMAaiqB2/8Y8aEB/YP474aen/l3xEA9JfB89/qFK4AKSWBwzsCD8OB6/B7PH8ifDF5zsEgCQEUlcH7OQHnwQBz8xZPnZ8skAFRcAuU5A4OpwGA6EB6UEtgpPmLM5woBlZPA4CPG888UHEigeHJxNqAVAKosgXIqkCQwmBc0dAJAtSUwOGcg2aCUwODJJ62ARgCo3ppAec7A2o07YexHCYQflE8sDALVl8DgnIG0VRgksPBs6v5i8WSUBMqpAYCKSOBrKDuAIIOF7WWRA7WTwOBtw8uNtftmBEANJQCABACQAAASAEACAEgAAAkAIAEAJACABACQAIBaS+Df/7nzn/I7gFpK4N//Kb8DqKcElsrvAMZOAjv3d6amjheeTU3Fzxlbu5FfH6TL3Rvpw0bLMwjC9f7O/cX8c0j8g2KgKhIIoz0M9pvpY8Xu3riZPl8wDvX31+OjtfeDAwkexM8eSweThK+d80MJAIy3BMoPF45DPh1CsHOcX4cPJ7v9j+v55xKHV6Yfr/3zHgkAFZkOLOYnkIRBHicF6RSy21PxNJLw9DhvFmL7X5xHkD5/MHJT8kAFJXCn/PGDNOsP84Q75RkE5xKwHgBUVQJpvBfk3X/4dXkGQZoFLDwL04EbmgCgqhK4eyO0Ajs3Gx+uxwWBu3fib8ozCOL4DzODYoVwzcIgUEUJxMMHir3BOOd/kE4pHzqQYOp45zitFcTJwigJ9N/5ewBjJoE/yYM7X/qtswqBCktg4dm9/NCyL/D8t0V/D6CynUB8N6GNAaDu0wEAJACABACQAAASAEACAEgAAAkAIAEAJACABADUSAILP/s4AYAEAIy9BOInhNzMP1g4faxIcfLAxcvFcwgSvz4NbP769PXTpzNRBwt3lqIYnj51BAkwXhKIHyr0fnEggfhhYunIgXQZeQ5B/2Bx0AkEFRSPogRmTpc1CMCYSaD4gOGBBHbyjxotLiPPIbgogc0hCbx/mloEfxJgnDqBnfyzxQsJFE4YXEaeQzC0JvDr0+vnEli48zTh04WAcZJAHNr3Fy+TwKhzCL4gAesBwBhKILUBaU3wbnkQWWNwGXEOweLnEsjXBON0QBMAjN2awId0vNDCs+PYEhQnD3y4Pnz55ByC8zWBpUICafC/fxoXBuOPLAwCY9UJ3J5K8/140sCrvB1IRw4Ul1HnEBQSiDsDm7kE0s7gnaV839CUABi76QAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABAOMugedn76QF1LoTeL57XVwACQAgAQD1lMDa+j1xAXWWgFYA0AmIC7AmAIAEAJAAgBpK4PaBY8KAOkvg+ZkTwoB6dwIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASADAWErg40exALWWwO8zLADUWgLTv3+cAVATRkoAQH0gAYAEAJAAABIAQAIASABA3fg/SbfsJTHBgZQAAAAASUVORK5CYII="},64222:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf4-adca0c0aa1bedb4e3d9e2f698082b75e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/02a66036.e186b9ac.js b/knife4j-doc/gitee/assets/js/02a66036.e186b9ac.js new file mode 100644 index 000000000..dd1285fe9 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/02a66036.e186b9ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2133],{3905:(A,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>k});var n=t(67294);function a(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}function r(A,e){var t=Object.keys(A);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(A,e).enumerable}))),t.push.apply(t,n)}return t}function p(A){for(var e=1;e=0||(a[t]=A[t]);return a}(A,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(A);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(A,t)&&(a[t]=A[t])}return a}var o=n.createContext({}),l=function(A){var e=n.useContext(o),t=e;return A&&(t="function"==typeof A?A(e):p(p({},e),A)),t},i=function(A){var e=l(A.components);return n.createElement(o.Provider,{value:e},A.children)},s="mdxType",c={inlineCode:"code",wrapper:function(A){var e=A.children;return n.createElement(n.Fragment,{},e)}},u=n.forwardRef((function(A,e){var t=A.components,a=A.mdxType,r=A.originalType,o=A.parentName,i=g(A,["components","mdxType","originalType","parentName"]),s=l(t),u=a,k=s["".concat(o,".").concat(u)]||s[u]||c[u]||r;return t?n.createElement(k,p(p({ref:e},i),{},{components:t})):n.createElement(k,p({ref:e},i))}));function k(A,e){var t=arguments,a=e&&e.mdxType;if("string"==typeof A||a){var r=t.length,p=new Array(r);p[0]=u;var g={};for(var o in e)hasOwnProperty.call(e,o)&&(g[o]=e[o]);g.originalType=A,g[s]="string"==typeof A?A:a,p[1]=g;for(var l=2;l{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>o,default:()=>k,frontMatter:()=>g,metadata:()=>l,toc:()=>s});var n=t(87462),a=t(63366),r=(t(67294),t(3905)),p=["components"],g={},o="Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",l={unversionedId:"faq/swagger-des-not-found",id:"faq/swagger-des-not-found",title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",description:"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca.",source:"@site/docs/faq/swagger-des-not-found.md",sourceDirName:"faq",slug:"/faq/swagger-des-not-found",permalink:"/docs/faq/swagger-des-not-found",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",permalink:"/docs/faq/springmvc-notshow"},next:{title:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",permalink:"/docs/faq/swaggerResourceInvalid"}},i={},s=[],c={toc:s},u="wrapper";function k(A){var e=A.components,g=(0,a.Z)(A,p);return(0,r.kt)(u,(0,n.Z)({},c,g,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a"},"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a"),(0,r.kt)("p",null,"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca."),(0,r.kt)("p",null,"1.8.9\u7684\u529f\u80fd\u5c55\u793a\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(9806).Z,width:"1384",height:"617"})),(0,r.kt)("p",null,"\u6b63\u5e38\u60c5\u51b5\u4e0b,\u4e0d\u7ba1\u662f\u8c03\u8bd5\u8fd8\u662f\u6587\u6863\u8bf4\u660e\u90fd\u4f1a\u663e\u793a\u4ee5\u4e0a\u5b57\u6bb5\u8bf4\u660e(\u9664\u975e\u4f60\u6ca1\u5199\u6ce8\u89e3\u8bf4\u660e)"),(0,r.kt)("p",null,"\u8fd9\u91cc\u5f88\u591a\u670b\u53cb\u78b0\u89c1\u7684\u6700\u591a\u7684\u95ee\u9898\u4e3b\u8981\u67092\u4e2a\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u8fd4\u56deMap|Object\u4e3a\u4f55\u4e0d\u663e\u793a"),(0,r.kt)("li",{parentName:"ul"},"\u4f7f\u7528\u6cdb\u578bT\u8fd8\u662f\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u4e0d\u663e\u793a\u6548\u679c\u53ef\u80fd\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(72941).Z,width:"574",height:"199"})),(0,r.kt)("p",null,"\u8fd4\u56deObject\u4e0d\u663e\u793a\u5b57\u6bb5\u5c5e\u6027"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(41472).Z,width:"1028",height:"489"})),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u8fd4\u56deMap\u4e3a\u4f55\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u4e3a\u4f55\u8fd4\u56deMap\u4e0d\u663e\u793a,\u5927\u5bb6\u90fd\u77e5\u9053Map\u662fJava\u91cc\u9762\u7684\u96c6\u5408\u63a5\u53e3,\u4e0d\u7ba1\u662fMap\u672c\u8eab\u8fd8\u662f\u8bf8\u5982HashMap\u7b49\u5b50\u5b9e\u73b0,\u8fd9\u7c7b\u6570\u636e\u5bf9\u4e8eSwagger\u6765\u8bf4\u90fd\u662f\u672a\u5b9a\u4e49\u7ed3\u6784\u7684\u6570\u636e"),(0,r.kt)("p",null,"Swagger\u53ea\u8ba4\u8bc6\u5b9a\u4e49\u597d\u7684\u7c7b-\u5c5e\u6027\uff0c\u6240\u4ee5\u63a5\u53e3\u8fd4\u56deMap,\u5bf9\u4e8eSwagger\u6765\u8bf4\u662f\u6ca1\u6709\u5b57\u6bb5\u5c55\u793a\u7684,\u8fd9\u79cd\u60c5\u51b5\u540c\u6837\u9002\u7528\u4e0e\u8fd4\u56deObject\u8fd9\u4e2a\u9876\u7ea7\u7236\u7c7b.\u8fd9\u4e5f\u662f\u4e3a\u4f55\u8981\u9002\u7528\u6cdb\u578bT\u7684\u539f\u56e0"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u9002\u7528\u6cdb\u578bT\u8fd8\u662f\u4e0d\u663e\u793a")),(0,r.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u4f1a\u8bf4\u6211\u5df2\u7ecf\u4f7f\u7528\u6cdb\u578bT\u4e86,\u53ef\u662f\u6587\u6863\u4e0a\u8fd8\u662f\u4e0d\u663e\u793a,\u8fd9\u91cc\u4e3b\u8981\u7684\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u70b9"),(0,r.kt)("p",null,"\u5c5e\u6027\u5b9a\u4e49\u5fc5\u987b\u662f\u6cdb\u578bT\uff0c\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"private T data;//\u8fd4\u56de\u5c5e\u6027T\n")),(0,r.kt)("p",null,"\u8fd4\u56deT\u7c7b\u578b\u7684get\u65b9\u6cd5\u5fc5\u987b\u662f\u8fd4\u56deT\uff0c\u6709\u65f6\u5019\u81ea\u52a8\u751f\u6210get\u3001setter\u65b9\u6cd5\u63d2\u4ef6\u7b49\u4f1a\u5c06\u6211\u4eec\u7684\u4ee3\u7801\u751f\u6210\u8fd4\u56deObject\uff0c\u4f8b\u5982\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public Object getData(){\n return data;\n}\n")),(0,r.kt)("p",null,"\u4ee5\u4e0a\u662f\u9519\u8bef\u7684\u5f62\u5f0f,\u5c3d\u7ba1\u5c5e\u6027\u4e2d\u5df2\u7ecf\u5b9a\u4e49\u4e3aT\u4e86\uff0c\u6b63\u786e\u7684\u65b9\u5f0f\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public T getData(){\n return data;\n}\n")),(0,r.kt)("p",null,"\u6700\u91cd\u8981\u7684\u4e00\u6b65,\u4ee5\u4e0a\u6b65\u9aa4\u5b8c\u5168\u6b63\u786e,\u4ee3\u7801\u4e5f\u6ca1\u6709\u95ee\u9898,\u53ef\u662fui\u8fd8\u662f\u4e0d\u663e\u793a\u5c5e\u6027\uff0c\u5fc5\u987b\u5728\u63a5\u53e3\u5c42\u5f3a\u6307\u5b9a\u6cdb\u578b\u7c7b\u578b(\u53ef\u80fd\u662fSwagger\u8981\u6c42\u6211\u4eec\u5199\u4ee3\u7801\u8981\u89c4\u8303\u5427~~~),\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(64222).Z,width:"1039",height:"152"})),(0,r.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u57282.0.6\u7b49\u540e\u9762\u7684\u9ad8\u7248\u672c\u4e2d,\u7531\u4e8e\u5347\u7ea7\u4e86Springfox\u57fa\u7840\u7ec4\u4ef6\uff0c\u5982\u679c\u5f00\u53d1\u8005\u4f7f\u7528\u7c7b\u4f3cJRebel\u8fd9\u7c7b\u70ed\u52a0\u8f7d\u63d2\u4ef6\u7684\u65f6\u5019\uff0c\u4f1a\u51fa\u73b0\u7c7b\u5b57\u6bb5\u6ca1\u6709\u7684\u60c5\u51b5\uff0c\u76ee\u524d\u6ca1\u6709\u529e\u6cd5\u89e3\u51b3springfox\u9879\u76ee\u4e0eJRebel\u63d2\u4ef6\u7684\u51b2\u7a81\uff0c\u5efa\u8bae\u662f\u4e0d\u7528JRebel")),(0,r.kt)("p",null,"\u5982\u679c\u4ee5\u4e0a\u60c5\u51b5\u90fdok\uff0c\u8fd8\u662f\u4e0d\u663e\u793a\u8bf4\u660e,\u606d\u559c\u4f60\u53d1\u73b0\u4e86SwaggerBootstrapUi\u7684\u4e00\u4e2abug\uff0c\u6b22\u8fce\u63d0",(0,r.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues",target:"_blank",rel:"noopener"},"issue"),"\u53cd\u9988\u7ed9\u6211,\u6211\u4f1a\u641e\u5b9a\u5b83\u7684~~\uff01"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u53e6\u5916")),(0,r.kt)("p",null,"\u4e00\u822c\u5728\u5b8c\u6210\u4ee5\u4e0a\u60c5\u51b5\u540e,\u5b57\u6bb5\u8bf4\u660e\u90fd\u4f1a\u663e\u793a,\u8fd9\u91cc\u518d\u63d0\u9192\u4e00\u4e0b\u5927\u5bb6,\u5982\u679c\u5df2\u7ecf\u5728\u6cdb\u578b\u4e2d\u5f3a\u5236\u7ea6\u675f\u4e86\u8fd4\u56de\u7c7b\u578b\u540e,\u5c31\u65e0\u9700\u5728\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiOperation"),"\u4e2d\u8bbe\u7f6e",(0,r.kt)("inlineCode",{parentName:"p"},"response"),"\u5c5e\u6027\u503c\uff0c\u6bd4\u5982\u5982\u4e0b\u4ee3\u7801"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u67e5\u8be2\u6240\u6709",response=AlarmReponse.class)\n@GetMapping("/queryAll")\npublic Rest> queryAll(){\n //more..\n}\n')),(0,r.kt)("p",null,"\u4ee5\u4e0a\u4ee3\u7801\u8fd4\u56de\u4e86\u6cdb\u578b",(0,r.kt)("inlineCode",{parentName:"p"},"Rest"),"\u7c7b\u578b\u7684List-AlarmResponse\u96c6\u5408,\u4f46\u662f\u5374",(0,r.kt)("inlineCode",{parentName:"p"},"ApiOperation"),"\u6ce8\u89e3\u4e2d\u52a0\u4e86response\u5c5e\u6027\u4e3a",(0,r.kt)("inlineCode",{parentName:"p"},"AlarmResponse.class"),"\uff0c\u8fd9\u79cd\u60c5\u51b5\u4f1a\u9020\u6210Ui\u53ea\u663e\u793a",(0,r.kt)("inlineCode",{parentName:"p"},"AlarmReponse"),"\u7c7b\u7684\u5c5e\u6027\u8bf4\u660e\uff0c\u8fd9\u663e\u7136\u662f\u4e0d\u5bf9\u7684\uff0c\u56e0\u4e3a\u5b83\u628a",(0,r.kt)("inlineCode",{parentName:"p"},"Rest"),"\u7684\u5c5e\u6027\u7ed9\u5ffd\u7565\u4e86,\u6240\u4ee5:"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u4e00\u822c\u60c5\u51b5\u4e0b,\u662f\u4e0d\u5199\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"strong"},"@ApiOperation"),"\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"strong"},"response"),"\u5c5e\u6027\u503c,\u80fd\u5c11\u5199\u5c31\u5c11\u5199,\u5c06\u5269\u4e0b\u7684\u4ea4\u7ed9springfox-swagger\u8fd9\u4e2a\u6846\u67b6,\u7531\u5b83\u81ea\u52a8\u89e3\u6790\u751f\u6210\u63a5\u53e3\u8fd4\u56de\u7c7b\u578b")),(0,r.kt)("p",null,"\u6700\u540e\u8d34\u4e00\u4e2a\u7b80\u5355\u7684\u8fd4\u56de\u5c01\u88c5\u7c7b\u4f9b\u5927\u5bb6\u53c2\u8003(",(0,r.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/blob/master/swagger-bootstrap-ui-demo/src/main/java/com/swagger/bootstrap/ui/demo/common/Rest.java?tdsourcetag=s_pctim_aiomsg",target:"_blank",rel:"noopener"},"Rest.java"),")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class Rest {\n\n @ApiModelProperty(value = "\u662f\u5426\u6210\u529f")\n private boolean success=true;\n @ApiModelProperty(value = "\u8fd4\u56de\u5bf9\u8c61")\n private T data;\n @ApiModelProperty(value = "\u9519\u8bef\u7f16\u53f7")\n private Integer errCode;\n @ApiModelProperty(value = "\u9519\u8bef\u4fe1\u606f")\n private String message;\n\n public boolean isSuccess() {\n return success;\n }\n\n public void setSuccess(boolean success) {\n this.success = success;\n }\n\n public T getData() {\n return data;\n }\n\n public void setData(T data) {\n this.data = data;\n }\n\n public Integer getErrCode() {\n return errCode;\n }\n\n public void setErrCode(Integer errCode) {\n this.errCode = errCode;\n }\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n}\n')),(0,r.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u5728\u6cdb\u578b\u57fa\u7840\u5c01\u88c5\u7c7b\u4e2d,\u5f00\u53d1\u8005\u6709\u4e24\u70b9\u9700\u8981\u6ce8\u610f\uff1a"),(0,r.kt)("p",{parentName:"admonition"},"1\u3001\u57fa\u7840\u5c01\u88c5\u6cdb\u578b\u7c7b\u4e2d,\u4e0d\u80fd\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiModel"),"\u6ce8\u89e3\u6765\u7ea6\u675f\u8be5\u6cdb\u578b\u7c7b\u7684\u7c7b\u540d\u79f0\uff0c\u56e0\u4e3a\u6cdb\u578b\u7c7b\u4e00\u65e6\u7528\u8be5\u6ce8\u89e3\u8fdb\u884c\u7ea6\u675f\u540e,\u5728OpenAPI\u7684\u7ed3\u6784\u4e2d,\u7c7b\u540d\u79f0\u5c31\u53ea\u6709\u4e00\u4e2a\uff0c\u4f1a\u5bfc\u81f4\u5b57\u6bb5\u5c5e\u6027\u627e\u4e0d\u5230\u7684\u60c5\u51b5\u3002",(0,r.kt)("strong",{parentName:"p"},"\u9519\u8bef\u7684\u4ee3\u7801\u793a\u4f8b"),"\uff1a"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/*\n* \u6cdb\u578b\u7c7b\u4e2d\u4e0d\u80fd\u4f7f\u7528@ApiModel\u6ce8\u89e3\uff0c\u5e94\u8be5\u53bb\u6389\n*/\n@ApiModel("\u7ed3\u679c\u7c7b")\npublic class Rest {\n //....\n}\n')),(0,r.kt)("p",{parentName:"admonition"},"2\u3001\u9488\u5bf9\u6cdb\u578bT\u7684\u5c5e\u6027\uff0c\u4e0d\u5e94\u8be5\u5728\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@ApiModelProperty"),"\u6ce8\u89e3\u65f6\uff0c\u8d4b\u4e88",(0,r.kt)("inlineCode",{parentName:"p"},"example"),"\u503c,",(0,r.kt)("strong",{parentName:"p"},"\u9519\u8bef\u7684\u4ee3\u7801\u793a\u4f8b"),"\uff1a"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class Rest {\n /*\n * \u6cdb\u578bT\u5c5e\u6027\u4e0d\u80fd\u8d4b\u4e88example\u503c\uff0c\u56e0\u4e3aT\u6709\u53ef\u80fd\u662f\u5b9e\u4f53\u7c7b\uff0c\u8fd9\u6837\u8d4b\u503c\u4f1a\u5bfc\u81f4\u751f\u6210\u7684\u793a\u4f8b\u503c\u4e0d\u4e00\u81f4\uff0c\u5e94\u8be5\u4ea4\u7ed9\u6846\u67b6\u53bb\u89e3\u6790\u7c7b\u7ed3\u6784\n */\n @ApiModelProperty(value = "\u8fd4\u56de\u5bf9\u8c61",example="Test")\n private T data; \n}\n'))))}k.isMDXComponent=!0},72941:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf1-1ee0f71b81456c62d4941e0fa3601b3c.jpg"},9806:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf2-40b4cbb5e01c0147fa7913ed6a1eba44.png"},41472:(A,e,t)=>{t.d(e,{Z:()=>n});const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAQAAAHpCAMAAAAiWx4mAAAAAXNSR0IArs4c6QAAAPxQTFRF7+/vgwAA/+SnAIPHRERE///JfgBU////3d3dAAAA56dSpeL+5///AFSl7+/bxO/v2/DvUarng8j9yv//TwMA/8iIc7Tq///n7fHHnQBUkkRKx4MAlc/1AABPo7zvrW5EREVu1aF0UESRUgBS77yTyZJFpVQAlJ3b8NWwudbvgE+wfgCVmU8ARGytAACFy3hVTJvZtHkAAE+asen/79WbgXPI569ub0pHAHi4RZHKAAB6AJ3RuE1W79mn2ZtM7rx6kgB27++5eZ3MlMvLtNzAhQBS58PPUgCFfgB2y9KgbLDQyKLAtn6nakRE4aL/KnD65+jnfnSp+fn5TAB6dZjBfgAAFetJREFUeNrt3WlbG0fahmEhiaUxYEBIYBZjiIWXAWxsk0C8TWInHi/MOJn//1/equpuIWzhOMkcr1H3eR2BlkD5cvPU1U9VyarGNIBa0xABQAIASAAACQAgAQAkAIAESr5v9waPJ9fbm0O/aJ9u73bCo+bu4vbB2vrj5tmpKIHqSCAM8var9Xbi1uP0o9Xt9un5b3vTd39Iv+q2320f7LR73w8pAsD4S+DW67NX67384eMw/s/pTfcHj29tTq8+exUkcJq/RDMAVFUCqfMfonl2MJc/Kozw6izI4dNXARhzCbwLt/eDnVICseGfXL/1uD/UFqQftYMQ+u3QDJRiAFAZCfT6hQR2djtx6S/vALppnaB5FtUQfpJPFg7W1s0GgMpKIK4FxH4gbReEVmAz3P97cb9gdftdahN2fth9e2ZpEKioBCbXw21+t9Nvb/bjsD/fMohbA6kN2O102z9YEgAqJIG0RViuCQQJzIUeoNs+WB8M9H5aEIhvHziYi5OE2BrIEqheJ5B2B7rtYjWgmzYBm2eFAPJmoH0a+oP4NoLiDQUAKiCB6XSPT7f2/q172+WQ7w+9Iyjc+tv5ymBoF+ZWt3fftu0OAJWTQBzpp9OTvz0ZerPQ5HqxDDA9vdoIDcBuJy4TnEYdmBAAVZIAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAYEwnMAKgPIyXQwNjgjyWfvw0JKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAJKHL5kAAUuXxIAIpcPiQARS4fEoAilw8J5LzIspP9H6+HR0/++3r/0U9Tm09WTvJfPVnZ2hy8Lj55kfXk+s2K/Ohho/Hy0WLjp4nw93mZBR6+iN+z9NeTz08TvUaq3RcPU1lHHh39GIp6kQS+JIGQ1cPG7bMsC8P9ZXa6/6gfK6tXDPusoNc4CqoIZTgkBfw/F3kY9icL++HP9TL/Yz18spL+VAv7JJD/4Cg7iRI4SlYM6URbksAfSuCoHObZ1rvGwvq7IIFYaFkc8i+yk+I1McQYaGkF7cC3udP9697iTxOPZvajiklgRFt79OPblZOikSWBPzEdeLJSZlQY4beVhyG66+Guv7D/MJRY7oIUaKy+utbclZjzFk1uagdIYHQ26Zb2aj9/8OM+CfyBBI6Gcgvl9NNEvOkfxa4z5fZicN/Pu4P2QxOCb1bk4Y9TLsq8TBKwJvAZL4uFgFi8oVJ1Al/XCaT5ZegG8lnUo9yfj9LSU74qcDJ44Umow0dHWx/MBr5NkS/sX5SATuDTljbYMM4F0r0sNrh5GS+QwB+uCfRCZmH2lPUW9k9TOW2fhZlV70J/lWYF2cNQeEdbr8q9A3wLCZgOfGm61BjsbN39YTPZIHyFtEjgUgnkTX7e4MetgaK3fJm1f7yeftcrJlsP00biUXhpkIA1gW8ngVDXwdDxzlZKwHTgkrltroQaNwFfPx0o0+ulWWfZReXuPDqXQGipJk7i7468WeAbSuCH0LI9ChJ4+91mkkBq3XQCF6YEpRKHnKAT+KIE0qZf73xZ5eQo9Zd5dzAkgcbOq4mTu/u9uNzyss6hflMJZDH86OK3Kw/TGtiteKcjgQHx9vUiO7/76wS+/m3Dcd6UrwzGldVQVDspyKNhlRZrhXYHvul0IK7ghsr+PutFFceVnLyBk09x8++Va90k8LUSiKO/mFMuzIQ7Tb4UcJLeaXGxE8gl8CLL6p7qNyzyozDyCzkXf4Unu4sva/vmrc/XBMrBH8r03f7wCsEJCfgHRJWZ80I+JKDIIR8SUOSQDwkocsiHBBS5fEACilw+IAFFLh+QgCKXD0hAkcsHJKDI5QMSUOTyAQkocvngjyQAoD6MlMA0xgZ/LPn8XUhAkcuHBOSmyOVDAnJT5PIhAbkpcvmQgNwUuXxIQG6KXD4kIDdFLh8SEIsilw8JQJHLhwSgyOVDAlDk8iEBKHL5kMAoNlqyU+RjmE/zu2vlw8lfwsPJiSxbDk9ms2zrGgmQAAnUKp8ogcmJpeSF2cPOdDd8kcBluTVXsmwpl+ZS/vTwKEigm+USBQmMUycw+ctOlh12Ug8QB/7q3lL4bzpcl0ngstwmJ5bjV5RmEufKchj/rSTOoeYKJDAmEpiYn1vda+XTgaEZQqxzErgkt9n5ucEljPx03Wjl3pw1LSCBsZPAcqrmXAKhIVi6UOckMCq3Yv6fLs03nXSdbcVuKkACJDDWEhgU+KyFwb8gAesBJFAJCaQVwfo64G9NB5aUGAmMuQTKop7eqOvWwPTXLwyGIV8uDManaWEwqJMJSGCsJZAvei+lLUIS+FJdxS3C1oUtwvm4RTibZRkHkMC4SmB6I1sqtr+LBa4lElBXJCAfEpCbIpcPCchNkcuHBMSiyOVDAlDk8iEBKHL5kAAUuXxIAIpcPiQARS4fEoAilw8JQJHLhwSgyOVDAlDk8qmDBADUB52AO518dAJyU+TyIQG5KXL5kIDcFLl8SEBuilw+JCA3RS4fEpCbIpcPCYhFkcuHBKDI5UMCUOTyIQEocvmQABS5fEgAilw+JDA4nzzSzU8phiIf33ya3+Unkc9+VsyzLRIgARKokQQ+hwRG5tZcyQ7jMcTdLMsOO934bXXPkcQkMI75FGdrN7/bTkdtx04g1vVyvNHFyp7Nsrrd5L5GAs2V5ZBTa7q7Fc9zb8VOYHUv5rd1TZGRwHjlMzmxlL6aK3kVBwl0DzupMYg+CF86gVG5pWlTOR3YaA2mA5d3VCCBK5pPKuYw7FPxhuvsfGNvOU0CJieWTQcuzS2N/xRNmBdkpQRC76QTIIFxyycVc/NNJ/yXbmOz82thfhBoDZYKSeALEggKWC47gY0wcdIJkEAlJLB8obElgS9NB1I6uQQmf7lmOkACFZkOLBWrBaYDl+cW04kLg2nhJJ8OxB9NTpgOkMC45XO+MNhK17gwGOp4dW8p3ygIWiCB6dFbhPNHrem4LdiaPezE0d/Nsq3XE/YISWDc8im3CN/0B1uEs8V2d77M1Vw57JCAuiKB2uRTv/s+CZCAfC6wQQIkQAJ1zse6FgmQgHxAAopcPiQgN0UuHxKQmyKXDwnITZHLhwTkpsjlQwJyU+TyIQG5KXL5kIDcFLl8SACKXD61lgCA+qATcKeTj05AbopcPiQgN0UuHxKQmyKXDwnITZHLhwTkpsjlQwJyU+TyIQGxKHL5kAAUuXxIAIpcPiQARS4fEoAilw8JQJHLhwSgyCuVTzpWO5JOKSYBdUUC9ZUAvk4CzTdvs6zVXMniaa3dLMuW00HF6WzX/BLPKy6eHvaDWuPJr854I4GrmM9GlsWDtUMVN3ePslboBGZP9gZV/PN310hgpARWWum85niGezeIoPndtcmJ5TDSl4vL6l4843nrWn7u+/xc/HF8MUjgquWTjiIPJfpLPIN8KT2fDXe17ta16Y35udW9LRIYLYFgxzSmZ1ure8sxyFYc5rGpyi/lq7pxfhWiTMc9N990lCAJXEUJFNOBWNdJAql3XU4zhC4JfEkCy/ngzyKt6dm8358t2/7QZG1dS4M/RLqRXnRIAiRw5fIJFRzH+QgJpLtW03TgKyQwuPV30zwqv2xk83PhVQMJWA8ggSubT5j6H3ZI4K9L4MJMv+isZufXYiM1PB2w7UICVzifovc3HfhrEkghBRMUS39Dl8mJ4YXBJRuwJHBl1wS6IzsBC4NfK4G4ChCnAd20MjB02XqdDJAd9lv5ziEHkMAVzCfuA8aBvpEtfSqBtEVYx+Xs//2bhWYtCJDA2ObTJIG/WVfxTQTDu4YggfHJJ1VuLde0/7edwEb+dkKQwBjmU8xtSUBdkYB8SEBuilw+JABFLh8SgCKXDwlAkcuHBKDI5UMCUOTyIQEocvmQABS5fEgAilw+tZEAgPqgE3Cnk49OQG6KXD4kIDdFLh8SkJsilw8JyE2Ry4cE5KbI5UMCclPk8iEBsShy+ZAAFLl8SACKXD4kAEUuHxKAIpcPCUCRy4cEoMirkc9lZ49vtEhAXZEACZDA5XW1kWWHnTy+jeLM4aXBZXIiHd508QISuKoS2M4rNFZqKN90onZR2LP5w1jY4Tr5y06qexKIxKObw1cpgXhwY/gauqzuLYX/hi5qjwSuqgRW5udW92IVL6Wvbhju8SsUdqzz7mGnuRIren5uciJ/JQmUEigbqSKr85+mk8ibbzr5yCcAEhiD6UAY6ql8wzUVbKjqjdbkL3GisLFU1nw6pbiochIIjVPqkgoJFLOn8pJFDjuhq0qx5heQwBWVwJtOKuWN/Ob1Oo70eCfbaMVZQDaY4ZLAp6zuhWF+iQRa541WmmsVF5DAmEmgWDIMCljSCYyqq5DIJdOBoZS6+TJKtxarKSRQtelA8kH4YfwNCYxYEwhxxWWU5kq+MBjm/oPLUnxFI4a50VrNL2qPBK6qBFbOFwU/XRgMN69Q1fEe1jUd+HwykBYF4ny/X2wRXryEpC5eQAJXdTrQv3SLMK5vLafL/MutayQAEpBPTSABRS4fEpCbIpcPCchNkcuHBOSmyOVDAnJT5PIhAbkpcvmQgNwUuXxIQCyKXD4kAEUuHxKAIpcPCUCRy4cEoMjlU0MJAKgPDR4EdAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAGD8JfB9uzd4PLne3ix/WnLrcfz5afGKfnwKoBISiOP81fr5SA+sbrdPR/3v3fZv8VU9EgAqJYFbr89erffyh4/D+D+n98lL+7ud8JLQEPRIAKiuBHY7l/3fk+u7neABEgCqKIF3oQM42Ckl8H17Mwz1W4/7Q21Be7Pb3l2MjcI7EgCqKIFev5DAzm6neXY63Tw7mCsagHzEh5nC7tuzoIJXJABUWQJxLSD2A/l2QXe3EyUQLkkC27FdeE0CQHUlMLl+sBan/u3NftwmnFxv94IE7oXBPzf9PswOfmi3d9dIAKiUBNIWYbkmECQwF3qAbvtgPb/5n6bpQL5pGFcFu+1TC4NANTuBtDsQxni+GtBNoz42AGlNoHkWGoMggdXtKAoSACokgchkvkXYj31/8V7BOBtYXbvfyXcGgyBOPwYJLBa/71++kQhgTCUQpv+x9//tycU3C30/9Kah/m5yQFw8PBUmUCUJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABACQAgAQAkACAcZHA7x9nANSEURL4feZjA0BdGCGBjxwA1FsCM1IBSAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAKC6Erh96568gBpLYGF7WVxAnSWwtq4RAEgAQH0l8Hz3uriAGktAIwDoBHQCgDUBACQAgAQA1FEC3iwE1FwC3jYM1F0CAEgAAAkAIAEAJACABACQAAASAEACAEgAAAkAIIGCu//8/N8YzBzfv39T2kBtJTBzfLPx67F/fwTUVgLvf240Fj7cETdQOQncvTE1dTO/3F8Mz29PTf3jbZRA8YucfPy/P16UN1AxCdy9EQb6+8Xbcbw/CBaID9Zu/Ote43b4Ch3BwvZpksDxTRIAKimBB8dpjD+Ll7UghPQ8CGDhWbz1P7hDAkC1JRDH/eASBn7+IHQAa2EyEDgupwMkANROAhf2Axc+JAn8LG6gYhLIu/7iEgZ+/mAnTgeOL7zQ7gBQ0TWBuBC48OF8YXAnrgemhcH0k3JhsDFzfK/x67ETjIDKSSBuCYYhHy/5AsBOuUUYHkRBFBJo/Hr/fnRA/53EgWpJ4M/h/BKg5hJ4/pv9AaDWEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAMCYSmDUOQMAaiqB2/8Y8aEB/YP474aen/l3xEA9JfB89/qFK4AKSWBwzsCD8OB6/B7PH8ifDF5zsEgCQEUlcH7OQHnwQBz8xZPnZ8skAFRcAuU5A4OpwGA6EB6UEtgpPmLM5woBlZPA4CPG888UHEigeHJxNqAVAKosgXIqkCQwmBc0dAJAtSUwOGcg2aCUwODJJ62ARgCo3ppAec7A2o07YexHCYQflE8sDALVl8DgnIG0VRgksPBs6v5i8WSUBMqpAYCKSOBrKDuAIIOF7WWRA7WTwOBtw8uNtftmBEANJQCABACQAAASAEACAEgAAAkAIAEAJACABACQAIBaS+Df/7nzn/I7gFpK4N//Kb8DqKcElsrvAMZOAjv3d6amjheeTU3Fzxlbu5FfH6TL3Rvpw0bLMwjC9f7O/cX8c0j8g2KgKhIIoz0M9pvpY8Xu3riZPl8wDvX31+OjtfeDAwkexM8eSweThK+d80MJAIy3BMoPF45DPh1CsHOcX4cPJ7v9j+v55xKHV6Yfr/3zHgkAFZkOLOYnkIRBHicF6RSy21PxNJLw9DhvFmL7X5xHkD5/MHJT8kAFJXCn/PGDNOsP84Q75RkE5xKwHgBUVQJpvBfk3X/4dXkGQZoFLDwL04EbmgCgqhK4eyO0Ajs3Gx+uxwWBu3fib8ozCOL4DzODYoVwzcIgUEUJxMMHir3BOOd/kE4pHzqQYOp45zitFcTJwigJ9N/5ewBjJoE/yYM7X/qtswqBCktg4dm9/NCyL/D8t0V/D6CynUB8N6GNAaDu0wEAJACABACQAAASAEACAEgAAAkAIAEAJACABADUSAILP/s4AYAEAIy9BOInhNzMP1g4faxIcfLAxcvFcwgSvz4NbP769PXTpzNRBwt3lqIYnj51BAkwXhKIHyr0fnEggfhhYunIgXQZeQ5B/2Bx0AkEFRSPogRmTpc1CMCYSaD4gOGBBHbyjxotLiPPIbgogc0hCbx/mloEfxJgnDqBnfyzxQsJFE4YXEaeQzC0JvDr0+vnEli48zTh04WAcZJAHNr3Fy+TwKhzCL4gAesBwBhKILUBaU3wbnkQWWNwGXEOweLnEsjXBON0QBMAjN2awId0vNDCs+PYEhQnD3y4Pnz55ByC8zWBpUICafC/fxoXBuOPLAwCY9UJ3J5K8/140sCrvB1IRw4Ul1HnEBQSiDsDm7kE0s7gnaV839CUABi76QAAEgBAAgBIAAAJACABACQAgAQAkAAAEgBAAgBIAAAJACABAOMugedn76QF1LoTeL57XVwACQAgAQD1lMDa+j1xAXWWgFYA0AmIC7AmAIAEAJAAgBpK4PaBY8KAOkvg+ZkTwoB6dwIASAAACQAgAQAkAIAEAJAAABIAQAIASAAACQAgAQAkAIAEAJAAABIAQAIASADAWErg40exALWWwO8zLADUWgLTv3+cAVATRkoAQH0gAYAEAJAAABIAQAIASABA3fg/SbfsJTHBgZQAAAAASUVORK5CYII="},64222:(A,e,t)=>{t.d(e,{Z:()=>n});const n=t.p+"assets/images/nf4-adca0c0aa1bedb4e3d9e2f698082b75e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/02aa3483.4e7fc6fb.js b/knife4j-doc/gitee/assets/js/02aa3483.4e7fc6fb.js new file mode 100644 index 000000000..1ae030096 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/02aa3483.4e7fc6fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3137],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=s(n),d=o,m=l["".concat(p,".").concat(d)]||l[d]||f[d]||a;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:o,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>m,frontMatter:()=>c,metadata:()=>s,toc:()=>l});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),i=["components"],c={},p="\u8bf4\u660e",s={unversionedId:"oas/annotation-introduction",id:"oas/annotation-introduction",title:"\u8bf4\u660e",description:"",source:"@site/docs/oas/annotation-introduction.md",sourceDirName:"oas",slug:"/oas/annotation-introduction",permalink:"/docs/oas/annotation-introduction",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"oas",previous:{title:"OpenAPI3",permalink:"/docs/oas/openapi3"},next:{title:"Swagger2\u6ce8\u89e3",permalink:"/docs/oas/openapi2-annotation"}},u={},l=[],f={toc:l},d="wrapper";function m(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)(d,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"\u8bf4\u660e"},"\u8bf4\u660e"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/02aa3483.9408b4b5.js b/knife4j-doc/gitee/assets/js/02aa3483.9408b4b5.js deleted file mode 100644 index 3711b8945..000000000 --- a/knife4j-doc/gitee/assets/js/02aa3483.9408b4b5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3137],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),f=s(n),d=o,m=f["".concat(p,".").concat(d)]||f[d]||l[d]||a;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>l});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),i=["components"],c={},p="\u8bf4\u660e",s={unversionedId:"oas/annotation-introduction",id:"oas/annotation-introduction",title:"\u8bf4\u660e",description:"",source:"@site/docs/oas/annotation-introduction.md",sourceDirName:"oas",slug:"/oas/annotation-introduction",permalink:"/docs/oas/annotation-introduction",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"oas",previous:{title:"OpenAPI3",permalink:"/docs/oas/openapi3"},next:{title:"Swagger2\u6ce8\u89e3",permalink:"/docs/oas/openapi2-annotation"}},u={},l=[],f={toc:l};function d(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"\u8bf4\u660e"},"\u8bf4\u660e"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0311a7e4.0635457f.js b/knife4j-doc/gitee/assets/js/0311a7e4.0635457f.js deleted file mode 100644 index 3d66f8a88..000000000 --- a/knife4j-doc/gitee/assets/js/0311a7e4.0635457f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6620],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),m=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=m(e.components);return n.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),u=m(r),f=o,y=u["".concat(p,".").concat(f)]||u[f]||s[f]||a;return r?n.createElement(y,i(i({ref:t},l),{},{components:r})):n.createElement(y,i({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var m=2;m{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>f,frontMatter:()=>c,metadata:()=>m,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],c={},p="\u6e90\u4ee3\u7801",m={unversionedId:"community/sourcecode",id:"community/sourcecode",title:"\u6e90\u4ee3\u7801",description:"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0ahttps://gitee.com/xiaoym/knife4j\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801",source:"@site/docs/community/sourcecode.md",sourceDirName:"community",slug:"/community/sourcecode",permalink:"/docs/community/sourcecode",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"\u83b7\u53d6\u5e2e\u52a9",permalink:"/docs/community/community-get-helps"},next:{title:"Apache 2.0 \u8bb8\u53ef\u8bc1",permalink:"/docs/community/apache"}},l={},s=[],u={toc:s};function f(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"\u6e90\u4ee3\u7801"},"\u6e90\u4ee3\u7801"),(0,a.kt)("p",null,"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0a",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/stargazers",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/badge/star.svg?theme=gvp",alt:"star"})),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/members",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/badge/fork.svg?theme=gvp",alt:"fork"}))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/widgets/widget_card.svg?colors=393222,ebdfc1,fffae5,d8ca9f,393222,a28b40",alt:"\u8427\u660e/knife4j"}))),(0,a.kt)("p",null,"\u5982\u679c\u4f60\u4e00\u822c\u5728GitHub\u6d3b\u52a8,Knife4j\u7684\u4ee3\u7801\u5728GitHub\u4e5f\u6709\u5907\u4efd\u5e93\uff1a"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/knife4j")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"\u6ce8\u610f\uff1aGitHub\u4ed3\u5e93\u4f5c\u8005\u53ea\u662f\u4f5c\u4e3a\u4e00\u4e2a\u5907\u4efd,\u4ee3\u7801\u53ef\u80fd\u4e0d\u662f\u6700\u65b0,\u6700\u65b0\u7684\u4ee3\u7801\u90fd\u5728Gitee\u4ed3\u5e93\u7684dev\u5206\u652f,\u5f00\u53d1\u8005\u5982\u679c\u60f3\u63d0\u4ea4PR,\u5c3d\u91cf\u5728Gitee\u7684dev\u5206\u652f\u4e0b\u63d0\u4ea4!!!")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0311a7e4.886c0224.js b/knife4j-doc/gitee/assets/js/0311a7e4.886c0224.js new file mode 100644 index 000000000..f611db744 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0311a7e4.886c0224.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6620],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>y});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),m=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=m(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),s=m(r),f=o,y=s["".concat(p,".").concat(f)]||s[f]||u[f]||a;return r?n.createElement(y,i(i({ref:t},l),{},{components:r})):n.createElement(y,i({ref:t},l))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[s]="string"==typeof e?e:o,i[1]=c;for(var m=2;m{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>m,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],c={},p="\u6e90\u4ee3\u7801",m={unversionedId:"community/sourcecode",id:"community/sourcecode",title:"\u6e90\u4ee3\u7801",description:"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0ahttps://gitee.com/xiaoym/knife4j\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801",source:"@site/docs/community/sourcecode.md",sourceDirName:"community",slug:"/community/sourcecode",permalink:"/docs/community/sourcecode",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"\u83b7\u53d6\u5e2e\u52a9",permalink:"/docs/community/community-get-helps"},next:{title:"Apache 2.0 \u8bb8\u53ef\u8bc1",permalink:"/docs/community/apache"}},l={},s=[],u={toc:s},f="wrapper";function y(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)(f,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"\u6e90\u4ee3\u7801"},"\u6e90\u4ee3\u7801"),(0,a.kt)("p",null,"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0a",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/stargazers",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/badge/star.svg?theme=gvp",alt:"star"})),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/members",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/badge/fork.svg?theme=gvp",alt:"fork"}))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},(0,a.kt)("img",{parentName:"a",src:"https://gitee.com/xiaoym/knife4j/widgets/widget_card.svg?colors=393222,ebdfc1,fffae5,d8ca9f,393222,a28b40",alt:"\u8427\u660e/knife4j"}))),(0,a.kt)("p",null,"\u5982\u679c\u4f60\u4e00\u822c\u5728GitHub\u6d3b\u52a8,Knife4j\u7684\u4ee3\u7801\u5728GitHub\u4e5f\u6709\u5907\u4efd\u5e93\uff1a"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/knife4j")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"\u6ce8\u610f\uff1aGitHub\u4ed3\u5e93\u4f5c\u8005\u53ea\u662f\u4f5c\u4e3a\u4e00\u4e2a\u5907\u4efd,\u4ee3\u7801\u53ef\u80fd\u4e0d\u662f\u6700\u65b0,\u6700\u65b0\u7684\u4ee3\u7801\u90fd\u5728Gitee\u4ed3\u5e93\u7684dev\u5206\u652f,\u5f00\u53d1\u8005\u5982\u679c\u60f3\u63d0\u4ea4PR,\u5c3d\u91cf\u5728Gitee\u7684dev\u5206\u652f\u4e0b\u63d0\u4ea4!!!")))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/03ec1073.b2bc62bd.js b/knife4j-doc/gitee/assets/js/03ec1073.b2bc62bd.js deleted file mode 100644 index e42a06c8f..000000000 --- a/knife4j-doc/gitee/assets/js/03ec1073.b2bc62bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5371],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>c});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),k=u(n),c=a,m=k["".concat(i,".").concat(c)]||k[c]||d[c]||l;return n?r.createElement(m,o(o({ref:t},s),{},{components:n})):r.createElement(m,o({ref:t},s))}));function c(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=k;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:a,o[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>p,metadata:()=>u,toc:()=>d});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),o=["components"],p={},i="Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f",u={unversionedId:"middleware-sources/desktop-use",id:"middleware-sources/desktop-use",title:"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f",description:"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Knife4jAggregationDesktop",source:"@site/docs/middleware-sources/desktop-use.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/desktop-use",permalink:"/docs/middleware-sources/desktop-use",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672134067,formattedLastUpdatedAt:"2022\u5e7412\u670827\u65e5",frontMatter:{}},s={},d=[{value:"2.3.1 \u589e\u52a0\u6587\u6863",id:"231-\u589e\u52a0\u6587\u6863",level:2},{value:"2.3.2 \u914d\u7f6e\u6587\u6863",id:"232-\u914d\u7f6e\u6587\u6863",level:2},{value:"2.3.2.1 Disk\u6a21\u5f0f",id:"2321-disk\u6a21\u5f0f",level:3},{value:"2.3.2.1 Cloud\u6a21\u5f0f",id:"2321-cloud\u6a21\u5f0f",level:3},{value:"2.3.2.2 Eureka\u6a21\u5f0f",id:"2322-eureka\u6a21\u5f0f",level:3},{value:"2.3.2.3 Nacos\u6a21\u5f0f",id:"2323-nacos\u6a21\u5f0f",level:3}],k={toc:d};function c(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)("wrapper",(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f"},"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f"),(0,l.kt)("p",null,"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop")),(0,l.kt)("h2",{id:"231-\u589e\u52a0\u6587\u6863"},"2.3.1 \u589e\u52a0\u6587\u6863"),(0,l.kt)("p",null,"\u5f53",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u542f\u52a8\u540e,\u5f00\u53d1\u8005\u60f3\u8981\u589e\u52a0OpenAPI\u6587\u6863\u5e94\u8be5\u600e\u4e48\u529e\uff1f"),(0,l.kt)("p",null,"\u4ece\u6280\u672f\u67b6\u6784\u56fe\u53ef\u4ee5\u770b\u5230,",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u63d0\u4f9b\u4e86",(0,l.kt)("inlineCode",{parentName:"p"},"MetaDataMonitor"),"\u7ec4\u4ef6,\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u76d1\u542c\u5668,\u4e3b\u8981\u76d1\u542cdata\u76ee\u5f55\u3002\u5f53\u5f00\u53d1\u8005\u5728data\u76ee\u5f55\u65b0\u5efa\u6587\u4ef6\u5939(\u6587\u6863)\u540e\uff0c\u6dfb\u52a0\u76f8\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u540e\u81ea\u52a8\u52a0\u8f7d\u5143\u6570\u636e\u914d\u7f6e\uff0c\u65e0\u9700\u91cd\u542f\u5373\u53ef\u5728\u7ebf\u8bbf\u95ee\u6587\u6863"),(0,l.kt)("p",null,"\u5728data\u76ee\u5f55\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5efaN\u4e2a\u4e00\u7ea7\u6587\u4ef6\u5939(\u6587\u6863),\u6587\u4ef6\u5939\u540d\u79f0\u5fc5\u987b\u662f\u82f1\u6587\u6216\u82f1\u6587+\u6570\u7ec4\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|------project1\n|------project2\n|------project3\n|-----\u2014project4\n|-----\u2014more...\n")),(0,l.kt)("p",null,"ROOT\u76ee\u5f55\u4ee3\u8868\u7684\u662f\u6839\u76ee\u5f55\uff0c\u6700\u7ec8\u8bbf\u95ee\u6587\u6863\u7684\u5730\u5740\u662f\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u800c\u5f00\u53d1\u8005\u81ea\u5efa\u7684\u6587\u4ef6\u5939\u76ee\u5f55\uff0c\u4f8b\u5982project1\u3001project2\u3001project3\u7b49\u7b49\uff0c\u6240\u4ee3\u8868\u7684\u662f\u4e00\u4e2a\u9879\u76ee\u540d\u79f0\uff0c\u6700\u7ec8\u8bbf\u95ee\u7684\u5730\u5740\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u9879\u76eecode"),(0,l.kt)("th",{parentName:"tr",align:null},"\u6587\u6863\u5730\u5740"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ROOT"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6839\u76ee\u5f55\uff0c\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project1"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project1/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project2"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project2/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project3"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project3/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project4"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project4/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"\u4ee5\u6b64\u7c7b\u63a8"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/${code}/doc.html"))))),(0,l.kt)("h2",{id:"232-\u914d\u7f6e\u6587\u6863"},"2.3.2 \u914d\u7f6e\u6587\u6863"),(0,l.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ecb\u7ecd\u79cd\uff0c\u6211\u4eec\u77e5\u9053\u4e86\u5982\u4f55\u589e\u52a0\u591a\u4e2a\u6587\u6863\uff0c\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728data\u76ee\u5f55\u5efa\u6587\u4ef6\u5939\u5373\u53ef\uff0c\u90a3\u4e48\u5efa\u7acb\u597d\u4e86\u6587\u4ef6\u5939\u540e\uff0c\u5982\u4f55\u914d\u7f6e\u5462\uff1f"),(0,l.kt)("p",null,"\u8fd9\u91cc\u9700\u8981\u6d89\u53ca\u5230Knife4jAggregation\u63d0\u4f9b\u652f\u6301\u76844\u79cd\u6a21\u5f0f\u4e86\uff1aDisk\u3001Cloud\u3001Eureka\u3001Nacos"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\u53ea\u652f\u6301\u4e00\u79cd\u6a21\u5f0f")),(0,l.kt)("p",null,"\u62ffROOT\u6839\u76ee\u5f55\u6765\u505a\u793a\u4f8b\u8bf4\u660e\uff0c\u5f00\u53d1\u8005\u5982\u4f55\u914d\u7f6e\u3002"),(0,l.kt)("h3",{id:"2321-disk\u6a21\u5f0f"},"2.3.2.1 Disk\u6a21\u5f0f"),(0,l.kt)("p",null,"Disk\u6a21\u5f0f\u5728Knife4jAggregationDesktop\u4e2d\u662f\u6700\u7b80\u5355\u7684\uff0c\u5982\u679c\u5f00\u53d1\u8005\u62e5\u6709OpenAPI\u6587\u6863\u7684\u9759\u6001",(0,l.kt)("inlineCode",{parentName:"p"},"JSON"),"\u6587\u4ef6\u6216\u8005",(0,l.kt)("inlineCode",{parentName:"p"},"yml"),"\u6587\u4ef6\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u76f4\u63a5\u653e\u5728\u5efa\u597d\u7684\u6587\u4ef6\u5939\u4e2d\uff0c\u4e0d\u7528\u4efb\u4f55\u914d\u7f6e\uff0c\u5373\u53ef\u6e32\u67d3\u3002"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------userOpenApi.json\n|--------orderOpenApi.json\n|--------goodsOpenApi.yml\n\n")),(0,l.kt)("p",null,"\u5728ROOT\u76ee\u5f55\u4e0b\uff0c\u6211\u4eec\u653e\u7f6e\u4e86\u4e09\u4e2aOpenAPI\u6587\u6863\u7684\u9759\u6001\u6587\u4ef6\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"userOpenAPI"),"\u4ee5\u53ca",(0,l.kt)("inlineCode",{parentName:"p"},"orderOpenApi"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"goodsOpenApi.yml"),",\u6b64\u65f6\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u5f00\u53d1\u8005\u5c31\u80fd\u5728\u6587\u6863\u754c\u9762\u4e2d\u770b\u5230\u4f1a\u5b58\u5728\u4e09\u4e2a\u5206\u7ec4\u4e0b\u7684OpenAPI\u6587\u6863\u4e86\u3002"),(0,l.kt)("p",null,"\u90a3\u4e48\u968f\u4e4b\u95ee\u9898\u4e5f\u6765\u4e86\uff0c\u5728\u6587\u6863\u4e2d\uff0c\u4e0b\u62c9\u6846\u7684\u9009\u9879\u540d\u79f0\u662f\u4ee5\u6587\u4ef6\u7684\u540d\u79f0\u6765\u547d\u540d\u663e\u793a\u7684\uff0c\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u663e\u793a\u5e94\u8be5\u600e\u4e48\u529e\uff1f\uff0c\u6b64\u65f6\u5c31\u9700\u8981\u7ee7\u7eed\u5728ROOT\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8fdb\u884c\u91cd\u547d\u540d\u914d\u7f6e"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-disk",target:null,rel:null},"disk\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.disk.routes[0].name=\u7528\u6237\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[0].location=userOpenApi.json\n\nknife4j.disk.routes[1].name=\u8ba2\u5355\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[1].location=orderOpenApi.json\n\nknife4j.disk.routes[2].name=\u5546\u54c1\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[2].location=goodsOpenApi.yml\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2321-cloud\u6a21\u5f0f"},"2.3.2.1 Cloud\u6a21\u5f0f"),(0,l.kt)("p",null,"Cloud\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eCloud\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------cloud.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-cloud",target:null,rel:null},"Cloud\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.cloud.routes[0].name=\u7528\u6237\nknife4j.cloud.routes[0].uri=192.168.0.152:8999\nknife4j.cloud.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eCloud\u6a21\u5f0f\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2322-eureka\u6a21\u5f0f"},"2.3.2.2 Eureka\u6a21\u5f0f"),(0,l.kt)("p",null,"Eureka\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eeureka\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------eureka.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-eureka",target:null,rel:null},"Eloud\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.eureka.serviceUrl=http://localhost:10000/eureka/\nknife4j.eureka.routes[0].name=\u7528\u6237\nknife4j.eureka.routes[0].serviceName=userService\nknife4j.eureka.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eEureka\u6a21\u5f0f\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2323-nacos\u6a21\u5f0f"},"2.3.2.3 Nacos\u6a21\u5f0f"),(0,l.kt)("p",null,"Nacos\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6enacos\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------nacos.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-nacos",target:null,rel:null},"Nacos\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.nacos.serviceUrl=http://localhost:10000/nacos/\nknife4j.nacos.routes[0].name=\u7528\u6237\nknife4j.nacos.routes[0].serviceName=userService\nknife4j.nacos.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eNacos\u6a21\u5f0f\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/03ec1073.d22ed28c.js b/knife4j-doc/gitee/assets/js/03ec1073.d22ed28c.js new file mode 100644 index 000000000..4d6cc7c44 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/03ec1073.d22ed28c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5371],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},d="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,i=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=u(n),c=a,m=d["".concat(i,".").concat(c)]||d[c]||k[c]||l;return n?r.createElement(m,o(o({ref:t},s),{},{components:n})):r.createElement(m,o({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[d]="string"==typeof e?e:a,o[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>p,metadata:()=>u,toc:()=>d});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),o=["components"],p={},i="Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f",u={unversionedId:"middleware-sources/desktop-use",id:"middleware-sources/desktop-use",title:"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f",description:"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Knife4jAggregationDesktop",source:"@site/docs/middleware-sources/desktop-use.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/desktop-use",permalink:"/docs/middleware-sources/desktop-use",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672134067,formattedLastUpdatedAt:"2022\u5e7412\u670827\u65e5",frontMatter:{}},s={},d=[{value:"2.3.1 \u589e\u52a0\u6587\u6863",id:"231-\u589e\u52a0\u6587\u6863",level:2},{value:"2.3.2 \u914d\u7f6e\u6587\u6863",id:"232-\u914d\u7f6e\u6587\u6863",level:2},{value:"2.3.2.1 Disk\u6a21\u5f0f",id:"2321-disk\u6a21\u5f0f",level:3},{value:"2.3.2.1 Cloud\u6a21\u5f0f",id:"2321-cloud\u6a21\u5f0f",level:3},{value:"2.3.2.2 Eureka\u6a21\u5f0f",id:"2322-eureka\u6a21\u5f0f",level:3},{value:"2.3.2.3 Nacos\u6a21\u5f0f",id:"2323-nacos\u6a21\u5f0f",level:3}],k={toc:d},c="wrapper";function m(e){var t=e.components,n=(0,a.Z)(e,o);return(0,l.kt)(c,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f"},"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f"),(0,l.kt)("p",null,"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop")),(0,l.kt)("h2",{id:"231-\u589e\u52a0\u6587\u6863"},"2.3.1 \u589e\u52a0\u6587\u6863"),(0,l.kt)("p",null,"\u5f53",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u542f\u52a8\u540e,\u5f00\u53d1\u8005\u60f3\u8981\u589e\u52a0OpenAPI\u6587\u6863\u5e94\u8be5\u600e\u4e48\u529e\uff1f"),(0,l.kt)("p",null,"\u4ece\u6280\u672f\u67b6\u6784\u56fe\u53ef\u4ee5\u770b\u5230,",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u63d0\u4f9b\u4e86",(0,l.kt)("inlineCode",{parentName:"p"},"MetaDataMonitor"),"\u7ec4\u4ef6,\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u76d1\u542c\u5668,\u4e3b\u8981\u76d1\u542cdata\u76ee\u5f55\u3002\u5f53\u5f00\u53d1\u8005\u5728data\u76ee\u5f55\u65b0\u5efa\u6587\u4ef6\u5939(\u6587\u6863)\u540e\uff0c\u6dfb\u52a0\u76f8\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u540e\u81ea\u52a8\u52a0\u8f7d\u5143\u6570\u636e\u914d\u7f6e\uff0c\u65e0\u9700\u91cd\u542f\u5373\u53ef\u5728\u7ebf\u8bbf\u95ee\u6587\u6863"),(0,l.kt)("p",null,"\u5728data\u76ee\u5f55\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5efaN\u4e2a\u4e00\u7ea7\u6587\u4ef6\u5939(\u6587\u6863),\u6587\u4ef6\u5939\u540d\u79f0\u5fc5\u987b\u662f\u82f1\u6587\u6216\u82f1\u6587+\u6570\u7ec4\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|------project1\n|------project2\n|------project3\n|-----\u2014project4\n|-----\u2014more...\n")),(0,l.kt)("p",null,"ROOT\u76ee\u5f55\u4ee3\u8868\u7684\u662f\u6839\u76ee\u5f55\uff0c\u6700\u7ec8\u8bbf\u95ee\u6587\u6863\u7684\u5730\u5740\u662f\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u800c\u5f00\u53d1\u8005\u81ea\u5efa\u7684\u6587\u4ef6\u5939\u76ee\u5f55\uff0c\u4f8b\u5982project1\u3001project2\u3001project3\u7b49\u7b49\uff0c\u6240\u4ee3\u8868\u7684\u662f\u4e00\u4e2a\u9879\u76ee\u540d\u79f0\uff0c\u6700\u7ec8\u8bbf\u95ee\u7684\u5730\u5740\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u9879\u76eecode"),(0,l.kt)("th",{parentName:"tr",align:null},"\u6587\u6863\u5730\u5740"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ROOT"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6839\u76ee\u5f55\uff0c\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project1"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project1/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project2"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project2/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project3"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project3/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project4"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project4/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"\u4ee5\u6b64\u7c7b\u63a8"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/${code}/doc.html"))))),(0,l.kt)("h2",{id:"232-\u914d\u7f6e\u6587\u6863"},"2.3.2 \u914d\u7f6e\u6587\u6863"),(0,l.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ecb\u7ecd\u79cd\uff0c\u6211\u4eec\u77e5\u9053\u4e86\u5982\u4f55\u589e\u52a0\u591a\u4e2a\u6587\u6863\uff0c\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728data\u76ee\u5f55\u5efa\u6587\u4ef6\u5939\u5373\u53ef\uff0c\u90a3\u4e48\u5efa\u7acb\u597d\u4e86\u6587\u4ef6\u5939\u540e\uff0c\u5982\u4f55\u914d\u7f6e\u5462\uff1f"),(0,l.kt)("p",null,"\u8fd9\u91cc\u9700\u8981\u6d89\u53ca\u5230Knife4jAggregation\u63d0\u4f9b\u652f\u6301\u76844\u79cd\u6a21\u5f0f\u4e86\uff1aDisk\u3001Cloud\u3001Eureka\u3001Nacos"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\u53ea\u652f\u6301\u4e00\u79cd\u6a21\u5f0f")),(0,l.kt)("p",null,"\u62ffROOT\u6839\u76ee\u5f55\u6765\u505a\u793a\u4f8b\u8bf4\u660e\uff0c\u5f00\u53d1\u8005\u5982\u4f55\u914d\u7f6e\u3002"),(0,l.kt)("h3",{id:"2321-disk\u6a21\u5f0f"},"2.3.2.1 Disk\u6a21\u5f0f"),(0,l.kt)("p",null,"Disk\u6a21\u5f0f\u5728Knife4jAggregationDesktop\u4e2d\u662f\u6700\u7b80\u5355\u7684\uff0c\u5982\u679c\u5f00\u53d1\u8005\u62e5\u6709OpenAPI\u6587\u6863\u7684\u9759\u6001",(0,l.kt)("inlineCode",{parentName:"p"},"JSON"),"\u6587\u4ef6\u6216\u8005",(0,l.kt)("inlineCode",{parentName:"p"},"yml"),"\u6587\u4ef6\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u76f4\u63a5\u653e\u5728\u5efa\u597d\u7684\u6587\u4ef6\u5939\u4e2d\uff0c\u4e0d\u7528\u4efb\u4f55\u914d\u7f6e\uff0c\u5373\u53ef\u6e32\u67d3\u3002"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------userOpenApi.json\n|--------orderOpenApi.json\n|--------goodsOpenApi.yml\n\n")),(0,l.kt)("p",null,"\u5728ROOT\u76ee\u5f55\u4e0b\uff0c\u6211\u4eec\u653e\u7f6e\u4e86\u4e09\u4e2aOpenAPI\u6587\u6863\u7684\u9759\u6001\u6587\u4ef6\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"userOpenAPI"),"\u4ee5\u53ca",(0,l.kt)("inlineCode",{parentName:"p"},"orderOpenApi"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"goodsOpenApi.yml"),",\u6b64\u65f6\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u5f00\u53d1\u8005\u5c31\u80fd\u5728\u6587\u6863\u754c\u9762\u4e2d\u770b\u5230\u4f1a\u5b58\u5728\u4e09\u4e2a\u5206\u7ec4\u4e0b\u7684OpenAPI\u6587\u6863\u4e86\u3002"),(0,l.kt)("p",null,"\u90a3\u4e48\u968f\u4e4b\u95ee\u9898\u4e5f\u6765\u4e86\uff0c\u5728\u6587\u6863\u4e2d\uff0c\u4e0b\u62c9\u6846\u7684\u9009\u9879\u540d\u79f0\u662f\u4ee5\u6587\u4ef6\u7684\u540d\u79f0\u6765\u547d\u540d\u663e\u793a\u7684\uff0c\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u663e\u793a\u5e94\u8be5\u600e\u4e48\u529e\uff1f\uff0c\u6b64\u65f6\u5c31\u9700\u8981\u7ee7\u7eed\u5728ROOT\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8fdb\u884c\u91cd\u547d\u540d\u914d\u7f6e"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-disk",target:null,rel:null},"disk\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.disk.routes[0].name=\u7528\u6237\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[0].location=userOpenApi.json\n\nknife4j.disk.routes[1].name=\u8ba2\u5355\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[1].location=orderOpenApi.json\n\nknife4j.disk.routes[2].name=\u5546\u54c1\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[2].location=goodsOpenApi.yml\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2321-cloud\u6a21\u5f0f"},"2.3.2.1 Cloud\u6a21\u5f0f"),(0,l.kt)("p",null,"Cloud\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eCloud\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------cloud.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-cloud",target:null,rel:null},"Cloud\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.cloud.routes[0].name=\u7528\u6237\nknife4j.cloud.routes[0].uri=192.168.0.152:8999\nknife4j.cloud.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eCloud\u6a21\u5f0f\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2322-eureka\u6a21\u5f0f"},"2.3.2.2 Eureka\u6a21\u5f0f"),(0,l.kt)("p",null,"Eureka\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eeureka\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------eureka.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-eureka",target:null,rel:null},"Eloud\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.eureka.serviceUrl=http://localhost:10000/eureka/\nknife4j.eureka.routes[0].name=\u7528\u6237\nknife4j.eureka.routes[0].serviceName=userService\nknife4j.eureka.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eEureka\u6a21\u5f0f\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"),(0,l.kt)("h3",{id:"2323-nacos\u6a21\u5f0f"},"2.3.2.3 Nacos\u6a21\u5f0f"),(0,l.kt)("p",null,"Nacos\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6enacos\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------nacos.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"aggregation-introduction",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684",(0,l.kt)("a",{parentName:"p",href:"aggregation-nacos",target:null,rel:null},"Nacos\u6a21\u5f0f"),"\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.nacos.serviceUrl=http://localhost:10000/nacos/\nknife4j.nacos.routes[0].name=\u7528\u6237\nknife4j.nacos.routes[0].serviceName=userService\nknife4j.nacos.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eNacos\u6a21\u5f0f\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d,\u4e5f\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"desktop-test",target:null,rel:null},"\u6d4b\u8bd5\u573a\u666f"),"\u4e2d\u7684\u914d\u7f6e"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0423fdb8.18473aa3.js b/knife4j-doc/gitee/assets/js/0423fdb8.18473aa3.js deleted file mode 100644 index d40fac120..000000000 --- a/knife4j-doc/gitee/assets/js/0423fdb8.18473aa3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6211],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},c=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=s(t),m=o,f=c["".concat(l,".").concat(m)]||c[m]||d[m]||a;return t?r.createElement(f,i(i({ref:n},u),{},{components:t})):r.createElement(f,i({ref:n},u))}));function m(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=c;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>p,metadata:()=>s,toc:()=>d});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],p={},l="3.17 \u81ea\u5b9a\u4e49Host",s={unversionedId:"features/host",id:"features/host",title:"3.17 \u81ea\u5b9a\u4e49Host",description:"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5.",source:"@site/docs/features/host.md",sourceDirName:"features",slug:"/features/host",permalink:"/docs/features/host",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicResponseDescription"},next:{title:"3.18 afterScript",permalink:"/docs/features/afterScript"}},u={},d=[{value:"3.17.1 \u524d\u7f6e\u6761\u4ef6",id:"3171-\u524d\u7f6e\u6761\u4ef6",level:2},{value:"3.17.2 \u914d\u7f6e\u5f62\u5f0f",id:"3172-\u914d\u7f6e\u5f62\u5f0f",level:2},{value:"3.17.3 \u539f\u7406",id:"3173-\u539f\u7406",level:2}],c={toc:d};function m(e){var n=e.components,p=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},c,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"317-\u81ea\u5b9a\u4e49host"},"3.17 \u81ea\u5b9a\u4e49Host"),(0,a.kt)("p",null,"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5."),(0,a.kt)("h2",{id:"3171-\u524d\u7f6e\u6761\u4ef6"},"3.17.1 \u524d\u7f6e\u6761\u4ef6"),(0,a.kt)("p",null,"\u8981\u5728Knife4j\u4f7f\u7528\u6b64\u5c5e\u6027,\u670d\u52a1\u7aef\u5fc5\u987b\u5f00\u542f\u8de8\u57df\u914d\u7f6e\uff0c\u5982\u679c\u4f60\u7684\u5de5\u7a0b\u662fSpring Boot,\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Bean\npublic CorsFilter corsFilter(){\n //\u9488\u5bf9CorsFilter\u8be6\u7ec6\u7684\u7528\u6cd5\uff0c\u4e0d\u540c\u7684Spring Boot\u53ef\u80fd\u914d\u7f6e\u4e0d\u592a\u4e00\u6837\uff0c\u5efa\u8bae\u5f00\u53d1\u8005\u8ddf\u8e2a\u6e90\u7801\u67e5\u770b\u5177\u4f53\u7684\u4f7f\u7528\u65b9\u5f0f\n // \u6b64\u5904\u4ee3\u7801\u4ec5\u7ed9\u51fa\u793a\u4f8b\u53c2\u8003\n UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();\n CorsConfiguration corsConfiguration=new CorsConfiguration();\n corsConfiguration.setAllowCredentials(true);\n corsConfiguration.addAllowedOrigin("*");\n corsConfiguration.addAllowedHeader("*");\n corsConfiguration.addAllowedMethod("*");\n corsConfiguration.setMaxAge(10000L);\n source.registerCorsConfiguration("/**",corsConfiguration);\n CorsFilter corsFilter=new CorsFilter(source);\n return corsFilter;\n}\n')),(0,a.kt)("p",null,"\u4ee5\u4e0a\u4ee3\u7801\u5728Knife4j\u4e2d\u5df2\u7ecf\u5185\u7f6e,\u5982\u679c\u5f00\u53d1\u8005\u5acc\u5f03\u6bcf\u4e2a\u9879\u76ee\u90fd\u9700\u8981\u914d\u7f6e\u5f88\u9ebb\u70e6,\u53ef\u4ee5\u901a\u8fc7\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7\u914d\u7f6e\u8fdb\u884c\u5f00\u542f\u4f7f\u7528,\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("p",null," \u5f53\u7136\uff0c\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u5728\u540e\u7aef\u63a7\u5236\u6587\u6863\u8bed\u8a00\u5448\u73b0\u65b9\u5f0f(\u81ea",(0,a.kt)("strong",{parentName:"p"},"2.0.6\u7248\u672c"),"\u5f00\u59cb)"),(0,a.kt)("p",null," yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},'knife4j:\n enable: true\n setting:\n # \u662f\u5426\u542f\u7528Host\n enable-host: false\n # \u542f\u7528Host\u540e\u5730\u5740\uff0c\u4f8b\u5982\uff1ahttp://192.168.0.111:8080\n enable-host-text: ""\n')),(0,a.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,a.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,a.kt)("p",null,"\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u540e,\u8fd8\u9700\u8981\u5728\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7\u8c03\u7528Knife4j\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u4e00\u4e2aOpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u7ed3\u6784"),(0,a.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,a.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,a.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,a.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,a.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,a.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-setting"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("img",{src:t(65253).Z,width:"963",height:"193"}))),(0,a.kt)("p",null,"\u4e00\u822cSpring Boot\u7684\u5355\u4f53\u67b6\u6784\u53ef\u4ee5\u4f7f\u7528\u6b64\u65b9\u5f0f\u8fdb\u884c\u5f00\u542fCors\u7684\u8de8\u57df\u914d\u7f6e,\u4f46\u662f\u5982\u679c\u4f60\u7684\u670d\u52a1\u662f\u8d70\u7f51\u5173\u7684\u5f62\u5f0f,\u90a3\u4e48\u5fc5\u987b\u5728\u7f51\u5173\u5c42\u8fdb\u884c\u5f00\u542f\uff0c\u7f51\u5173\u5c42\u7684\u5f62\u5f0f\u4f1a\u6709\u6240\u4e0d\u540c"),(0,a.kt)("p",null,"\u4ee5",(0,a.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u4e3a\u4f8b,\u8be5\u7f51\u5173\u5e95\u5c42\u662f\u57fa\u4e8eNetty,\u5e76\u975e\u662fServlet\u67b6\u6784,\u6240\u4ee5\u9700\u8981\u4f7f\u7528\u7f51\u5173\u81ea\u5e26\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"WebFilter"),"\u8fdb\u884c\u5f00\u542f\uff0c\u5426\u5219\u5728\u524d\u7aef\u5230\u8bf7\u6c42\u670d\u52a1\u65f6,\u6570\u636e\u53ef\u4ee5\u6d41\u5165,\u4f46\u662f\u5728\u7f51\u5173\u5c42\u65f6\u4f1a\u65e0\u6cd5\u54cd\u5e94\u6570\u636e,\u51fa\u73b0",(0,a.kt)("inlineCode",{parentName:"p"},"Access-Control-Allow-Origin"),"\u7b49\u9519\u8bef"),(0,a.kt)("h2",{id:"3172-\u914d\u7f6e\u5f62\u5f0f"},"3.17.2 \u914d\u7f6e\u5f62\u5f0f"),(0,a.kt)("p",null,"Host\u7684\u914d\u7f6e\u53ef\u4ee5\u6709\u591a\u79cd\u5f62\u5f0f\uff0c\u4e3e\u4f8b\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001ip+port\u7684\u5f62\u5f0f\uff0c\u4f8b\u5982",(0,a.kt)("inlineCode",{parentName:"p"},"192.169.0.111:8080")),(0,a.kt)("p",null,"2\u3001HTTP/HTTPS+ip+port\u7684\u5f62\u5f0f\uff0c\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://192.168.0.111:8080"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"https://192.168.0.111:8080")),(0,a.kt)("p",null,"3\u3001\u57df\u540d\u7684\u65b9\u5f0f\uff0c\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j.xiaominfo.com")),(0,a.kt)("p",null,"4\u3001HTTP/HTTPS+\u57df\u540d,\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://knife4j.xiaominfo.com"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"https://knife4j.xiaominfo.com")),(0,a.kt)("p",null,"5\u3001\u9664\u4e86\u914d\u7f6e\u57df\u540d\u6216\u8005ip\u5730\u5740\u5916,\u5728Host\u540e\u8fd8\u53ef\u4ee5\u8ddf\u968f",(0,a.kt)("inlineCode",{parentName:"p"},"basePath"),",\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://192.168.0.111:8080/v1"),"\u7b49"),(0,a.kt)("p",null,"\u5982\u679c\u5f53\u524d\u914d\u7f6e\u7684Host\u4e0d\u5305\u542b",(0,a.kt)("inlineCode",{parentName:"p"},"Protocol"),",\u9ed8\u8ba4\u4e3a",(0,a.kt)("inlineCode",{parentName:"p"},"HTTP")),(0,a.kt)("h2",{id:"3173-\u539f\u7406"},"3.17.3 \u539f\u7406"),(0,a.kt)("p",null,"\u4f7f\u7528\u8be5",(0,a.kt)("inlineCode",{parentName:"p"},"Host"),"\u540e,Knife4j\u4f1a\u5728\u53d1\u9001\u63a5\u53e3\u8c03\u8bd5\u65f6\u6821\u9a8c\u662f\u5426\u542f\u7528,\u5176\u539f\u7406\u662f\u5728\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"axios"),"\u7ec4\u4ef6\u65f6,\u914d\u7f6e\u5176",(0,a.kt)("inlineCode",{parentName:"p"},"baseURL"),"\u5c5e\u6027"),(0,a.kt)("p",null,"\u4f2a\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"var baseUrl='';//\u9ed8\u8ba4\u662f\u7a7a\n//\u662f\u5426\u542f\u7528Host\nif(this.enableHost){\n baseUrl=this.enableHostText;\n}\nvar requestConfig={\n baseURL:baseUrl,//\u8c03\u7528\u76ee\u6807Host\u670d\u52a1\u7684\u63a5\u53e3\n url: url,\n method: methodType,\n headers: headers,\n params: formParams,\n data: data,\n //Cookie\u6807\u5fd7\n withCredentials:this.debugSendHasCookie(headers),\n timeout: 0\n}\n")))}m.isMDXComponent=!0},65253:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/setting-a6923b1d41d592ba62880f74928fe84d.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0423fdb8.23159317.js b/knife4j-doc/gitee/assets/js/0423fdb8.23159317.js new file mode 100644 index 000000000..fbfbe7a78 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0423fdb8.23159317.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6211],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>f});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(t),m=o,f=d["".concat(l,".").concat(m)]||d[m]||c[m]||a;return t?r.createElement(f,i(i({ref:n},u),{},{components:t})):r.createElement(f,i({ref:n},u))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=m;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[d]="string"==typeof e?e:o,i[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>s,toc:()=>d});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],p={},l="3.17 \u81ea\u5b9a\u4e49Host",s={unversionedId:"features/host",id:"features/host",title:"3.17 \u81ea\u5b9a\u4e49Host",description:"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5.",source:"@site/docs/features/host.md",sourceDirName:"features",slug:"/features/host",permalink:"/docs/features/host",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicResponseDescription"},next:{title:"3.18 afterScript",permalink:"/docs/features/afterScript"}},u={},d=[{value:"3.17.1 \u524d\u7f6e\u6761\u4ef6",id:"3171-\u524d\u7f6e\u6761\u4ef6",level:2},{value:"3.17.2 \u914d\u7f6e\u5f62\u5f0f",id:"3172-\u914d\u7f6e\u5f62\u5f0f",level:2},{value:"3.17.3 \u539f\u7406",id:"3173-\u539f\u7406",level:2}],c={toc:d},m="wrapper";function f(e){var n=e.components,p=(0,o.Z)(e,i);return(0,a.kt)(m,(0,r.Z)({},c,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"317-\u81ea\u5b9a\u4e49host"},"3.17 \u81ea\u5b9a\u4e49Host"),(0,a.kt)("p",null,"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5."),(0,a.kt)("h2",{id:"3171-\u524d\u7f6e\u6761\u4ef6"},"3.17.1 \u524d\u7f6e\u6761\u4ef6"),(0,a.kt)("p",null,"\u8981\u5728Knife4j\u4f7f\u7528\u6b64\u5c5e\u6027,\u670d\u52a1\u7aef\u5fc5\u987b\u5f00\u542f\u8de8\u57df\u914d\u7f6e\uff0c\u5982\u679c\u4f60\u7684\u5de5\u7a0b\u662fSpring Boot,\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Bean\npublic CorsFilter corsFilter(){\n //\u9488\u5bf9CorsFilter\u8be6\u7ec6\u7684\u7528\u6cd5\uff0c\u4e0d\u540c\u7684Spring Boot\u53ef\u80fd\u914d\u7f6e\u4e0d\u592a\u4e00\u6837\uff0c\u5efa\u8bae\u5f00\u53d1\u8005\u8ddf\u8e2a\u6e90\u7801\u67e5\u770b\u5177\u4f53\u7684\u4f7f\u7528\u65b9\u5f0f\n // \u6b64\u5904\u4ee3\u7801\u4ec5\u7ed9\u51fa\u793a\u4f8b\u53c2\u8003\n UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();\n CorsConfiguration corsConfiguration=new CorsConfiguration();\n corsConfiguration.setAllowCredentials(true);\n corsConfiguration.addAllowedOrigin("*");\n corsConfiguration.addAllowedHeader("*");\n corsConfiguration.addAllowedMethod("*");\n corsConfiguration.setMaxAge(10000L);\n source.registerCorsConfiguration("/**",corsConfiguration);\n CorsFilter corsFilter=new CorsFilter(source);\n return corsFilter;\n}\n')),(0,a.kt)("p",null,"\u4ee5\u4e0a\u4ee3\u7801\u5728Knife4j\u4e2d\u5df2\u7ecf\u5185\u7f6e,\u5982\u679c\u5f00\u53d1\u8005\u5acc\u5f03\u6bcf\u4e2a\u9879\u76ee\u90fd\u9700\u8981\u914d\u7f6e\u5f88\u9ebb\u70e6,\u53ef\u4ee5\u901a\u8fc7\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7\u914d\u7f6e\u8fdb\u884c\u5f00\u542f\u4f7f\u7528,\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("p",null," \u5f53\u7136\uff0c\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u5728\u540e\u7aef\u63a7\u5236\u6587\u6863\u8bed\u8a00\u5448\u73b0\u65b9\u5f0f(\u81ea",(0,a.kt)("strong",{parentName:"p"},"2.0.6\u7248\u672c"),"\u5f00\u59cb)"),(0,a.kt)("p",null," yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},'knife4j:\n enable: true\n setting:\n # \u662f\u5426\u542f\u7528Host\n enable-host: false\n # \u542f\u7528Host\u540e\u5730\u5740\uff0c\u4f8b\u5982\uff1ahttp://192.168.0.111:8080\n enable-host-text: ""\n')),(0,a.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,a.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,a.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,a.kt)("p",null,"\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u540e,\u8fd8\u9700\u8981\u5728\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7\u8c03\u7528Knife4j\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u4e00\u4e2aOpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u7ed3\u6784"),(0,a.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,a.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,a.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,a.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,a.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,a.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,a.kt)("inlineCode",{parentName:"p"},"x-setting"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("img",{src:t(65253).Z,width:"963",height:"193"}))),(0,a.kt)("p",null,"\u4e00\u822cSpring Boot\u7684\u5355\u4f53\u67b6\u6784\u53ef\u4ee5\u4f7f\u7528\u6b64\u65b9\u5f0f\u8fdb\u884c\u5f00\u542fCors\u7684\u8de8\u57df\u914d\u7f6e,\u4f46\u662f\u5982\u679c\u4f60\u7684\u670d\u52a1\u662f\u8d70\u7f51\u5173\u7684\u5f62\u5f0f,\u90a3\u4e48\u5fc5\u987b\u5728\u7f51\u5173\u5c42\u8fdb\u884c\u5f00\u542f\uff0c\u7f51\u5173\u5c42\u7684\u5f62\u5f0f\u4f1a\u6709\u6240\u4e0d\u540c"),(0,a.kt)("p",null,"\u4ee5",(0,a.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u4e3a\u4f8b,\u8be5\u7f51\u5173\u5e95\u5c42\u662f\u57fa\u4e8eNetty,\u5e76\u975e\u662fServlet\u67b6\u6784,\u6240\u4ee5\u9700\u8981\u4f7f\u7528\u7f51\u5173\u81ea\u5e26\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"WebFilter"),"\u8fdb\u884c\u5f00\u542f\uff0c\u5426\u5219\u5728\u524d\u7aef\u5230\u8bf7\u6c42\u670d\u52a1\u65f6,\u6570\u636e\u53ef\u4ee5\u6d41\u5165,\u4f46\u662f\u5728\u7f51\u5173\u5c42\u65f6\u4f1a\u65e0\u6cd5\u54cd\u5e94\u6570\u636e,\u51fa\u73b0",(0,a.kt)("inlineCode",{parentName:"p"},"Access-Control-Allow-Origin"),"\u7b49\u9519\u8bef"),(0,a.kt)("h2",{id:"3172-\u914d\u7f6e\u5f62\u5f0f"},"3.17.2 \u914d\u7f6e\u5f62\u5f0f"),(0,a.kt)("p",null,"Host\u7684\u914d\u7f6e\u53ef\u4ee5\u6709\u591a\u79cd\u5f62\u5f0f\uff0c\u4e3e\u4f8b\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001ip+port\u7684\u5f62\u5f0f\uff0c\u4f8b\u5982",(0,a.kt)("inlineCode",{parentName:"p"},"192.169.0.111:8080")),(0,a.kt)("p",null,"2\u3001HTTP/HTTPS+ip+port\u7684\u5f62\u5f0f\uff0c\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://192.168.0.111:8080"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"https://192.168.0.111:8080")),(0,a.kt)("p",null,"3\u3001\u57df\u540d\u7684\u65b9\u5f0f\uff0c\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j.xiaominfo.com")),(0,a.kt)("p",null,"4\u3001HTTP/HTTPS+\u57df\u540d,\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://knife4j.xiaominfo.com"),"\u6216\u8005",(0,a.kt)("inlineCode",{parentName:"p"},"https://knife4j.xiaominfo.com")),(0,a.kt)("p",null,"5\u3001\u9664\u4e86\u914d\u7f6e\u57df\u540d\u6216\u8005ip\u5730\u5740\u5916,\u5728Host\u540e\u8fd8\u53ef\u4ee5\u8ddf\u968f",(0,a.kt)("inlineCode",{parentName:"p"},"basePath"),",\u4f8b\u5982\uff1a",(0,a.kt)("inlineCode",{parentName:"p"},"http://192.168.0.111:8080/v1"),"\u7b49"),(0,a.kt)("p",null,"\u5982\u679c\u5f53\u524d\u914d\u7f6e\u7684Host\u4e0d\u5305\u542b",(0,a.kt)("inlineCode",{parentName:"p"},"Protocol"),",\u9ed8\u8ba4\u4e3a",(0,a.kt)("inlineCode",{parentName:"p"},"HTTP")),(0,a.kt)("h2",{id:"3173-\u539f\u7406"},"3.17.3 \u539f\u7406"),(0,a.kt)("p",null,"\u4f7f\u7528\u8be5",(0,a.kt)("inlineCode",{parentName:"p"},"Host"),"\u540e,Knife4j\u4f1a\u5728\u53d1\u9001\u63a5\u53e3\u8c03\u8bd5\u65f6\u6821\u9a8c\u662f\u5426\u542f\u7528,\u5176\u539f\u7406\u662f\u5728\u901a\u8fc7\u8c03\u7528",(0,a.kt)("inlineCode",{parentName:"p"},"axios"),"\u7ec4\u4ef6\u65f6,\u914d\u7f6e\u5176",(0,a.kt)("inlineCode",{parentName:"p"},"baseURL"),"\u5c5e\u6027"),(0,a.kt)("p",null,"\u4f2a\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"var baseUrl='';//\u9ed8\u8ba4\u662f\u7a7a\n//\u662f\u5426\u542f\u7528Host\nif(this.enableHost){\n baseUrl=this.enableHostText;\n}\nvar requestConfig={\n baseURL:baseUrl,//\u8c03\u7528\u76ee\u6807Host\u670d\u52a1\u7684\u63a5\u53e3\n url: url,\n method: methodType,\n headers: headers,\n params: formParams,\n data: data,\n //Cookie\u6807\u5fd7\n withCredentials:this.debugSendHasCookie(headers),\n timeout: 0\n}\n")))}f.isMDXComponent=!0},65253:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/setting-a6923b1d41d592ba62880f74928fe84d.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0464f4a7.7c1edfc9.js b/knife4j-doc/gitee/assets/js/0464f4a7.7c1edfc9.js deleted file mode 100644 index d9ac985d7..000000000 --- a/knife4j-doc/gitee/assets/js/0464f4a7.7c1edfc9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6632],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=l(r),b=a,f=c["".concat(i,".").concat(b)]||c[b]||g[b]||o;return r?n.createElement(f,p(p({ref:t},u),{},{components:r})):n.createElement(f,p({ref:t},u))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=c;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,p[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>b,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],s={},i="[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",l={unversionedId:"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",id:"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",description:"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-07-05-swagger-bootstrap-ui-1.3-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",permalink:"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},next:{title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"}},u={},g=[],c={toc:g};function b(e){var t=e.components,r=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v13-20170705-\u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug"},"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u4fee\u590dapplication/json\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug\uff0c\u6587\u672c\u6846\u66ff\u6362\u4e3atextarea\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d")),(0,o.kt)("icp",null),"comment/>")))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0464f4a7.905b0f4d.js b/knife4j-doc/gitee/assets/js/0464f4a7.905b0f4d.js new file mode 100644 index 000000000..c1c262ee5 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0464f4a7.905b0f4d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6632],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},g="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),g=l(r),b=a,f=g["".concat(i,".").concat(b)]||g[b]||c[b]||o;return r?n.createElement(f,p(p({ref:t},u),{},{components:r})):n.createElement(f,p({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=b;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[g]="string"==typeof e?e:a,p[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],s={},i="[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",l={unversionedId:"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",id:"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",description:"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-07-05-swagger-bootstrap-ui-1.3-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",permalink:"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},next:{title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"}},u={},g=[],c={toc:g},b="wrapper";function f(e){var t=e.components,r=(0,a.Z)(e,p);return(0,o.kt)(b,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v13-20170705-\u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug"},"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u4fee\u590dapplication/json\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug\uff0c\u6587\u672c\u6846\u66ff\u6362\u4e3atextarea\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d")),(0,o.kt)("icp",null),"comment/>")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/048812b3.21d33c74.js b/knife4j-doc/gitee/assets/js/048812b3.21d33c74.js deleted file mode 100644 index 860258526..000000000 --- a/knife4j-doc/gitee/assets/js/048812b3.21d33c74.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6454],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},i=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},s=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,A=e.originalType,c=e.parentName,i=o(e,["components","mdxType","originalType","parentName"]),s=l(n),m=r,d=s["".concat(c,".").concat(m)]||s[m]||u[m]||A;return n?a.createElement(d,p(p({ref:t},i),{},{components:n})):a.createElement(d,p({ref:t},i))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var A=n.length,p=new Array(A);p[0]=s;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:r,p[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var a=n(87462),r=n(63366),A=(n(67294),n(3905)),p=["components"],o={},c="springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",l={unversionedId:"action/springfox/springfox2",id:"action/springfox/springfox2",title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",description:"\u65f6\u95f4\uff1a2019-5-22 1221",source:"@site/docs/action/springfox/springfox2.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox2",permalink:"/docs/action/springfox/springfox2",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3",permalink:"/docs/action/springfox/springfox1"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",permalink:"/docs/action/springfox/springfox3"}},i={},u=[{value:"\u524d\u8a00",id:"\u524d\u8a00",level:2},{value:"mapstruct",id:"mapstruct",level:2},{value:"\u7b80\u4ecb",id:"\u7b80\u4ecb",level:3},{value:"\u4f5c\u7528",id:"\u4f5c\u7528",level:3},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:3},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}],s={toc:u};function m(e){var t=e.components,o=(0,r.Z)(e,p);return(0,A.kt)("wrapper",(0,a.Z)({},s,o,{components:t,mdxType:"MDXLayout"}),(0,A.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e8c-\u521d\u63a2mapstruct"},"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct"),(0,A.kt)("p",null,"\u65f6\u95f4\uff1a2019-5-22 12:40:21"),(0,A.kt)("p",null,"\u5730\u70b9\uff1a\u5355\u4f4d"),(0,A.kt)("h2",{id:"\u524d\u8a00"},"\u524d\u8a00"),(0,A.kt)("p",null,"\u5728\u7ee7\u7eed\u9605\u8bfb\u5b66\u4e60springfox\u6e90\u7801\u4e4b\u524d,\u6211\u4eec\u9700\u8981\u5148\u6765\u5b66\u4e60\u4e00\u4e0bmapstruct\u8fd9\u4e2a\u7ec4\u4ef6,\u53ea\u6709\u5728\u7406\u89e3\u4e86mapstruct\u7ec4\u4ef6\u540e,\u540e\u9762\u518d\u770bspringfox\u7684\u6e90\u7801\u624d\u4e0d\u4f1a\u6709\u7591\u60d1"),(0,A.kt)("p",null,"\u56e0\u4e3a\u4e4b\u524d\u5e76\u6ca1\u6709\u63a5\u89e6\u8fc7mapstruct\u8fd9\u4e2a\u7ec4\u4ef6,\u6240\u4ee5\u8bb0\u5f55\u4e00\u4e0b\u5b66\u4e60\u7684\u8fc7\u7a0b."),(0,A.kt)("h2",{id:"mapstruct"},"mapstruct"),(0,A.kt)("p",null,"\u5b98\u7f51\u5730\u5740\uff1a",(0,A.kt)("a",{parentName:"p",href:"http://mapstruct.org/",target:"_blank",rel:"noopener"},"http://mapstruct.org/")),(0,A.kt)("p",null,"GitHub:",(0,A.kt)("a",{parentName:"p",href:"https://github.com/mapstruct/mapstruct",target:"_blank",rel:"noopener"},"https://github.com/mapstruct/mapstruct")),(0,A.kt)("p",null,"\u6587\u6863\uff1a",(0,A.kt)("a",{parentName:"p",href:"http://mapstruct.org/documentation/stable/reference/html/",target:"_blank",rel:"noopener"},"http://mapstruct.org/documentation/stable/reference/html/")),(0,A.kt)("p",null,"\u4e00\u8a00\u4e00\u6982\u4e4b:",(0,A.kt)("strong",{parentName:"p"},"Java bean mappings, the easy way!")),(0,A.kt)("h3",{id:"\u7b80\u4ecb"},"\u7b80\u4ecb"),(0,A.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u7684\u6700\u7b80\u5355\u7684\u4e00\u53e5\u8bdd,\u5f88\u6e05\u6670\u7684\u63cf\u8ff0\u4e86mapstruct\u7684\u4f5c\u7528,\u4e3b\u8981\u7528\u4e8eJava Bean\u7684\u6620\u5c04,\u8fd9\u6709\u70b9\u7c7b\u4f3cmybatis\u4e2d\u7684\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04,\u4f46\u6b64\u5904\u7684mappings\u5e76\u975emybatis\u90a3\u6837"),(0,A.kt)("p",null,"MapStruct\u540c\u65f6\u4e5f\u662f\u4e00\u4e2a\u4ee3\u7801\u751f\u6210\u5668\uff0c\u5b83\u57fa\u4e8e\u7ea6\u5b9a\u4f18\u4e8e\u914d\u7f6e\u65b9\u6cd5\u6781\u5927\u5730\u7b80\u5316\u4e86Java bean\u7c7b\u578b\u4e4b\u95f4\u6620\u5c04\u7684\u5b9e\u73b0\u3002"),(0,A.kt)("p",null,"\u901a\u8fc7MapStruct\u751f\u6210\u7684\u6620\u5c04\u4ee3\u7801\u4f7f\u7528\u666e\u901a\u65b9\u6cd5\u8c03\u7528\uff0c\u56e0\u6b64\u5feb\u901f\uff0c\u7c7b\u578b\u5b89\u5168\u4e14\u6613\u4e8e\u7406\u89e3\u3002"),(0,A.kt)("h3",{id:"\u4f5c\u7528"},"\u4f5c\u7528"),(0,A.kt)("p",null,"\u6211\u4eec\u4e3a\u4ec0\u4e48\u9700\u8981",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7ec4\u4ef6\uff1f"),(0,A.kt)("p",null,"\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u4f1a\u4f7f\u7528\u5206\u5c42\u7ed3\u6784,\u5206\u5c42\u65f6\u6bcf\u5c42\u7684\u5bf9\u8c61\u4f1a\u6709\u4e0d\u540c\u7684POJO\u5bf9\u8c61(\u4f8b\u5982\u5b9e\u4f53DO\u548c\u4e1a\u52a1DTO),\u5b9e\u4f53DO\u5b9a\u4e49\u4e86\u7a0b\u5e8f\u5185\u90e8\u7684\u903b\u8f91\u5c5e\u6027,\u800cDTO\u5b9a\u4e49\u4e86\u5916\u90e8\u4e1a\u52a1\u903b\u8f91\u5173\u7cfb"),(0,A.kt)("p",null,"\u901a\u5e38\u6211\u4eec\u5728\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7DTO\u63a5\u53d7\u8fdb\u6765\u5916\u90e8\u53c2\u6570\u65f6,\u9700\u8981\u5c06\u4e4b\u8f6c\u5316\u4e3a\u5185\u90e8DO\u5bf9\u8c61,\u4f9b\u5185\u90e8\u8c03\u7528,\u6b64\u65f6",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7ec4\u4ef6\u6b63\u4e3a\u6b64\u800c\u751f."),(0,A.kt)("p",null,"\u4e0e\u5176\u4ed6\u6620\u5c04\u6846\u67b6\u76f8\u6bd4\uff0cMapStruct\u5728\u7f16\u8bd1\u65f6\u751f\u6210bean\u6620\u5c04\uff0c\u53ef\u786e\u4fdd\u9ad8\u6027\u80fd\uff0c\u5141\u8bb8\u5feb\u901f\u7684\u5f00\u53d1\u4eba\u5458\u53cd\u9988\u548c\u5f7b\u5e95\u7684\u9519\u8bef\u68c0\u67e5\u3002"),(0,A.kt)("h3",{id:"\u793a\u4f8b"},"\u793a\u4f8b"),(0,A.kt)("p",null,"\u5148\u6765\u770b\u4e00\u7ec4\u5173\u4e8e",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7684\u793a\u4f8b"),(0,A.kt)("p",null,"\u5728",(0,A.kt)("inlineCode",{parentName:"p"},"maven"),"\u4e2d\u5f15\u5165",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u7684jar\u5305"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-xml"},"\n 1.2.0.Final\n\n\n \x3c!-- https://mvnrepository.com/artifact/junit/junit --\x3e\n \n junit\n junit\n 4.8.2\n test\n \n\n \n org.mapstruct\n mapstruct-jdk8\n ${mapstruct.version}\n \n \n org.mapstruct\n mapstruct-processor\n ${mapstruct.version}\n \n\n\n \n \n org.apache.maven.plugins\n maven-compiler-plugin\n 3.5.1 \x3c!-- or newer version --\x3e\n \n 1.8 \x3c!-- depending on your project --\x3e\n 1.8 \x3c!-- depending on your project --\x3e\n \n \n org.mapstruct\n mapstruct-processor\n ${mapstruct.version}\n \n \x3c!-- other annotation processors --\x3e\n \n \n \n -Amapstruct.suppressGeneratorTimestamp=true\n \n \n -Amapstruct.suppressGeneratorVersionInfoComment=true\n \n \n \n \n \n\n")),(0,A.kt)("p",null,"\u5047\u8bbe\u6211\u4eec\u62e5\u6709DO\u548c\u4e1a\u52a1DTO\u5bf9\u8c61",(0,A.kt)("inlineCode",{parentName:"p"},"Car.java"),"\u3001",(0,A.kt)("inlineCode",{parentName:"p"},"CarDTO.java")),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"Car.java:")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},"public class Car {\n\n private String name;\n private String make;\n private int numberOfSeats;\n //getter and setter ,constructs \n}\n")),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"CarDTO.java")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},"public class CarDTO {\n private int seatCount;\n //getter and setter ,constructs\n}\n")),(0,A.kt)("p",null,"\u6309\u7167\u4f20\u7edf\u7684\u8f6c\u6362\u5173\u7cfb,\u5982\u679c\u6211\u4eec\u4e0d\u4f7f\u7528",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u7684\u8bdd,\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff1a"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'Car car=new Car("c1","m1",12);\nCarDTO cd=new CarDTO();\n//\u8d4b\u503c\ncd.setSeatCount(car.getNumberOfSeats())\uff1b\n')),(0,A.kt)("p",null,"\u6309\u7167\u4ee5\u4e0a\u7684\u65b9\u5f0f\u4f1a\u6709\u4ee5\u4e0b\u5c40\u9650:"),(0,A.kt)("ul",null,(0,A.kt)("li",{parentName:"ul"},"\u5982\u679c\u5c5e\u6027\u5f88\u591a\u7684\u8bdd,\u9700\u8981\u5199\u5927\u91cf\u7684\u8d4b\u503c\u5c5e\u6027\u4ee3\u7801"),(0,A.kt)("li",{parentName:"ul"},"\u4ee3\u7801\u6781\u5176\u7e41\u7410")),(0,A.kt)("p",null,"\u5982\u679c\u4f7f\u7528",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6,\u6211\u4eec\u53ef\u4ee5\u5148\u58f0\u660e\u4e00\u4e2a",(0,A.kt)("inlineCode",{parentName:"p"},"CarMapping"),"\u63a5\u53e3"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/21 21:40\n */\n@Mapper\npublic interface CarMapper {\n\n CarMapper INSTANCE= Mappers.getMapper(CarMapper.class);\n\n @Mapping(source = "numberOfSeats", target = "seatCount")\n CarDTO carToCarDto(Car car);\n\n\n}\n')),(0,A.kt)("p",null,"\u6211\u4eec\u5c06\u6240\u6709DO\u5bf9\u8c61\u53caDTO\u5bf9\u8c61\u7684\u6620\u5c04\u5173\u7cfb\u90fd\u5b9a\u4e49\u5728Mapper\u63a5\u53e3\u4e2d,\u7136\u540e\u901a\u8fc7",(0,A.kt)("inlineCode",{parentName:"p"},"@Mapper"),"\u6ce8\u89e3\u6807\u6ce8"),(0,A.kt)("p",null,"\u800c\u6b64\u65f6\u6211\u4eec\u4f7f\u7528\u7684\u8bdd\u4e5f\u4f1a\u6709\u6240\u53d8\u5316\uff1a"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},' //given\nCar car = new Car( "Morris", "4make", 13 );\n//when\nCarDTO carDto = CarMapper.INSTANCE.carToCarDto( car );\n//then\nSystem.out.println(carDto.getSeatCount());\n')),(0,A.kt)("p",null,"\u6b64\u65f6\uff0c\u6211\u4eec\u7a0b\u5e8f\u5728compile\u7f16\u8bd1\u65f6,",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u4f1a\u4e3a\u6211\u4eec\u81ea\u52a8\u751f\u6210",(0,A.kt)("inlineCode",{parentName:"p"},"CarMapper"),"\u7684\u5b9e\u73b0\u7c7b\uff1a"),(0,A.kt)("p",null,(0,A.kt)("img",{src:n(2374).Z,width:"557",height:"317"})),(0,A.kt)("p",null,"\u6b64\u65f6\u5728",(0,A.kt)("inlineCode",{parentName:"p"},"generated-source"),"\u4e5f\u4f1a\u751f\u6210\u76f8\u5e94\u7684java\u6587\u4ef6"),(0,A.kt)("p",null,(0,A.kt)("img",{src:n(43048).Z,width:"564",height:"226"})),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"CarMapperImpl.java")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'\n@Generated(\n value = "org.mapstruct.ap.MappingProcessor",\n date = "2019-05-21T21:46:10+0800",\n comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_111 (Oracle Corporation)"\n)\npublic class CarMapperImpl implements CarMapper {\n\n @Override\n public CarDTO carToCarDto(Car car) {\n if ( car == null ) {\n return null;\n }\n\n CarDTO carDTO = new CarDTO();\n\n carDTO.setSeatCount( car.getNumberOfSeats() );\n\n return carDTO;\n }\n}\n')),(0,A.kt)("p",null,"\u6620\u5c04\u63a5\u53e3\u81ea\u52a8\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0\u4e86Java\u5b9e\u4f53\u7684\u8f6c\u6362"),(0,A.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,A.kt)("p",null,"\u4e86\u89e3\u4e86mapstruct\u7684\u529f\u80fd,\u6211\u4eec\u5728\u63a5\u4e0b\u6765\u5b66\u4e60springfox\u7684\u6e90\u7801\u65f6\u4f1a\u8f7b\u677e\u5f88\u591a."))}m.isMDXComponent=!0},2374:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/compile-f8e55b8154c83c314dacffed2b5b96aa.png"},43048:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjQAAADiCAYAAABZc10YAAAgAElEQVR4nO3df3DU933n8ddXSY1ix1OMVhJnJ25yCFZSUJvaDshdBbBb6sEiyNgDvZwBMb4A7twkN5aDM1NDr3Mmmallk0mTTh3T+Axl5lJyY1sEIScgfkmyfthJepa80oI0WAGlZrUr0bsBZKXR9/b73ZW0K+3qB1q0+5Wejxkm+/1+vt/P572bP/Ty5/P9Yfyx5z5TmFN+r8CjT36+aErH/vvFVv22veGW1mOad2vdf/2Gcuu/pYPvG9NuBwBgMhmpLgDJZwUUK6hMZjbCDAAAs+GTqS4At4YVVIauXNQnPl+kT+R+Pqbtd6H9vwuFmd/1/SZF1QEAkFwGS04AAMDpWHICAACOR6ABAACO98nFn74z1TUAAADMCDM0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8dLuScE7FvWN29c2kKnG67enoBoAAOAEMw40W7btVGZmZsL2gYEbOnzowIzGWJ45oAWGqTPX7pjyOeZQjkqe2qGspn062jG7LzxM5dgAAMxHMw40dXW1Wru2NHH72ZMzHcK2dMHH9r9EDvQtSso4AADAeWYcaLovdunq1X4tXHjXuLb+/j51d1+c6RDTZg4tV9nuMuUZhrR+r54prtfh107Ln/OQyss9chnhWZPOYy/YMyijMypVUmmZlgQbwseraKQf0+xVS3OfVuT12m29GUbsOCGBpld18FxO3LGt4wEAwK2RlGtoTtUe1+NPPDl+/8maZHQ/bUZGm6oq/THLPqZyVeKRair3hcNI/iZVlG6W23tEHZHzlpQW6Hio/ajVHgkzqt6n/VGhR+q1jw2HGY+CB0PHB0bbywL7xo0twgwAALdUUgJNXzConp5Luueez47su3zpQ/X3B5PRfVIYGX41VPmVveppVRRn2/tM0xdzTFf1EfmGw0dhQXimxiv7XjDr/Pqm81pRrJH2PCNbedv3amVUHwFX7i3/LgAAIFbS7nKqPVGtreW7ZNjLM0M6Vft2srpOCtO1xl5uUvMB7X/JH9nOnlmfgUTLSTkz6hcAAExP0p5DMzg4qHZvq/25/YNWezutuLKVFWxQzbkr9mZOvltZEx3vbVdXlkcPFoY37SWl4mUJ2y3usk1yD5lJLx0AAEzsE0vzPvc3yeqsp+fX+oM/+I86efK4TPPm/rDf/6kbN3XeL298KmbbMK5p4NOFeujhdSpelqELP3tXH9+3UY+uXa0H/2SV7rlxWTcWhWp+5wMF9Gnd+8f36/bL5+QLGJHz/eq48AkVb9qiP/VY59yrntbLumfRdb3/qw91PaN3TPsqZTT+g94JGuPG7vrlRV03uI4GAIBbxVj3yOq0mlKI92C9qZiN27btC4mLe7lrCQCANMOrDxKwlpg820eXkOy7mkqXKdjpJcwAAJBm0m6GJp0MX0jsinrOzKF6f4qrAgAAYxFoAACA47HkBAAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AM0PWE4Q3PMtLKQEASKVPprqAeP7iq+U6+fPjCgZ7Z9xXvHdDtQ1kqvH67TPuGwAApIe0nKG5887f18Ynvqp1jz6m227LTHr/yzMHtOaOa0nvFwAApEZaztAMu+cz92rLtq+p7f1fqaWlIal9L13wsf0vkdl4ezcAAEiOtA40loyMDP3hF+9XfmGRzp7+mbq7L6asFvuN27vLlBf1ssqD58YcM+aFlp3HXtDRjvDn7JJd2lqcHT7O9Ol45RH5MoyE++ONN/xyzETnAAAwH6V9oBl22223ae0jX9F77zXqX3757qyPPxwuFjYf0P6YN27nRB2ToxKPVFO5T71WIMnfpIrSzXJ7j6gj5yGtW9mn6hdfGQ0e1jGhABR3vz2eR8GD+3Q0YIT7fmqHNgT2qSoQvy8AAOYrxwSa3/3u39XcWC+v9/3UFFBYoCXBBh0+dyVheDAy/Gqo8it71dOqiJo9sfkDuiqPHt39tFwHX1FDwJh4f2i8PCNbedv3amXUGAFXruRNcA4AAPNU2gca0zR1/ny76s7WWlupLmdCw8tNsmZxXvJHtsPBxsho09GX2yIzLXv0TFZALXYYib+/3uovUK/Dr522Z3uiWcEpfl8EGwDA/JSWdzkNC/Re0T//+GAozJxUysOMt11dWR49WBjetJaEPCU5sce4spUVbFCNNYsTkpPvVlakyQo3nnzTDiP1rx1QS9ClLFfi/WPHs7jLws+7SXgOAADzVFrO0AwM3NCZUz/T5cu/TnUpI6wZlqqDLpWX71HFeiNyIW6roq+hkfesWop3aOtzJfZm4IJPweHzA2cU8ITPtZgX3tJ3OwwZSrB/zHgW+wLjDCNhXwAAzFfGukdWp/c6zgzFe7DeVHDbNgAAzpHWS04AAABTkZZLTsnETAsAAHMfMzQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQYYeZv0jPb1yh7aE6/DQMAMAfN+ScFx3uXU9tAphqv356CagAAwK2QdoFmy7adyszMTNhuvYn78KEDMxpjeeaAFhimzly7Y0b9pBtzKEclT+1QVtM+HeXt2wCAeSTtAk1dXa3Wri1N3H72ZFLGWbrgY/tfIrwDCgAA50i7QNN9sUtXr/Zr4cK7xrX19/epu/tiCqoKM4eWq2x3mfIMQ6bZq5bmPq3I69Xh106rN8OIabcEml7VoXp/ZL9HwdDxK4vdMW1j+409b3jGpUoqLdOSYIM9lj/nIZWXe+SKHN957AVVeYtG+1i/V88U14ePVVHcvuONa+8L9E74G2SX7NLW4uzwsaZPxyuPyBfnu8e0udaE6s1Wc5ztDuXG/44J6k70W01UGwBg7ku7QGM5VXtcjz/x5Pj9J2tSUE3Y8B9SVe/T/g5jJGxIvVHtodBycJ+OBkbbNwT2hcKGdYRLK7IatP+ln0T+oG+Up+MV1fuLJjlPWlJaEPrjHGq3woAVADxSTWjbDlH5m1RRuln53iOqqvTHLDmZmqjvopjvY3GXPa9Hx+fI0d8gVPe6lX2qfvGV0aAQFWYWNh/Q/uGwZNW1e7Nkh5bJxX7HonH9TfobBx6KWxsAYH5Iy0DTFwyqp+eS7rnnsyP7Ll/6UP39wdQVVVgQnj2wQkaGZGT4Vd90XiuKR9vzjGzlbd+rlVGnBVy5w5/U0tAa+t/QH1m/V11B9xTPk7qqR2carHEbqvzKXvW0KqJmIxLVnLDvMd/H0uE7r0cj32fcbNRBK3wFdFUePbr7ablC2w0BI/a3OXdlNER4z6qleIfchaF+A5P/vNHfMW5/k30fb4LaAADzQloGGkvtiWptLd8lw/6DOqRTtW+nuqRJmYH6keWnWDlJOy88u+ORrNmLl/wjyzfT7jt/wpJCwalNR19ui94zsi88M7JHz2QFwkEnYS8BBacQZqYj0fexgl682gg2ADA/pO1zaAYHB9XubbU/t3/Qam+nlLddXVkePVgY3rT/cBYvS9hucZdtknuyZ7pM9zxXtrKCDaqxZi9CcvLdyrqZvif7PnFY4cmTb4Znp147oJagS1mu0XHWrRqdVVLhaq2QT+dHVowWyRXJZxPWHKdua7bIU5Iz4fdJWBsAYF5I2xkaS1PjOS1efLeamupSXYo9O1F10KXy8j2qWD98UfB5KS9+u8W6WNe6JkRDU+930vMiSzlbnyuxNwMXfAqO9OXX+c6AtkZdFJyob0OhcasL9Gzo2Ir1Gvd94tYaOKOAZ7Qv88Jb+m5HeOamqlIq271DFcXRFwWHZ1Ks82qa3doaWSqKrnlqv7XVV6v9/RJ+nwS1AQDmB2PdI6vn9GNh4z1Ybyqmctu2feFrcW+C5SIAADBb0nbJKd1YSzKe7aNLQfZFs6XLFOz0EmYAAEixOT9Dk0zDF+S64jwDBQAApA6BBgAAOB5LTgAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINJgS66GC257dJY+LxxYBANJPWr+cMh3FezdU20CmGq/fnoJqAACAZc4/KXjLtp3KzMxM2D4wcEOHDx2Ycn+JXnZ54eMFOnPtjmnXN5us91GVPLVDWU37dHSSN1FP51gAAFJtzs/Q1NXVau3a0sTtZ08mZZylCz62/yUylbd3AwCAmzPnA033xS5dvdqvhQvvGtfW39+n7u6LKagqbOzLLjuPvWDPhthv8t7tUbC5TyuL3Xbb8IswJ2qz+7Tby5QX6dM0fTpeeUQdKhrdv36vnimu1+HXTsuf89C4Gqq844899FOpdHu2mkN9+TKMhOOMtiWuMbtkl7YWZ487DwCAmzXnA43lVO1xPf7Ek+P3n6xJQTVh9pKOR6qp3KdeKwTkb1JF6Wa5vVb4sLi0IqtB+1/6SST4bJSn4xWFM0GitnAQWdh8QPuHA47V7+7NUig0VFX6Y5aRTOXGrSHfG+fY0DijtS+fcJwJ69dDWreyT9UvvjIaYggzAIAZmhd3OfUFg+rpuRSz7/KlD9XfH0xRRZKR4VdD1Rlp1dOq+OYePbvePeaIgFoaWsMf/V51BafQVligJcEG1Zy7Mnqo96xagsvkLryZGhKY0jgJavQHdFXL9Ojup7ljCgCQNPNihsZSe6JaW8t3yTAMmeaQTtW+ndJ6hpebZM1yvOSPbGffotECCgZmo4b440QzMtp09OW2yEXHe/RMVij4HHxFDQFmaQAAN29ezNBYBgcH1e4Nzxi0f9Bqb6eUK1tZUbMcOfluZc20T2+7urI8Wrcqd3Rf4WqtkE/n/UmsYbrjRLFCkyfftGeH6l87oJagS1muqQwKAEBi82aGxtLUeE6LF9+tpqa6VJcSXqIp3qGtz5XYm4ELPs10Acya/aiqlMp271BFcfTFuqfta2QM+XW+M6Ctwxf6/uhMqIadcWuwAkfMsT+d+jgamqDGwBkFPHtUsT5y3oW39F1uCwcAzNCcfw5NsiV6Ds1kuG0bAIBbZ94sOQEAgLlrXi05JQMzLQAApB9maAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOPxpOAUi/duqLaBTDVevz0F1QAA4EwEmmnasm2nMjMzE7YPDNzQ4UMHZjTG8swBLTBMnbl2x4z6AQBgviDQTFNdXa3Wri1N3H72ZFLGWbrgY/tfIrxTCgCAUQSaaeq+2KWrV/u1cOFd49r6+/vU3X0xBVWFmUPLVba7THmGYW8Hml7VoXr/uP2m6dPxyiPyZRiRNo+C1T4tKfXIFTqm89gLqtJmPbveHdMPAADpikBzE07VHtfjTzw5fv/JmhRUEzYcWhY2H9D+qPARb7+Zv0kVuzdLoVDTYe9xaUWxT4cr98lfaAWZvaq48Jb2v/QTma41Ki9fLfe5cAACACAdcZfTTegLBtXTcylm3+VLH6q/P5iiikIKC7Qk2KCac1cm3+89q5bgMrkLh3cE1HLstHqtwOJtV6fZq5aG1nCTP6CrWiRXzmx8CQAAbg6B5ibVnqiWaZr2Z9Mc0qnat1Nc0XQFFAykugYAAJKDQHOTBgcH1e4Nz2K0f9Bqb6eUt11dWR49GJl1sZaaPCU5I/vXrcodPbZwtVbIp/NcFgMAmCO4hmYGmhrPafHiu9XUVJfqUmRktKnqoEvl5XtUsd6IXPjbGtrvV1WlVLZ7hyqKoy8KjiwxDaW4cAAAksBY98hqM9VFzGfxHqw3Fdy2DQDAKJacAACA47HklGLMtAAAMHPM0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0GBaTNcabXt2lzyu2XtjxnTGNIdy5Nn+vCq+uUcb8nmrBwDMFzwpeI6J926otoFMNV6/PQXVzL6cVRu1or9K+19vC20ZqS4HADBLCDQptmXbTmVmZiZsHxi4ocOHDsxojOWZA1pgmDpz7Y4Z9WMxAmd06OUzms2wMJ0xF2W5FAz6b3lNAID0QqBJsbq6Wq1dW5q4/ezJpIyzdMHH9r9EeKcUAMDJCDQp1n2xS1ev9mvhwrvGtfX396m7+2IKqpKyS3Zpy8o+Ha88Il+GIXfZ83pUVdrf4FJ5ebaaI/ut61vKyz1yGeHZk85jL+hoR/izObRcZbvLlBdpM03fSH/hNo+C1T4tKQ2fb51bpc16dr3bPj7Q9KoO1fsjY4TH7FBR+LzmPq0sjj3OqrF0aWispTv1zMrwWOHj49cAAJg7PrE073N/k+oi5ruPPupRQeEfjtt//Ngb9pLTdNz/qekdP+yXNz4Vs339179Qf85Grczx6V9uf1Tblnbo8P9q1rU7Pq8vfvEO9bzzgQJmrkr+PBQ0fnRItY11eqcvV6WlX1B/g9UWDhILmw/olR/XqPGdc2rs/4K2bY+0K1f5nvtUlHVJb/z9IZ3sX6z16x/Xg0a9vvs//7feOZ+hL5YWasA6NnrM4fMGoo8r0acvvKdf/apOfdlf1qILB/TDf3530hqCBqEGAOYK7nJKA33BoHp6LsXsu3zpQ/X3B1NUUVjHm1W6unKHKkoXqeXYafWOmdUwMvxqqDojrXravqtoeGbFVligJcEG1Zy7MrrPe1YtwWVyFw7vCIz2621Xp9mrlobWcJM/oKtaJFdOvMoCUcd51ZXoZ5pSDQCAuYBAkyZqT1TLNMO3GZvmkE7Vvp3iiiYXvp36ea3Tm9r/0j69/Hq9Jo9gAQUDs1Bc2tcAAEgmAk2aGBwcVLs3POvQ/kGrvZ1q+RvDyzWHm6UV6x9S9tCY57q4spUVNQOSk+9W1nCbt11dWR6tW5U7enzhaq2QT+dn6yakdKgBADAruCg4jTQ1ntPixXerqaku1aWELwK+q0GH37wiv95US94ObdkY0P6GqIOs5ZviHdr6XIm9GbjgG5mhMTLaVFUple3eoYri6AtyI0tMQ7f+O0xaAwBgzjDWPbKax6nOIfEerDcV3LYNAHAylpwAAIDjseQ0xzDTAgCYj5ihAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegQUqZQ8u14dlNco998WUy+s7fpGe2rxn/Uk0AwJzDk4IxoXjvhmobyFTj9dtTUA0AAPERaOaYLdt2KjMzM2H7wMANHT50YEZjLM8c0ALD1Jlrd8yoHwAAkoVAM8fU1dVq7drSxO1nTyZlnKULPrb/JcI7pQAAs4lAM8d0X+zS1av9WrjwrnFt/f196u6+mIKqwqzrZcp2lynPMOztQNOrOnhu4mNM06fjlUfkyzBkutaovDxbzYm2x5xrnx/onbXvBwBIHQLNHHSq9rgef+LJ8ftP1qSgmrDhsLGw+YD21/ujWnImPMa6sLdi92YpFFo6ptC/qvdpf0c40LjLntej43MdAGAO4i6nOagvGFRPz6WYfZcvfaj+/mCKKgopLNCSYINqzl2Z3jHes2oJLpO7cGr9N3pHd3X4zs+oZACAcxBo5qjaE9UyzfDtyqY5pFO1b6e4opkIKBhIdQ0AgHRGoJmjBgcH1e5ttT+3f9Bqb6eUt11dWR49GJlpsZaIPCU5cY9Ztyp3dF/haq2QT+dHVqkWyRU5LSffrayE/eeopHjZrfkuAIC0wzU0c1hT4zktXny3mprqUl2KjIw2VR10qbx8jyrWG5GLfa3AlRN7TKVUtnuHKoqjLwo+rd4MQ0bgjGqa3dq6fa9WhtoCF3wKRp9bXaBn1+8N9W+d16uW5vNS3qx/VQBAChjrHlnNY1SRULwH600Ft20DAGYTS04AAMDxWHLChJhpAQA4ATM0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0mJOsl19ueHaT3EMze7OH6Vqjbc/uksfFG0IAIJ3xpGDMqnjvhmobyFTj9dtTUA0AYK4g0GBCW7btVGZmZsL2gYEbOnzowIzGWJ45oAWGqTPX7phRP7eC9YbvQy+fsT6luhQAwAQINJhQXV2t1q4tTdx+9mRSxlm64GP7XyK8UwoAMBECDSbUfbFLV6/2a+HCu8a19ff3qbv7Ygqqsq6RyVHJUzuU1VQllZYpzwjPoHQee0FHO2JnU6zrYMrLs9VceUS+DGP89tByle0O92GavWpp7tOKvF4dfu20/DkPjRzboaLQcR4FQ+0ri91234GmV3Wo3j/r3x8AEIuLgjGpU7XH4+8/WTPLlYy3pLRAvsp92v/SPr18zBfa3jytC4GHw4yqw33sr3xTyls2wRkurchqD4/3er20ciMXDANAGiDQYFJ9waB6ei7F7Lt86UP19wdTVNGorurwLIvNe1YtwWVyF06jg8ICLQk2qNEb3jQy/KpvOj/BCQG1NLSGP/q96kr9TwAAEIEGU1R7olqmGZ6JMM0hnap9O8UVAQAwikCDKRkcHFS7Nzwz0f5Bq72dDpa4i0Y+56zaqBVZ5+XzxjtykVw5kePy3coa3u1tV1eWRw9GZnXsa3OKJ1pyAgCkIy4KxpQ1NZ7T4sV3q6mpLtWljOhSgSq++Zj92TR9Oh650FdDo8dYt17XNLu1dfterQxtBy74NLxSZGS0qeqgS+Xle1Sxfvii4PNS3qx/FQDADBjrHlnNFY2YNfEerDcVY2/bHr3Lad+4u5pmyszfpIri8F1OvRk8fwYAnIAlJ8xrVjDybB99RYJ911PpMgU7vYQZAHAQlpwwq9LtAXn2XU3HelW+e49KI8+y4dkyAOA8LDkBAADHY8kJAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4Hk8KhqPFezdU20CmGq/fnoJqAACpQqDBrNqybacyMzMTtg8M3NDhQwdmNMbyzAEtMEyduXbHjPqZTbfqZZu38iWeAJBOCDSYVXV1tVq7tjRx+9mTSRln6YKP7X+JpNs7pQAAM0Ogwazqvtilq1f7tXDhXePa+vv71N19MQVVRd6yvdujYLVPS0o9chmGOo+9oCpt1rPr3fYx0S+tNF1rVF4ePs5iHWvNgIzOiFRJpWXKG9NuyS7Zpa3F2eF+TJ+qX/Qq/7nHwseu36tniut16EcfKP+/7BzpZ0mwQYd+Gvq4PVvNlUfkyzAiNURt299hdMzexlr9W/HDMf0efu00bxEHMCcRaDDrTtUe1+NPPDl+/8maFFQTzaUVxT4drtwnf6EVZPaq4sJb2v/STyLhYbXc546oQ7kq8Ug1oeOscGDmb1JF6Wa5vVZb2JLSAh0PtR8d257zkNat7AuFmFfsEGL7hOSr7I1ZGjKNnPH9hGpIZDjMLGw+oP1Rbwo367pil5wIMwDmKO5ywqzrCwbV03MpZt/lSx+qvz+YooqGBdRyLDKD4W1Xp9mrlobWcJM/oKtaJFcoZxgZfjVUnZFWPa2Kb+4ZmcGJ1lV9ZDSweM+qJbhM7sLhfpbp0d1Py+Oa/EX3Mf1MpLDAnsWpOXdl6l8XAOYQZmiQErUnqrW1fJcMw5BpDulU7dupLmnKhpebZM2GvOQfWfqZCiOjTUdfbossTe3RM1mhEHXwFUVNqgAAbgIzNEiJwcFBtXvDsx/tH7Ta247hylZW1GxITr5bWWMOWeIuGvmcs2qjVmSdl88bDkOefNOe5al/7YBagi5luaYzeHiWaNy43nZ1ZXn0YGF401qC8pTk3MSXAwBnYoYGKdPUeE6LF9+tpqa6VJcyPdYSUvEObX2uxN4MXPBp7GJZlwpU8c3H7M/Whb/HIxfuGoEzCnj2qGJ9eBnJvPCWvtth2AHnfGdAW6MuCh7LOrem2a2t2/dq5ZhxrZmfqoMulZeH+w6P2Rrab8T0y0XBAOYqY90jqydfyAfSVLwH603Frbptm+e+AEBqsOQEAAAcjyUnOBoPyAMAWFhyAgAAjseSEwAAcDwCDQAAcLxP1v+aFScAAOBszNAAAADHI9AAAADH47ZtYAJfXnmf6pp/qaf+02Nx21/78VuzXBEAIB5maIAErDCz9PP3proMAMAUEGiAOAgzzmCay/VX39ukh83YmxvMex7S97/3tMrv4aYHYL5gyQkYI5lhxvqD+/zfPaYHjMjLKN9/U0/8Y9tN9JOj7c/v1IbcgI6++A862GOMaQ+Pc/+VBn3r26fUaaTXe6Qe/toebbzyqr7+U3+qSwEwRxFogDGsa2asfzNlfmmT3tyar/f+6X/o8XeNkX0/+Ir/pv+w/+aK9MB9uaFAE3v+0g0ldmhiPiLM6Dmtr/+309anVJcCYJYQaIAxEl0APB32jMkWtx1mvvPu6B9V492f6Osz6PdfW336D3+2Wg8fPaJTw7M+Zo48RVLViQ5tKJph4QDgUAQa4FZYURBe/mlRwkkC6zqPHzzn0T2RYDIcfoaXl+458Za0JbyM9Ny+yDLVR6f0ZutebdyQq1PDszwrVmuDfPrWR66YQDPV/h+YZrvd95iltJ4TP7RnneLVbi2BxXxv+9wS9Rz26YEt4fqsvr+tzfaM1kT9xasl8W/r0pvfCAe/eL/Ft1ty7b4faB1dCsv7ytP62yKfXfOFzzwc9/cDkJ64KBhIAfsP9Trpe994QY+H/m38pw7dv2VzzMWt928pUFOo7YnvnI65Jqb2//h0tzVLEzrW7metW784EfoDfJP9T7d9JJC8GGn7+g/1XtFO/dWXJq99VCh8rQ3XZ/X9wNa/1ht/1B7u72/rpcj3m2qtN/Nb/6mu6PUTod+y6AvKi/yWniJX5LfMnfT3A5BemKEBxvj15d/owoeXNDj4W9122+9p6ec+q3s/c3dSxzAMvw7+o195G/5Sb6zNtveZZkfMMb84PLqsFKPlrI6u3WnP0tR+ZM3ORGaCVsyg/0ifxaE+alsmaVeBHjCy9cC3/lplUf31LM6dvPYRAR09GLl4uaVd723JUk9Nq+zprMu9+le59dnPhOp4ngAAAAPKSURBVDYvT63WiUz4W4TG/sWWEnk+Y4WYL+iBXJ/ebJna7wcgvRBogDFyOk9ry6KBke2fd3aqrqfAvvtpyqL+UHb2jG8eXgLRyVf1+Df8I0skU2H9sbVmFjas/YK257r1m9az42ZBZtL/VJgf1Se4myonaWMky0S/hWG0qan1MW28LzcUC92hY96IWaK6Vb8fgORjyQmI8p8XX9OfR4WZ1zsH7O0v3Wi3Z26myvpDeeSktOG5v4x5Fop1l9P3vxL6o3+3S3dfadD3jl6x9y+9z61pzQFZgSnXow1FPr0Z6SPGFPq//49GL7hZuuFxbcj1qallCu2RsTdHzQg9/LXxz4JJpslqtSR89swkv0VtTYNUtFqbQ0O898srUzoHQPphhgaIEh1mxu7/7x9emtbSU+dPX9HjH23Sm1FLM+Hn0PhDH8LLJi9+v8Te3/N+h6Yel4YDU4nuz22fcFlqov5/oQK98Xcbw3WZHfr7yAW0w/d+J2o31KZvv5itHzy3V29sjbpgNurcZJus1glN9ltc/kDvaac2+N/Sd3qMqZ0DIO0Ydxas4io3IOL1wmDsdueAtudl2p9f/rel+tKXV8W0O/FdTqN3Dr0Q966dydpn083WMvYuJwBzH0tOQBw/vTQ4bt//NRakoBLcDHuJ6EpAv051IQBmDUtOQJSf92XqT+68of/32yF7dmbRbcbI/qV5n01xdZjM8NOZw8tS6fcKCAC3DktOwBhjLwy2wsy7n4p/l5MTl5wAYC4i0AAAAMfjGhoAAOB4nyy5lzVmAADgbMzQAAAAxyPQAAAAxyPQAAAAxyPQAAAAxyPQYISZv0nPbF+j7CHu5AcAOEtaPin4L75arpM/P65gsHfGfe1Y1DduX9tAphqv3z7jvgEAQHpIyxmaO+/8fW184qta9+hjuu22zKT3vzxzQGvuuJb0flPNHMqRZ/vz2pB/a2ZYktH/ra4RADA/peUMzbB7PnOvtmz7mtre/5VaWhqS2vfSBR/b/xI50LcoqeMBAIBbx1j3yOq0+0/lr+38xrh9g4ODOnv6Z+ruvjitvuItOU1FvEBjDi1X2e4y5RmGTLNXLc19WpHXq8OvnVZvhhHTbgk0vapD9f7Ifo+CoeNXFrtj2sb2G3tejkqe2qGspiqptExLgg32WP6ch1Re7pErcnznsRdU5S2K6cMM1IePVVHcvuONG32e9X0Sffep9p9dsktbi7PDx5s+Vb/oVf5zj43rY+xY8c49XnlEvji/cUyba03od8lWc5ztDuXG/y0T1J/o/5OJagMApM7/B/KYrI1ASRIsAAAAAElFTkSuQmCC"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/048812b3.4c8e8a79.js b/knife4j-doc/gitee/assets/js/048812b3.4c8e8a79.js new file mode 100644 index 000000000..41c0f017d --- /dev/null +++ b/knife4j-doc/gitee/assets/js/048812b3.4c8e8a79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6454],{3905:(e,t,n)=>{n.d(t,{Zo:()=>i,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},i=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,A=e.originalType,c=e.parentName,i=o(e,["components","mdxType","originalType","parentName"]),u=l(n),m=r,d=u["".concat(c,".").concat(m)]||u[m]||s[m]||A;return n?a.createElement(d,p(p({ref:t},i),{},{components:n})):a.createElement(d,p({ref:t},i))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var A=n.length,p=new Array(A);p[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[u]="string"==typeof e?e:r,p[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var a=n(87462),r=n(63366),A=(n(67294),n(3905)),p=["components"],o={},c="springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",l={unversionedId:"action/springfox/springfox2",id:"action/springfox/springfox2",title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",description:"\u65f6\u95f4\uff1a2019-5-22 1221",source:"@site/docs/action/springfox/springfox2.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox2",permalink:"/docs/action/springfox/springfox2",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3",permalink:"/docs/action/springfox/springfox1"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",permalink:"/docs/action/springfox/springfox3"}},i={},u=[{value:"\u524d\u8a00",id:"\u524d\u8a00",level:2},{value:"mapstruct",id:"mapstruct",level:2},{value:"\u7b80\u4ecb",id:"\u7b80\u4ecb",level:3},{value:"\u4f5c\u7528",id:"\u4f5c\u7528",level:3},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:3},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}],s={toc:u},m="wrapper";function d(e){var t=e.components,o=(0,r.Z)(e,p);return(0,A.kt)(m,(0,a.Z)({},s,o,{components:t,mdxType:"MDXLayout"}),(0,A.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e8c-\u521d\u63a2mapstruct"},"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct"),(0,A.kt)("p",null,"\u65f6\u95f4\uff1a2019-5-22 12:40:21"),(0,A.kt)("p",null,"\u5730\u70b9\uff1a\u5355\u4f4d"),(0,A.kt)("h2",{id:"\u524d\u8a00"},"\u524d\u8a00"),(0,A.kt)("p",null,"\u5728\u7ee7\u7eed\u9605\u8bfb\u5b66\u4e60springfox\u6e90\u7801\u4e4b\u524d,\u6211\u4eec\u9700\u8981\u5148\u6765\u5b66\u4e60\u4e00\u4e0bmapstruct\u8fd9\u4e2a\u7ec4\u4ef6,\u53ea\u6709\u5728\u7406\u89e3\u4e86mapstruct\u7ec4\u4ef6\u540e,\u540e\u9762\u518d\u770bspringfox\u7684\u6e90\u7801\u624d\u4e0d\u4f1a\u6709\u7591\u60d1"),(0,A.kt)("p",null,"\u56e0\u4e3a\u4e4b\u524d\u5e76\u6ca1\u6709\u63a5\u89e6\u8fc7mapstruct\u8fd9\u4e2a\u7ec4\u4ef6,\u6240\u4ee5\u8bb0\u5f55\u4e00\u4e0b\u5b66\u4e60\u7684\u8fc7\u7a0b."),(0,A.kt)("h2",{id:"mapstruct"},"mapstruct"),(0,A.kt)("p",null,"\u5b98\u7f51\u5730\u5740\uff1a",(0,A.kt)("a",{parentName:"p",href:"http://mapstruct.org/",target:"_blank",rel:"noopener"},"http://mapstruct.org/")),(0,A.kt)("p",null,"GitHub:",(0,A.kt)("a",{parentName:"p",href:"https://github.com/mapstruct/mapstruct",target:"_blank",rel:"noopener"},"https://github.com/mapstruct/mapstruct")),(0,A.kt)("p",null,"\u6587\u6863\uff1a",(0,A.kt)("a",{parentName:"p",href:"http://mapstruct.org/documentation/stable/reference/html/",target:"_blank",rel:"noopener"},"http://mapstruct.org/documentation/stable/reference/html/")),(0,A.kt)("p",null,"\u4e00\u8a00\u4e00\u6982\u4e4b:",(0,A.kt)("strong",{parentName:"p"},"Java bean mappings, the easy way!")),(0,A.kt)("h3",{id:"\u7b80\u4ecb"},"\u7b80\u4ecb"),(0,A.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u7684\u6700\u7b80\u5355\u7684\u4e00\u53e5\u8bdd,\u5f88\u6e05\u6670\u7684\u63cf\u8ff0\u4e86mapstruct\u7684\u4f5c\u7528,\u4e3b\u8981\u7528\u4e8eJava Bean\u7684\u6620\u5c04,\u8fd9\u6709\u70b9\u7c7b\u4f3cmybatis\u4e2d\u7684\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04,\u4f46\u6b64\u5904\u7684mappings\u5e76\u975emybatis\u90a3\u6837"),(0,A.kt)("p",null,"MapStruct\u540c\u65f6\u4e5f\u662f\u4e00\u4e2a\u4ee3\u7801\u751f\u6210\u5668\uff0c\u5b83\u57fa\u4e8e\u7ea6\u5b9a\u4f18\u4e8e\u914d\u7f6e\u65b9\u6cd5\u6781\u5927\u5730\u7b80\u5316\u4e86Java bean\u7c7b\u578b\u4e4b\u95f4\u6620\u5c04\u7684\u5b9e\u73b0\u3002"),(0,A.kt)("p",null,"\u901a\u8fc7MapStruct\u751f\u6210\u7684\u6620\u5c04\u4ee3\u7801\u4f7f\u7528\u666e\u901a\u65b9\u6cd5\u8c03\u7528\uff0c\u56e0\u6b64\u5feb\u901f\uff0c\u7c7b\u578b\u5b89\u5168\u4e14\u6613\u4e8e\u7406\u89e3\u3002"),(0,A.kt)("h3",{id:"\u4f5c\u7528"},"\u4f5c\u7528"),(0,A.kt)("p",null,"\u6211\u4eec\u4e3a\u4ec0\u4e48\u9700\u8981",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7ec4\u4ef6\uff1f"),(0,A.kt)("p",null,"\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\u901a\u5e38\u4f1a\u4f7f\u7528\u5206\u5c42\u7ed3\u6784,\u5206\u5c42\u65f6\u6bcf\u5c42\u7684\u5bf9\u8c61\u4f1a\u6709\u4e0d\u540c\u7684POJO\u5bf9\u8c61(\u4f8b\u5982\u5b9e\u4f53DO\u548c\u4e1a\u52a1DTO),\u5b9e\u4f53DO\u5b9a\u4e49\u4e86\u7a0b\u5e8f\u5185\u90e8\u7684\u903b\u8f91\u5c5e\u6027,\u800cDTO\u5b9a\u4e49\u4e86\u5916\u90e8\u4e1a\u52a1\u903b\u8f91\u5173\u7cfb"),(0,A.kt)("p",null,"\u901a\u5e38\u6211\u4eec\u5728\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7DTO\u63a5\u53d7\u8fdb\u6765\u5916\u90e8\u53c2\u6570\u65f6,\u9700\u8981\u5c06\u4e4b\u8f6c\u5316\u4e3a\u5185\u90e8DO\u5bf9\u8c61,\u4f9b\u5185\u90e8\u8c03\u7528,\u6b64\u65f6",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7ec4\u4ef6\u6b63\u4e3a\u6b64\u800c\u751f."),(0,A.kt)("p",null,"\u4e0e\u5176\u4ed6\u6620\u5c04\u6846\u67b6\u76f8\u6bd4\uff0cMapStruct\u5728\u7f16\u8bd1\u65f6\u751f\u6210bean\u6620\u5c04\uff0c\u53ef\u786e\u4fdd\u9ad8\u6027\u80fd\uff0c\u5141\u8bb8\u5feb\u901f\u7684\u5f00\u53d1\u4eba\u5458\u53cd\u9988\u548c\u5f7b\u5e95\u7684\u9519\u8bef\u68c0\u67e5\u3002"),(0,A.kt)("h3",{id:"\u793a\u4f8b"},"\u793a\u4f8b"),(0,A.kt)("p",null,"\u5148\u6765\u770b\u4e00\u7ec4\u5173\u4e8e",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u7684\u793a\u4f8b"),(0,A.kt)("p",null,"\u5728",(0,A.kt)("inlineCode",{parentName:"p"},"maven"),"\u4e2d\u5f15\u5165",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u7684jar\u5305"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-xml"},"\n 1.2.0.Final\n\n\n \x3c!-- https://mvnrepository.com/artifact/junit/junit --\x3e\n \n junit\n junit\n 4.8.2\n test\n \n\n \n org.mapstruct\n mapstruct-jdk8\n ${mapstruct.version}\n \n \n org.mapstruct\n mapstruct-processor\n ${mapstruct.version}\n \n\n\n \n \n org.apache.maven.plugins\n maven-compiler-plugin\n 3.5.1 \x3c!-- or newer version --\x3e\n \n 1.8 \x3c!-- depending on your project --\x3e\n 1.8 \x3c!-- depending on your project --\x3e\n \n \n org.mapstruct\n mapstruct-processor\n ${mapstruct.version}\n \n \x3c!-- other annotation processors --\x3e\n \n \n \n -Amapstruct.suppressGeneratorTimestamp=true\n \n \n -Amapstruct.suppressGeneratorVersionInfoComment=true\n \n \n \n \n \n\n")),(0,A.kt)("p",null,"\u5047\u8bbe\u6211\u4eec\u62e5\u6709DO\u548c\u4e1a\u52a1DTO\u5bf9\u8c61",(0,A.kt)("inlineCode",{parentName:"p"},"Car.java"),"\u3001",(0,A.kt)("inlineCode",{parentName:"p"},"CarDTO.java")),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"Car.java:")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},"public class Car {\n\n private String name;\n private String make;\n private int numberOfSeats;\n //getter and setter ,constructs \n}\n")),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"CarDTO.java")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},"public class CarDTO {\n private int seatCount;\n //getter and setter ,constructs\n}\n")),(0,A.kt)("p",null,"\u6309\u7167\u4f20\u7edf\u7684\u8f6c\u6362\u5173\u7cfb,\u5982\u679c\u6211\u4eec\u4e0d\u4f7f\u7528",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u7684\u8bdd,\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff1a"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'Car car=new Car("c1","m1",12);\nCarDTO cd=new CarDTO();\n//\u8d4b\u503c\ncd.setSeatCount(car.getNumberOfSeats())\uff1b\n')),(0,A.kt)("p",null,"\u6309\u7167\u4ee5\u4e0a\u7684\u65b9\u5f0f\u4f1a\u6709\u4ee5\u4e0b\u5c40\u9650:"),(0,A.kt)("ul",null,(0,A.kt)("li",{parentName:"ul"},"\u5982\u679c\u5c5e\u6027\u5f88\u591a\u7684\u8bdd,\u9700\u8981\u5199\u5927\u91cf\u7684\u8d4b\u503c\u5c5e\u6027\u4ee3\u7801"),(0,A.kt)("li",{parentName:"ul"},"\u4ee3\u7801\u6781\u5176\u7e41\u7410")),(0,A.kt)("p",null,"\u5982\u679c\u4f7f\u7528",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6,\u6211\u4eec\u53ef\u4ee5\u5148\u58f0\u660e\u4e00\u4e2a",(0,A.kt)("inlineCode",{parentName:"p"},"CarMapping"),"\u63a5\u53e3"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/21 21:40\n */\n@Mapper\npublic interface CarMapper {\n\n CarMapper INSTANCE= Mappers.getMapper(CarMapper.class);\n\n @Mapping(source = "numberOfSeats", target = "seatCount")\n CarDTO carToCarDto(Car car);\n\n\n}\n')),(0,A.kt)("p",null,"\u6211\u4eec\u5c06\u6240\u6709DO\u5bf9\u8c61\u53caDTO\u5bf9\u8c61\u7684\u6620\u5c04\u5173\u7cfb\u90fd\u5b9a\u4e49\u5728Mapper\u63a5\u53e3\u4e2d,\u7136\u540e\u901a\u8fc7",(0,A.kt)("inlineCode",{parentName:"p"},"@Mapper"),"\u6ce8\u89e3\u6807\u6ce8"),(0,A.kt)("p",null,"\u800c\u6b64\u65f6\u6211\u4eec\u4f7f\u7528\u7684\u8bdd\u4e5f\u4f1a\u6709\u6240\u53d8\u5316\uff1a"),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},' //given\nCar car = new Car( "Morris", "4make", 13 );\n//when\nCarDTO carDto = CarMapper.INSTANCE.carToCarDto( car );\n//then\nSystem.out.println(carDto.getSeatCount());\n')),(0,A.kt)("p",null,"\u6b64\u65f6\uff0c\u6211\u4eec\u7a0b\u5e8f\u5728compile\u7f16\u8bd1\u65f6,",(0,A.kt)("inlineCode",{parentName:"p"},"MapStruct"),"\u6846\u67b6\u4f1a\u4e3a\u6211\u4eec\u81ea\u52a8\u751f\u6210",(0,A.kt)("inlineCode",{parentName:"p"},"CarMapper"),"\u7684\u5b9e\u73b0\u7c7b\uff1a"),(0,A.kt)("p",null,(0,A.kt)("img",{src:n(2374).Z,width:"557",height:"317"})),(0,A.kt)("p",null,"\u6b64\u65f6\u5728",(0,A.kt)("inlineCode",{parentName:"p"},"generated-source"),"\u4e5f\u4f1a\u751f\u6210\u76f8\u5e94\u7684java\u6587\u4ef6"),(0,A.kt)("p",null,(0,A.kt)("img",{src:n(43048).Z,width:"564",height:"226"})),(0,A.kt)("p",null,(0,A.kt)("inlineCode",{parentName:"p"},"CarMapperImpl.java")),(0,A.kt)("pre",null,(0,A.kt)("code",{parentName:"pre",className:"language-java"},'\n@Generated(\n value = "org.mapstruct.ap.MappingProcessor",\n date = "2019-05-21T21:46:10+0800",\n comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_111 (Oracle Corporation)"\n)\npublic class CarMapperImpl implements CarMapper {\n\n @Override\n public CarDTO carToCarDto(Car car) {\n if ( car == null ) {\n return null;\n }\n\n CarDTO carDTO = new CarDTO();\n\n carDTO.setSeatCount( car.getNumberOfSeats() );\n\n return carDTO;\n }\n}\n')),(0,A.kt)("p",null,"\u6620\u5c04\u63a5\u53e3\u81ea\u52a8\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0\u4e86Java\u5b9e\u4f53\u7684\u8f6c\u6362"),(0,A.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,A.kt)("p",null,"\u4e86\u89e3\u4e86mapstruct\u7684\u529f\u80fd,\u6211\u4eec\u5728\u63a5\u4e0b\u6765\u5b66\u4e60springfox\u7684\u6e90\u7801\u65f6\u4f1a\u8f7b\u677e\u5f88\u591a."))}d.isMDXComponent=!0},2374:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/compile-f8e55b8154c83c314dacffed2b5b96aa.png"},43048:(e,t,n)=>{n.d(t,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjQAAADiCAYAAABZc10YAAAgAElEQVR4nO3df3DU933n8ddXSY1ix1OMVhJnJ25yCFZSUJvaDshdBbBb6sEiyNgDvZwBMb4A7twkN5aDM1NDr3Mmmallk0mTTh3T+Axl5lJyY1sEIScgfkmyfthJepa80oI0WAGlZrUr0bsBZKXR9/b73ZW0K+3qB1q0+5Wejxkm+/1+vt/P572bP/Ty5/P9Yfyx5z5TmFN+r8CjT36+aErH/vvFVv22veGW1mOad2vdf/2Gcuu/pYPvG9NuBwBgMhmpLgDJZwUUK6hMZjbCDAAAs+GTqS4At4YVVIauXNQnPl+kT+R+Pqbtd6H9vwuFmd/1/SZF1QEAkFwGS04AAMDpWHICAACOR6ABAACO98nFn74z1TUAAADMCDM0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8dLuScE7FvWN29c2kKnG67enoBoAAOAEMw40W7btVGZmZsL2gYEbOnzowIzGWJ45oAWGqTPX7pjyOeZQjkqe2qGspn062jG7LzxM5dgAAMxHMw40dXW1Wru2NHH72ZMzHcK2dMHH9r9EDvQtSso4AADAeWYcaLovdunq1X4tXHjXuLb+/j51d1+c6RDTZg4tV9nuMuUZhrR+r54prtfh107Ln/OQyss9chnhWZPOYy/YMyijMypVUmmZlgQbwseraKQf0+xVS3OfVuT12m29GUbsOCGBpld18FxO3LGt4wEAwK2RlGtoTtUe1+NPPDl+/8maZHQ/bUZGm6oq/THLPqZyVeKRair3hcNI/iZVlG6W23tEHZHzlpQW6Hio/ajVHgkzqt6n/VGhR+q1jw2HGY+CB0PHB0bbywL7xo0twgwAALdUUgJNXzConp5Luueez47su3zpQ/X3B5PRfVIYGX41VPmVveppVRRn2/tM0xdzTFf1EfmGw0dhQXimxiv7XjDr/Pqm81pRrJH2PCNbedv3amVUHwFX7i3/LgAAIFbS7nKqPVGtreW7ZNjLM0M6Vft2srpOCtO1xl5uUvMB7X/JH9nOnlmfgUTLSTkz6hcAAExP0p5DMzg4qHZvq/25/YNWezutuLKVFWxQzbkr9mZOvltZEx3vbVdXlkcPFoY37SWl4mUJ2y3usk1yD5lJLx0AAEzsE0vzPvc3yeqsp+fX+oM/+I86efK4TPPm/rDf/6kbN3XeL298KmbbMK5p4NOFeujhdSpelqELP3tXH9+3UY+uXa0H/2SV7rlxWTcWhWp+5wMF9Gnd+8f36/bL5+QLGJHz/eq48AkVb9qiP/VY59yrntbLumfRdb3/qw91PaN3TPsqZTT+g94JGuPG7vrlRV03uI4GAIBbxVj3yOq0mlKI92C9qZiN27btC4mLe7lrCQCANMOrDxKwlpg820eXkOy7mkqXKdjpJcwAAJBm0m6GJp0MX0jsinrOzKF6f4qrAgAAYxFoAACA47HkBAAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AAwAAHI9AM0PWE4Q3PMtLKQEASKVPprqAeP7iq+U6+fPjCgZ7Z9xXvHdDtQ1kqvH67TPuGwAApIe0nKG5887f18Ynvqp1jz6m227LTHr/yzMHtOaOa0nvFwAApEZaztAMu+cz92rLtq+p7f1fqaWlIal9L13wsf0vkdl4ezcAAEiOtA40loyMDP3hF+9XfmGRzp7+mbq7L6asFvuN27vLlBf1ssqD58YcM+aFlp3HXtDRjvDn7JJd2lqcHT7O9Ol45RH5MoyE++ONN/xyzETnAAAwH6V9oBl22223ae0jX9F77zXqX3757qyPPxwuFjYf0P6YN27nRB2ToxKPVFO5T71WIMnfpIrSzXJ7j6gj5yGtW9mn6hdfGQ0e1jGhABR3vz2eR8GD+3Q0YIT7fmqHNgT2qSoQvy8AAOYrxwSa3/3u39XcWC+v9/3UFFBYoCXBBh0+dyVheDAy/Gqo8it71dOqiJo9sfkDuiqPHt39tFwHX1FDwJh4f2i8PCNbedv3amXUGAFXruRNcA4AAPNU2gca0zR1/ny76s7WWlupLmdCw8tNsmZxXvJHtsPBxsho09GX2yIzLXv0TFZALXYYib+/3uovUK/Dr522Z3uiWcEpfl8EGwDA/JSWdzkNC/Re0T//+GAozJxUysOMt11dWR49WBjetJaEPCU5sce4spUVbFCNNYsTkpPvVlakyQo3nnzTDiP1rx1QS9ClLFfi/WPHs7jLws+7SXgOAADzVFrO0AwM3NCZUz/T5cu/TnUpI6wZlqqDLpWX71HFeiNyIW6roq+hkfesWop3aOtzJfZm4IJPweHzA2cU8ITPtZgX3tJ3OwwZSrB/zHgW+wLjDCNhXwAAzFfGukdWp/c6zgzFe7DeVHDbNgAAzpHWS04AAABTkZZLTsnETAsAAHMfMzQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQAAMDxCDQYYeZv0jPb1yh7aE6/DQMAMAfN+ScFx3uXU9tAphqv356CagAAwK2QdoFmy7adyszMTNhuvYn78KEDMxpjeeaAFhimzly7Y0b9pBtzKEclT+1QVtM+HeXt2wCAeSTtAk1dXa3Wri1N3H72ZFLGWbrgY/tfIrwDCgAA50i7QNN9sUtXr/Zr4cK7xrX19/epu/tiCqoKM4eWq2x3mfIMQ6bZq5bmPq3I69Xh106rN8OIabcEml7VoXp/ZL9HwdDxK4vdMW1j+409b3jGpUoqLdOSYIM9lj/nIZWXe+SKHN957AVVeYtG+1i/V88U14ePVVHcvuONa+8L9E74G2SX7NLW4uzwsaZPxyuPyBfnu8e0udaE6s1Wc5ztDuXG/44J6k70W01UGwBg7ku7QGM5VXtcjz/x5Pj9J2tSUE3Y8B9SVe/T/g5jJGxIvVHtodBycJ+OBkbbNwT2hcKGdYRLK7IatP+ln0T+oG+Up+MV1fuLJjlPWlJaEPrjHGq3woAVADxSTWjbDlH5m1RRuln53iOqqvTHLDmZmqjvopjvY3GXPa9Hx+fI0d8gVPe6lX2qfvGV0aAQFWYWNh/Q/uGwZNW1e7Nkh5bJxX7HonH9TfobBx6KWxsAYH5Iy0DTFwyqp+eS7rnnsyP7Ll/6UP39wdQVVVgQnj2wQkaGZGT4Vd90XiuKR9vzjGzlbd+rlVGnBVy5w5/U0tAa+t/QH1m/V11B9xTPk7qqR2carHEbqvzKXvW0KqJmIxLVnLDvMd/H0uE7r0cj32fcbNRBK3wFdFUePbr7ablC2w0BI/a3OXdlNER4z6qleIfchaF+A5P/vNHfMW5/k30fb4LaAADzQloGGkvtiWptLd8lw/6DOqRTtW+nuqRJmYH6keWnWDlJOy88u+ORrNmLl/wjyzfT7jt/wpJCwalNR19ui94zsi88M7JHz2QFwkEnYS8BBacQZqYj0fexgl682gg2ADA/pO1zaAYHB9XubbU/t3/Qam+nlLddXVkePVgY3rT/cBYvS9hucZdtknuyZ7pM9zxXtrKCDaqxZi9CcvLdyrqZvif7PnFY4cmTb4Znp147oJagS1mu0XHWrRqdVVLhaq2QT+dHVowWyRXJZxPWHKdua7bIU5Iz4fdJWBsAYF5I2xkaS1PjOS1efLeamupSXYo9O1F10KXy8j2qWD98UfB5KS9+u8W6WNe6JkRDU+930vMiSzlbnyuxNwMXfAqO9OXX+c6AtkZdFJyob0OhcasL9Gzo2Ir1Gvd94tYaOKOAZ7Qv88Jb+m5HeOamqlIq271DFcXRFwWHZ1Ks82qa3doaWSqKrnlqv7XVV6v9/RJ+nwS1AQDmB2PdI6vn9GNh4z1Ybyqmctu2feFrcW+C5SIAADBb0nbJKd1YSzKe7aNLQfZFs6XLFOz0EmYAAEixOT9Dk0zDF+S64jwDBQAApA6BBgAAOB5LTgAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINAAAwPEINJgS66GC257dJY+LxxYBANJPWr+cMh3FezdU20CmGq/fnoJqAACAZc4/KXjLtp3KzMxM2D4wcEOHDx2Ycn+JXnZ54eMFOnPtjmnXN5us91GVPLVDWU37dHSSN1FP51gAAFJtzs/Q1NXVau3a0sTtZ08mZZylCz62/yUylbd3AwCAmzPnA033xS5dvdqvhQvvGtfW39+n7u6LKagqbOzLLjuPvWDPhthv8t7tUbC5TyuL3Xbb8IswJ2qz+7Tby5QX6dM0fTpeeUQdKhrdv36vnimu1+HXTsuf89C4Gqq844899FOpdHu2mkN9+TKMhOOMtiWuMbtkl7YWZ487DwCAmzXnA43lVO1xPf7Ek+P3n6xJQTVh9pKOR6qp3KdeKwTkb1JF6Wa5vVb4sLi0IqtB+1/6SST4bJSn4xWFM0GitnAQWdh8QPuHA47V7+7NUig0VFX6Y5aRTOXGrSHfG+fY0DijtS+fcJwJ69dDWreyT9UvvjIaYggzAIAZmhd3OfUFg+rpuRSz7/KlD9XfH0xRRZKR4VdD1Rlp1dOq+OYePbvePeaIgFoaWsMf/V51BafQVligJcEG1Zy7Mnqo96xagsvkLryZGhKY0jgJavQHdFXL9Ojup7ljCgCQNPNihsZSe6JaW8t3yTAMmeaQTtW+ndJ6hpebZM1yvOSPbGffotECCgZmo4b440QzMtp09OW2yEXHe/RMVij4HHxFDQFmaQAAN29ezNBYBgcH1e4Nzxi0f9Bqb6eUK1tZUbMcOfluZc20T2+7urI8Wrcqd3Rf4WqtkE/n/UmsYbrjRLFCkyfftGeH6l87oJagS1muqQwKAEBi82aGxtLUeE6LF9+tpqa6VJcSXqIp3qGtz5XYm4ELPs10Acya/aiqlMp271BFcfTFuqfta2QM+XW+M6Ctwxf6/uhMqIadcWuwAkfMsT+d+jgamqDGwBkFPHtUsT5y3oW39F1uCwcAzNCcfw5NsiV6Ds1kuG0bAIBbZ94sOQEAgLlrXi05JQMzLQAApB9maAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOMRaAAAgOPxpOAUi/duqLaBTDVevz0F1QAA4EwEmmnasm2nMjMzE7YPDNzQ4UMHZjTG8swBLTBMnbl2x4z6AQBgviDQTFNdXa3Wri1N3H72ZFLGWbrgY/tfIrxTCgCAUQSaaeq+2KWrV/u1cOFd49r6+/vU3X0xBVWFmUPLVba7THmGYW8Hml7VoXr/uP2m6dPxyiPyZRiRNo+C1T4tKfXIFTqm89gLqtJmPbveHdMPAADpikBzE07VHtfjTzw5fv/JmhRUEzYcWhY2H9D+qPARb7+Zv0kVuzdLoVDTYe9xaUWxT4cr98lfaAWZvaq48Jb2v/QTma41Ki9fLfe5cAACACAdcZfTTegLBtXTcylm3+VLH6q/P5iiikIKC7Qk2KCac1cm3+89q5bgMrkLh3cE1HLstHqtwOJtV6fZq5aG1nCTP6CrWiRXzmx8CQAAbg6B5ibVnqiWaZr2Z9Mc0qnat1Nc0XQFFAykugYAAJKDQHOTBgcH1e4Nz2K0f9Bqb6eUt11dWR49GJl1sZaaPCU5I/vXrcodPbZwtVbIp/NcFgMAmCO4hmYGmhrPafHiu9XUVJfqUmRktKnqoEvl5XtUsd6IXPjbGtrvV1WlVLZ7hyqKoy8KjiwxDaW4cAAAksBY98hqM9VFzGfxHqw3Fdy2DQDAKJacAACA47HklGLMtAAAMHPM0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0AAAAMcj0GBaTNcabXt2lzyu2XtjxnTGNIdy5Nn+vCq+uUcb8nmrBwDMFzwpeI6J926otoFMNV6/PQXVzL6cVRu1or9K+19vC20ZqS4HADBLCDQptmXbTmVmZiZsHxi4ocOHDsxojOWZA1pgmDpz7Y4Z9WMxAmd06OUzms2wMJ0xF2W5FAz6b3lNAID0QqBJsbq6Wq1dW5q4/ezJpIyzdMHH9r9EeKcUAMDJCDQp1n2xS1ev9mvhwrvGtfX396m7+2IKqpKyS3Zpy8o+Ha88Il+GIXfZ83pUVdrf4FJ5ebaaI/ut61vKyz1yGeHZk85jL+hoR/izObRcZbvLlBdpM03fSH/hNo+C1T4tKQ2fb51bpc16dr3bPj7Q9KoO1fsjY4TH7FBR+LzmPq0sjj3OqrF0aWispTv1zMrwWOHj49cAAJg7PrE073N/k+oi5ruPPupRQeEfjtt//Ngb9pLTdNz/qekdP+yXNz4Vs339179Qf85Grczx6V9uf1Tblnbo8P9q1rU7Pq8vfvEO9bzzgQJmrkr+PBQ0fnRItY11eqcvV6WlX1B/g9UWDhILmw/olR/XqPGdc2rs/4K2bY+0K1f5nvtUlHVJb/z9IZ3sX6z16x/Xg0a9vvs//7feOZ+hL5YWasA6NnrM4fMGoo8r0acvvKdf/apOfdlf1qILB/TDf3530hqCBqEGAOYK7nJKA33BoHp6LsXsu3zpQ/X3B1NUUVjHm1W6unKHKkoXqeXYafWOmdUwMvxqqDojrXravqtoeGbFVligJcEG1Zy7MrrPe1YtwWVyFw7vCIz2621Xp9mrlobWcJM/oKtaJFdOvMoCUcd51ZXoZ5pSDQCAuYBAkyZqT1TLNMO3GZvmkE7Vvp3iiiYXvp36ea3Tm9r/0j69/Hq9Jo9gAQUDs1Bc2tcAAEgmAk2aGBwcVLs3POvQ/kGrvZ1q+RvDyzWHm6UV6x9S9tCY57q4spUVNQOSk+9W1nCbt11dWR6tW5U7enzhaq2QT+dn6yakdKgBADAruCg4jTQ1ntPixXerqaku1aWELwK+q0GH37wiv95US94ObdkY0P6GqIOs5ZviHdr6XIm9GbjgG5mhMTLaVFUple3eoYri6AtyI0tMQ7f+O0xaAwBgzjDWPbKax6nOIfEerDcV3LYNAHAylpwAAIDjseQ0xzDTAgCYj5ihAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegAQAAjkegQUqZQ8u14dlNco998WUy+s7fpGe2rxn/Uk0AwJzDk4IxoXjvhmobyFTj9dtTUA0AAPERaOaYLdt2KjMzM2H7wMANHT50YEZjLM8c0ALD1Jlrd8yoHwAAkoVAM8fU1dVq7drSxO1nTyZlnKULPrb/JcI7pQAAs4lAM8d0X+zS1av9WrjwrnFt/f196u6+mIKqwqzrZcp2lynPMOztQNOrOnhu4mNM06fjlUfkyzBkutaovDxbzYm2x5xrnx/onbXvBwBIHQLNHHSq9rgef+LJ8ftP1qSgmrDhsLGw+YD21/ujWnImPMa6sLdi92YpFFo6ptC/qvdpf0c40LjLntej43MdAGAO4i6nOagvGFRPz6WYfZcvfaj+/mCKKgopLNCSYINqzl2Z3jHes2oJLpO7cGr9N3pHd3X4zs+oZACAcxBo5qjaE9UyzfDtyqY5pFO1b6e4opkIKBhIdQ0AgHRGoJmjBgcH1e5ttT+3f9Bqb6eUt11dWR49GJlpsZaIPCU5cY9Ztyp3dF/haq2QT+dHVqkWyRU5LSffrayE/eeopHjZrfkuAIC0wzU0c1hT4zktXny3mprqUl2KjIw2VR10qbx8jyrWG5GLfa3AlRN7TKVUtnuHKoqjLwo+rd4MQ0bgjGqa3dq6fa9WhtoCF3wKRp9bXaBn1+8N9W+d16uW5vNS3qx/VQBAChjrHlnNY1SRULwH600Ft20DAGYTS04AAMDxWHLChJhpAQA4ATM0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0AADA8Qg0mJOsl19ueHaT3EMze7OH6Vqjbc/uksfFG0IAIJ3xpGDMqnjvhmobyFTj9dtTUA0AYK4g0GBCW7btVGZmZsL2gYEbOnzowIzGWJ45oAWGqTPX7phRP7eC9YbvQy+fsT6luhQAwAQINJhQXV2t1q4tTdx+9mRSxlm64GP7XyK8UwoAMBECDSbUfbFLV6/2a+HCu8a19ff3qbv7Ygqqsq6RyVHJUzuU1VQllZYpzwjPoHQee0FHO2JnU6zrYMrLs9VceUS+DGP89tByle0O92GavWpp7tOKvF4dfu20/DkPjRzboaLQcR4FQ+0ri91234GmV3Wo3j/r3x8AEIuLgjGpU7XH4+8/WTPLlYy3pLRAvsp92v/SPr18zBfa3jytC4GHw4yqw33sr3xTyls2wRkurchqD4/3er20ciMXDANAGiDQYFJ9waB6ei7F7Lt86UP19wdTVNGorurwLIvNe1YtwWVyF06jg8ICLQk2qNEb3jQy/KpvOj/BCQG1NLSGP/q96kr9TwAAEIEGU1R7olqmGZ6JMM0hnap9O8UVAQAwikCDKRkcHFS7Nzwz0f5Bq72dDpa4i0Y+56zaqBVZ5+XzxjtykVw5kePy3coa3u1tV1eWRw9GZnXsa3OKJ1pyAgCkIy4KxpQ1NZ7T4sV3q6mpLtWljOhSgSq++Zj92TR9Oh650FdDo8dYt17XNLu1dfterQxtBy74NLxSZGS0qeqgS+Xle1Sxfvii4PNS3qx/FQDADBjrHlnNFY2YNfEerDcVY2/bHr3Lad+4u5pmyszfpIri8F1OvRk8fwYAnIAlJ8xrVjDybB99RYJ911PpMgU7vYQZAHAQlpwwq9LtAXn2XU3HelW+e49KI8+y4dkyAOA8LDkBAADHY8kJAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4HoEGAAA4Hk8KhqPFezdU20CmGq/fnoJqAACpQqDBrNqybacyMzMTtg8M3NDhQwdmNMbyzAEtMEyduXbHjPqZTbfqZZu38iWeAJBOCDSYVXV1tVq7tjRx+9mTSRln6YKP7X+JpNs7pQAAM0Ogwazqvtilq1f7tXDhXePa+vv71N19MQVVRd6yvdujYLVPS0o9chmGOo+9oCpt1rPr3fYx0S+tNF1rVF4ePs5iHWvNgIzOiFRJpWXKG9NuyS7Zpa3F2eF+TJ+qX/Qq/7nHwseu36tniut16EcfKP+/7BzpZ0mwQYd+Gvq4PVvNlUfkyzAiNURt299hdMzexlr9W/HDMf0efu00bxEHMCcRaDDrTtUe1+NPPDl+/8maFFQTzaUVxT4drtwnf6EVZPaq4sJb2v/STyLhYbXc546oQ7kq8Ug1oeOscGDmb1JF6Wa5vVZb2JLSAh0PtR8d257zkNat7AuFmFfsEGL7hOSr7I1ZGjKNnPH9hGpIZDjMLGw+oP1Rbwo367pil5wIMwDmKO5ywqzrCwbV03MpZt/lSx+qvz+YooqGBdRyLDKD4W1Xp9mrlobWcJM/oKtaJFcoZxgZfjVUnZFWPa2Kb+4ZmcGJ1lV9ZDSweM+qJbhM7sLhfpbp0d1Py+Oa/EX3Mf1MpLDAnsWpOXdl6l8XAOYQZmiQErUnqrW1fJcMw5BpDulU7dupLmnKhpebZM2GvOQfWfqZCiOjTUdfbossTe3RM1mhEHXwFUVNqgAAbgIzNEiJwcFBtXvDsx/tH7Ta247hylZW1GxITr5bWWMOWeIuGvmcs2qjVmSdl88bDkOefNOe5al/7YBagi5luaYzeHiWaNy43nZ1ZXn0YGF401qC8pTk3MSXAwBnYoYGKdPUeE6LF9+tpqa6VJcyPdYSUvEObX2uxN4MXPBp7GJZlwpU8c3H7M/Whb/HIxfuGoEzCnj2qGJ9eBnJvPCWvtth2AHnfGdAW6MuCh7LOrem2a2t2/dq5ZhxrZmfqoMulZeH+w6P2Rrab8T0y0XBAOYqY90jqydfyAfSVLwH603Frbptm+e+AEBqsOQEAAAcjyUnOBoPyAMAWFhyAgAAjseSEwAAcDwCDQAAcLxP1v+aFScAAOBszNAAAADHI9AAAADH47ZtYAJfXnmf6pp/qaf+02Nx21/78VuzXBEAIB5maIAErDCz9PP3proMAMAUEGiAOAgzzmCay/VX39ukh83YmxvMex7S97/3tMrv4aYHYL5gyQkYI5lhxvqD+/zfPaYHjMjLKN9/U0/8Y9tN9JOj7c/v1IbcgI6++A862GOMaQ+Pc/+VBn3r26fUaaTXe6Qe/toebbzyqr7+U3+qSwEwRxFogDGsa2asfzNlfmmT3tyar/f+6X/o8XeNkX0/+Ir/pv+w/+aK9MB9uaFAE3v+0g0ldmhiPiLM6Dmtr/+309anVJcCYJYQaIAxEl0APB32jMkWtx1mvvPu6B9V492f6Osz6PdfW336D3+2Wg8fPaJTw7M+Zo48RVLViQ5tKJph4QDgUAQa4FZYURBe/mlRwkkC6zqPHzzn0T2RYDIcfoaXl+458Za0JbyM9Ny+yDLVR6f0ZutebdyQq1PDszwrVmuDfPrWR66YQDPV/h+YZrvd95iltJ4TP7RnneLVbi2BxXxv+9wS9Rz26YEt4fqsvr+tzfaM1kT9xasl8W/r0pvfCAe/eL/Ft1ty7b4faB1dCsv7ytP62yKfXfOFzzwc9/cDkJ64KBhIAfsP9Trpe994QY+H/m38pw7dv2VzzMWt928pUFOo7YnvnI65Jqb2//h0tzVLEzrW7metW784EfoDfJP9T7d9JJC8GGn7+g/1XtFO/dWXJq99VCh8rQ3XZ/X9wNa/1ht/1B7u72/rpcj3m2qtN/Nb/6mu6PUTod+y6AvKi/yWniJX5LfMnfT3A5BemKEBxvj15d/owoeXNDj4W9122+9p6ec+q3s/c3dSxzAMvw7+o195G/5Sb6zNtveZZkfMMb84PLqsFKPlrI6u3WnP0tR+ZM3ORGaCVsyg/0ifxaE+alsmaVeBHjCy9cC3/lplUf31LM6dvPYRAR09GLl4uaVd723JUk9Nq+zprMu9+le59dnPhOp4ngAAAAPKSURBVDYvT63WiUz4W4TG/sWWEnk+Y4WYL+iBXJ/ebJna7wcgvRBogDFyOk9ry6KBke2fd3aqrqfAvvtpyqL+UHb2jG8eXgLRyVf1+Df8I0skU2H9sbVmFjas/YK257r1m9az42ZBZtL/VJgf1Se4myonaWMky0S/hWG0qan1MW28LzcUC92hY96IWaK6Vb8fgORjyQmI8p8XX9OfR4WZ1zsH7O0v3Wi3Z26myvpDeeSktOG5v4x5Fop1l9P3vxL6o3+3S3dfadD3jl6x9y+9z61pzQFZgSnXow1FPr0Z6SPGFPq//49GL7hZuuFxbcj1qallCu2RsTdHzQg9/LXxz4JJpslqtSR89swkv0VtTYNUtFqbQ0O898srUzoHQPphhgaIEh1mxu7/7x9emtbSU+dPX9HjH23Sm1FLM+Hn0PhDH8LLJi9+v8Te3/N+h6Yel4YDU4nuz22fcFlqov5/oQK98Xcbw3WZHfr7yAW0w/d+J2o31KZvv5itHzy3V29sjbpgNurcZJus1glN9ltc/kDvaac2+N/Sd3qMqZ0DIO0Ydxas4io3IOL1wmDsdueAtudl2p9f/rel+tKXV8W0O/FdTqN3Dr0Q966dydpn083WMvYuJwBzH0tOQBw/vTQ4bt//NRakoBLcDHuJ6EpAv051IQBmDUtOQJSf92XqT+68of/32yF7dmbRbcbI/qV5n01xdZjM8NOZw8tS6fcKCAC3DktOwBhjLwy2wsy7n4p/l5MTl5wAYC4i0AAAAMfjGhoAAOB4nyy5lzVmAADgbMzQAAAAxyPQAAAAxyPQAAAAxyPQAAAAxyPQYISZv0nPbF+j7CHu5AcAOEtaPin4L75arpM/P65gsHfGfe1Y1DduX9tAphqv3z7jvgEAQHpIyxmaO+/8fW184qta9+hjuu22zKT3vzxzQGvuuJb0flPNHMqRZ/vz2pB/a2ZYktH/ra4RADA/peUMzbB7PnOvtmz7mtre/5VaWhqS2vfSBR/b/xI50LcoqeMBAIBbx1j3yOq0+0/lr+38xrh9g4ODOnv6Z+ruvjitvuItOU1FvEBjDi1X2e4y5RmGTLNXLc19WpHXq8OvnVZvhhHTbgk0vapD9f7Ifo+CoeNXFrtj2sb2G3tejkqe2qGspiqptExLgg32WP6ch1Re7pErcnznsRdU5S2K6cMM1IePVVHcvuONG32e9X0Sffep9p9dsktbi7PDx5s+Vb/oVf5zj43rY+xY8c49XnlEvji/cUyba03od8lWc5ztDuXG/y0T1J/o/5OJagMApM7/B/KYrI1ASRIsAAAAAElFTkSuQmCC"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/05dc8e8d.a6593f31.js b/knife4j-doc/gitee/assets/js/05dc8e8d.a6593f31.js deleted file mode 100644 index f023ef104..000000000 --- a/knife4j-doc/gitee/assets/js/05dc8e8d.a6593f31.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[139],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>d});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),s=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(p.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},g=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),g=s(t),d=a,k=g["".concat(p,".").concat(d)]||g[d]||c[d]||o;return t?r.createElement(k,i(i({ref:n},u),{},{components:t})):r.createElement(k,i({ref:n},u))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=g;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(87462),a=t(63366),o=(t(67294),t(3905)),i=["components"],l={},p="5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",s={unversionedId:"action/dotnetcore-knife4j-how",id:"action/dotnetcore-knife4j-how",title:"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",description:"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002",source:"@site/docs/action/dotnetcore-knife4j-how.md",sourceDirName:"action",slug:"/action/dotnetcore-knife4j-how",permalink:"/docs/action/dotnetcore-knife4j-how",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1606020212,formattedLastUpdatedAt:"2020\u5e7411\u670822\u65e5",frontMatter:{},sidebar:"action",previous:{title:"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI",permalink:"/docs/action/aggregation-docker"},next:{title:"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",permalink:"/docs/action/dotnetcore-knife4j-guid"}},u={},c=[{value:"\u6ce8\u610f",id:"\u6ce8\u610f",level:4},{value:"\u6e90\u7801\u4e0b\u8f7d",id:"\u6e90\u7801\u4e0b\u8f7d",level:3},{value:"Swashbuckle.AspNetCore.SwaggerUI\u3002",id:"swashbuckleaspnetcoreswaggerui",level:3},{value:"knife4j-v3-spring-ui",id:"knife4j-v3-spring-ui",level:3},{value:"\u7ed3\u6784\u5982\u4e0b\u3002",id:"\u7ed3\u6784\u5982\u4e0b",level:3},{value:"Startup \u4e2d\u7684Configure\u4e2d\u95f4\u4ef6",id:"startup-\u4e2d\u7684configure\u4e2d\u95f4\u4ef6",level:3},{value:"\u4e0d\u7528IGeekFan.AspNetCore.Knife4jUI\u4e5f\u80fd\u5b9e\u73b0\uff1f",id:"\u4e0d\u7528igeekfanaspnetcoreknife4jui\u4e5f\u80fd\u5b9e\u73b0",level:3}],g={toc:c};function d(e){var n=e.components,t=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},g,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"51-knife4jnet-core\u5c01\u88c5\u8fc7\u7a0b"},"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b"),(0,o.kt)("p",null,"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},(0,o.kt)("a",{parentName:"strong",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j UI"))," \uff0c\u5b9e\u73b0swagger\u7684\u89c4\u8303\uff0c\u672c\u6587\u4ecb\u7ecd\u5982\u4f55\u5c06\u4ed6\u96c6\u6210\u5230.NET Core\u4e2d\u3002"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"GitHub \u5f00\u6e90\u5730\u5740 ",(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI"))),(0,o.kt)("p",null,"\u6982\u5ff5\u5bf9\u5e94\u5173\u7cfb\u5982\u4e0b"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"\u529f\u80fd"),(0,o.kt)("th",{parentName:"tr",align:null},"c#"),(0,o.kt)("th",{parentName:"tr",align:null},"java"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u5b9e\u73b0swagger\u89c4\u8303"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"Swashbuckle.AspNetCore")),(0,o.kt)("td",{parentName:"tr",align:null},"spring-fox")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u5c01\u88c5\u6210nuget\u5305/maven\u5305\u7684UI\u5e93"),(0,o.kt)("td",{parentName:"tr",align:null},"Swashbuckle.AspNetCore.SwaggerUI"),(0,o.kt)("td",{parentName:"tr",align:null},"knife4j-v3-spring-ui")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"UI\u5e93"),(0,o.kt)("td",{parentName:"tr",align:null},"swagger-ui-dist"),(0,o.kt)("td",{parentName:"tr",align:null},"knife4j-vue-v3(swagger v3\u7248\u672c)")))),(0,o.kt)("h4",{id:"\u6ce8\u610f"},"\u6ce8\u610f"),(0,o.kt)("p",null,"swagger v2\u548cv3\u7248\u672c\u4e0d\u4e00\u6837\uff0c\u6211\u53ea\u5b9e\u73b0\u4e86swagger v3\u7248\u672c\u7684\u5c01\u88c5\u3002"),(0,o.kt)("h3",{id:"\u6e90\u7801\u4e0b\u8f7d"},"\u6e90\u7801\u4e0b\u8f7d"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"https://github.com/domaindrivendev/Swashbuckle.AspNetCore"))),(0,o.kt)("h3",{id:"swashbuckleaspnetcoreswaggerui"},"Swashbuckle.AspNetCore.SwaggerUI\u3002"),(0,o.kt)("p",null,"\u901a\u8fc7\u4e2d\u95f4\u4ef6SwaggerUI\u4e2d\u95f4\u4ef6Middleware\uff0cInvoke\u65b9\u6cd5\u4e2d\uff0c\u66ff\u6362\u4e86Index.html\u4e2d\u7684%(DocumentTitle) %(HeadContent),%(ConfigObject)\u7b49\u7b49 \u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'private readonly SwaggerUIOptions _options;\n//xxx\n \npublic async Task Invoke(HttpContext httpContext)\n{ \n//xxx\n if (httpMethod == "GET" && Regex.IsMatch(path, $"^/{Regex.Escape(_options.RoutePrefix)}/?index.html$"))\n {\n await RespondWithIndexHtml(httpContext.Response);\n return;\n }\n//xxx\n }\n\nprivate async Task RespondWithIndexHtml(HttpResponse response)\n{\n response.StatusCode = 200;\n response.ContentType = "text/html;charset=utf-8";\n\n using (var stream = _options.IndexStream())\n {\n // Inject arguments before writing to response\n var htmlBuilder = new StringBuilder(new StreamReader(stream).ReadToEnd());\n foreach (var entry in GetIndexArguments())\n {\n htmlBuilder.Replace(entry.Key, entry.Value);\n }\n\n await response.WriteAsync(htmlBuilder.ToString(), Encoding.UTF8);\n }\n}\n\nprivate IDictionary GetIndexArguments()\n{\n return new Dictionary()\n {\n { "%(DocumentTitle)", _options.DocumentTitle },\n { "%(HeadContent)", _options.HeadContent },\n { "%(ConfigObject)", JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions) },\n { "%(OAuthConfigObject)", JsonSerializer.Serialize(_options.OAuthConfigObject, _jsonSerializerOptions) }\n };\n}\n')),(0,o.kt)("p",null,"\u5728index.html\u4e2d\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"%(DocumentTitle)\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"var configObject = JSON.parse('%(ConfigObject)');\nvar oauthConfigObject = JSON.parse('%(OAuthConfigObject)');\n")),(0,o.kt)("p",null,"\u5f53\u6211\u4eec\u5199\u7684aspnetcore\u9879\u76ee\u96c6\u6210swagger\u7ec4\u4ef6\u540e\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2aajax\u7684\u5f02\u6b65\u8bf7\u6c42"),(0,o.kt)("h3",{id:"knife4j-v3-spring-ui"},"knife4j-v3-spring-ui"),(0,o.kt)("p",null,"\u6548\u679c(2.X\u7248)\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,o.kt)("p",null,"\u7531\u4e8e\u5b98\u65b9\u4e5f\u6ca1\u6709v3\u7684demo\uff0c\u6211\u4eec\u53ef\u4ee5\u6682\u65f6\u901a\u8fc7v2\u5206\u6790,\u53d1\u73b0\u4ed6\u67093\u4e2a\u5f02\u6b65\u8bf7\u6c42\uff0c\u6709\u4e00\u4e2a\u8bf7\u6c42\u8fd4\u56de\u76f8\u4f3c\u7684\u3002\u53e6\u4e00\u4e2a\u5219\u662fswagger\u7684\u914d\u7f6e\u9879\uff0c\u53ef\u4ee5\u53d1\u73b0\uff0c\u8fd4\u56de\u503c\u4e0eSwaggerUIOptions\u4e00\u81f4\u3002"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"\u529f\u80fd"),(0,o.kt)("th",{parentName:"tr",align:null},"c# \uff08swagger v3\uff09"),(0,o.kt)("th",{parentName:"tr",align:null},"java\uff08swagger v2)"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u5206\u7ec4\u914d\u7f6e"),(0,o.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,o.kt)("td",{parentName:"tr",align:null},"/swagger-resources")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"swagger\u914d\u7f6e\u9879"),(0,o.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,o.kt)("td",{parentName:"tr",align:null},"/swagger-resources/configuration/ui")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"api\u6587\u6863"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://api.igeekfan.cn/swagger/v1/swagger.json",target:"_blank",rel:"noopener"},"https://api.igeekfan.cn/swagger/v1/swagger.json")),(0,o.kt)("td",{parentName:"tr",align:null},"/v2/api-docs?group=2.X\u7248\u672c")))),(0,o.kt)("h3",{id:"\u7ed3\u6784\u5982\u4e0b"},"\u7ed3\u6784\u5982\u4e0b\u3002"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u7248\u672c\u5206\u7ec4\u914d\u7f6e"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/swagger-resources",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/swagger-resources"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'[\n {\n "name":"2.X\u7248\u672c",\n "url":"/v2/api-docs?group=2.X\u7248\u672c",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=2.X\u7248\u672c"\n },\n {\n "name":"\u5206\u7ec4\u63a5\u53e3",\n "url":"/v2/api-docs?group=\u5206\u7ec4\u63a5\u53e3",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=\u5206\u7ec4\u63a5\u53e3"\n },\n {\n "name":"\u9ed8\u8ba4\u63a5\u53e3",\n "url":"/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3"\n }\n]\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger \u914d\u7f6e\u9879"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/swagger-resources/configuration/ui",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/swagger-resources/configuration/ui"),"\n\u8bf7\u6c42\u65b9\u6cd5: GET")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "deepLinking":true,\n "displayOperationId":false,\n "defaultModelsExpandDepth":1,\n "defaultModelExpandDepth":1,\n "defaultModelRendering":"example",\n "displayRequestDuration":false,\n "docExpansion":"none",\n "filter":false,\n "operationsSorter":"alpha",\n "showExtensions":false,\n "tagsSorter":"alpha",\n "validatorUrl":"",\n "apisSorter":"alpha",\n "jsonEditor":false,\n "showRequestHeaders":false,\n "supportedSubmitMethods":[\n "get",\n "put",\n "post",\n "delete",\n "options",\n "head",\n "patch",\n "trace"\n ]\n}\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"api \u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/v2/api-docs?group=2.X%E7%89%88%E6%9C%AC",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/v2/api-docs?group=2.X%E7%89%88%E6%9C%AC"))),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fb78c14195aa594d23f4a.jpg",alt:null})),(0,o.kt)("p",null,"\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u4e0bknife4j,\u53ef\u4ee5\u770b\u5230\uff0c\u4ed6\u6709knife4j-vue-v3\u9879\u76ee\uff0c\u8fd9\u4e2a\u662fswagger v3\u7248\u672c\u7684vue\u5b9e\u73b0\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u6253\u5f00knife4j-vue-v3\u9879\u76ee\uff0c\u4fee\u6539\u914d\u7f6e\u9879vue.config.js,devServer \u53cd\u5411\u4ee3\u7406\u7684\u5730\u5740(\u540e\u53f0\u5730\u5740)"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"proxy: {\n \"/\": {\n target: 'http://localhost:5000/',\n ws: true,\n changeOrigin: true\n }\n}\n")),(0,o.kt)("p",null,"\u5b89\u88c5\u4f9d\u8d56\uff0c\u5e76\u8fd0\u884c\u4ed6"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"yarn install\nyarn serve\n")),(0,o.kt)("p",null,"\u6211\u4eec\u4f1a\u770b\u5230\u4e00\u4e2a\u8bf7\u6c42\u9519\u8bef\u3002Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38\uff0c\u56e0\u4e3a\u540e\u53f0\u5e76\u6ca1\u6709\uff1a'/v3/api-docs/swagger-config'\u3002"),(0,o.kt)("p",null,"\u4e5f\u5c31\u662f\u4e0a\u6587\u4e2d\u7684/swagger-resources/configuration/ui\uff0c\u6211\u4eec\u53ef\u4ee5\u5728SwaggerUIMiddleware\u4e2d\u95f4\u4ef6\u83b7\u53d6\u8fd9\u4e9b\u53c2\u6570\uff0c\u539f\u672c\u662f\u901a\u8fc7\u66ff\u6362\u5b57\u7b26\u4e32\uff0c\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u5199\u4e00\u4e2aapi\u3002\u600e\u4e48\u5199\u5462\u3002"),(0,o.kt)("p",null,"\u4e0b\u8f7dSwashbuckle.AspNetCore\u7684\u6e90\u7801\uff0c\u6253\u5f00Swashbuckle.AspNetCore.sln\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u5c1d\u8bd5\u4fee\u6539Swashbuckle.AspNetCore.SwaggerUI\u9879\u76ee\u4e2d,SwaggerUIMiddleware\u4e2d\u7684\u6e90\u7801\u3002"),(0,o.kt)("p",null,"Invoke\u65b9\u6cd5\u589e\u52a0\u5982\u4e0b\u5904\u7406\uff0c\u5c06\u914d\u7f6e\u9879\u76f4\u63a5\u8fd4\u56dejson\u4e32\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'if (httpMethod == "GET" && Regex.IsMatch(path, $"^/v3/api-docs/swagger-config$"))\n{\n await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));\n return;\n}\n\n')),(0,o.kt)("p",null,"\u5728swagger v3 \u7248\u672c\u4e2d,",(0,o.kt)("strong",{parentName:"p"},"/v3/api-docs/swagger-config"),",\u8fd4\u56de\u4e86\u5206\u7ec4\u4fe1\u606f,urls\u5b57\u6bb5\u3002\n",(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2feaf014195aa594e1a5cf.jpg",alt:"image"})),(0,o.kt)("p",null,"\u6548\u679c\u5982\u4e0b"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2feb1714195aa594e1af42.jpg",alt:"image"})),(0,o.kt)("p",null,"\u8bbe\u7f6etest/WebSites/Basic\u9879\u76ee\u4e3a\u542f\u52a8\u9879\u76ee\uff0c\u8fd0\u884c\u540e,\u6253\u5f00\u4e86http://localhost:5000/index.html\uff0c\u8fd9\u4e2a\u8fd8\u662f\u539f\u672c\u7684swagger ui\uff0c\u6211\u4eec\u6253\u5f00http://localhost:8080/#/home\uff0c\u524d\u53f0\u4f9d\u65e7\u63d0\u793a\u6709\u95ee\u9898\u3002"),(0,o.kt)("p",null,"AddSwaggerGen \u9700\u8981\u589e\u52a0Server\uff0c\u524d\u53f0\u5224\u65ad\u6709BUG\uff0c\u975e\u7a7a\u3002"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fc1cd14195aa594d5dabc.jpg",alt:"image"})),(0,o.kt)("p",null,"servers.length\u5f97\u5230\u7684\u662f0\uff0c\u95ee\u53f7\u8868\u8fbe\u5f0f\u5c31\u4f1a\u6267\u884c\u540e\u9762\u7684servers","[0]",".url\uff0c"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fc22214195aa594d5f883.jpg",alt:null})),(0,o.kt)("p",null,"\u4e34\u65f6\u65b9\u6848"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'services.AddSwaggerGen(c =>\n{\n\n c.AddServer(new OpenApiServer()\n {\n Url = "",\n Description = "v1"\n });\n});\n')),(0,o.kt)("p",null,"\u4f46\u8fd8\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u524d\u53f0\u6839\u636eoperationId\u751f\u6210\u7684\u8def\u7531\uff0c ",'[HttpPost(Name = "CreateProduct")]',"\u6bd4\u5982CreateProduct\u3002\u6709\u4e9b\u6ca1\u6709\u8bbe\u7f6e Name\u7684\uff0c\u70b9\u51fb\u540e\u5c31\u4f1a\u51fa\u73b0\u7a7a\u767d\u754c\u9762\u3002"),(0,o.kt)("p",null,"\u589e\u52a0CustomOperationIds\u7684\u914d\u7f6e\uff0c\u901a\u8fc7\u53cd\u5c04\u83b7\u53d6\u65b9\u6cd5\u540d\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"services.AddSwaggerGen(c =>\n{\n //xx\n c.CustomOperationIds(apiDesc =>\n {\n return apiDesc.TryGetMethodInfo(out MethodInfo methodInfo) ? methodInfo.Name : null;\n });\n});\n")),(0,o.kt)("p",null,"\u89e3\u51b3\u4e86\u8fd9\u4e9b\u95ee\u9898\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u65b0\u7c7b\u5e93\uff0c\u8d77\u540d",(0,o.kt)("strong",{parentName:"p"},"IGeekFan.AspNetCore.Knife4jUI")),(0,o.kt)("p",null,"\u5c06\u524d\u7aef\u6253\u5305\u3002\u4fee\u6539\u6253\u5305\u6587\u4ef6\u914d\u7f6e\uff0cvue.config.js"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'assetsDir: "knife4j",\nindexPath: "index.html"\n')),(0,o.kt)("p",null,"\u6253\u5305"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"yarn run build\n")),(0,o.kt)("p",null,"\u590d\u5236\u5230\u6839\u76ee\u5f55\uff0c\u8bbe\u7f6e\u4e3a\u5d4c\u5165\u6587\u4ef6\uff0c\u5220\u9664\u4e0d\u9700\u8981\u7684images\u548ctxt\u6587\u672c\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'\n \n \n \n\n')),(0,o.kt)("p",null,"\u5c06\u540e\u53f0Swashbuckle.AspNetCore.SwaggerUI\u7684\u4ee3\u7801\u590d\u5236\u8fc7\u6765\uff0c\u5168\u90e8\u91cd\u547d\u540d\u3002\u6bd4\u5982\u4e2d\u95f4\u4ef6\u540d\u5b57\u4e3a"),(0,o.kt)("p",null,"SwaggerUIMiddleware -> Knife4jUIMiddleware\u3002\u5373SwaggerUI\u90fd\u6539\u6210Knife4jUI\u3002"),(0,o.kt)("p",null,"Knife4jUIMiddleware\u4fee\u6539\u4f4d\u7f6e"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'private const string EmbeddedFileNamespace = "IGeekFan.AspNetCore.Knife4jUI";\n')),(0,o.kt)("p",null,"\u5220\u9664\u65e0\u7528\u7684\u66ff\u6362\u53d8\u91cf\uff0c\u589e\u52a0"),(0,o.kt)("p",null,"Knife4UIOptions \u4fee\u6539"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'public Func IndexStream { get; set; } = () => typeof(Knife4UIOptions).GetTypeInfo().Assembly\n .GetManifestResourceStream("IGeekFan.AspNetCore.Knife4jUI.index.html");\n')),(0,o.kt)("h3",{id:"startup-\u4e2d\u7684configure\u4e2d\u95f4\u4ef6"},"Startup \u4e2d\u7684Configure\u4e2d\u95f4\u4ef6"),(0,o.kt)("p",null,"\u5c06UseSwaggerUI()\u6539\u6210UseKnife4UI()"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseKnife4UI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");\n c.SwaggerEndpoint("/gp/api-docs", "\u767b\u5f55\u6a21\u5757");\n});\n')),(0,o.kt)("h3",{id:"\u4e0d\u7528igeekfanaspnetcoreknife4jui\u4e5f\u80fd\u5b9e\u73b0"},"\u4e0d\u7528IGeekFan.AspNetCore.Knife4jUI\u4e5f\u80fd\u5b9e\u73b0\uff1f"),(0,o.kt)("p",null,"\u5f53\u7136\uff0c\u53ef\u4ee5\u3002\u53ef\u4ee5\u770b\u8fd9\u4e2ademo",(0,o.kt)("a",{parentName:"p",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo")),(0,o.kt)("p",null,"\u6211\u4eec\u4e5f\u80fd\u901a\u8fc7\u5176\u4ed6\u65b9\u5f0f\uff0c\u5728SwaggerUI\u7684\u57fa\u7840\u4e0a\uff0c\u66ff\u6362\u6bd4\u5982\u66ff\u6362Index.html\u9875\u9762\uff0c\u81ea\u5df1\u6253\u5305\u524d\u7aefUI\uff0c\u590d\u5236\u5230\u9879\u76ee\u4e2d\u7b49\u3002"),(0,o.kt)("p",null,"\u5c06knife4j-vue-v3\u9879\u76ee\u6253\u5305\uff0c\u653e\u5230wwwwroot\u76ee\u5f55\u4e2d\u3002"),(0,o.kt)("p",null,"\u9700\u8981\u914d\u7f6e\u9759\u6001\u6587\u4ef6\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," app.UseStaticFiles();\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseSwaggerUI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");//\u8fd9\u4e2a\u914d\u7f6e\u65e0\u6548\u3002\n c.IndexStream = () => new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")).GetFileInfo("index.html").CreateReadStream();\n});\n')),(0,o.kt)("p",null,"\u91cd\u5199/v3/api-docs/swagger-config\u8def\u7531"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseEndpoints(endpoints =>\n{\n endpoints.MapControllers();\n endpoints.MapSwagger("{documentName}/api-docs");\n endpoints.MapGet("/v3/api-docs/swagger-config", async (httpContext) =>\n {\n\n JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions();\n _jsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;\n _jsonSerializerOptions.IgnoreNullValues = true;\n _jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false));\n\n SwaggerUIOptions _options = new SwaggerUIOptions()\n {\n ConfigObject = new ConfigObject()\n {\n Urls = new List\n {\n new UrlDescriptor()\n {\n Url="/v1/api-docs",\n Name="V1 Docs"\n }\n }\n }\n };\n\n await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));\n });\n});\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/05dc8e8d.f8cc0f15.js b/knife4j-doc/gitee/assets/js/05dc8e8d.f8cc0f15.js new file mode 100644 index 000000000..42b24b67d --- /dev/null +++ b/knife4j-doc/gitee/assets/js/05dc8e8d.f8cc0f15.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[139],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>k});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),s=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(p.Provider,{value:n},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=s(t),d=a,k=c["".concat(p,".").concat(d)]||c[d]||g[d]||o;return t?r.createElement(k,i(i({ref:n},u),{},{components:t})):r.createElement(k,i({ref:n},u))}));function k(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=d;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>k,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(87462),a=t(63366),o=(t(67294),t(3905)),i=["components"],l={},p="5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",s={unversionedId:"action/dotnetcore-knife4j-how",id:"action/dotnetcore-knife4j-how",title:"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",description:"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002",source:"@site/docs/action/dotnetcore-knife4j-how.md",sourceDirName:"action",slug:"/action/dotnetcore-knife4j-how",permalink:"/docs/action/dotnetcore-knife4j-how",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1606020212,formattedLastUpdatedAt:"2020\u5e7411\u670822\u65e5",frontMatter:{},sidebar:"action",previous:{title:"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI",permalink:"/docs/action/aggregation-docker"},next:{title:"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",permalink:"/docs/action/dotnetcore-knife4j-guid"}},u={},c=[{value:"\u6ce8\u610f",id:"\u6ce8\u610f",level:4},{value:"\u6e90\u7801\u4e0b\u8f7d",id:"\u6e90\u7801\u4e0b\u8f7d",level:3},{value:"Swashbuckle.AspNetCore.SwaggerUI\u3002",id:"swashbuckleaspnetcoreswaggerui",level:3},{value:"knife4j-v3-spring-ui",id:"knife4j-v3-spring-ui",level:3},{value:"\u7ed3\u6784\u5982\u4e0b\u3002",id:"\u7ed3\u6784\u5982\u4e0b",level:3},{value:"Startup \u4e2d\u7684Configure\u4e2d\u95f4\u4ef6",id:"startup-\u4e2d\u7684configure\u4e2d\u95f4\u4ef6",level:3},{value:"\u4e0d\u7528IGeekFan.AspNetCore.Knife4jUI\u4e5f\u80fd\u5b9e\u73b0\uff1f",id:"\u4e0d\u7528igeekfanaspnetcoreknife4jui\u4e5f\u80fd\u5b9e\u73b0",level:3}],g={toc:c},d="wrapper";function k(e){var n=e.components,t=(0,a.Z)(e,i);return(0,o.kt)(d,(0,r.Z)({},g,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"51-knife4jnet-core\u5c01\u88c5\u8fc7\u7a0b"},"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b"),(0,o.kt)("p",null,"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},(0,o.kt)("a",{parentName:"strong",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j UI"))," \uff0c\u5b9e\u73b0swagger\u7684\u89c4\u8303\uff0c\u672c\u6587\u4ecb\u7ecd\u5982\u4f55\u5c06\u4ed6\u96c6\u6210\u5230.NET Core\u4e2d\u3002"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"GitHub \u5f00\u6e90\u5730\u5740 ",(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI"))),(0,o.kt)("p",null,"\u6982\u5ff5\u5bf9\u5e94\u5173\u7cfb\u5982\u4e0b"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"\u529f\u80fd"),(0,o.kt)("th",{parentName:"tr",align:null},"c#"),(0,o.kt)("th",{parentName:"tr",align:null},"java"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u5b9e\u73b0swagger\u89c4\u8303"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"Swashbuckle.AspNetCore")),(0,o.kt)("td",{parentName:"tr",align:null},"spring-fox")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u5c01\u88c5\u6210nuget\u5305/maven\u5305\u7684UI\u5e93"),(0,o.kt)("td",{parentName:"tr",align:null},"Swashbuckle.AspNetCore.SwaggerUI"),(0,o.kt)("td",{parentName:"tr",align:null},"knife4j-v3-spring-ui")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"UI\u5e93"),(0,o.kt)("td",{parentName:"tr",align:null},"swagger-ui-dist"),(0,o.kt)("td",{parentName:"tr",align:null},"knife4j-vue-v3(swagger v3\u7248\u672c)")))),(0,o.kt)("h4",{id:"\u6ce8\u610f"},"\u6ce8\u610f"),(0,o.kt)("p",null,"swagger v2\u548cv3\u7248\u672c\u4e0d\u4e00\u6837\uff0c\u6211\u53ea\u5b9e\u73b0\u4e86swagger v3\u7248\u672c\u7684\u5c01\u88c5\u3002"),(0,o.kt)("h3",{id:"\u6e90\u7801\u4e0b\u8f7d"},"\u6e90\u7801\u4e0b\u8f7d"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"https://github.com/domaindrivendev/Swashbuckle.AspNetCore"))),(0,o.kt)("h3",{id:"swashbuckleaspnetcoreswaggerui"},"Swashbuckle.AspNetCore.SwaggerUI\u3002"),(0,o.kt)("p",null,"\u901a\u8fc7\u4e2d\u95f4\u4ef6SwaggerUI\u4e2d\u95f4\u4ef6Middleware\uff0cInvoke\u65b9\u6cd5\u4e2d\uff0c\u66ff\u6362\u4e86Index.html\u4e2d\u7684%(DocumentTitle) %(HeadContent),%(ConfigObject)\u7b49\u7b49 \u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'private readonly SwaggerUIOptions _options;\n//xxx\n \npublic async Task Invoke(HttpContext httpContext)\n{ \n//xxx\n if (httpMethod == "GET" && Regex.IsMatch(path, $"^/{Regex.Escape(_options.RoutePrefix)}/?index.html$"))\n {\n await RespondWithIndexHtml(httpContext.Response);\n return;\n }\n//xxx\n }\n\nprivate async Task RespondWithIndexHtml(HttpResponse response)\n{\n response.StatusCode = 200;\n response.ContentType = "text/html;charset=utf-8";\n\n using (var stream = _options.IndexStream())\n {\n // Inject arguments before writing to response\n var htmlBuilder = new StringBuilder(new StreamReader(stream).ReadToEnd());\n foreach (var entry in GetIndexArguments())\n {\n htmlBuilder.Replace(entry.Key, entry.Value);\n }\n\n await response.WriteAsync(htmlBuilder.ToString(), Encoding.UTF8);\n }\n}\n\nprivate IDictionary GetIndexArguments()\n{\n return new Dictionary()\n {\n { "%(DocumentTitle)", _options.DocumentTitle },\n { "%(HeadContent)", _options.HeadContent },\n { "%(ConfigObject)", JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions) },\n { "%(OAuthConfigObject)", JsonSerializer.Serialize(_options.OAuthConfigObject, _jsonSerializerOptions) }\n };\n}\n')),(0,o.kt)("p",null,"\u5728index.html\u4e2d\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"%(DocumentTitle)\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"var configObject = JSON.parse('%(ConfigObject)');\nvar oauthConfigObject = JSON.parse('%(OAuthConfigObject)');\n")),(0,o.kt)("p",null,"\u5f53\u6211\u4eec\u5199\u7684aspnetcore\u9879\u76ee\u96c6\u6210swagger\u7ec4\u4ef6\u540e\uff0c\u53ea\u4f1a\u6709\u4e00\u4e2aajax\u7684\u5f02\u6b65\u8bf7\u6c42"),(0,o.kt)("h3",{id:"knife4j-v3-spring-ui"},"knife4j-v3-spring-ui"),(0,o.kt)("p",null,"\u6548\u679c(2.X\u7248)\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,o.kt)("p",null,"\u7531\u4e8e\u5b98\u65b9\u4e5f\u6ca1\u6709v3\u7684demo\uff0c\u6211\u4eec\u53ef\u4ee5\u6682\u65f6\u901a\u8fc7v2\u5206\u6790,\u53d1\u73b0\u4ed6\u67093\u4e2a\u5f02\u6b65\u8bf7\u6c42\uff0c\u6709\u4e00\u4e2a\u8bf7\u6c42\u8fd4\u56de\u76f8\u4f3c\u7684\u3002\u53e6\u4e00\u4e2a\u5219\u662fswagger\u7684\u914d\u7f6e\u9879\uff0c\u53ef\u4ee5\u53d1\u73b0\uff0c\u8fd4\u56de\u503c\u4e0eSwaggerUIOptions\u4e00\u81f4\u3002"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"\u529f\u80fd"),(0,o.kt)("th",{parentName:"tr",align:null},"c# \uff08swagger v3\uff09"),(0,o.kt)("th",{parentName:"tr",align:null},"java\uff08swagger v2)"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u5206\u7ec4\u914d\u7f6e"),(0,o.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,o.kt)("td",{parentName:"tr",align:null},"/swagger-resources")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"swagger\u914d\u7f6e\u9879"),(0,o.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,o.kt)("td",{parentName:"tr",align:null},"/swagger-resources/configuration/ui")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"api\u6587\u6863"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"https://api.igeekfan.cn/swagger/v1/swagger.json",target:"_blank",rel:"noopener"},"https://api.igeekfan.cn/swagger/v1/swagger.json")),(0,o.kt)("td",{parentName:"tr",align:null},"/v2/api-docs?group=2.X\u7248\u672c")))),(0,o.kt)("h3",{id:"\u7ed3\u6784\u5982\u4e0b"},"\u7ed3\u6784\u5982\u4e0b\u3002"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u7248\u672c\u5206\u7ec4\u914d\u7f6e"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/swagger-resources",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/swagger-resources"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'[\n {\n "name":"2.X\u7248\u672c",\n "url":"/v2/api-docs?group=2.X\u7248\u672c",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=2.X\u7248\u672c"\n },\n {\n "name":"\u5206\u7ec4\u63a5\u53e3",\n "url":"/v2/api-docs?group=\u5206\u7ec4\u63a5\u53e3",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=\u5206\u7ec4\u63a5\u53e3"\n },\n {\n "name":"\u9ed8\u8ba4\u63a5\u53e3",\n "url":"/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3",\n "swaggerVersion":"2.0",\n "location":"/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3"\n }\n]\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger \u914d\u7f6e\u9879"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/swagger-resources/configuration/ui",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/swagger-resources/configuration/ui"),"\n\u8bf7\u6c42\u65b9\u6cd5: GET")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "deepLinking":true,\n "displayOperationId":false,\n "defaultModelsExpandDepth":1,\n "defaultModelExpandDepth":1,\n "defaultModelRendering":"example",\n "displayRequestDuration":false,\n "docExpansion":"none",\n "filter":false,\n "operationsSorter":"alpha",\n "showExtensions":false,\n "tagsSorter":"alpha",\n "validatorUrl":"",\n "apisSorter":"alpha",\n "jsonEditor":false,\n "showRequestHeaders":false,\n "supportedSubmitMethods":[\n "get",\n "put",\n "post",\n "delete",\n "options",\n "head",\n "patch",\n "trace"\n ]\n}\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"api \u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"http://knife4j.xiaominfo.com/v2/api-docs?group=2.X%E7%89%88%E6%9C%AC",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/v2/api-docs?group=2.X%E7%89%88%E6%9C%AC"))),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fb78c14195aa594d23f4a.jpg",alt:null})),(0,o.kt)("p",null,"\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u4e0bknife4j,\u53ef\u4ee5\u770b\u5230\uff0c\u4ed6\u6709knife4j-vue-v3\u9879\u76ee\uff0c\u8fd9\u4e2a\u662fswagger v3\u7248\u672c\u7684vue\u5b9e\u73b0\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u6253\u5f00knife4j-vue-v3\u9879\u76ee\uff0c\u4fee\u6539\u914d\u7f6e\u9879vue.config.js,devServer \u53cd\u5411\u4ee3\u7406\u7684\u5730\u5740(\u540e\u53f0\u5730\u5740)"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"proxy: {\n \"/\": {\n target: 'http://localhost:5000/',\n ws: true,\n changeOrigin: true\n }\n}\n")),(0,o.kt)("p",null,"\u5b89\u88c5\u4f9d\u8d56\uff0c\u5e76\u8fd0\u884c\u4ed6"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"yarn install\nyarn serve\n")),(0,o.kt)("p",null,"\u6211\u4eec\u4f1a\u770b\u5230\u4e00\u4e2a\u8bf7\u6c42\u9519\u8bef\u3002Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38\uff0c\u56e0\u4e3a\u540e\u53f0\u5e76\u6ca1\u6709\uff1a'/v3/api-docs/swagger-config'\u3002"),(0,o.kt)("p",null,"\u4e5f\u5c31\u662f\u4e0a\u6587\u4e2d\u7684/swagger-resources/configuration/ui\uff0c\u6211\u4eec\u53ef\u4ee5\u5728SwaggerUIMiddleware\u4e2d\u95f4\u4ef6\u83b7\u53d6\u8fd9\u4e9b\u53c2\u6570\uff0c\u539f\u672c\u662f\u901a\u8fc7\u66ff\u6362\u5b57\u7b26\u4e32\uff0c\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u5199\u4e00\u4e2aapi\u3002\u600e\u4e48\u5199\u5462\u3002"),(0,o.kt)("p",null,"\u4e0b\u8f7dSwashbuckle.AspNetCore\u7684\u6e90\u7801\uff0c\u6253\u5f00Swashbuckle.AspNetCore.sln\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u5c1d\u8bd5\u4fee\u6539Swashbuckle.AspNetCore.SwaggerUI\u9879\u76ee\u4e2d,SwaggerUIMiddleware\u4e2d\u7684\u6e90\u7801\u3002"),(0,o.kt)("p",null,"Invoke\u65b9\u6cd5\u589e\u52a0\u5982\u4e0b\u5904\u7406\uff0c\u5c06\u914d\u7f6e\u9879\u76f4\u63a5\u8fd4\u56dejson\u4e32\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'if (httpMethod == "GET" && Regex.IsMatch(path, $"^/v3/api-docs/swagger-config$"))\n{\n await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));\n return;\n}\n\n')),(0,o.kt)("p",null,"\u5728swagger v3 \u7248\u672c\u4e2d,",(0,o.kt)("strong",{parentName:"p"},"/v3/api-docs/swagger-config"),",\u8fd4\u56de\u4e86\u5206\u7ec4\u4fe1\u606f,urls\u5b57\u6bb5\u3002\n",(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2feaf014195aa594e1a5cf.jpg",alt:"image"})),(0,o.kt)("p",null,"\u6548\u679c\u5982\u4e0b"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2feb1714195aa594e1af42.jpg",alt:"image"})),(0,o.kt)("p",null,"\u8bbe\u7f6etest/WebSites/Basic\u9879\u76ee\u4e3a\u542f\u52a8\u9879\u76ee\uff0c\u8fd0\u884c\u540e,\u6253\u5f00\u4e86http://localhost:5000/index.html\uff0c\u8fd9\u4e2a\u8fd8\u662f\u539f\u672c\u7684swagger ui\uff0c\u6211\u4eec\u6253\u5f00http://localhost:8080/#/home\uff0c\u524d\u53f0\u4f9d\u65e7\u63d0\u793a\u6709\u95ee\u9898\u3002"),(0,o.kt)("p",null,"AddSwaggerGen \u9700\u8981\u589e\u52a0Server\uff0c\u524d\u53f0\u5224\u65ad\u6709BUG\uff0c\u975e\u7a7a\u3002"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fc1cd14195aa594d5dabc.jpg",alt:"image"})),(0,o.kt)("p",null,"servers.length\u5f97\u5230\u7684\u662f0\uff0c\u95ee\u53f7\u8868\u8fbe\u5f0f\u5c31\u4f1a\u6267\u884c\u540e\u9762\u7684servers","[0]",".url\uff0c"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fc22214195aa594d5f883.jpg",alt:null})),(0,o.kt)("p",null,"\u4e34\u65f6\u65b9\u6848"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'services.AddSwaggerGen(c =>\n{\n\n c.AddServer(new OpenApiServer()\n {\n Url = "",\n Description = "v1"\n });\n});\n')),(0,o.kt)("p",null,"\u4f46\u8fd8\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u524d\u53f0\u6839\u636eoperationId\u751f\u6210\u7684\u8def\u7531\uff0c ",'[HttpPost(Name = "CreateProduct")]',"\u6bd4\u5982CreateProduct\u3002\u6709\u4e9b\u6ca1\u6709\u8bbe\u7f6e Name\u7684\uff0c\u70b9\u51fb\u540e\u5c31\u4f1a\u51fa\u73b0\u7a7a\u767d\u754c\u9762\u3002"),(0,o.kt)("p",null,"\u589e\u52a0CustomOperationIds\u7684\u914d\u7f6e\uff0c\u901a\u8fc7\u53cd\u5c04\u83b7\u53d6\u65b9\u6cd5\u540d\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"services.AddSwaggerGen(c =>\n{\n //xx\n c.CustomOperationIds(apiDesc =>\n {\n return apiDesc.TryGetMethodInfo(out MethodInfo methodInfo) ? methodInfo.Name : null;\n });\n});\n")),(0,o.kt)("p",null,"\u89e3\u51b3\u4e86\u8fd9\u4e9b\u95ee\u9898\u3002"),(0,o.kt)("p",null,"\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u65b0\u7c7b\u5e93\uff0c\u8d77\u540d",(0,o.kt)("strong",{parentName:"p"},"IGeekFan.AspNetCore.Knife4jUI")),(0,o.kt)("p",null,"\u5c06\u524d\u7aef\u6253\u5305\u3002\u4fee\u6539\u6253\u5305\u6587\u4ef6\u914d\u7f6e\uff0cvue.config.js"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'assetsDir: "knife4j",\nindexPath: "index.html"\n')),(0,o.kt)("p",null,"\u6253\u5305"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"yarn run build\n")),(0,o.kt)("p",null,"\u590d\u5236\u5230\u6839\u76ee\u5f55\uff0c\u8bbe\u7f6e\u4e3a\u5d4c\u5165\u6587\u4ef6\uff0c\u5220\u9664\u4e0d\u9700\u8981\u7684images\u548ctxt\u6587\u672c\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'\n \n \n \n\n')),(0,o.kt)("p",null,"\u5c06\u540e\u53f0Swashbuckle.AspNetCore.SwaggerUI\u7684\u4ee3\u7801\u590d\u5236\u8fc7\u6765\uff0c\u5168\u90e8\u91cd\u547d\u540d\u3002\u6bd4\u5982\u4e2d\u95f4\u4ef6\u540d\u5b57\u4e3a"),(0,o.kt)("p",null,"SwaggerUIMiddleware -> Knife4jUIMiddleware\u3002\u5373SwaggerUI\u90fd\u6539\u6210Knife4jUI\u3002"),(0,o.kt)("p",null,"Knife4jUIMiddleware\u4fee\u6539\u4f4d\u7f6e"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'private const string EmbeddedFileNamespace = "IGeekFan.AspNetCore.Knife4jUI";\n')),(0,o.kt)("p",null,"\u5220\u9664\u65e0\u7528\u7684\u66ff\u6362\u53d8\u91cf\uff0c\u589e\u52a0"),(0,o.kt)("p",null,"Knife4UIOptions \u4fee\u6539"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'public Func IndexStream { get; set; } = () => typeof(Knife4UIOptions).GetTypeInfo().Assembly\n .GetManifestResourceStream("IGeekFan.AspNetCore.Knife4jUI.index.html");\n')),(0,o.kt)("h3",{id:"startup-\u4e2d\u7684configure\u4e2d\u95f4\u4ef6"},"Startup \u4e2d\u7684Configure\u4e2d\u95f4\u4ef6"),(0,o.kt)("p",null,"\u5c06UseSwaggerUI()\u6539\u6210UseKnife4UI()"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseKnife4UI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");\n c.SwaggerEndpoint("/gp/api-docs", "\u767b\u5f55\u6a21\u5757");\n});\n')),(0,o.kt)("h3",{id:"\u4e0d\u7528igeekfanaspnetcoreknife4jui\u4e5f\u80fd\u5b9e\u73b0"},"\u4e0d\u7528IGeekFan.AspNetCore.Knife4jUI\u4e5f\u80fd\u5b9e\u73b0\uff1f"),(0,o.kt)("p",null,"\u5f53\u7136\uff0c\u53ef\u4ee5\u3002\u53ef\u4ee5\u770b\u8fd9\u4e2ademo",(0,o.kt)("a",{parentName:"p",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo")),(0,o.kt)("p",null,"\u6211\u4eec\u4e5f\u80fd\u901a\u8fc7\u5176\u4ed6\u65b9\u5f0f\uff0c\u5728SwaggerUI\u7684\u57fa\u7840\u4e0a\uff0c\u66ff\u6362\u6bd4\u5982\u66ff\u6362Index.html\u9875\u9762\uff0c\u81ea\u5df1\u6253\u5305\u524d\u7aefUI\uff0c\u590d\u5236\u5230\u9879\u76ee\u4e2d\u7b49\u3002"),(0,o.kt)("p",null,"\u5c06knife4j-vue-v3\u9879\u76ee\u6253\u5305\uff0c\u653e\u5230wwwwroot\u76ee\u5f55\u4e2d\u3002"),(0,o.kt)("p",null,"\u9700\u8981\u914d\u7f6e\u9759\u6001\u6587\u4ef6\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," app.UseStaticFiles();\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseSwaggerUI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");//\u8fd9\u4e2a\u914d\u7f6e\u65e0\u6548\u3002\n c.IndexStream = () => new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")).GetFileInfo("index.html").CreateReadStream();\n});\n')),(0,o.kt)("p",null,"\u91cd\u5199/v3/api-docs/swagger-config\u8def\u7531"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseEndpoints(endpoints =>\n{\n endpoints.MapControllers();\n endpoints.MapSwagger("{documentName}/api-docs");\n endpoints.MapGet("/v3/api-docs/swagger-config", async (httpContext) =>\n {\n\n JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions();\n _jsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;\n _jsonSerializerOptions.IgnoreNullValues = true;\n _jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false));\n\n SwaggerUIOptions _options = new SwaggerUIOptions()\n {\n ConfigObject = new ConfigObject()\n {\n Urls = new List\n {\n new UrlDescriptor()\n {\n Url="/v1/api-docs",\n Name="V1 Docs"\n }\n }\n }\n };\n\n await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));\n });\n});\n')))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/06a5b69c.643da133.js b/knife4j-doc/gitee/assets/js/06a5b69c.643da133.js new file mode 100644 index 000000000..1ce5a5217 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/06a5b69c.643da133.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8163],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var a=n(67294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=u(n),k=l,m=c["".concat(o,".").concat(k)]||c[k]||s[k]||i;return n?a.createElement(m,r(r({ref:t},d),{},{components:n})):a.createElement(m,r({ref:t},d))}));function m(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=n.length,r=new Array(i);r[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:l,r[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>m,frontMatter:()=>p,metadata:()=>u,toc:()=>c});var a=n(87462),l=n(63366),i=(n(67294),n(3905)),r=["components"],p={},o="4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",u={unversionedId:"middleware-sources/knife4jCloud",id:"middleware-sources/knife4jCloud",title:"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",description:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",source:"@site/docs/middleware-sources/knife4jCloud.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/knife4jCloud",permalink:"/docs/middleware-sources/knife4jCloud",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},d={},c=[{value:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",id:"411-\u4ea7\u54c1\u4ecb\u7ecd",level:2},{value:"4.1.2 \u529f\u80fd\u4ecb\u7ecd",id:"412-\u529f\u80fd\u4ecb\u7ecd",level:2},{value:"4.1.2.1 \u767b\u5f55",id:"4121-\u767b\u5f55",level:3},{value:"4.1.2.2 \u5de5\u4f5c\u53f0",id:"4122-\u5de5\u4f5c\u53f0",level:3},{value:"4.1.2.3 \u9879\u76ee\u7ba1\u7406",id:"4123-\u9879\u76ee\u7ba1\u7406",level:3},{value:"4.1.2.4 \u670d\u52a1\u7ba1\u7406",id:"4124-\u670d\u52a1\u7ba1\u7406",level:3},{value:"4.1.2.5 \u9884\u89c8\u6587\u6863",id:"4125-\u9884\u89c8\u6587\u6863",level:3},{value:"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"4126-\u4e2a\u4eba\u4e2d\u5fc3",level:3},{value:"4.1.3 \u5f00\u653eAPI",id:"413-\u5f00\u653eapi",level:2},{value:"4.1.3.1 \u6ce8\u518cAPI",id:"4131-\u6ce8\u518capi",level:3},{value:"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c",level:3},{value:"4.1.4 \u4ea7\u54c1\u8bd5\u7528",id:"414-\u4ea7\u54c1\u8bd5\u7528",level:2}],s={toc:c},k="wrapper";function m(e){var t=e.components,p=(0,l.Z)(e,r);return(0,i.kt)(k,(0,a.Z)({},s,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"41-knife4jcloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"},"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"),(0,i.kt)("h2",{id:"411-\u4ea7\u54c1\u4ecb\u7ecd"},"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot 2.2.0.RELEASE"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Mybatis 3.5"),"\u8fdb\u884c\u5f00\u53d1."),(0,i.kt)("p",null,"\u5c06\u76ee\u524d\u5f00\u6e90\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u8fdb\u884c\u6574\u5408,\u901a\u8fc7\u4e91\u5e73\u53f0\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"OpenAPI v2"),"\u7684Swagger\u6587\u6863\u8fdb\u884c\u4e91\u7aef\u805a\u5408,\u5728\u7ebf\u5bf9Swagger\u6587\u6863\u8fdb\u884c\u6e32\u67d3\u548c\u8c03\u8bd5,\u975e\u5e38\u7075\u6d3b\u65b9\u4fbf,\u7279\u522b\u662f\u5728\u5fae\u670d\u52a1\u76db\u884c\u7684\u4eca\u5929,\u5bf9\u4e8e\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u6765\u8bf4,\u662f\u4e00\u6b3e\u975e\u5e38\u8f7b\u5de7\u3001\u65b9\u4fbf\u3001\u7b80\u5355\u3001\u6613\u7528\u7684\u4ea7\u54c1."),(0,i.kt)("p",null,"\u4ea7\u54c1\u7684\u4e3b\u8981\u4f18\u52bf\uff1a"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"1).\u8de8\u8bed\u8a00")),(0,i.kt)("p",null,"\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u90fd\u77e5\u9053,OpenAPI\u662f\u4e00\u5957\u6807\u51c6\u7684\u89c4\u8303,\u5728\u4e0d\u540c\u7684\u8bed\u8a00\u4e2d\u90fd\u6709\u76f8\u5e94\u7684\u5b9e\u73b0\u65b9\u5f0f,\u5305\u62ecJava\u3001Node\u3001Python\u3001.Net\u7b49\u8bed\u8a00,\u4f7f\u7528\u8303\u56f4\u975e\u5e38\u5e7f\u6cdb,\u7279\u522b\u662fJava\u4f53\u7cfb\u4e0bSpring\u7684\u751f\u6001\u975e\u5e38\u5b8c\u5584,Springfox\u7ec4\u4ef6\u63d0\u4f9b\u4e86\u5bf9OpenAPI\u7684\u652f\u6301,\u5c06SpringMVC\u63a5\u53e3\u548cSwagger\u7d27\u5bc6\u7684\u8054\u7cfb\u4e86\u8d77\u6765,\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5"),(0,i.kt)("p",null,"\u4e5f\u6b63\u662f\u56e0\u4e3a\u8fd9\u79cd\u539f\u56e0,Knife4j\u76ee\u524d\u7ecf\u5386\u8fd13\u5e74\u7684\u53d1\u5c55,OpenAPI2.0\u7248\u672c\u5df2\u7ecf\u8d8a\u6765\u8d8a\u6210\u719f,Java\u7684\u5f00\u53d1\u8005\u96c6\u6210Knife4j\u975e\u5e38\u65b9\u4fbf,\u4f46\u662f\u5176\u4ed6\u8bed\u8a00\u76ee\u524d\u60f3\u8981\u4f7f\u7528Knife4j\u90fd\u4f1a\u6709\u4e00\u4e9b\u96be\u5ea6,\u9700\u8981\u66f4\u6539\u76f8\u5173\u7684\u4ee3\u7801\u624d\u80fd\u505a\u5230\u96c6\u6210,\u4f7f\u7528\u4e0a\u5f88\u9ebb\u70e6"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u4f5c\u4e3a\u72ec\u7acb\u7684\u5e73\u53f0,\u4e0d\u7ba1\u662f\u63d0\u4f9bOpenAPI\u7684\u63a5\u53e3\u8fd8\u662f\u63d0\u4f9bSwagger\u7684JSON,\u90fd\u53ef\u4ee5\u901a\u8fc7\u5728\u5e73\u53f0\u4e0a\u7b80\u5355\u64cd\u4f5c,\u5373\u53ef\u60c5\u51b5\u5c06OpenAPIV2\u7684\u7ed3\u6784\u5728Knife4j\u7684Ui\u4e0a\u5c55\u793a\u51fa\u6765."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"2).\u5fae\u670d\u52a1\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408")),(0,i.kt)("p",null,"\u5728\u76ee\u524d\u7684Knife4j\u6280\u672f\u4ea4\u6d41\u7fa4\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5404\u4e2a\u5f00\u53d1\u8005\u8be2\u95ee\u5982\u4f55\u5728Spring Cloud\u7684\u5fae\u670d\u52a1\u6280\u672f\u67b6\u6784\u4e0b\u805a\u5408Swagger\u6587\u6863,\u6709\u7684\u4eba\u805a\u5408\u6210\u529f\u4e86,\u6709\u7684\u4eba\u805a\u5408\u5931\u8d25\u4e86"),(0,i.kt)("p",null,"\u7a76\u5176\u539f\u56e0,Spring Cloud\u6280\u672f\u67b6\u6784\u53d1\u5c55\u76f8\u5f53\u8fc5\u901f,\u90e8\u5206\u5f00\u53d1\u4eba\u5458\u65e0\u6687\u53bb\u901a\u8fc7\u8c03\u8bd5\u5e95\u5c42\u4ee3\u7801\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u78b0\u5230\u7684\u95ee\u9898,\u7279\u522b\u662fSwagger\u6587\u6863\u7684\u805a\u5408\u4e00\u822c\u90fd\u662f\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027\u8fdb\u884c\u805a\u5408,\u800c\u5fae\u670d\u52a1\u67b6\u6784\u7684\u7f51\u5173\u4ece",(0,i.kt)("inlineCode",{parentName:"p"},"Zuul"),"\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u7684\u8fed\u4ee3,\u90fd\u662f\u53d1\u5c55\u60ca\u4eba\u7684,\u65b0\u7248\u672c\u7684\u8fed\u4ee3\u5fc5\u7136\u4f1a\u78b0\u5230\u7248\u672c\u517c\u5bb9\u7684\u95ee\u9898,\u7f51\u5173\u7684\u8fed\u4ee3,\u6bcf\u4e00\u6b21\u7684\u8fed\u4ee3\u65b0\u589e\u4e86\u90a3\u4e9b\u7279\u6027,\u5220\u9664\u4e86\u90a3\u4e9b\u7279\u6027,\u5927\u90e8\u5206\u60c5\u51b5\u4e0b,\u6211\u4eec\u662f\u4e0d\u4f1a\u53bb\u770b\u8fed\u4ee3\u65e5\u5fd7\u7684.\u5347\u7ea7\u5c31\u5b8c\u4e8b\u4e86.\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6709\u4eba\u6210\u529f,\u6709\u4eba\u5931\u8d25"),(0,i.kt)("p",null,"\u90a3\u4e48,\u901a\u8fc7\u73b0\u8c61\u770b\u672c\u8d28,\u6211\u4eec\u78b0\u5230\u7684\u95ee\u9898\u5230\u5e95\u662f\u4ec0\u4e48?"),(0,i.kt)("p",null,"1\u3001\u7f51\u5173\u7248\u672c\u5347\u7ea7,\u5bfc\u81f4\u8bf7\u6c42Swagger\u63a5\u53e3\u5931\u8d25,\u6216\u8005\u4e22\u5931\u67d0\u4e2a\u5c5e\u6027"),(0,i.kt)("p",null,"2\u3001\u7f51\u5173\u914d\u7f6e\u4e0d\u6b63\u786e,\u8c03\u8bd5\u8f6c\u53d1\u5931\u8d25"),(0,i.kt)("p",null,"3\u3001\u7b49\u7b49..."),(0,i.kt)("p",null,"\u6211\u4eec\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b,\u5f15\u5165Swagger\u6587\u6863\u5982\u6b64\u7b80\u5355,\u4e3a\u4ec0\u4e48\u5728Spring Cloud\u7684\u4f53\u73b0\u8fd9\u4e48\u9ebb\u70e6?\u805a\u5408\u4ee3\u7801\u5199\u4e86\u4e00\u5927\u5806,\u8fd8\u8981\u8c03\u8bd5\u4e3a\u4f55\u5931\u8d25,\u4e0d\u540c\u7684\u7248\u672c\u6709\u4e0d\u540c\u7684\u8981\u6c42.\u7b49\u7b49"),(0,i.kt)("p",null,"\u90a3\u4e48,Knife4jCloud\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u5462?"),(0,i.kt)("p",null,"1\u3001Knife4jCloud\u628aSwagger\u7684\u7279\u6027\u5168\u90e8\u62bd\u8c61\u51fa\u6765,\u5168\u90e8\u653e\u5728\u5e73\u53f0\u91cc\u6765\u505a,\u4ed6\u5145\u5f53\u7684\u4e5f\u662f\u4e00\u4e2a\u7f51\u5173\u7684\u89d2\u8272,\u4f46\u662f\u662f\u81ea\u5df1\u6269\u5c55\u5b9e\u73b0\u7684,\u6269\u5c55\u7684\u76ee\u7684\u53ea\u6709\u4e00\u4e2a,\u5c31\u662f\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u8c03\u8bd5"),(0,i.kt)("p",null,"2\u3001Knife4jCloud\u4e2d\u4f1a\u628a\u6bcf\u4e00\u4e2aSwagger\u6587\u6863\u4f5c\u4e3a\u4e00\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff0c\u5fae\u670d\u52a1\u7684IP\u3001\u7aef\u53e3\u3001Swagger-JSONNeri\u90fd\u4f1a\u4fdd\u5b58\u5728\u5e73\u53f0\u4e2d"),(0,i.kt)("p",null,"\u8fd9\u6837\u5728\u5e73\u53f0\u4e2d,\u5bf9\u4e8eSwagger\u6587\u6863\u53ef\u4ee5\u8fdb\u884c\u4efb\u610f\u805a\u5408,\u548c\u5fae\u670d\u52a1\u5f7b\u5e95\u62dc\u62dc\u4e86~~"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"3).\u4e2a\u6027\u5316\u914d\u7f6e")),(0,i.kt)("p",null,"Knife4jCloud\u4ea7\u54c1\u672c\u8eab\u662f\u62e5\u6709\u7528\u6237\u7684\u89d2\u8272\u7684,\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06\u5e73\u53f0\u90e8\u7f72\u5728\u548c\u5b9e\u9645\u540c\u4e00\u4e2a\u7f51\u7edc\u73af\u5883\u4e2d,\u5bf9\u5916\u7684Swagger\u6587\u6863\u53ef\u4ee5\u901a\u8fc7Knife4jCloud\u505a\u5230\u7f51\u7edc\u9694\u79bb"),(0,i.kt)("p",null,"\u5bf9\u4e8e\u6bcf\u4e00\u4efdSwagger\u6587\u6863\u9875\u53ef\u4ee5\u505a\u5230\u662f\u5426\u767b\u5f55\u540e\u53ef\u770b,\u6587\u6863\u662f\u5426\u53ef\u4ee5\u8c03\u8bd5\u7b49\u7b49\u4e2a\u6027\u5316\u7684\u914d\u7f6e\u90fd\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u64cd\u4f5c"),(0,i.kt)("h2",{id:"412-\u529f\u80fd\u4ecb\u7ecd"},"4.1.2 \u529f\u80fd\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,i.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,i.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,i.kt)("h3",{id:"4121-\u767b\u5f55"},"4.1.2.1 \u767b\u5f55"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,i.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,i.kt)("h3",{id:"4122-\u5de5\u4f5c\u53f0"},"4.1.2.2 \u5de5\u4f5c\u53f0"),(0,i.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,i.kt)("h3",{id:"4123-\u9879\u76ee\u7ba1\u7406"},"4.1.2.3 \u9879\u76ee\u7ba1\u7406"),(0,i.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,i.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,i.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,i.kt)("h3",{id:"4124-\u670d\u52a1\u7ba1\u7406"},"4.1.2.4 \u670d\u52a1\u7ba1\u7406"),(0,i.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,i.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,i.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,i.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,i.kt)("h3",{id:"4125-\u9884\u89c8\u6587\u6863"},"4.1.2.5 \u9884\u89c8\u6587\u6863"),(0,i.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,i.kt)("h3",{id:"4126-\u4e2a\u4eba\u4e2d\u5fc3"},"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,i.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})),(0,i.kt)("h2",{id:"413-\u5f00\u653eapi"},"4.1.3 \u5f00\u653eAPI"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,i.kt)("h3",{id:"4131-\u6ce8\u518capi"},"4.1.3.1 \u6ce8\u518cAPI"),(0,i.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,i.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"application/json")),(0,i.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"POST")),(0,i.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,i.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,i.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,i.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:"_blank",rel:"noopener"},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,i.kt)("h3",{id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c"},"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"1.Maven\u5f15\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,i.kt)("p",null,"2\u3001\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,i.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")),(0,i.kt)("h2",{id:"414-\u4ea7\u54c1\u8bd5\u7528"},"4.1.4 \u4ea7\u54c1\u8bd5\u7528"),(0,i.kt)("p",null,"\u53ef\u4ee5\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"http://cloud.xiaominfo.com",target:"_blank",rel:"noopener"},"http://cloud.xiaominfo.com"),"\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!"))}m.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/06a5b69c.6bbbe0ef.js b/knife4j-doc/gitee/assets/js/06a5b69c.6bbbe0ef.js deleted file mode 100644 index 0fd401e7b..000000000 --- a/knife4j-doc/gitee/assets/js/06a5b69c.6bbbe0ef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8163],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var l=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},s=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),s=u(n),k=a,m=s["".concat(o,".").concat(k)]||s[k]||c[k]||i;return n?l.createElement(m,r(r({ref:t},d),{},{components:n})):l.createElement(m,r({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=s;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,r[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>k,frontMatter:()=>p,metadata:()=>u,toc:()=>c});var l=n(87462),a=n(63366),i=(n(67294),n(3905)),r=["components"],p={},o="4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",u={unversionedId:"middleware-sources/knife4jCloud",id:"middleware-sources/knife4jCloud",title:"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",description:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",source:"@site/docs/middleware-sources/knife4jCloud.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/knife4jCloud",permalink:"/docs/middleware-sources/knife4jCloud",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},d={},c=[{value:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",id:"411-\u4ea7\u54c1\u4ecb\u7ecd",level:2},{value:"4.1.2 \u529f\u80fd\u4ecb\u7ecd",id:"412-\u529f\u80fd\u4ecb\u7ecd",level:2},{value:"4.1.2.1 \u767b\u5f55",id:"4121-\u767b\u5f55",level:3},{value:"4.1.2.2 \u5de5\u4f5c\u53f0",id:"4122-\u5de5\u4f5c\u53f0",level:3},{value:"4.1.2.3 \u9879\u76ee\u7ba1\u7406",id:"4123-\u9879\u76ee\u7ba1\u7406",level:3},{value:"4.1.2.4 \u670d\u52a1\u7ba1\u7406",id:"4124-\u670d\u52a1\u7ba1\u7406",level:3},{value:"4.1.2.5 \u9884\u89c8\u6587\u6863",id:"4125-\u9884\u89c8\u6587\u6863",level:3},{value:"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"4126-\u4e2a\u4eba\u4e2d\u5fc3",level:3},{value:"4.1.3 \u5f00\u653eAPI",id:"413-\u5f00\u653eapi",level:2},{value:"4.1.3.1 \u6ce8\u518cAPI",id:"4131-\u6ce8\u518capi",level:3},{value:"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c",level:3},{value:"4.1.4 \u4ea7\u54c1\u8bd5\u7528",id:"414-\u4ea7\u54c1\u8bd5\u7528",level:2}],s={toc:c};function k(e){var t=e.components,p=(0,a.Z)(e,r);return(0,i.kt)("wrapper",(0,l.Z)({},s,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"41-knife4jcloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"},"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"),(0,i.kt)("h2",{id:"411-\u4ea7\u54c1\u4ecb\u7ecd"},"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot 2.2.0.RELEASE"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Mybatis 3.5"),"\u8fdb\u884c\u5f00\u53d1."),(0,i.kt)("p",null,"\u5c06\u76ee\u524d\u5f00\u6e90\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u8fdb\u884c\u6574\u5408,\u901a\u8fc7\u4e91\u5e73\u53f0\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"OpenAPI v2"),"\u7684Swagger\u6587\u6863\u8fdb\u884c\u4e91\u7aef\u805a\u5408,\u5728\u7ebf\u5bf9Swagger\u6587\u6863\u8fdb\u884c\u6e32\u67d3\u548c\u8c03\u8bd5,\u975e\u5e38\u7075\u6d3b\u65b9\u4fbf,\u7279\u522b\u662f\u5728\u5fae\u670d\u52a1\u76db\u884c\u7684\u4eca\u5929,\u5bf9\u4e8e\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u6765\u8bf4,\u662f\u4e00\u6b3e\u975e\u5e38\u8f7b\u5de7\u3001\u65b9\u4fbf\u3001\u7b80\u5355\u3001\u6613\u7528\u7684\u4ea7\u54c1."),(0,i.kt)("p",null,"\u4ea7\u54c1\u7684\u4e3b\u8981\u4f18\u52bf\uff1a"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"1).\u8de8\u8bed\u8a00")),(0,i.kt)("p",null,"\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u90fd\u77e5\u9053,OpenAPI\u662f\u4e00\u5957\u6807\u51c6\u7684\u89c4\u8303,\u5728\u4e0d\u540c\u7684\u8bed\u8a00\u4e2d\u90fd\u6709\u76f8\u5e94\u7684\u5b9e\u73b0\u65b9\u5f0f,\u5305\u62ecJava\u3001Node\u3001Python\u3001.Net\u7b49\u8bed\u8a00,\u4f7f\u7528\u8303\u56f4\u975e\u5e38\u5e7f\u6cdb,\u7279\u522b\u662fJava\u4f53\u7cfb\u4e0bSpring\u7684\u751f\u6001\u975e\u5e38\u5b8c\u5584,Springfox\u7ec4\u4ef6\u63d0\u4f9b\u4e86\u5bf9OpenAPI\u7684\u652f\u6301,\u5c06SpringMVC\u63a5\u53e3\u548cSwagger\u7d27\u5bc6\u7684\u8054\u7cfb\u4e86\u8d77\u6765,\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5"),(0,i.kt)("p",null,"\u4e5f\u6b63\u662f\u56e0\u4e3a\u8fd9\u79cd\u539f\u56e0,Knife4j\u76ee\u524d\u7ecf\u5386\u8fd13\u5e74\u7684\u53d1\u5c55,OpenAPI2.0\u7248\u672c\u5df2\u7ecf\u8d8a\u6765\u8d8a\u6210\u719f,Java\u7684\u5f00\u53d1\u8005\u96c6\u6210Knife4j\u975e\u5e38\u65b9\u4fbf,\u4f46\u662f\u5176\u4ed6\u8bed\u8a00\u76ee\u524d\u60f3\u8981\u4f7f\u7528Knife4j\u90fd\u4f1a\u6709\u4e00\u4e9b\u96be\u5ea6,\u9700\u8981\u66f4\u6539\u76f8\u5173\u7684\u4ee3\u7801\u624d\u80fd\u505a\u5230\u96c6\u6210,\u4f7f\u7528\u4e0a\u5f88\u9ebb\u70e6"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u4f5c\u4e3a\u72ec\u7acb\u7684\u5e73\u53f0,\u4e0d\u7ba1\u662f\u63d0\u4f9bOpenAPI\u7684\u63a5\u53e3\u8fd8\u662f\u63d0\u4f9bSwagger\u7684JSON,\u90fd\u53ef\u4ee5\u901a\u8fc7\u5728\u5e73\u53f0\u4e0a\u7b80\u5355\u64cd\u4f5c,\u5373\u53ef\u60c5\u51b5\u5c06OpenAPIV2\u7684\u7ed3\u6784\u5728Knife4j\u7684Ui\u4e0a\u5c55\u793a\u51fa\u6765."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"2).\u5fae\u670d\u52a1\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408")),(0,i.kt)("p",null,"\u5728\u76ee\u524d\u7684Knife4j\u6280\u672f\u4ea4\u6d41\u7fa4\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5404\u4e2a\u5f00\u53d1\u8005\u8be2\u95ee\u5982\u4f55\u5728Spring Cloud\u7684\u5fae\u670d\u52a1\u6280\u672f\u67b6\u6784\u4e0b\u805a\u5408Swagger\u6587\u6863,\u6709\u7684\u4eba\u805a\u5408\u6210\u529f\u4e86,\u6709\u7684\u4eba\u805a\u5408\u5931\u8d25\u4e86"),(0,i.kt)("p",null,"\u7a76\u5176\u539f\u56e0,Spring Cloud\u6280\u672f\u67b6\u6784\u53d1\u5c55\u76f8\u5f53\u8fc5\u901f,\u90e8\u5206\u5f00\u53d1\u4eba\u5458\u65e0\u6687\u53bb\u901a\u8fc7\u8c03\u8bd5\u5e95\u5c42\u4ee3\u7801\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u78b0\u5230\u7684\u95ee\u9898,\u7279\u522b\u662fSwagger\u6587\u6863\u7684\u805a\u5408\u4e00\u822c\u90fd\u662f\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027\u8fdb\u884c\u805a\u5408,\u800c\u5fae\u670d\u52a1\u67b6\u6784\u7684\u7f51\u5173\u4ece",(0,i.kt)("inlineCode",{parentName:"p"},"Zuul"),"\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u7684\u8fed\u4ee3,\u90fd\u662f\u53d1\u5c55\u60ca\u4eba\u7684,\u65b0\u7248\u672c\u7684\u8fed\u4ee3\u5fc5\u7136\u4f1a\u78b0\u5230\u7248\u672c\u517c\u5bb9\u7684\u95ee\u9898,\u7f51\u5173\u7684\u8fed\u4ee3,\u6bcf\u4e00\u6b21\u7684\u8fed\u4ee3\u65b0\u589e\u4e86\u90a3\u4e9b\u7279\u6027,\u5220\u9664\u4e86\u90a3\u4e9b\u7279\u6027,\u5927\u90e8\u5206\u60c5\u51b5\u4e0b,\u6211\u4eec\u662f\u4e0d\u4f1a\u53bb\u770b\u8fed\u4ee3\u65e5\u5fd7\u7684.\u5347\u7ea7\u5c31\u5b8c\u4e8b\u4e86.\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6709\u4eba\u6210\u529f,\u6709\u4eba\u5931\u8d25"),(0,i.kt)("p",null,"\u90a3\u4e48,\u901a\u8fc7\u73b0\u8c61\u770b\u672c\u8d28,\u6211\u4eec\u78b0\u5230\u7684\u95ee\u9898\u5230\u5e95\u662f\u4ec0\u4e48?"),(0,i.kt)("p",null,"1\u3001\u7f51\u5173\u7248\u672c\u5347\u7ea7,\u5bfc\u81f4\u8bf7\u6c42Swagger\u63a5\u53e3\u5931\u8d25,\u6216\u8005\u4e22\u5931\u67d0\u4e2a\u5c5e\u6027"),(0,i.kt)("p",null,"2\u3001\u7f51\u5173\u914d\u7f6e\u4e0d\u6b63\u786e,\u8c03\u8bd5\u8f6c\u53d1\u5931\u8d25"),(0,i.kt)("p",null,"3\u3001\u7b49\u7b49..."),(0,i.kt)("p",null,"\u6211\u4eec\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b,\u5f15\u5165Swagger\u6587\u6863\u5982\u6b64\u7b80\u5355,\u4e3a\u4ec0\u4e48\u5728Spring Cloud\u7684\u4f53\u73b0\u8fd9\u4e48\u9ebb\u70e6?\u805a\u5408\u4ee3\u7801\u5199\u4e86\u4e00\u5927\u5806,\u8fd8\u8981\u8c03\u8bd5\u4e3a\u4f55\u5931\u8d25,\u4e0d\u540c\u7684\u7248\u672c\u6709\u4e0d\u540c\u7684\u8981\u6c42.\u7b49\u7b49"),(0,i.kt)("p",null,"\u90a3\u4e48,Knife4jCloud\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u5462?"),(0,i.kt)("p",null,"1\u3001Knife4jCloud\u628aSwagger\u7684\u7279\u6027\u5168\u90e8\u62bd\u8c61\u51fa\u6765,\u5168\u90e8\u653e\u5728\u5e73\u53f0\u91cc\u6765\u505a,\u4ed6\u5145\u5f53\u7684\u4e5f\u662f\u4e00\u4e2a\u7f51\u5173\u7684\u89d2\u8272,\u4f46\u662f\u662f\u81ea\u5df1\u6269\u5c55\u5b9e\u73b0\u7684,\u6269\u5c55\u7684\u76ee\u7684\u53ea\u6709\u4e00\u4e2a,\u5c31\u662f\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u8c03\u8bd5"),(0,i.kt)("p",null,"2\u3001Knife4jCloud\u4e2d\u4f1a\u628a\u6bcf\u4e00\u4e2aSwagger\u6587\u6863\u4f5c\u4e3a\u4e00\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff0c\u5fae\u670d\u52a1\u7684IP\u3001\u7aef\u53e3\u3001Swagger-JSONNeri\u90fd\u4f1a\u4fdd\u5b58\u5728\u5e73\u53f0\u4e2d"),(0,i.kt)("p",null,"\u8fd9\u6837\u5728\u5e73\u53f0\u4e2d,\u5bf9\u4e8eSwagger\u6587\u6863\u53ef\u4ee5\u8fdb\u884c\u4efb\u610f\u805a\u5408,\u548c\u5fae\u670d\u52a1\u5f7b\u5e95\u62dc\u62dc\u4e86~~"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"3).\u4e2a\u6027\u5316\u914d\u7f6e")),(0,i.kt)("p",null,"Knife4jCloud\u4ea7\u54c1\u672c\u8eab\u662f\u62e5\u6709\u7528\u6237\u7684\u89d2\u8272\u7684,\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06\u5e73\u53f0\u90e8\u7f72\u5728\u548c\u5b9e\u9645\u540c\u4e00\u4e2a\u7f51\u7edc\u73af\u5883\u4e2d,\u5bf9\u5916\u7684Swagger\u6587\u6863\u53ef\u4ee5\u901a\u8fc7Knife4jCloud\u505a\u5230\u7f51\u7edc\u9694\u79bb"),(0,i.kt)("p",null,"\u5bf9\u4e8e\u6bcf\u4e00\u4efdSwagger\u6587\u6863\u9875\u53ef\u4ee5\u505a\u5230\u662f\u5426\u767b\u5f55\u540e\u53ef\u770b,\u6587\u6863\u662f\u5426\u53ef\u4ee5\u8c03\u8bd5\u7b49\u7b49\u4e2a\u6027\u5316\u7684\u914d\u7f6e\u90fd\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u64cd\u4f5c"),(0,i.kt)("h2",{id:"412-\u529f\u80fd\u4ecb\u7ecd"},"4.1.2 \u529f\u80fd\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,i.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,i.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,i.kt)("h3",{id:"4121-\u767b\u5f55"},"4.1.2.1 \u767b\u5f55"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,i.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,i.kt)("h3",{id:"4122-\u5de5\u4f5c\u53f0"},"4.1.2.2 \u5de5\u4f5c\u53f0"),(0,i.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,i.kt)("h3",{id:"4123-\u9879\u76ee\u7ba1\u7406"},"4.1.2.3 \u9879\u76ee\u7ba1\u7406"),(0,i.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,i.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,i.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,i.kt)("h3",{id:"4124-\u670d\u52a1\u7ba1\u7406"},"4.1.2.4 \u670d\u52a1\u7ba1\u7406"),(0,i.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,i.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,i.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,i.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,i.kt)("h3",{id:"4125-\u9884\u89c8\u6587\u6863"},"4.1.2.5 \u9884\u89c8\u6587\u6863"),(0,i.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,i.kt)("h3",{id:"4126-\u4e2a\u4eba\u4e2d\u5fc3"},"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,i.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})),(0,i.kt)("h2",{id:"413-\u5f00\u653eapi"},"4.1.3 \u5f00\u653eAPI"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,i.kt)("h3",{id:"4131-\u6ce8\u518capi"},"4.1.3.1 \u6ce8\u518cAPI"),(0,i.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,i.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"application/json")),(0,i.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"POST")),(0,i.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,i.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,i.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,i.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:null,rel:null},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,i.kt)("h3",{id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c"},"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"1.Maven\u5f15\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,i.kt)("p",null,"2\u3001\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,i.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")),(0,i.kt)("h2",{id:"414-\u4ea7\u54c1\u8bd5\u7528"},"4.1.4 \u4ea7\u54c1\u8bd5\u7528"),(0,i.kt)("p",null,"\u53ef\u4ee5\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"http://cloud.xiaominfo.com",target:"_blank",rel:"noopener"},"http://cloud.xiaominfo.com"),"\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!"))}k.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/07862142.02cb143b.js b/knife4j-doc/gitee/assets/js/07862142.02cb143b.js new file mode 100644 index 000000000..ee3c54d7e --- /dev/null +++ b/knife4j-doc/gitee/assets/js/07862142.02cb143b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5103],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),s=u(n),k=i,f=s["".concat(p,".").concat(k)]||s[k]||c[k]||a;return n?r.createElement(f,o(o({ref:t},m),{},{components:n})):r.createElement(f,o({ref:t},m))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=k;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:i,o[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>p,default:()=>f,frontMatter:()=>l,metadata:()=>u,toc:()=>s});var r=n(87462),i=n(63366),a=(n(67294),n(3905)),o=["components"],l={id:"contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},p=void 0,u={unversionedId:"community/contributing",id:"community/contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j",source:"@site/docs/community/contributing.mdx",sourceDirName:"community",slug:"/community/contributing",permalink:"/docs/community/contributing",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1693280772,formattedLastUpdatedAt:"2023\u5e748\u670829\u65e5",frontMatter:{id:"contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},sidebar:"docs",previous:{title:"\u5982\u4f55\u8d21\u732e\u6587\u6863",permalink:"/docs/community/joinus"},next:{title:"\u4ecb\u7ecd",permalink:"/docs/introduction/"}},m={},s=[{value:"\u793e\u533a\u8d21\u732e",id:"\u793e\u533a\u8d21\u732e",level:2},{value:"\u5f00\u6e90\u8d21\u732e",id:"\u5f00\u6e90\u8d21\u732e",level:2},{value:"Knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e",id:"knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e",level:3},{value:"\u6307\u5bfc\u65b9\u9488",id:"\u6307\u5bfc\u65b9\u9488",level:3},{value:"\u8c03\u8bd5\u4ee3\u7801",id:"\u8c03\u8bd5\u4ee3\u7801",level:2}],c={toc:s},k="wrapper";function f(e){var t=e.components,n=(0,i.Z)(e,o);return(0,a.kt)(k,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u4f5c\u4e3a\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0cKnife4j \u7684\u6210\u957f\u79bb\u4e0d\u5f00\u793e\u533a\u8d21\u732e\u8005\u7684\u652f\u6301\u548c\u53c2\u4e0e\u3002\u6211\u4eec\u975e\u5e38\u6b22\u8fce\u5e7f\u5927\u793e\u533a\u7528\u6237\u4e3a Knife4j \u8d21\u732e\u4ee3\u7801\u3001\u6587\u6863\u6216\u6539\u8fdb\u7f51\u7ad9\uff0c\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u613f\u610f\u4e3a\u60a8\u63d0\u4f9b\u5fc5\u8981\u7684\u652f\u6301\u3002"),(0,a.kt)("h2",{id:"\u793e\u533a\u8d21\u732e"},"\u793e\u533a\u8d21\u732e"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u70b9\u4eaeStar\uff0c\u7167\u4eaeKnife4j\u5f00\u6e90\u4e4b\u8def!!",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/knife4j",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/knife4j")))),(0,a.kt)("li",{parentName:"ul"},"\u53d1\u8868\u4f60\u7684\u770b\u6cd5\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/knife4j/discussions",target:"_blank",rel:"noopener"},"Knife4j\u8bba\u575b")),(0,a.kt)("li",{parentName:"ul"},"\u8ba4\u9886\u5f00\u53d1\u4efb\u52a1\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/issues",target:"_blank",rel:"noopener"},"Issues")),(0,a.kt)("li",{parentName:"ul"},"\u5b8c\u5584",(0,a.kt)("a",{parentName:"li",href:"joinus",target:null,rel:null},"Knife4j\u6587\u6863")),(0,a.kt)("li",{parentName:"ul"},"\u5728\u4f60\u81ea\u5df1\u7684\u535a\u5ba2\u3001\u5fae\u535a\u3001\u5fae\u4fe1\u516c\u4f17\u53f7\u3001vlog \u7b49\u81ea\u5a92\u4f53\u5206\u4eab\u6709\u5173 Knife4j \u7684\u4e00\u5207\u3002\u4e5f\u975e\u5e38\u6b22\u8fce\u5c06\u5b9e\u6218\u5185\u5bb9\u901a\u8fc7PR\u8fdb\u884c\u8d21\u732e\u5408\u5e76\u5728Knife4j\u7684\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u5c55\u793a\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u628aKnife4j\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u4eba")),(0,a.kt)("h2",{id:"\u5f00\u6e90\u8d21\u732e"},"\u5f00\u6e90\u8d21\u732e"),(0,a.kt)("h3",{id:"knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e"},"Knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-desktop",target:"_blank",rel:"noopener"},"knife4j-desktop"),":Knife4j\u7684\u72ec\u7acb\u4e2d\u95f4\u4ef6\uff0c\u57fa\u4e8eJava\u7f16\u5199\uff0c\u53ef\u4ee5\u72ec\u7acb\u8fd0\u884c\u6e32\u67d3OpenAPI\u89c4\u8303\u6587\u4ef6"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-doc",target:"_blank",rel:"noopener"},"knife4j-doc"),": \u5b98\u7f51\u6587\u6863\uff0c\u57fa\u4e8e",(0,a.kt)("a",{parentName:"li",href:"https://docusaurus.io/zh-CN/",target:"_blank",rel:"noopener"},"Docusaurus"),"\u8fdb\u884c\u7f16\u5199"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-vue",target:"_blank",rel:"noopener"},"knife4j-vue"),": \u524d\u7aef\u6e90\u7801\uff0c\u57fa\u4e8eVue2\u6846\u67b6\u7f16\u5199"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j",target:"_blank",rel:"noopener"},"knife4j"),": Java\u7aef\u4ee3\u7801\uff0c\u5305\u62ec\u6240\u6709\u516c\u5f00\u4f7f\u7528\u7684starter\u7ec4\u4ef6\u5c01\u88c5")),(0,a.kt)("h3",{id:"\u6307\u5bfc\u65b9\u9488"},"\u6307\u5bfc\u65b9\u9488"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u5728\u5f00\u59cb\u8fdb\u884c\u529f\u80fd\u6216\u8005\u4fee\u590dBug\u4e4b\u524d\uff0c\u4e8b\u5148\u8bf7\u5728Github\u3001Gitee\u5e73\u53f0\u4e0a\u641c\u7d22\u4e0e\u4e4b\u76f8\u5173\u7684\u529f\u80fd\u662f\u5426\u5df2\u7ecf\u5b9e\u73b0\uff0c\u6216\u7740\u4e5f\u53ef\u4ee5\u901a\u8fc7Github\u3001Gitee\u5e73\u53f0\u7684issue\u4e0e\u6211\u4eec\u53d6\u5f97",(0,a.kt)("a",{parentName:"li",href:"community-get-helps",target:null,rel:null},"\u8054\u7cfb"),"\u3002\u4ee5\u786e\u4fdd\u8be5\u4efb\u52a1\u6ca1\u6709\u5176\u4ed6\u4eba\u5728\u5904\u7406\uff0c\u907f\u514d\u91cd\u590d\u64cd\u4f5c\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u6240\u6709\u529f\u80fd\u53ef\u901a\u8fc7Github\u6216\u8005Gitee\u7684",(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/discussions",target:"_blank",rel:"noopener"},"issues"),"\u8fdb\u884c\u6c9f\u901a\u8ba8\u8bba\uff0c\u907f\u514d\u6d6a\u8d39\u5927\u5bb6\u7684\u65f6\u95f4\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u5982\u679c\u662f\u91cd\u5927\u529f\u80fd\u66f4\u65b0\uff0c\u5efa\u8bae\u4f60\u5728\u7f16\u7801\u5f00\u53d1\u7684\u540c\u65f6\uff0c\u5c06\u8be5\u529f\u80fd\u7684\u8bbe\u8ba1\u3001\u601d\u60f3\u3001\u5b9e\u73b0\u4ee5\u53ca\u4f7f\u7528\u8bf4\u660e\u901a\u8fc7\u6587\u6863\u8fdb\u884c\u8f93\u51fa\u3002\u6700\u597d\u662f\u5408\u5e76\u5728Knife4j\u7684\u5b98\u65b9\u6587\u6863\u4e0a"),(0,a.kt)("li",{parentName:"ul"},"\u63d0\u4ea4PR\u65f6\uff0c\u9700\u8981\u5c06PR\u8bf7\u6c42\u63d0\u4ea4\u5230",(0,a.kt)("strong",{parentName:"li"},"dev\u5206\u652f"),"\uff01\uff01\uff01")),(0,a.kt)("h2",{id:"\u8c03\u8bd5\u4ee3\u7801"},"\u8c03\u8bd5\u4ee3\u7801"),(0,a.kt)("p",null,"\u76ee\u524d",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-vue",target:"_blank",rel:"noopener"},"knife4j-vue"),"\u662f\u524d\u7aef\u4ee3\u7801\uff0c\u57fa\u4e8eVue2\u6846\u67b6\u7f16\u5199\u7f16\u5199"),(0,a.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u60f3\u8d21\u732e\u4ee3\u7801\u6216\u8005\u81ea\u5df1\u6539\u9020\uff0c\u5f97\u542f\u52a8\u6b64\u9879\u76ee\u8fdb\u884c\u8c03\u8bd5"),(0,a.kt)("p",null,"1\u3001\u73af\u5883\u51c6\u5907"),(0,a.kt)("p",null,"\u9996\u5148\uff0c\u5f00\u53d1\u8005\u672c\u5730\u9700\u8981\u5b89\u88c5Node\u73af\u5883\uff0c\u76ee\u524d\u8be5\u7248\u672c\u7684Node\u4f9d\u8d56\u6bd4\u8f83\u4f4e\uff0c\u4f5c\u8005\u672c\u5730\u4f7f\u7528\u7684\u7248\u672c\u662f",(0,a.kt)("inlineCode",{parentName:"p"},"v15.14.0"),",\u53ef\u4ee5\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"p"},"nvm"),"\u5de5\u5177\u5207\u6362\u5b89\u88c5\u4e0d\u540c\u7684node\u7248\u672c\uff0c\u9ad8\u7248\u672c\u7684Node\u76ee\u524d\u53ef\u80fd\u4f1a\u5b58\u5728\u95ee\u9898\uff0c\u4fdd\u6301\u4e00\u81f4\u5373\u53ef"),(0,a.kt)("p",null,"2\u3001\u5b89\u88c5\u4f9d\u8d56"),(0,a.kt)("p",null,"\u6267\u884c\u547d\u4ee4"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-shell"},"npm install \n")),(0,a.kt)("p",null,"3\u3001\u540e\u7aef\u63a5\u53e3\u51c6\u5907"),(0,a.kt)("p",null,"\u76ee\u524dKnife4j\u7ec4\u4ef6\u8fd8\u662f\u4ee5Java\u751f\u6001\u4e3a\u4e3b\uff0c\u6240\u4ee5\u5728\u8c03\u8bd5\u83b7\u53d6OpenAPI\u6570\u636e\u6e90\u65f6\uff0c\u662f\u6839\u636e\u89e3\u6790\u6846\u67b6\u505a\u517c\u5bb9\u9002\u914d\uff0c\u4e3b\u8981\u662f\u4e24\u4e2a\u6846\u67b6\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"springfox\uff1a\u63d0\u4f9bSwagger2\u89c4\u8303\u7684\u89e3\u6790\uff0c\u5728Spring Boot\u6846\u67b6\u751f\u6001\u4e0b\u63d0\u4f9b\u670d\u52a1\uff0c\u53c2\u8003demo\u5de5\u7a0b\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-boot27-demo",target:"_blank",rel:"noopener"},"knife4j-spring-boot27-demo")),(0,a.kt)("li",{parentName:"ul"},"springdoc\uff1a\u63d0\u4f9bOpenAPI3\u89c4\u8303\u7684\u89e3\u6790\uff0c\u5728Spring Boot\u6846\u67b6\u751f\u6001\u4e0b\u63d0\u4f9b\u670d\u52a1,\u53c2\u8003demo\u5de5\u7a0b\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-springdoc-openapi-demo",target:"_blank",rel:"noopener"},"knife4j-springdoc-openapi-demo"))),(0,a.kt)("p",null,"\u800cKnife4j-vue\u524d\u7aef\u4ee3\u7801\u76ee\u524d\u8fd8\u662f\u6bd4\u8f83\u7b28\u62d9\u7684\u65b9\u5f0f\uff0c\u4e3b\u8981\u4f53\u73b0\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-vue/src/layouts/BasicLayout.vue"),"\u6587\u4ef6\u4e2d"),(0,a.kt)("p",null,"\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"create()"),"\u65b9\u6cd5\u65f6\u4f1a\u5b58\u5728\u533a\u522b"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"}," created() {\n // \u8c03\u8bd5springdoc\u6846\u67b6\u65f6\uff0c\u4f7f\u7528\u8be5\u65b9\u6cd5\uff0c\u6ce8\u91ca\u4e0b\u9762\u7684this.initKnife4jSpringUi()\u65b9\u6cd5\n this.initSpringDocOpenApi();\n // \u8c03\u8bd5springfox\u6846\u67b6\u65f6\uff0c\u4f7f\u7528\u8be5\u65b9\u6cd5\uff0c\u6ce8\u91ca\u4e0a\u9762\u7684 this.initSpringDocOpenApi()\u65b9\u6cd5\n //this.initKnife4jSpringUi();\n this.initI18n();\n },\n")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"\u8fd9\u79cd\u65b9\u6cd5\u5728\u6253\u5305\u6784\u5efa\u65f6\uff0c\u4e5f\u540c\u6837\u5982\u6b64")),(0,a.kt)("p",null,"4\u3001\u670d\u52a1\u7aef\u4ee3\u7406\u7aef\u53e3"),(0,a.kt)("p",null,"\u5728",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j-vue/vue.config.js"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4fee\u6539",(0,a.kt)("inlineCode",{parentName:"p"},"proxy"),"\u8282\u70b9\u4e0b\u7684\u914d\u7f6e"),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"\u5728\u4e0a\u9762springfox\u548cspringdoc\u4e24\u4e2ademo\u5de5\u7a0b\u4e0b\uff0c\u670d\u52a1\u542f\u52a8\u540e\uff0c\u4fee\u6539\u4e3a\u76f8\u5e94\u7684\u7aef\u53e3\u5373\u53ef")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},"devServer: {\n watchOptions: {\n ignored: /node_modules/\n },\n proxy: {\n \"/\": {\n // \u4ee3\u7406\u670d\u52a1\u7aef\u7aef\u53e3\n target: 'http://localhost:8990/',\n ws: true,\n changeOrigin: true\n }\n }\n },\n\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/07862142.a38d8e28.js b/knife4j-doc/gitee/assets/js/07862142.a38d8e28.js deleted file mode 100644 index aaa3160be..000000000 --- a/knife4j-doc/gitee/assets/js/07862142.a38d8e28.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5103],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),s=p(n),f=i,k=s["".concat(u,".").concat(f)]||s[f]||m[f]||a;return n?r.createElement(k,o(o({ref:t},c),{},{components:n})):r.createElement(k,o({ref:t},c))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=s;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l.mdxType="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>u,default:()=>f,frontMatter:()=>l,metadata:()=>p,toc:()=>m});var r=n(87462),i=n(63366),a=(n(67294),n(3905)),o=["components"],l={id:"contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},u=void 0,p={unversionedId:"community/contributing",id:"community/contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j",source:"@site/docs/community/contributing.mdx",sourceDirName:"community",slug:"/community/contributing",permalink:"/docs/community/contributing",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{id:"contributing",title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",description:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},sidebar:"docs",previous:{title:"\u5982\u4f55\u8d21\u732e\u6587\u6863",permalink:"/docs/community/joinus"},next:{title:"\u4ecb\u7ecd",permalink:"/docs/introduction/"}},c={},m=[{value:"\u793e\u533a\u8d21\u732e",id:"\u793e\u533a\u8d21\u732e",level:2},{value:"\u5f00\u6e90\u8d21\u732e",id:"\u5f00\u6e90\u8d21\u732e",level:2},{value:"Knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e",id:"knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e",level:3},{value:"\u6307\u5bfc\u65b9\u9488",id:"\u6307\u5bfc\u65b9\u9488",level:3}],s={toc:m};function f(e){var t=e.components,n=(0,i.Z)(e,o);return(0,a.kt)("wrapper",(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u4f5c\u4e3a\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0cKnife4j \u7684\u6210\u957f\u79bb\u4e0d\u5f00\u793e\u533a\u8d21\u732e\u8005\u7684\u652f\u6301\u548c\u53c2\u4e0e\u3002\u6211\u4eec\u975e\u5e38\u6b22\u8fce\u5e7f\u5927\u793e\u533a\u7528\u6237\u4e3a Knife4j \u8d21\u732e\u4ee3\u7801\u3001\u6587\u6863\u6216\u6539\u8fdb\u7f51\u7ad9\uff0c\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u613f\u610f\u4e3a\u60a8\u63d0\u4f9b\u5fc5\u8981\u7684\u652f\u6301\u3002"),(0,a.kt)("h2",{id:"\u793e\u533a\u8d21\u732e"},"\u793e\u533a\u8d21\u732e"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u70b9\u4eaeStar\uff0c\u7167\u4eaeKnife4j\u5f00\u6e90\u4e4b\u8def!!",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/knife4j",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/knife4j")))),(0,a.kt)("li",{parentName:"ul"},"\u53d1\u8868\u4f60\u7684\u770b\u6cd5\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/knife4j/discussions",target:"_blank",rel:"noopener"},"Knife4j\u8bba\u575b")),(0,a.kt)("li",{parentName:"ul"},"\u8ba4\u9886\u5f00\u53d1\u4efb\u52a1\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/issues",target:"_blank",rel:"noopener"},"Issues")),(0,a.kt)("li",{parentName:"ul"},"\u5b8c\u5584",(0,a.kt)("a",{parentName:"li",href:"joinus",target:null,rel:null},"Knife4j\u6587\u6863")),(0,a.kt)("li",{parentName:"ul"},"\u5728\u4f60\u81ea\u5df1\u7684\u535a\u5ba2\u3001\u5fae\u535a\u3001\u5fae\u4fe1\u516c\u4f17\u53f7\u3001vlog \u7b49\u81ea\u5a92\u4f53\u5206\u4eab\u6709\u5173 Knife4j \u7684\u4e00\u5207\u3002\u4e5f\u975e\u5e38\u6b22\u8fce\u5c06\u5b9e\u6218\u5185\u5bb9\u901a\u8fc7PR\u8fdb\u884c\u8d21\u732e\u5408\u5e76\u5728Knife4j\u7684\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u5c55\u793a\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u628aKnife4j\u5206\u4eab\u7ed9\u66f4\u591a\u7684\u4eba")),(0,a.kt)("h2",{id:"\u5f00\u6e90\u8d21\u732e"},"\u5f00\u6e90\u8d21\u732e"),(0,a.kt)("h3",{id:"knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e"},"Knife4j\u4ed3\u5e93\u7ed3\u6784\u8bf4\u660e"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-desktop",target:"_blank",rel:"noopener"},"knife4j-desktop"),":Knife4j\u7684\u72ec\u7acb\u4e2d\u95f4\u4ef6\uff0c\u57fa\u4e8eJava\u7f16\u5199\uff0c\u53ef\u4ee5\u72ec\u7acb\u8fd0\u884c\u6e32\u67d3OpenAPI\u89c4\u8303\u6587\u4ef6"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-doc",target:"_blank",rel:"noopener"},"knife4j-doc"),": \u5b98\u7f51\u6587\u6863\uff0c\u57fa\u4e8e",(0,a.kt)("a",{parentName:"li",href:"https://docusaurus.io/zh-CN/",target:"_blank",rel:"noopener"},"Docusaurus"),"\u8fdb\u884c\u7f16\u5199"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j-vue",target:"_blank",rel:"noopener"},"knife4j-vue"),": \u524d\u7aef\u6e90\u7801\uff0c\u57fa\u4e8eVue\u6846\u67b6\u7f16\u5199"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/tree/dev/knife4j",target:"_blank",rel:"noopener"},"knife4j"),": Java\u7aef\u4ee3\u7801\uff0c\u5305\u62ec\u6240\u6709\u516c\u5f00\u4f7f\u7528\u7684starter\u7ec4\u4ef6\u5c01\u88c5")),(0,a.kt)("h3",{id:"\u6307\u5bfc\u65b9\u9488"},"\u6307\u5bfc\u65b9\u9488"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u5728\u5f00\u59cb\u8fdb\u884c\u529f\u80fd\u6216\u8005\u4fee\u590dBug\u4e4b\u524d\uff0c\u4e8b\u5148\u8bf7\u5728Github\u3001Gitee\u5e73\u53f0\u4e0a\u641c\u7d22\u4e0e\u4e4b\u76f8\u5173\u7684\u529f\u80fd\u662f\u5426\u5df2\u7ecf\u5b9e\u73b0\uff0c\u6216\u7740\u4e5f\u53ef\u4ee5\u901a\u8fc7Github\u3001Gitee\u5e73\u53f0\u7684issue\u4e0e\u6211\u4eec\u53d6\u5f97",(0,a.kt)("a",{parentName:"li",href:"community-get-helps",target:null,rel:null},"\u8054\u7cfb"),"\u3002\u4ee5\u786e\u4fdd\u8be5\u4efb\u52a1\u6ca1\u6709\u5176\u4ed6\u4eba\u5728\u5904\u7406\uff0c\u907f\u514d\u91cd\u590d\u64cd\u4f5c\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u6240\u6709\u529f\u80fd\u53ef\u901a\u8fc7Github\u6216\u8005Gitee\u7684",(0,a.kt)("a",{parentName:"li",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/discussions",target:"_blank",rel:"noopener"},"issues"),"\u8fdb\u884c\u6c9f\u901a\u8ba8\u8bba\uff0c\u907f\u514d\u6d6a\u8d39\u5927\u5bb6\u7684\u65f6\u95f4\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u5982\u679c\u662f\u91cd\u5927\u529f\u80fd\u66f4\u65b0\uff0c\u5efa\u8bae\u4f60\u5728\u7f16\u7801\u5f00\u53d1\u7684\u540c\u65f6\uff0c\u5c06\u8be5\u529f\u80fd\u7684\u8bbe\u8ba1\u3001\u601d\u60f3\u3001\u5b9e\u73b0\u4ee5\u53ca\u4f7f\u7528\u8bf4\u660e\u901a\u8fc7\u6587\u6863\u8fdb\u884c\u8f93\u51fa\u3002\u6700\u597d\u662f\u5408\u5e76\u5728Knife4j\u7684\u5b98\u65b9\u6587\u6863\u4e0a"),(0,a.kt)("li",{parentName:"ul"},"\u63d0\u4ea4PR\u65f6\uff0c\u9700\u8981\u5c06PR\u8bf7\u6c42\u63d0\u4ea4\u5230",(0,a.kt)("strong",{parentName:"li"},"dev\u5206\u652f"),"\uff01\uff01\uff01")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/09120524.0d2fe4d6.js b/knife4j-doc/gitee/assets/js/09120524.0d2fe4d6.js deleted file mode 100644 index 9771f9f06..000000000 --- a/knife4j-doc/gitee/assets/js/09120524.0d2fe4d6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7465],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>c});var a=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function p(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=a.createContext({}),m=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},u=function(e){var n=m(e.components);return a.createElement(l.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),d=m(t),c=i,k=d["".concat(l,".").concat(c)]||d[c]||s[c]||r;return t?a.createElement(k,p(p({ref:n},u),{},{components:t})):a.createElement(k,p({ref:n},u))}));function c(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,p=new Array(r);p[0]=d;var o={};for(var l in n)hasOwnProperty.call(n,l)&&(o[l]=n[l]);o.originalType=e,o.mdxType="string"==typeof e?e:i,p[1]=o;for(var m=2;m{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>m,toc:()=>s});var a=t(87462),i=t(63366),r=(t(67294),t(3905)),p=["components"],o={},l="3.4 \u81ea\u5b9a\u4e49\u6587\u6863",m={unversionedId:"features/selfdocument",id:"features/selfdocument",title:"3.4 \u81ea\u5b9a\u4e49\u6587\u6863",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb",source:"@site/docs/features/selfdocument.md",sourceDirName:"features",slug:"/features/selfdocument",permalink:"/docs/features/selfdocument",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",permalink:"/docs/features/author"},next:{title:"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236",permalink:"/docs/features/accessControl"}},u={},s=[],d={toc:s};function c(e){var n=e.components,o=(0,i.Z)(e,p);return(0,r.kt)("wrapper",(0,a.Z)({},d,o,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"34-\u81ea\u5b9a\u4e49\u6587\u6863"},"3.4 \u81ea\u5b9a\u4e49\u6587\u6863"),(0,r.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e3a\u4e86\u6ee1\u8db3\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e,\u6dfb\u52a0\u4e86\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd,\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\u80fd\u4e30\u5bcc\u63a5\u53e3\u6587\u6863,\u5728OpenAPI\u4e0d\u8db3\u4ee5\u6ee1\u8db3\u63a5\u53e3\u8bf4\u660e\u7684\u60c5\u51b5\u4e0b,\u5f00\u53d1\u8005\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\u80fd\u591f\u628a\u63a5\u53e3\u6587\u6863\u66f4\u6e05\u6670\u7684\u63cf\u8ff0\u3002\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u4ef6\u6269\u5c55\u8865\u5145\u6574\u4e2a\u7cfb\u7edf\u7684\u6587\u6863\u8bf4\u660e"),(0,r.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5f53\u524d\u9879\u76ee\u4e2d\u6dfb\u52a0\u591a\u4e2a\u4e2a\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u5939\u4e2d\u5b58\u653e",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u683c\u5f0f\u7684markdown\u6587\u4ef6,\u6bcf\u4e2a",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u6863\u4ee3\u8868\u4e00\u4efd\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u6ce8\u610f"),"\uff1a\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\u5fc5\u987b\u4ee5",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u7ed3\u5c3e\u7684\u6587\u4ef6,\u5176\u4ed6\u683c\u5f0f\u6587\u4ef6\u4f1a\u88ab\u5ffd\u7565"),(0,r.kt)("p",null,"\u4f8b\u5982\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(68623).Z,width:"366",height:"241"})),(0,r.kt)("p",null,"\u6bcf\u4e2a",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u4ef6\u4e2d\uff0c",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5141\u8bb8\u4e00\u7ea7(h1)\u3001\u4e8c\u7ea7(h2)\u3001\u4e09\u7ea7(h3)\u6807\u9898\u4f5c\u4e3a\u6700\u7ec8\u7684\u6587\u6863\u6807\u9898"),(0,r.kt)("p",null,"\u6bd4\u5982",(0,r.kt)("inlineCode",{parentName:"p"},"api.md"),"\u6587\u6863\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-markdown"},"# \u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\n\n## \u6548\u679c\u8bf4\u660e\n\n`knife4j`\u4e3a\u4e86\u6ee1\u8db3\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e,\u6dfb\u52a0\u4e86\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\n\n\u5f00\u53d1\u8005\u53ef\u81ea\u5b9a\u4e49`md`\u6587\u4ef6\u6269\u5c55\u8865\u5145\u6574\u4e2a\u7cfb\u7edf\u7684\u6587\u6863\u8bf4\u660e\n\n\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5f53\u524d\u9879\u76ee\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u5939\u4e2d\u5b58\u653e`.md`\u683c\u5f0f\u7684markdown\u6587\u4ef6,\u6bcf\u4e2a`.md`\u6587\u6863\u4ee3\u8868\u4e00\u4efd\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\n\n**\u6ce8\u610f**\uff1a\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\u5fc5\u987b\u4ee5`.md`\u7ed3\u5c3e\u7684\u6587\u4ef6,\u5176\u4ed6\u683c\u5f0f\u6587\u4ef6\u4f1a\u88ab\u5ffd\u7565\n")),(0,r.kt)("p",null,"\u6700\u7ec8\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u7684\u754c\u9762\u4e2d,",(0,r.kt)("inlineCode",{parentName:"p"},"api.md"),"\u7684\u6587\u6863\u6807\u9898\u4f1a\u662f",(0,r.kt)("inlineCode",{parentName:"p"},"\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e")),(0,r.kt)("p",null,"\u6574\u4e2a\u6587\u6863\u6548\u679c\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(78272).Z,width:"1309",height:"602"})),(0,r.kt)("p",null,"\u5982\u679c\u6ca1\u6709\u6309\u7167\u4e00\u7ea7(h1)\u3001\u4e8c\u7ea7(h2)\u3001\u4e09\u7ea7(h3)\u6765\u8bbe\u7f6e\u6807\u9898,\u9ed8\u8ba4\u6807\u9898\u4f1a\u662f\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u56fe\u4e0a\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"api2.md")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u5982\u4f55\u4f7f\u7528")),(0,r.kt)("p",null,"\u5728Spring Boot\u73af\u5883\u4e2d,\u9996\u5148\u9700\u8981\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,r.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u81ea\u5b9a\u4e49\u6587\u6863\u76ee\u5f55,\u652f\u6301\u591a\u7ea7\u76ee\u5f55"),(0,r.kt)("p",null,"\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n documents:\n -\n group: 1.2.x\n name: \u6d4b\u8bd5\u81ea\u5b9a\u4e49\u6807\u9898\u5206\u7ec4\n # \u67d0\u4e00\u4e2a\u6587\u4ef6\u5939\u4e0b\u6240\u6709\u7684.md\u6587\u4ef6\n locations: classpath:markdown/*\n -\n group: 1.2.x\n name: \u63a5\u53e3\u7b7e\u540d\n # \u67d0\u4e00\u4e2a\u6587\u4ef6\u5939\u4e0b\u5355\u4e2a.md\u6587\u4ef6\n locations: classpath:markdown/sign.md\n")),(0,r.kt)("p",null,"\u5728\u914d\u7f6e",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j.documents"),"\u4e2d\uff0c\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u96c6\u5408\u6570\u7ec4,\u4ee3\u8868\u5f00\u53d1\u8005\u53ef\u4ee5\u6dfb\u52a0\u591a\u4e2a\u81ea\u5b9a\u4e49\u6587\u6863\u5206\u7ec4,\u56e0\u4e3a\u6211\u4eec\u5728\u6700\u7ec8\u5448\u73b0\u63a5\u53e3\u6587\u6863\u65f6\uff0c\u4f1a\u5b58\u5728\u903b\u8f91\u5206\u7ec4\u7684\u60c5\u51b5\uff0c\u6709\u65f6\u5019\u6211\u4eec\u5e0c\u671b\u4e0d\u540c\u7684\u903b\u8f91\u5206\u7ec4\u4e0b\u663e\u793a\u4e0d\u540c\u7684\u903b\u8f91\u5206\u7ec4\u6587\u6863\uff0c\u6240\u4ee5\u9700\u8981\u901a\u8fc7\u8be5\u8282\u70b9\u4e0b\u7684group(\u5206\u7ec4\u540d\u79f0)\u8fdb\u884c\u533a\u5206"),(0,r.kt)("p",null,"\u76f8\u5173\u5c5e\u6027\u8bf4\u660e\u5982\u4e0b\uff1a"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"\u5c5e\u6027\u540d\u79f0"),(0,r.kt)("th",{parentName:"tr",align:null},"\u662f\u5426\u5fc5\u987b"),(0,r.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"group"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u903b\u8f91\u5206\u7ec4\u540d\u79f0,\u6700\u7ec8\u5728\u903b\u8f91\u5206\u7ec4\u65f6\u8be5\u5c5e\u6027\u9700\u8981\u4f20\u5165")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"name"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u5206\u7ec4\u540d\u79f0\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u5f00\u53d1\u8005\u5b58\u5728\u591a\u4e2a\u81ea\u5b9a\u4e49\u6587\u6863\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u5448\u73b0\u65f6\u7684\u4e00\u4e2a\u5206\u7ec4\u540d\u79f0")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"location"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u63d0\u4f9b\u81ea\u5b9a\u4e49",(0,r.kt)("inlineCode",{parentName:"td"},".md"),"\u6587\u4ef6\u7684\u8def\u5f84\u6216\u8005\u6587\u4ef6")))),(0,r.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,r.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,r.kt)("p",null,"\u5f00\u53d1\u8005\u914d\u7f6e\u597d\u540e,\u6700\u6838\u5fc3\u7684\u4e00\u6b65\uff0c\u4e5f\u662f\u6700\u540e\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5728\u521b\u5efa",(0,r.kt)("inlineCode",{parentName:"p"},"Docket"),"\u903b\u8f91\u5206\u7ec4\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u5c06\u6269\u5c55\u5c5e\u6027\u8fdb\u884c\u8d4b\u503c"),(0,r.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,r.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,"1\u3001\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,r.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,r.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,r.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,r.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,r.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,r.kt)("inlineCode",{parentName:"p"},"x-markdownFiles"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("img",{src:t(81835).Z,width:"809",height:"285"}))))}c.isMDXComponent=!0},68623:(e,n,t)=>{t.d(n,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW4AAADxCAYAAADr5V2tAAAgAElEQVR4nO3da3AU55kv8P+IO5KNLeZi8CIuDhqhi9k1eEmQCIK1s+XigADjdVHxSaqCwTipOpv9aIONSYB8PKlTlcPNbJ2c1BZF7IBlg4EDBmQksgTbCeg6g7lIXluei2QbSxZgrDnv290z03OfkTSX1vx/VaCZvr7d0jz99Ns9/ZgWLVrkKykpQbfbCyIiyg7f4CBkLI6nq6sLPR4XCjLUJiIiGiEM3EREBsPATURkMAzcREQGw8BNRGQwYzOxkhXr1kcMu3HVgbbLH2Vi9YYxaF2KX2xcDIv3AvbuOQeXyZTtJuWcQV8F1m9dBTucOLLjTTQnuY+qnnkJa0q9aNy/D2fc3K/ZNFg4Cz94fCq8lz7Atf7s/i5ypS2D1nI8NsWDbwZ8GEDidmQt45491475Cxdla/V5y1a7Ea9u2YjlVt+ITktDM+grxCOP/xBPLFsa+PdPteWw+SL3+aDPgkdrF+CRQl9yw0VQWvT4LBRFWdbIbkP09Y8WubJ9PkzB7PlzlddRM+4XNz2PiRMnxlzAwMAA9uw/MOyG/N2sOcq/WI69eXDY66BQVotZ/J/cPfupTJspBaZWHNrZqr4ZRWck7tZzuKKdCcjs60fLa2HTDZMKTB5c7yxBhbUI1270Z6mlkVJtV0H/TVw8d1O8yv7vL5m25Mp+N+ErfO6aoLyOGrhPvXcWK1c8FXMBp06fSU/LkjBY+TS2r7YH3rcfeQum1XWw67oX5GnxWrsJHW/txKEWk3aa7MThX78P64vPY4lF/SX5fJ6QU2d/V4VVLMPnqMcRrAo5vU44XjuNL9MCirvxdew+5w52gTjf1uZJ4jS/ah22advpX47SxrB1+HyOkGXFG+/fL4AFSzZtQY3Yhl+90RqxT+V+a5v3csS0rzWYI7Yj3j7Vd/0ccZRibY0lYnsifr+6faW0zWfFE5s3oMas7rPLqEyqqyTydxU2PtHvSv49NZmxWewX/zadtq4L7KdUfiepKnC34f/1y1P4CthcrSFdZrfcPUC5BUXX+9CXQweuXG3XSMmV7fvmy1vKz6iB++Nr19D7xRcofvDBiHE9vb3iqHMjva2LQflQ1ZWGDDOJDKzNKQJ3aSkqbOfQ7apAuTZJsdkmPlQi9BSLN14v3CIIVZj181pQs3EdPP6AoH3QlXH2OqyF/BBq65YfzkTjdR9eyVrzPJ717sRBf4wqXiwCUOLtNFmqRcAIvrdU12F5mwgcrsqIdZhMdqzZug7QBbVY45PdpwmFbIcFlpj7NLg9ay2R25OuvuYR+V1BHGjqzMFtWrMJdnNwQ5P9nQw1eKPPA2//AthsQHd/sB/2qhyOBZhjuyGy8dQWWTR7Ab4/q0h5LQ9GLWfVg4LsCvj7ZfMC++vrmx/gosgsZTfO3H9cgMLOdhG05sHS34WLfxGf/TkLI5bTHaVdcn2LZg4E1mOr/KH4C23HqRuFYnsm46Z//Uo/cwnu8x9E9WcfYW0LrA9FStvM3g+VtirTijOVJ2d+g/+82IdHls9Ef1sPzOXqcuUy/4YK/KjCErqNyrrVtnTDKtZVgv7OAcyeFTodYuz32PsuertdpujbJXn/yxN4LbtF5swvwQPa+wHXVXR8fhu4/ZXyPubFyXffPYHnfhx5UfHY8ROxZkk/q1nZ0NCMTfxBmL3iwykCiFW+N6NY7GK3xwyLRd35MrB4mtrhLnCL0+y2wOLUTLwYFptcdpny4fN5mpTMvTuQ2fknTnK8P4vVMjd58IC/qaIdjv27sFv+Ucb5QEdmyRbYy20i4wttQ/Dswo6aZTZc9sYfv/uN3wDhF+lEth1tn6IlyrRimyK2o0BMGmufJtieM+4UI0+yRuR31YvGHftw2VarZu7ib6lXnIn8rtmmnAEssWh/bwl+J80xziyGqsDUj6udXjxpFSt3exLPoJEBqkIE0eYzHwQz+EDQFsHqUgNO95sCwfrR/gb8zaVOZhGZZsvZBlyR0xfNxg+iLKcAke3qu/EhWgp/iFlzisTBZyYqJ8nA75YRPdguuT7xtlUsX2aySvAtV8801EA6D5M6P8RpfXBeVgGIICjXN2tmMAueJuKDp7MBX5vkL6ZQjOvBRbHcWzYZsGvxpKcNp8+2acF6JmzX5TrCifkKu3TTleERt7xwGbl9/uCrb1+s4fp2+7cLbWKfawcoeVCbps2vBm0r7jiu4K+3xd8WJuJh+1zMvn0FXV23lWliBm5PTw86P/kEM2fMCAy7ebMTPT29yfydpEdzBzpEdlgmsqNtNQh+MNuccFeb1Q+eiCoWrxONveJnsRnTxCAZyB1tLrFD/R+6YND0Z2HTzMXKT4+jXfmDLIDM5MWHvTS18TK727a1Lrh8iy7VdF4Idsvosr7Aqbh/OuXsQOX2eAG7JWobUh2fyj6Ne0dLyHZYY+7TgBjbE3cfJCnaMlrD94MYrqxWS5iT+l352+zyQv7FW8TBp61ZBk43PMqA0GWltM+T1g8RLyL7YV1ie0Qwtfncyd951NePAZSgctlCFOnvoLBZxIFbZM//WIvZusm/LiwKvPa06bprYi0nRru6m9thW7YAT4ptuXmpNaKbQR6IrrX0o0hk8U/osnh/25QsXwTmQKLj6sTNmdqZiLK+EtiKbuBWn0VJ4FzNwX13s+2Guj4xnbt8EvpvuNV9qGzDVBQVIQoxX2A6edYzNfb2RWtfMu2GNt6FwK9UPitq2hRt/gemiEx7ovgbehS6/AcDEycFXse9HfDoseP4+QsbxbrFkXBwEMdOnIw3+ZAlexHSf2HK3ycrT8Ff+BcvXvtjOxxecfpun4cnLKXiQ3Qep71m1IiAVFHeK3aTyJ7ETpq2rE6c4ntxfp+aQarZYeg61CzdrQSE8ig9CInGR+2/9WeqUbYlSGa02ktxSi5fdougWKFFm16vS/zC1Yjhb4OyaEvy46NdgIm1T2Ummoxk9mms7ZFBMOY+EAddeWdFd1hXTKz265dhK1dfBfdD9GUk+7uKp9ub+j5Pim0mZkFkjH2Ri5AXy1zeeUom61Iyum9EgC9EYSFk3AkqnIwiMc4/z5VzHi2jXop/KpSB9ANcFeN8fZ1KF0hk321hRLNiLUcG8Mh2JebvJoHMTs8Guy7i0w5ououGLmuJSNi6lLMCpOnmj6FsXyi13VF2a6TbbnQ4Po95a2DcwH337l1caW7B/EerlJ/yfbqM+fn/jDr8u//9b4HX4RfR/GQAaHV4UVNdqpwO97aLD4w4gnkg3ssBIkOUp+ny6CX7K+XFtiXavP7s0J+1W7UszKdlaTAnOf7sBXRUrwpkruqyHdoFtdTIPtK1r2xR+mX9y2lTMgktOw7PFJMdHziz1V1wbC+Luk+DbdFfnIw/Tfg+Tbg90f4mtQzXKvv5X6nWbUPMJkYI/12FL2Mkf1eBM5YE+zwVanfBpECGGu1e4+4bXZgVuFjWL3ZbPxaVBy9mKqfr5Wb0iYDoX8bcwhu45han/H/5UGTYC9RAr2SR80L6bm2V4sjXHK0bAbGXo8Wx0HaZMK1K7TK4iDLRvtlwiQPELf0C5cFFl53ebxWZsAhXCq1tFXM8gX7s8AOaetFwJuS9aTfb3EPb4SnQb9+tsH0n9/ncOd/g6vUE7e4Ln08cBGeKQPKldqbx5Vf4cmYJHnrgc9z4Uh304CxxcLvZiS6tHQnv4z73/nkRoLxoON848nthmJTT+j+2KK/lh9Uju0nMTvUD45JZOJS+SUe7No38wGqfXjnveUcwGhS4G/C7emfgvafpAhy6dSUcLzK/g/svwD0C98zq26ae/qv9w8o6drwd2AZ1fLD/ONF46XJD/Dbq92miaaV4+zTR9kSjbINuP3e89TrOe1Lbp+G/K3djfcgyRvJ3lcw+T4a1ojZwH7e8wHbxbIIvhCgXy6bCpp3uK/3J4iyzarm6nB8tL1cDphY4ZHdLn3WpNm4hZg20KxcAZRb5t0tdmFQevI/c5m6N2QUTaznR2qVcjJzUhVYZ5K534CZKsKjKGrpA2YUghn9fa3dF4QD6AvtWtO1sOwZmLgjuG3FMadGdHcj23BwQn3sRFF19SD/d9oXvuyeXWdAntjVRu5Xxbd7A7/zJZWVK15yfvO3vusONCTMfxT/Mr1L+PfBlJ77QHZRMmXged7RvTurJrpJkMu5M8mf3sT6EicYTvwmabspdG4VdeK8l+YuUmZDpdskDxKz+4EEq3dK1fak8jzsjX3k3whdpot0iJnmazitBOdF4oky7db0LnmUpXqTMgEy2S3bdzDJ7cbM57AJhGuXCfs9I4DYq/xd4hjqeKJ38Fwpz7RukmWqXzLSrLOo92pkMoLmw3zPSVZKMXOsqISLKpJzrKkkGAzQRUXL4PG4iIoNh4CYiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjKYnLkdMBXpKD6sfj27FI4YxWTlV9xfq/byq9tElHUZy7h/9tOfBAobpAOLDxNRvshYxj1lyv14bv2z6Oz6BO+eOInbt2+P+DqGU3xYPlFu90753FJm00SU2zLexz2zZAZeeP5nWFK9ONOrJiIaFbLSx11QUICFCx5DVVUlTp48lbXiw3pqH7cZjdojWqM9DdDnCT7PJVaV8OCygsVq+TAqIhpJWb04OWH8eKxauQIX/nwRFy9dymZTQviDMup3YbsWcJWSXMX68Yvh2b8Lh9ymQN3FZ727cFAWk10KHN6xS61EIi9q1q1DVTOf2U1EIyOrgfvevXt4v7ERl6+0ZLMZkarKYJcP/9eVnrrc7sSa6uD4MpMFZbpyXZLbbFPKqJ15ww3bsk3YVqNejJXFFoiIRkpWArfP50Nrezvee++MyFaz0YLhi1UN3d9NgqYD2L7DHeiCISIaKRm/OOlyufHvv/+/OHU6+0FbBtUXt2zEcmtYQ5o74DAvRm2VNp3sCqkujTleqnrmaVTJuoNWs1Kq6/BZlzJ8Wnkp0ncTJBHlo4xl3AMDAzh+8hQ6u7oST5xlasFaWf18C7at1grcNjkBu278frPIpF8W43UXIGX23XwejdUbAhXK3Q4HcqsiIBEZXc5UwElFouLDsRih9iUR5SdDVsBJBQMwEeUzPmSKiMhgGLiJiAyGgZuIyGAKzGbeY0xEZCTMuImIDIaBm4jIYBi4iYgMhoGbiMhgGLiJiAzGkN+cTEexYCIioxg1GTeLBRNRvshIxv3ipucxceLEmOPlkwP37D8w7PUMp1gwEZFRZCTjPvXe2fjjT5/JRDOIiEaFjGTcH1+7ht4vvkDxgw9GjOvp7c1qsWBb7UZs1pUYO7LjTVyGTakhaWl6G6hbpZYx23MO3aiMWSCYiChTMnZx8t13T+C5H0deVDx2/ESmmhBBVsBZW92Lw7/eFyzkK39qBXHsdWUikO9SCiQMakG7WJYkY7AmoizK2MVJT08POj/5JGTYzZud6OnpzVQTIrm86EUp1mzdFFm+THDU6yqzawWE/SXJiIiyJaN3lRw9dlwpFCwNDg7i2ImTmVx9BFmC7NDO3+C1HfXAmpfxarT6k0REOSajgfvu3bu40tyivJY/5ftskl0lyyt9IoC7cXrPATR6zbBYY0wcUUC4AstrY01MRJQ+Gf8Czrn3z2P69GloON+Y6VVHKHA3wLM0WPDX56jHr1pM0acNKxCsXshsUfvEiYgyyLRixQrf5MmTWSyYiCiLWCyYiGgUGzVfeSciyhcM3EREBsPATURkMAzcREQGw8BNRGQwDNxERAbDwE1EZDAM3EREBsPATURkMIb85uRIy7Xiw/LhV7/YWArH/n044+azUIgoFDPuGFh8mIhylSEz7tFefFg+tXD3zgbxitk2EUUyZMbN4sNElM8MmXHnavFhWVxh/dbF8NQ7Ya9bDKvJhI63duIg1mH7arsyjb7AsNqXrU4nyWkPtZi04WY0KoWLK9VlNvViSU3kMogo/xgy45Zk8eFosll8WGVGTTVweMcubHvLgbLVW/DavA5sl+/3NQHVS1Dl84kgb8UTS9XptmvT2uvWKeOiLtOiX0YdS6wR5TFDZtySv/jwzBkzAsOyXnxY4UXjkXNwySy6uQMddcXwNMhybaZAcWKLTfZju3HmDTdsyzZhW41FmVNW1Ym5zMAy2uHwlmZqY4goBxk245ZyrfhwKmR3yItbXsJa1AcyaU+2G0VEhmDowJ1rxYdTYjXD4r2Aw2ddyttp5SITz3KTiMgYDNtV4pdLxYdT0nwejdUbsPmVauWt2+Fgxk1ESTFkseCRxuLDRJRto75Y8EhjACYiIzF0HzcRUT5i4CYiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhgGbiIig2HgzmHqEwQ38tnbRBSCX3nX/OynP8E77x6HxzP8Rz0V/PNPIwd2tmOw4y/DXjYREQO3ZsqU+/Hc+mfR2fUJ3j1xErdv3x7ZFcycB9O48fA1J/8UQxYNJqJoGLjDzCyZgRee/xk++uvfcL7pwogu2zT9EeVfLIMnfz+i6yOi0YmBO4qCggIsXPAYqqoqcfLkqewVH9YVDW42maIWFz7YbMMTmzfA7jgQKCBsq92IF+xO7N1zDt222qgFiYnIuBi445gwfjxWrVyBC3++iIuXLmW1LfriwrKe5WDl03itbh3mN7+J001O1FTPg+2sC92wocJuhqNpn/I62jxVzeqBgIiMiYE7jnv37uH9xkZcvtKS7aagwBSnuHBzBxx1i1FhExk25sFudqKxOcE8RGRYDNxRyALEre3teO+9MyLTzXZrVP5uEjQdwPYd7kA3ilRgakWbcxVqym1oRamYpj6kayXaPERkXAzcYVwuN44eP45bt77OdlNCacWF98riwiIoq8WFewOjLzdcQM2aJagVrx1HZAFiU8J5iMiYGLg1AwMDOH7yFDq7urLdlOgSFRd2tcOBDajpfRuH3Kbk5iEiQ2Lg1uzZfyDbTYhL6a/e+xucCR+hXWSMNj7RPERkTPzKew5Tuja8Xriz3RAiyinMuNNguF+kkbftbV9tV+4AObLjnHIrHxGRHwN3Dipo+RO2++9AZNAmojDsKiEiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhgGbiIig+EXcNJg2VOrIoZ9cuM6Pu7I/nO9icj4GLiFFzc9j4kTJ8YcL58cONyHUM2YPQfjxo9D+5W/Dms5REQM3MKp985i5YqnYo8/HfF8vSF56OEZyr9Yzh5/e0TWQ0SjGwO38PG1a+j94gsUP/hgxLie3t7sFQuWdSY3b4ClSQT0ulWwy6IIsgAwKrF+6yqUac8xcTe+HlIoeLOuTNkRf6FhX0XIPCHjohYlVt9fhi2lNoSvJ5m2EVFqGLg17757As/9eH3E8GPHT2ShNaHsdWUiyO3CIRlUlYC5GJ79u5SCCf7g/qx3Fw66a7G2uheHf70vGBB1QbtYljDTgqhSOHjrOkAJzkNpQ+jylGUq60mtbUSUOgZujaenB52ffIKZM4JdGTdvdqKnZ+RLfaXaJeKo12WmVWUim7WgbNMWLNFN4zbbgGYverEYa7ZugmX/PpxxB+ex60qYKbTqOOVVwOUkHvgd3oaI5Q21bUSUMgZunaPHjuPnL2wUsUhki4ODOHbiZNrWdeD56Hdibnh9MOG8Pk+T0l0R/pxuWfHm0M5WLdN9Ga+avWgUQfJ0zCV54RnhKg2pto0BnCh1vI9b5+7du7jSrN6yJ3/K9+kiA3S0fwk1d8BhXozaquCgqmeeRpXPp/RNL6/0KUHy9J4DaPSaYbEG51m7zKabaQlq4ESryz+gGBZttFpUOPk2yC6S5bXWobWNiFLGjDvMuffPY/r0aWg435jW9Qw14y4wteLgfjN+sfFlbFutZqsdb+1U+p4L3A3wLA0O9znq8asWkzrPDmD91g3YVqO/OKlmxnK+w02l2Kx1cSQqKhzeBnVZLUpQTrVtRJQ604oVK3yTJ09Gt9ub7baMGtG+gKPH2/6IKJxvcBAlJSVxp+nq6kKPx8WMO1uG08dNRPmNgTsNksmoGaCJaKgYuLOEGTcRDRUDd5YwQBPRUPF2QCIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhjeDmgAK9ZFPif8xlUH2i5/lIXWRBcs+rALh5J4BonyPPBqb9QnCRJRfMy4DWr2XDvmL1yU7WYQURYw406DTBQflv5u1hzlXyzH3jw47HUQUe5hxp0Gsvhw3PEjVHyYiPITM+40SHfx4Vtffqn8vP+BB1KaL1ATst4Je91iWE0m5XnZB7EO21fblWn0xX3VosHqdJLybO0WU9Qixnt2t4WuS5vX4nwbv3qjNaKIsOTzBB8lHK+YcdUzL6HGcyCkGDHq1b50f1/5nt0eLHulGp6mXiypidwWotGEgTtN0lV8+GpbM5xtapWe0vJKzC2vSjBHODNqqp3Yu2MXuqtkwN6C1xz12L7jT1qwXYKqs1p196XAYTGdvHioBMi6dahqDhYXDikgbLKiUhuuTluMxv27sNttCgm227ULlzIYrynWpk9QzNgtArzFImvyuJW6lsVeEfBlHUvxfv68Ungc5/G5yaJum+WCblvqsLyN5dFo9GFXSZr4iw/rjUTx4R63O+rr5HnReES7k6O5Ax0+Dxob1AMBXLKgr1rCTFazOfNGA7BsE7ZtfTmQkeuFFBD2m7dOBG2IgB5ZrPhcc3Cyy+3O4Btt/OGzruAwWczYW6oUM+5uc8JTWqaUQJs/rxiOIxfQa58Hm8j8LcVeONr883l129IOB2uD0CjFwJ1GsviwTwQbaaSKD0+1WqO+HmkyY31xy0tYC5mN78K2fU1xy5n52YuLxXTB+pXDoxUzVoKwXGYlyotlnUyPWEcpKqrmwR5SN5MoPzBwp1E6ig/LrpElTzyl/Eu9myQFVjMsuiw4YQFhjaNpH3633wn7xpfxbKV60IosLmzFE9WlwZkSFDOW2X+rQxwU1iyGvdcrzha093IZjnbeB055h33caZaO4sOpXpQcEtlVUb0Bm1+pVt4mKiCsJwsD/26HF+u3voxX65zKRcaD9WVKf/q21fLCoweNTU4RebXpExQzlmR3CaoXiwODPBCatPelcBxxKe+J8gmLBRtAtG9OJoP3cRMZB4sFjzIMwESkxz5uIiKDYeAmIjIYBm4iIoNh4CYiMpjAxckp8/9HNttBRJTXvv3qBgoT3FVSOFbeVbKPGTcRkdEwcBMRGQzv4ybMmWbC9W4fFpVF/wbixQ5fhltERPEw485zMmhbpmS7FUSUCgbuPJarQdtXNA7//b9NxOKikc30fdMn4F+XjoPZxzMIMjZ2leSpXAjaPt9YrFw5Ad8zmcTrb3H8ndtw8kl/RAkxcOcp2ad9vTt76/f5ClBdOwbOd/pwVATr0oWFeOrxcXB+cA+mvm/xh6Pfgk/9I4qOgTtPxboQmSkm0yAuNNyRL5T3js/u4am5JqUbw8usmyguBm4aFtkf/ZPa8ZiqBduPP/waRz8zaRn1JBRfFcH5MbU7RD8+nH36WPR+PqAEbXWZBbgY1nWidq2I6T76Do88pq5TLu8dTMS/LRinTNPj/AZ/cAzqpg+uWxl2607a9gVRpjBw05ApwbkMOP5Onxpwp0/ALx+biNJPb8OhTfPIY2OU8UfDxjsDAToYgP8QJaBHGoPH536H/xDL9DwsA/Z9+GX3bfz2nTva8sahtEOuf5wStPFRH36rLVfpjilM2+4gyhgG7jw1EvdmK90dHwzCXDYJvyxV/5TkRUa9ax/psuZPv8WluZNQ+jDg/Ay6vmwZVIvwr3Pv4j/O3U1Qaec7XPrwrtqd8ul3+PgxE3o7tP7wr334Qvw03wc47h+DR74Wy/sUga5ytTtm2JtNlHUM3HnoTsWMIc87oTVYud6fMePqgMh4bwe6OIbCcekOSleORakIusmWSCPKV7yPO095j+/FwMcfKq/72/+svPcPl/96Tv0f3P7UEW8RwP0FKBZZ7fGO75S3lofHoDhskkemjwu8tpSNx+P33YPzU+1e7YVjdePGigz5Ozi/Dp1/yPd0i2z82n3j8f2HteXIbp25zFNodOBfch775kYzxtw3FQM3r4QMNz/1ghK0+9v+jIkP22MvQOv6eG7VBOVtT/e36A2b5BrG4JcrJyqv9fdqy26S419PDBt3d8TuKDGZ7uGdj8aofeAL5PLv4dLVe8BDI7J4oqxi4M5j44un49ZHJ1E4dyH6r34QMk4G7L4r5+LOr97S148LkSNEpNRef3Ybv/3gTug4jdchxjkQMU7t+1bf6+/plsH46NF78HdaJ3z/2R389rPQu0guOELbQGRE7CrJY0XzazGueBomfW9BxDiZcZvGTshCq4goEWbcecw0djymLFoVMVz2ccugXVj+gyy0iogSYeDOU7IfO9r78OFD5e9G4dfWiUYeA3ce0t/SR0TGwz5uIiKDCWTcX13+X9lsBxFRXvMNDqL/Xvxiwf1dXcpPZtxERAbDwE1EZDC8OEmY9+g/oP3KX7HsqchbA6Wzx9/OcIuIKB5m3HlOBu2HHh76Q6eIKPMYuPNYNoP2oHUpXtyyEcutI1u4d7Dyabz6wlLYWBCYRjEG7jzFTJvIuNjHnadkn7b8ly0F7gbs3tkAfrOSKHUM3Hkq1oVIIsp9DNw0LLKv+hcbF8OqPSq1462dONRiwqDPiic2b4Cl6W2gbhXKwscr85nRuONNNOseszroq8D6rYvhqXfCXqcuV85zEOuwfbX6bHB34+vYfc6tmz64fMnn8WZq84mygoGbhkwJzkuBwzt2wSUCp7ww+FrdOlQ1v4nL2jT2ujIcEeMPxRgfnRk11U7sFfN1V8mAvQWvOeqxfceftIC/BFVn5TIqlaCN+l3Y3qIG7qpnXsKa8DI8RKMMA3eeGol7swtMbpx5ww3bsk3YVmNRhvl8oeXOHPW6jLr5PBqrN6C8CrjsjrdkLxqPnFMOBmjuQEddMe4/laYAAASOSURBVDwNLVD6w11e9KIUFpt4ay2D3XsBe5sR6Cq/3O7EmuphbxpRTmPgzkMF//zTIc87ePL3wddaNwmaDohs2B3o/iCi9OLtgHnqy/ffwZ0up/J64Hqr8t4/XP776sIJ3HUnePyr1QyLyHgPn3Upb6eVi0w4bBL7vMrA62nL6lBjdqKtOXSaId/TLbJxh3kxaqu05cium+rS1JZBZEDMuPPY7f+6jjGF9+OO+Kn3wA9XKkF74ONWjLfGuddb6/rY/IraN+F2OOAJm8SBMmzbWqe8lt0oR8IuRg5HgakVB+vLlD7wbavl8j1obBIHozj1jYlGA9OKFSt8kydPRrebV+LzhewqkVn1uKnT8G1PNybNsmPgpkMJ2HK4/CnpX/vpu0riCd5Vsku5i4SI4pOPdS0pif9Y166uLvR4XOwqyWeTy/4eYx+Yigklkd0LMuM2jR2XhVYRUSLsKsljpjFjUfTo4ojhMtOWQXvS9yqy0CoiSoSBO0+Fd4H434cPHyrlVsG9vwG/0k408hi481Cy/dRElJvYx01EZDAM3EREBsPATURkMAzcREQGw4uTxGLBRAbDjDvPsYQZkfEwcOex0VgsOO46WUiYRgkG7jyVi5m2rGbz7JaX8GKtNdtNIcpp7OPOU7lULNj/QCr5yFeHM2tNIjIMBu48lUvFgv1fjz8DtfRYTbYbRJTjGLhpWEa6WHDcdbGQMJGCgZuGLH3FguNhIWEiBu48ldvFguNhIWEiBu48xGLBRMbG2wHzVC4VC46HhYSJIjHjzmNGLxYcDwsJ02jGYsF5iMWCiXIPiwVTUlgsmMiY2FWSx1gsmMiYGLjzFIsFExkXA3ceYrFgotwk+7CTwcBNRJQDTAXJX3LkxUkiIoNh4CYiMhgGbiIig2EfN7FYMJHBMOPOc7lYwoyI4mPgzmMsFkxkTOwqyVO5lmnLoOqvYqM8EGr/Ppxx88s7RNEwcOep3CoWXIH11V7s+fWbwUo6G9fBk6EnCRIZDQN3nsqtYsGtOLRXvAhUyumAo26xWslmyJVyiEYvBm4alrQUC64qgx29aJP1GXSjWCyYSMXATUOWjmLBSkCvK4WjfleMbhIWCyZi4M5TuVgs2Fa7ES9UA437d8W5MMliwUQM3HkoF4sFK9kw3savdraCj4Ilio/3ceepXCoWLAN+TakTR/7YErEKFgsmisSMO4/lTLFgcQCwmuxY+8oWrNUNVi48DvGuEhYLptGMxYLzEIsFExmX19XNrpJ8xmLBRMbErpI8xmLBRMbErpI8NFJ3lRBR5smuEmbceYjBl8jY2MdNRGQwDNxERAbDwE1EZDAM3EREBsPATURkMAzco8z4YuDhp00YW5TtlhBRujBwjxIyUE+tNuGhlQUYU2TC+Acz+zVzWbTg2S1Po8rnG/FCwNkoLJwM/TYTZRLv4zaogvEiu34QGCcy7Ik2EybNDA3UcjgSPNyPiIyJgdtAZFY9Zb4I0iUycMfPqCc+BHwVq8xMmukLAQ9F+AOqhrs8otGGgdsgir4HFFcn7tn6rs+ndJWMY4kuolHr/wP5JCBVSyzbhQAAAABJRU5ErkJggg=="},81835:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/markdownfiles-7689b403bd69465458e99e222a781f83.png"},78272:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/self-doc1-c3efdc94769a2ac752278f89b3a48a49.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/09120524.ce7b82c1.js b/knife4j-doc/gitee/assets/js/09120524.ce7b82c1.js new file mode 100644 index 000000000..5ef2f1c41 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/09120524.ce7b82c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7465],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>k});var a=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function p(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=a.createContext({}),m=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},u=function(e){var n=m(e.components);return a.createElement(l.Provider,{value:n},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),s=m(t),c=i,k=s["".concat(l,".").concat(c)]||s[c]||d[c]||r;return t?a.createElement(k,p(p({ref:n},u),{},{components:t})):a.createElement(k,p({ref:n},u))}));function k(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,p=new Array(r);p[0]=c;var o={};for(var l in n)hasOwnProperty.call(n,l)&&(o[l]=n[l]);o.originalType=e,o[s]="string"==typeof e?e:i,p[1]=o;for(var m=2;m{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>k,frontMatter:()=>o,metadata:()=>m,toc:()=>s});var a=t(87462),i=t(63366),r=(t(67294),t(3905)),p=["components"],o={},l="3.4 \u81ea\u5b9a\u4e49\u6587\u6863",m={unversionedId:"features/selfdocument",id:"features/selfdocument",title:"3.4 \u81ea\u5b9a\u4e49\u6587\u6863",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb",source:"@site/docs/features/selfdocument.md",sourceDirName:"features",slug:"/features/selfdocument",permalink:"/docs/features/selfdocument",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",permalink:"/docs/features/author"},next:{title:"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236",permalink:"/docs/features/accessControl"}},u={},s=[],d={toc:s},c="wrapper";function k(e){var n=e.components,o=(0,i.Z)(e,p);return(0,r.kt)(c,(0,a.Z)({},d,o,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"34-\u81ea\u5b9a\u4e49\u6587\u6863"},"3.4 \u81ea\u5b9a\u4e49\u6587\u6863"),(0,r.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e3a\u4e86\u6ee1\u8db3\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e,\u6dfb\u52a0\u4e86\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd,\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\u80fd\u4e30\u5bcc\u63a5\u53e3\u6587\u6863,\u5728OpenAPI\u4e0d\u8db3\u4ee5\u6ee1\u8db3\u63a5\u53e3\u8bf4\u660e\u7684\u60c5\u51b5\u4e0b,\u5f00\u53d1\u8005\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\u80fd\u591f\u628a\u63a5\u53e3\u6587\u6863\u66f4\u6e05\u6670\u7684\u63cf\u8ff0\u3002\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u4ef6\u6269\u5c55\u8865\u5145\u6574\u4e2a\u7cfb\u7edf\u7684\u6587\u6863\u8bf4\u660e"),(0,r.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5f53\u524d\u9879\u76ee\u4e2d\u6dfb\u52a0\u591a\u4e2a\u4e2a\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u5939\u4e2d\u5b58\u653e",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u683c\u5f0f\u7684markdown\u6587\u4ef6,\u6bcf\u4e2a",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u6863\u4ee3\u8868\u4e00\u4efd\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u6ce8\u610f"),"\uff1a\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\u5fc5\u987b\u4ee5",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u7ed3\u5c3e\u7684\u6587\u4ef6,\u5176\u4ed6\u683c\u5f0f\u6587\u4ef6\u4f1a\u88ab\u5ffd\u7565"),(0,r.kt)("p",null,"\u4f8b\u5982\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(68623).Z,width:"366",height:"241"})),(0,r.kt)("p",null,"\u6bcf\u4e2a",(0,r.kt)("inlineCode",{parentName:"p"},".md"),"\u6587\u4ef6\u4e2d\uff0c",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5141\u8bb8\u4e00\u7ea7(h1)\u3001\u4e8c\u7ea7(h2)\u3001\u4e09\u7ea7(h3)\u6807\u9898\u4f5c\u4e3a\u6700\u7ec8\u7684\u6587\u6863\u6807\u9898"),(0,r.kt)("p",null,"\u6bd4\u5982",(0,r.kt)("inlineCode",{parentName:"p"},"api.md"),"\u6587\u6863\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-markdown"},"# \u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\n\n## \u6548\u679c\u8bf4\u660e\n\n`knife4j`\u4e3a\u4e86\u6ee1\u8db3\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e,\u6dfb\u52a0\u4e86\u81ea\u5b9a\u4e49\u6587\u6863\u529f\u80fd\n\n\u5f00\u53d1\u8005\u53ef\u81ea\u5b9a\u4e49`md`\u6587\u4ef6\u6269\u5c55\u8865\u5145\u6574\u4e2a\u7cfb\u7edf\u7684\u6587\u6863\u8bf4\u660e\n\n\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5f53\u524d\u9879\u76ee\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u6587\u4ef6\u5939\u4e2d\u5b58\u653e`.md`\u683c\u5f0f\u7684markdown\u6587\u4ef6,\u6bcf\u4e2a`.md`\u6587\u6863\u4ee3\u8868\u4e00\u4efd\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\n\n**\u6ce8\u610f**\uff1a\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e\u5fc5\u987b\u4ee5`.md`\u7ed3\u5c3e\u7684\u6587\u4ef6,\u5176\u4ed6\u683c\u5f0f\u6587\u4ef6\u4f1a\u88ab\u5ffd\u7565\n")),(0,r.kt)("p",null,"\u6700\u7ec8\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u7684\u754c\u9762\u4e2d,",(0,r.kt)("inlineCode",{parentName:"p"},"api.md"),"\u7684\u6587\u6863\u6807\u9898\u4f1a\u662f",(0,r.kt)("inlineCode",{parentName:"p"},"\u81ea\u5b9a\u4e49\u6587\u6863\u8bf4\u660e")),(0,r.kt)("p",null,"\u6574\u4e2a\u6587\u6863\u6548\u679c\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:t(78272).Z,width:"1309",height:"602"})),(0,r.kt)("p",null,"\u5982\u679c\u6ca1\u6709\u6309\u7167\u4e00\u7ea7(h1)\u3001\u4e8c\u7ea7(h2)\u3001\u4e09\u7ea7(h3)\u6765\u8bbe\u7f6e\u6807\u9898,\u9ed8\u8ba4\u6807\u9898\u4f1a\u662f\u6587\u4ef6\u540d\u79f0\uff0c\u5982\u56fe\u4e0a\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"api2.md")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u5982\u4f55\u4f7f\u7528")),(0,r.kt)("p",null,"\u5728Spring Boot\u73af\u5883\u4e2d,\u9996\u5148\u9700\u8981\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,r.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u81ea\u5b9a\u4e49\u6587\u6863\u76ee\u5f55,\u652f\u6301\u591a\u7ea7\u76ee\u5f55"),(0,r.kt)("p",null,"\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n documents:\n -\n group: 1.2.x\n name: \u6d4b\u8bd5\u81ea\u5b9a\u4e49\u6807\u9898\u5206\u7ec4\n # \u67d0\u4e00\u4e2a\u6587\u4ef6\u5939\u4e0b\u6240\u6709\u7684.md\u6587\u4ef6\n locations: classpath:markdown/*\n -\n group: 1.2.x\n name: \u63a5\u53e3\u7b7e\u540d\n # \u67d0\u4e00\u4e2a\u6587\u4ef6\u5939\u4e0b\u5355\u4e2a.md\u6587\u4ef6\n locations: classpath:markdown/sign.md\n")),(0,r.kt)("p",null,"\u5728\u914d\u7f6e",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j.documents"),"\u4e2d\uff0c\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u96c6\u5408\u6570\u7ec4,\u4ee3\u8868\u5f00\u53d1\u8005\u53ef\u4ee5\u6dfb\u52a0\u591a\u4e2a\u81ea\u5b9a\u4e49\u6587\u6863\u5206\u7ec4,\u56e0\u4e3a\u6211\u4eec\u5728\u6700\u7ec8\u5448\u73b0\u63a5\u53e3\u6587\u6863\u65f6\uff0c\u4f1a\u5b58\u5728\u903b\u8f91\u5206\u7ec4\u7684\u60c5\u51b5\uff0c\u6709\u65f6\u5019\u6211\u4eec\u5e0c\u671b\u4e0d\u540c\u7684\u903b\u8f91\u5206\u7ec4\u4e0b\u663e\u793a\u4e0d\u540c\u7684\u903b\u8f91\u5206\u7ec4\u6587\u6863\uff0c\u6240\u4ee5\u9700\u8981\u901a\u8fc7\u8be5\u8282\u70b9\u4e0b\u7684group(\u5206\u7ec4\u540d\u79f0)\u8fdb\u884c\u533a\u5206"),(0,r.kt)("p",null,"\u76f8\u5173\u5c5e\u6027\u8bf4\u660e\u5982\u4e0b\uff1a"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"\u5c5e\u6027\u540d\u79f0"),(0,r.kt)("th",{parentName:"tr",align:null},"\u662f\u5426\u5fc5\u987b"),(0,r.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"group"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u903b\u8f91\u5206\u7ec4\u540d\u79f0,\u6700\u7ec8\u5728\u903b\u8f91\u5206\u7ec4\u65f6\u8be5\u5c5e\u6027\u9700\u8981\u4f20\u5165")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"name"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u5206\u7ec4\u540d\u79f0\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u5f00\u53d1\u8005\u5b58\u5728\u591a\u4e2a\u81ea\u5b9a\u4e49\u6587\u6863\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u5448\u73b0\u65f6\u7684\u4e00\u4e2a\u5206\u7ec4\u540d\u79f0")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"location"),(0,r.kt)("td",{parentName:"tr",align:null},"true"),(0,r.kt)("td",{parentName:"tr",align:null},"\u63d0\u4f9b\u81ea\u5b9a\u4e49",(0,r.kt)("inlineCode",{parentName:"td"},".md"),"\u6587\u4ef6\u7684\u8def\u5f84\u6216\u8005\u6587\u4ef6")))),(0,r.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,r.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,r.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,r.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,r.kt)("p",null,"\u5f00\u53d1\u8005\u914d\u7f6e\u597d\u540e,\u6700\u6838\u5fc3\u7684\u4e00\u6b65\uff0c\u4e5f\u662f\u6700\u540e\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5728\u521b\u5efa",(0,r.kt)("inlineCode",{parentName:"p"},"Docket"),"\u903b\u8f91\u5206\u7ec4\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u5c06\u6269\u5c55\u5c5e\u6027\u8fdb\u884c\u8d4b\u503c"),(0,r.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildExtensions(groupName));\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,r.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,"1\u3001\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,r.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,r.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"buildExtensions"),"\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u9700\u8981\u4e00\u4e2a\u903b\u8f91\u5206\u7ec4\u540d\u79f0\uff0c\u5c31\u662f\u5f00\u53d1\u8005\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"group"),"\u540d\u79f0"),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,r.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,r.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,r.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,r.kt)("inlineCode",{parentName:"p"},"x-markdownFiles"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u6587\u6863\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("img",{src:t(81835).Z,width:"809",height:"285"}))))}k.isMDXComponent=!0},68623:(e,n,t)=>{t.d(n,{Z:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW4AAADxCAYAAADr5V2tAAAgAElEQVR4nO3da3AU55kv8P+IO5KNLeZi8CIuDhqhi9k1eEmQCIK1s+XigADjdVHxSaqCwTipOpv9aIONSYB8PKlTlcPNbJ2c1BZF7IBlg4EDBmQksgTbCeg6g7lIXluei2QbSxZgrDnv290z03OfkTSX1vx/VaCZvr7d0jz99Ns9/ZgWLVrkKykpQbfbCyIiyg7f4CBkLI6nq6sLPR4XCjLUJiIiGiEM3EREBsPATURkMAzcREQGw8BNRGQwYzOxkhXr1kcMu3HVgbbLH2Vi9YYxaF2KX2xcDIv3AvbuOQeXyZTtJuWcQV8F1m9dBTucOLLjTTQnuY+qnnkJa0q9aNy/D2fc3K/ZNFg4Cz94fCq8lz7Atf7s/i5ypS2D1nI8NsWDbwZ8GEDidmQt45491475Cxdla/V5y1a7Ea9u2YjlVt+ITktDM+grxCOP/xBPLFsa+PdPteWw+SL3+aDPgkdrF+CRQl9yw0VQWvT4LBRFWdbIbkP09Y8WubJ9PkzB7PlzlddRM+4XNz2PiRMnxlzAwMAA9uw/MOyG/N2sOcq/WI69eXDY66BQVotZ/J/cPfupTJspBaZWHNrZqr4ZRWck7tZzuKKdCcjs60fLa2HTDZMKTB5c7yxBhbUI1270Z6mlkVJtV0H/TVw8d1O8yv7vL5m25Mp+N+ErfO6aoLyOGrhPvXcWK1c8FXMBp06fSU/LkjBY+TS2r7YH3rcfeQum1XWw67oX5GnxWrsJHW/txKEWk3aa7MThX78P64vPY4lF/SX5fJ6QU2d/V4VVLMPnqMcRrAo5vU44XjuNL9MCirvxdew+5w52gTjf1uZJ4jS/ah22advpX47SxrB1+HyOkGXFG+/fL4AFSzZtQY3Yhl+90RqxT+V+a5v3csS0rzWYI7Yj3j7Vd/0ccZRibY0lYnsifr+6faW0zWfFE5s3oMas7rPLqEyqqyTydxU2PtHvSv49NZmxWewX/zadtq4L7KdUfiepKnC34f/1y1P4CthcrSFdZrfcPUC5BUXX+9CXQweuXG3XSMmV7fvmy1vKz6iB++Nr19D7xRcofvDBiHE9vb3iqHMjva2LQflQ1ZWGDDOJDKzNKQJ3aSkqbOfQ7apAuTZJsdkmPlQi9BSLN14v3CIIVZj181pQs3EdPP6AoH3QlXH2OqyF/BBq65YfzkTjdR9eyVrzPJ717sRBf4wqXiwCUOLtNFmqRcAIvrdU12F5mwgcrsqIdZhMdqzZug7QBbVY45PdpwmFbIcFlpj7NLg9ay2R25OuvuYR+V1BHGjqzMFtWrMJdnNwQ5P9nQw1eKPPA2//AthsQHd/sB/2qhyOBZhjuyGy8dQWWTR7Ab4/q0h5LQ9GLWfVg4LsCvj7ZfMC++vrmx/gosgsZTfO3H9cgMLOdhG05sHS34WLfxGf/TkLI5bTHaVdcn2LZg4E1mOr/KH4C23HqRuFYnsm46Z//Uo/cwnu8x9E9WcfYW0LrA9FStvM3g+VtirTijOVJ2d+g/+82IdHls9Ef1sPzOXqcuUy/4YK/KjCErqNyrrVtnTDKtZVgv7OAcyeFTodYuz32PsuertdpujbJXn/yxN4LbtF5swvwQPa+wHXVXR8fhu4/ZXyPubFyXffPYHnfhx5UfHY8ROxZkk/q1nZ0NCMTfxBmL3iwykCiFW+N6NY7GK3xwyLRd35MrB4mtrhLnCL0+y2wOLUTLwYFptcdpny4fN5mpTMvTuQ2fknTnK8P4vVMjd58IC/qaIdjv27sFv+Ucb5QEdmyRbYy20i4wttQ/Dswo6aZTZc9sYfv/uN3wDhF+lEth1tn6IlyrRimyK2o0BMGmufJtieM+4UI0+yRuR31YvGHftw2VarZu7ib6lXnIn8rtmmnAEssWh/bwl+J80xziyGqsDUj6udXjxpFSt3exLPoJEBqkIE0eYzHwQz+EDQFsHqUgNO95sCwfrR/gb8zaVOZhGZZsvZBlyR0xfNxg+iLKcAke3qu/EhWgp/iFlzisTBZyYqJ8nA75YRPdguuT7xtlUsX2aySvAtV8801EA6D5M6P8RpfXBeVgGIICjXN2tmMAueJuKDp7MBX5vkL6ZQjOvBRbHcWzYZsGvxpKcNp8+2acF6JmzX5TrCifkKu3TTleERt7xwGbl9/uCrb1+s4fp2+7cLbWKfawcoeVCbps2vBm0r7jiu4K+3xd8WJuJh+1zMvn0FXV23lWliBm5PTw86P/kEM2fMCAy7ebMTPT29yfydpEdzBzpEdlgmsqNtNQh+MNuccFeb1Q+eiCoWrxONveJnsRnTxCAZyB1tLrFD/R+6YND0Z2HTzMXKT4+jXfmDLIDM5MWHvTS18TK727a1Lrh8iy7VdF4Idsvosr7Aqbh/OuXsQOX2eAG7JWobUh2fyj6Ne0dLyHZYY+7TgBjbE3cfJCnaMlrD94MYrqxWS5iT+l352+zyQv7FW8TBp61ZBk43PMqA0GWltM+T1g8RLyL7YV1ie0Qwtfncyd951NePAZSgctlCFOnvoLBZxIFbZM//WIvZusm/LiwKvPa06bprYi0nRru6m9thW7YAT4ptuXmpNaKbQR6IrrX0o0hk8U/osnh/25QsXwTmQKLj6sTNmdqZiLK+EtiKbuBWn0VJ4FzNwX13s+2Guj4xnbt8EvpvuNV9qGzDVBQVIQoxX2A6edYzNfb2RWtfMu2GNt6FwK9UPitq2hRt/gemiEx7ovgbehS6/AcDEycFXse9HfDoseP4+QsbxbrFkXBwEMdOnIw3+ZAlexHSf2HK3ycrT8Ff+BcvXvtjOxxecfpun4cnLKXiQ3Qep71m1IiAVFHeK3aTyJ7ETpq2rE6c4ntxfp+aQarZYeg61CzdrQSE8ig9CInGR+2/9WeqUbYlSGa02ktxSi5fdougWKFFm16vS/zC1Yjhb4OyaEvy46NdgIm1T2Ummoxk9mms7ZFBMOY+EAddeWdFd1hXTKz265dhK1dfBfdD9GUk+7uKp9ub+j5Pim0mZkFkjH2Ri5AXy1zeeUom61Iyum9EgC9EYSFk3AkqnIwiMc4/z5VzHi2jXop/KpSB9ANcFeN8fZ1KF0hk321hRLNiLUcG8Mh2JebvJoHMTs8Guy7i0w5ououGLmuJSNi6lLMCpOnmj6FsXyi13VF2a6TbbnQ4Po95a2DcwH337l1caW7B/EerlJ/yfbqM+fn/jDr8u//9b4HX4RfR/GQAaHV4UVNdqpwO97aLD4w4gnkg3ssBIkOUp+ny6CX7K+XFtiXavP7s0J+1W7UszKdlaTAnOf7sBXRUrwpkruqyHdoFtdTIPtK1r2xR+mX9y2lTMgktOw7PFJMdHziz1V1wbC+Luk+DbdFfnIw/Tfg+Tbg90f4mtQzXKvv5X6nWbUPMJkYI/12FL2Mkf1eBM5YE+zwVanfBpECGGu1e4+4bXZgVuFjWL3ZbPxaVBy9mKqfr5Wb0iYDoX8bcwhu45han/H/5UGTYC9RAr2SR80L6bm2V4sjXHK0bAbGXo8Wx0HaZMK1K7TK4iDLRvtlwiQPELf0C5cFFl53ebxWZsAhXCq1tFXM8gX7s8AOaetFwJuS9aTfb3EPb4SnQb9+tsH0n9/ncOd/g6vUE7e4Ln08cBGeKQPKldqbx5Vf4cmYJHnrgc9z4Uh304CxxcLvZiS6tHQnv4z73/nkRoLxoON848nthmJTT+j+2KK/lh9Uju0nMTvUD45JZOJS+SUe7No38wGqfXjnveUcwGhS4G/C7emfgvafpAhy6dSUcLzK/g/svwD0C98zq26ae/qv9w8o6drwd2AZ1fLD/ONF46XJD/Dbq92miaaV4+zTR9kSjbINuP3e89TrOe1Lbp+G/K3djfcgyRvJ3lcw+T4a1ojZwH7e8wHbxbIIvhCgXy6bCpp3uK/3J4iyzarm6nB8tL1cDphY4ZHdLn3WpNm4hZg20KxcAZRb5t0tdmFQevI/c5m6N2QUTaznR2qVcjJzUhVYZ5K534CZKsKjKGrpA2YUghn9fa3dF4QD6AvtWtO1sOwZmLgjuG3FMadGdHcj23BwQn3sRFF19SD/d9oXvuyeXWdAntjVRu5Xxbd7A7/zJZWVK15yfvO3vusONCTMfxT/Mr1L+PfBlJ77QHZRMmXged7RvTurJrpJkMu5M8mf3sT6EicYTvwmabspdG4VdeK8l+YuUmZDpdskDxKz+4EEq3dK1fak8jzsjX3k3whdpot0iJnmazitBOdF4oky7db0LnmUpXqTMgEy2S3bdzDJ7cbM57AJhGuXCfs9I4DYq/xd4hjqeKJ38Fwpz7RukmWqXzLSrLOo92pkMoLmw3zPSVZKMXOsqISLKpJzrKkkGAzQRUXL4PG4iIoNh4CYiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjKYnLkdMBXpKD6sfj27FI4YxWTlV9xfq/byq9tElHUZy7h/9tOfBAobpAOLDxNRvshYxj1lyv14bv2z6Oz6BO+eOInbt2+P+DqGU3xYPlFu90753FJm00SU2zLexz2zZAZeeP5nWFK9ONOrJiIaFbLSx11QUICFCx5DVVUlTp48lbXiw3pqH7cZjdojWqM9DdDnCT7PJVaV8OCygsVq+TAqIhpJWb04OWH8eKxauQIX/nwRFy9dymZTQviDMup3YbsWcJWSXMX68Yvh2b8Lh9ymQN3FZ727cFAWk10KHN6xS61EIi9q1q1DVTOf2U1EIyOrgfvevXt4v7ERl6+0ZLMZkarKYJcP/9eVnrrc7sSa6uD4MpMFZbpyXZLbbFPKqJ15ww3bsk3YVqNejJXFFoiIRkpWArfP50Nrezvee++MyFaz0YLhi1UN3d9NgqYD2L7DHeiCISIaKRm/OOlyufHvv/+/OHU6+0FbBtUXt2zEcmtYQ5o74DAvRm2VNp3sCqkujTleqnrmaVTJuoNWs1Kq6/BZlzJ8Wnkp0ncTJBHlo4xl3AMDAzh+8hQ6u7oST5xlasFaWf18C7at1grcNjkBu278frPIpF8W43UXIGX23XwejdUbAhXK3Q4HcqsiIBEZXc5UwElFouLDsRih9iUR5SdDVsBJBQMwEeUzPmSKiMhgGLiJiAyGgZuIyGAKzGbeY0xEZCTMuImIDIaBm4jIYBi4iYgMhoGbiMhgGLiJiAzGkN+cTEexYCIioxg1GTeLBRNRvshIxv3ipucxceLEmOPlkwP37D8w7PUMp1gwEZFRZCTjPvXe2fjjT5/JRDOIiEaFjGTcH1+7ht4vvkDxgw9GjOvp7c1qsWBb7UZs1pUYO7LjTVyGTakhaWl6G6hbpZYx23MO3aiMWSCYiChTMnZx8t13T+C5H0deVDx2/ESmmhBBVsBZW92Lw7/eFyzkK39qBXHsdWUikO9SCiQMakG7WJYkY7AmoizK2MVJT08POj/5JGTYzZud6OnpzVQTIrm86EUp1mzdFFm+THDU6yqzawWE/SXJiIiyJaN3lRw9dlwpFCwNDg7i2ImTmVx9BFmC7NDO3+C1HfXAmpfxarT6k0REOSajgfvu3bu40tyivJY/5ftskl0lyyt9IoC7cXrPATR6zbBYY0wcUUC4AstrY01MRJQ+Gf8Czrn3z2P69GloON+Y6VVHKHA3wLM0WPDX56jHr1pM0acNKxCsXshsUfvEiYgyyLRixQrf5MmTWSyYiCiLWCyYiGgUGzVfeSciyhcM3EREBsPATURkMAzcREQGw8BNRGQwDNxERAbDwE1EZDAM3EREBsPATURkMIb85uRIy7Xiw/LhV7/YWArH/n044+azUIgoFDPuGFh8mIhylSEz7tFefFg+tXD3zgbxitk2EUUyZMbN4sNElM8MmXHnavFhWVxh/dbF8NQ7Ya9bDKvJhI63duIg1mH7arsyjb7AsNqXrU4nyWkPtZi04WY0KoWLK9VlNvViSU3kMogo/xgy45Zk8eFosll8WGVGTTVweMcubHvLgbLVW/DavA5sl+/3NQHVS1Dl84kgb8UTS9XptmvT2uvWKeOiLtOiX0YdS6wR5TFDZtySv/jwzBkzAsOyXnxY4UXjkXNwySy6uQMddcXwNMhybaZAcWKLTfZju3HmDTdsyzZhW41FmVNW1Ym5zMAy2uHwlmZqY4goBxk245ZyrfhwKmR3yItbXsJa1AcyaU+2G0VEhmDowJ1rxYdTYjXD4r2Aw2ddyttp5SITz3KTiMgYDNtV4pdLxYdT0nwejdUbsPmVauWt2+Fgxk1ESTFkseCRxuLDRJRto75Y8EhjACYiIzF0HzcRUT5i4CYiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhgGbiIig2HgzmHqEwQ38tnbRBSCX3nX/OynP8E77x6HxzP8Rz0V/PNPIwd2tmOw4y/DXjYREQO3ZsqU+/Hc+mfR2fUJ3j1xErdv3x7ZFcycB9O48fA1J/8UQxYNJqJoGLjDzCyZgRee/xk++uvfcL7pwogu2zT9EeVfLIMnfz+i6yOi0YmBO4qCggIsXPAYqqoqcfLkqewVH9YVDW42maIWFz7YbMMTmzfA7jgQKCBsq92IF+xO7N1zDt222qgFiYnIuBi445gwfjxWrVyBC3++iIuXLmW1LfriwrKe5WDl03itbh3mN7+J001O1FTPg+2sC92wocJuhqNpn/I62jxVzeqBgIiMiYE7jnv37uH9xkZcvtKS7aagwBSnuHBzBxx1i1FhExk25sFudqKxOcE8RGRYDNxRyALEre3teO+9MyLTzXZrVP5uEjQdwPYd7kA3ilRgakWbcxVqym1oRamYpj6kayXaPERkXAzcYVwuN44eP45bt77OdlNCacWF98riwiIoq8WFewOjLzdcQM2aJagVrx1HZAFiU8J5iMiYGLg1AwMDOH7yFDq7urLdlOgSFRd2tcOBDajpfRuH3Kbk5iEiQ2Lg1uzZfyDbTYhL6a/e+xucCR+hXWSMNj7RPERkTPzKew5Tuja8Xriz3RAiyinMuNNguF+kkbftbV9tV+4AObLjnHIrHxGRHwN3Dipo+RO2++9AZNAmojDsKiEiMhgGbiIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhgGbiIig+EXcNJg2VOrIoZ9cuM6Pu7I/nO9icj4GLiFFzc9j4kTJ8YcL58cONyHUM2YPQfjxo9D+5W/Dms5REQM3MKp985i5YqnYo8/HfF8vSF56OEZyr9Yzh5/e0TWQ0SjGwO38PG1a+j94gsUP/hgxLie3t7sFQuWdSY3b4ClSQT0ulWwy6IIsgAwKrF+6yqUac8xcTe+HlIoeLOuTNkRf6FhX0XIPCHjohYlVt9fhi2lNoSvJ5m2EVFqGLg17757As/9eH3E8GPHT2ShNaHsdWUiyO3CIRlUlYC5GJ79u5SCCf7g/qx3Fw66a7G2uheHf70vGBB1QbtYljDTgqhSOHjrOkAJzkNpQ+jylGUq60mtbUSUOgZujaenB52ffIKZM4JdGTdvdqKnZ+RLfaXaJeKo12WmVWUim7WgbNMWLNFN4zbbgGYverEYa7ZugmX/PpxxB+ex60qYKbTqOOVVwOUkHvgd3oaI5Q21bUSUMgZunaPHjuPnL2wUsUhki4ODOHbiZNrWdeD56Hdibnh9MOG8Pk+T0l0R/pxuWfHm0M5WLdN9Ga+avWgUQfJ0zCV54RnhKg2pto0BnCh1vI9b5+7du7jSrN6yJ3/K9+kiA3S0fwk1d8BhXozaquCgqmeeRpXPp/RNL6/0KUHy9J4DaPSaYbEG51m7zKabaQlq4ESryz+gGBZttFpUOPk2yC6S5bXWobWNiFLGjDvMuffPY/r0aWg435jW9Qw14y4wteLgfjN+sfFlbFutZqsdb+1U+p4L3A3wLA0O9znq8asWkzrPDmD91g3YVqO/OKlmxnK+w02l2Kx1cSQqKhzeBnVZLUpQTrVtRJQ604oVK3yTJ09Gt9ub7baMGtG+gKPH2/6IKJxvcBAlJSVxp+nq6kKPx8WMO1uG08dNRPmNgTsNksmoGaCJaKgYuLOEGTcRDRUDd5YwQBPRUPF2QCIig2HgJiIyGAZuIiKDYeAmIjIYBm4iIoNh4CYiMhjeDmgAK9ZFPif8xlUH2i5/lIXWRBcs+rALh5J4BonyPPBqb9QnCRJRfMy4DWr2XDvmL1yU7WYQURYw406DTBQflv5u1hzlXyzH3jw47HUQUe5hxp0Gsvhw3PEjVHyYiPITM+40SHfx4Vtffqn8vP+BB1KaL1ATst4Je91iWE0m5XnZB7EO21fblWn0xX3VosHqdJLybO0WU9Qixnt2t4WuS5vX4nwbv3qjNaKIsOTzBB8lHK+YcdUzL6HGcyCkGDHq1b50f1/5nt0eLHulGp6mXiypidwWotGEgTtN0lV8+GpbM5xtapWe0vJKzC2vSjBHODNqqp3Yu2MXuqtkwN6C1xz12L7jT1qwXYKqs1p196XAYTGdvHioBMi6dahqDhYXDikgbLKiUhuuTluMxv27sNttCgm227ULlzIYrynWpk9QzNgtArzFImvyuJW6lsVeEfBlHUvxfv68Ungc5/G5yaJum+WCblvqsLyN5dFo9GFXSZr4iw/rjUTx4R63O+rr5HnReES7k6O5Ax0+Dxob1AMBXLKgr1rCTFazOfNGA7BsE7ZtfTmQkeuFFBD2m7dOBG2IgB5ZrPhcc3Cyy+3O4Btt/OGzruAwWczYW6oUM+5uc8JTWqaUQJs/rxiOIxfQa58Hm8j8LcVeONr883l129IOB2uD0CjFwJ1GsviwTwQbaaSKD0+1WqO+HmkyY31xy0tYC5mN78K2fU1xy5n52YuLxXTB+pXDoxUzVoKwXGYlyotlnUyPWEcpKqrmwR5SN5MoPzBwp1E6ig/LrpElTzyl/Eu9myQFVjMsuiw4YQFhjaNpH3633wn7xpfxbKV60IosLmzFE9WlwZkSFDOW2X+rQxwU1iyGvdcrzha093IZjnbeB055h33caZaO4sOpXpQcEtlVUb0Bm1+pVt4mKiCsJwsD/26HF+u3voxX65zKRcaD9WVKf/q21fLCoweNTU4RebXpExQzlmR3CaoXiwODPBCatPelcBxxKe+J8gmLBRtAtG9OJoP3cRMZB4sFjzIMwESkxz5uIiKDYeAmIjIYBm4iIoNh4CYiMpjAxckp8/9HNttBRJTXvv3qBgoT3FVSOFbeVbKPGTcRkdEwcBMRGQzv4ybMmWbC9W4fFpVF/wbixQ5fhltERPEw485zMmhbpmS7FUSUCgbuPJarQdtXNA7//b9NxOKikc30fdMn4F+XjoPZxzMIMjZ2leSpXAjaPt9YrFw5Ad8zmcTrb3H8ndtw8kl/RAkxcOcp2ad9vTt76/f5ClBdOwbOd/pwVATr0oWFeOrxcXB+cA+mvm/xh6Pfgk/9I4qOgTtPxboQmSkm0yAuNNyRL5T3js/u4am5JqUbw8usmyguBm4aFtkf/ZPa8ZiqBduPP/waRz8zaRn1JBRfFcH5MbU7RD8+nH36WPR+PqAEbXWZBbgY1nWidq2I6T76Do88pq5TLu8dTMS/LRinTNPj/AZ/cAzqpg+uWxl2607a9gVRpjBw05ApwbkMOP5Onxpwp0/ALx+biNJPb8OhTfPIY2OU8UfDxjsDAToYgP8QJaBHGoPH536H/xDL9DwsA/Z9+GX3bfz2nTva8sahtEOuf5wStPFRH36rLVfpjilM2+4gyhgG7jw1EvdmK90dHwzCXDYJvyxV/5TkRUa9ax/psuZPv8WluZNQ+jDg/Ay6vmwZVIvwr3Pv4j/O3U1Qaec7XPrwrtqd8ul3+PgxE3o7tP7wr334Qvw03wc47h+DR74Wy/sUga5ytTtm2JtNlHUM3HnoTsWMIc87oTVYud6fMePqgMh4bwe6OIbCcekOSleORakIusmWSCPKV7yPO095j+/FwMcfKq/72/+svPcPl/96Tv0f3P7UEW8RwP0FKBZZ7fGO75S3lofHoDhskkemjwu8tpSNx+P33YPzU+1e7YVjdePGigz5Ozi/Dp1/yPd0i2z82n3j8f2HteXIbp25zFNodOBfch775kYzxtw3FQM3r4QMNz/1ghK0+9v+jIkP22MvQOv6eG7VBOVtT/e36A2b5BrG4JcrJyqv9fdqy26S419PDBt3d8TuKDGZ7uGdj8aofeAL5PLv4dLVe8BDI7J4oqxi4M5j44un49ZHJ1E4dyH6r34QMk4G7L4r5+LOr97S148LkSNEpNRef3Ybv/3gTug4jdchxjkQMU7t+1bf6+/plsH46NF78HdaJ3z/2R389rPQu0guOELbQGRE7CrJY0XzazGueBomfW9BxDiZcZvGTshCq4goEWbcecw0djymLFoVMVz2ccugXVj+gyy0iogSYeDOU7IfO9r78OFD5e9G4dfWiUYeA3ce0t/SR0TGwz5uIiKDCWTcX13+X9lsBxFRXvMNDqL/Xvxiwf1dXcpPZtxERAbDwE1EZDC8OEmY9+g/oP3KX7HsqchbA6Wzx9/OcIuIKB5m3HlOBu2HHh76Q6eIKPMYuPNYNoP2oHUpXtyyEcutI1u4d7Dyabz6wlLYWBCYRjEG7jzFTJvIuNjHnadkn7b8ly0F7gbs3tkAfrOSKHUM3Hkq1oVIIsp9DNw0LLKv+hcbF8OqPSq1462dONRiwqDPiic2b4Cl6W2gbhXKwscr85nRuONNNOseszroq8D6rYvhqXfCXqcuV85zEOuwfbX6bHB34+vYfc6tmz64fMnn8WZq84mygoGbhkwJzkuBwzt2wSUCp7ww+FrdOlQ1v4nL2jT2ujIcEeMPxRgfnRk11U7sFfN1V8mAvQWvOeqxfceftIC/BFVn5TIqlaCN+l3Y3qIG7qpnXsKa8DI8RKMMA3eeGol7swtMbpx5ww3bsk3YVmNRhvl8oeXOHPW6jLr5PBqrN6C8CrjsjrdkLxqPnFMOBmjuQEddMe4/laYAAASOSURBVDwNLVD6w11e9KIUFpt4ay2D3XsBe5sR6Cq/3O7EmuphbxpRTmPgzkMF//zTIc87ePL3wddaNwmaDohs2B3o/iCi9OLtgHnqy/ffwZ0up/J64Hqr8t4/XP776sIJ3HUnePyr1QyLyHgPn3Upb6eVi0w4bBL7vMrA62nL6lBjdqKtOXSaId/TLbJxh3kxaqu05cium+rS1JZBZEDMuPPY7f+6jjGF9+OO+Kn3wA9XKkF74ONWjLfGuddb6/rY/IraN+F2OOAJm8SBMmzbWqe8lt0oR8IuRg5HgakVB+vLlD7wbavl8j1obBIHozj1jYlGA9OKFSt8kydPRrebV+LzhewqkVn1uKnT8G1PNybNsmPgpkMJ2HK4/CnpX/vpu0riCd5Vsku5i4SI4pOPdS0pif9Y166uLvR4XOwqyWeTy/4eYx+Yigklkd0LMuM2jR2XhVYRUSLsKsljpjFjUfTo4ojhMtOWQXvS9yqy0CoiSoSBO0+Fd4H434cPHyrlVsG9vwG/0k408hi481Cy/dRElJvYx01EZDAM3EREBsPATURkMAzcREQGw4uTxGLBRAbDjDvPsYQZkfEwcOex0VgsOO46WUiYRgkG7jyVi5m2rGbz7JaX8GKtNdtNIcpp7OPOU7lULNj/QCr5yFeHM2tNIjIMBu48lUvFgv1fjz8DtfRYTbYbRJTjGLhpWEa6WHDcdbGQMJGCgZuGLH3FguNhIWEiBu48ldvFguNhIWEiBu48xGLBRMbG2wHzVC4VC46HhYSJIjHjzmNGLxYcDwsJ02jGYsF5iMWCiXIPiwVTUlgsmMiY2FWSx1gsmMiYGLjzFIsFExkXA3ceYrFgotwk+7CTwcBNRJQDTAXJX3LkxUkiIoNh4CYiMhgGbiIig2EfN7FYMJHBMOPOc7lYwoyI4mPgzmMsFkxkTOwqyVO5lmnLoOqvYqM8EGr/Ppxx88s7RNEwcOep3CoWXIH11V7s+fWbwUo6G9fBk6EnCRIZDQN3nsqtYsGtOLRXvAhUyumAo26xWslmyJVyiEYvBm4alrQUC64qgx29aJP1GXSjWCyYSMXATUOWjmLBSkCvK4WjfleMbhIWCyZi4M5TuVgs2Fa7ES9UA437d8W5MMliwUQM3HkoF4sFK9kw3savdraCj4Ilio/3ceepXCoWLAN+TakTR/7YErEKFgsmisSMO4/lTLFgcQCwmuxY+8oWrNUNVi48DvGuEhYLptGMxYLzEIsFExmX19XNrpJ8xmLBRMbErpI8xmLBRMbErpI8NFJ3lRBR5smuEmbceYjBl8jY2MdNRGQwDNxERAbDwE1EZDAM3EREBsPATURkMAzco8z4YuDhp00YW5TtlhBRujBwjxIyUE+tNuGhlQUYU2TC+Acz+zVzWbTg2S1Po8rnG/FCwNkoLJwM/TYTZRLv4zaogvEiu34QGCcy7Ik2EybNDA3UcjgSPNyPiIyJgdtAZFY9Zb4I0iUycMfPqCc+BHwVq8xMmukLAQ9F+AOqhrs8otGGgdsgir4HFFcn7tn6rs+ndJWMY4kuolHr/wP5JCBVSyzbhQAAAABJRU5ErkJggg=="},81835:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/markdownfiles-7689b403bd69465458e99e222a781f83.png"},78272:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/self-doc1-c3efdc94769a2ac752278f89b3a48a49.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/096873fa.b5b56014.js b/knife4j-doc/gitee/assets/js/096873fa.b5b56014.js deleted file mode 100644 index 928dc7320..000000000 --- a/knife4j-doc/gitee/assets/js/096873fa.b5b56014.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8550],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),f=s(r),d=o,m=f["".concat(p,".").concat(d)]||f[d]||l[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var s=2;s{r(67294),r(39960),r(52263);var n="4.0.0".split(".");[n[0],n[1]].join(".")},77556:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>l});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=(r(14959),["components"]),c={id:"features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f"},p=void 0,s={unversionedId:"features/features",id:"features/features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/features/index.mdx",sourceDirName:"features",slug:"/features/",permalink:"/docs/features/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"docs",previous:{title:"\u793a\u4f8b\u4ee3\u7801",permalink:"/docs/community/simple-demo"},next:{title:"3.1 \u589e\u5f3a\u6a21\u5f0f",permalink:"/docs/features/enhance"}},u={},l=[],f={toc:l};function d(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u589e\u5f3a"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/096873fa.d9c2dbd6.js b/knife4j-doc/gitee/assets/js/096873fa.d9c2dbd6.js new file mode 100644 index 000000000..6ae860819 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/096873fa.d9c2dbd6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8550],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=s(r),d=o,m=l["".concat(p,".").concat(d)]||l[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:o,i[1]=c;for(var s=2;s{r(67294),r(39960),r(52263);var n="4.0.0".split(".");[n[0],n[1]].join(".")},77556:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>m,frontMatter:()=>c,metadata:()=>s,toc:()=>l});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=(r(14959),["components"]),c={id:"features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f"},p=void 0,s={unversionedId:"features/features",id:"features/features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/features/index.mdx",sourceDirName:"features",slug:"/features/",permalink:"/docs/features/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"features",title:"\u589e\u5f3a\u7279\u6027",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"docs",previous:{title:"\u793a\u4f8b\u4ee3\u7801",permalink:"/docs/community/simple-demo"},next:{title:"3.1 \u589e\u5f3a\u6a21\u5f0f",permalink:"/docs/features/enhance"}},u={},l=[],f={toc:l},d="wrapper";function m(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)(d,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u589e\u5f3a"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/09aeb77f.6b6f8cca.js b/knife4j-doc/gitee/assets/js/09aeb77f.6b6f8cca.js new file mode 100644 index 000000000..dcf80da30 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/09aeb77f.6b6f8cca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9781],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),s=c(n),f=a,d=s["".concat(l,".").concat(f)]||s[f]||m[f]||o;return n?r.createElement(d,i(i({ref:t},u),{},{components:n})):r.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[s]="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>d,frontMatter:()=>p,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},l="3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",c={unversionedId:"features/exportDocument",id:"features/exportDocument",title:"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",description:"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(Typora)\u8fdb\u884c\u5bfc\u51fa",source:"@site/docs/features/exportDocument.md",sourceDirName:"features",slug:"/features/exportDocument",permalink:"/docs/features/exportDocument",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1678369652,formattedLastUpdatedAt:"2023\u5e743\u67089\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/dynamicRequestParameter"},next:{title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/filterRequestParameter"}},u={},s=[],m={toc:s},f="wrapper";function d(e){var t=e.components,p=(0,a.Z)(e,i);return(0,o.kt)(f,(0,r.Z)({},m,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"310-\u5bfc\u51fa\u79bb\u7ebf\u6587\u6863"},"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},(0,o.kt)("inlineCode",{parentName:"p"},"knife4j")," \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(",(0,o.kt)("a",{parentName:"p",href:"https://typora.io/",target:"_blank",rel:"noopener"},"Typora"),")\u8fdb\u884c\u5bfc\u51fa")),(0,o.kt)("p",null,"\u5728\u4ee5\u524d\u7684\u5f00\u53d1\u4eba\u5458\u4f7f\u7528Swagger\u7684\u65f6\u5019,\u5e0c\u671bSwagger\u80fd\u591f\u5bfc\u51fa\u4e00\u4efd\u7cbe\u7ec6\u7684\u6587\u6863,\u4e0d\u7ba1\u662f\u96c6\u6210\u4f55\u79cd\u65b9\u5f0f,\u4f7f\u7528\u65b9\u6cd5\u90fd\u662f\u6bd4\u8f83\u7e41\u7410\u7684,\u800c\u4e14\u5bfc\u51fa\u7684\u6587\u6863\u6548\u679c\u4e5f\u4e0d\u5c3d\u5982\u4eba\u610f"),(0,o.kt)("p",null,"\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898,",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5728\u524d\u7aef\u754c\u9762\u76f4\u63a5\u96c6\u6210\u4e86\u4e24\u79cd\u5bfc\u51faSwagger\u6587\u6863\u7684\u65b9\u5f0f,\u4e3b\u8981\u662f\u5bfc\u51faMarkdown\u548c\u79bb\u7ebfHtml"),(0,o.kt)("p",null,"\u5bf9\u4e8e\u4f7f\u7528\u8005\u6765\u8bf4,\u80fd\u628a\u8fc7\u7a0b\u7b80\u5355\u5316\u662f\u6700\u597d\u7684,\u800c",(0,o.kt)("inlineCode",{parentName:"p"},"Knfie4j"),"\u63d0\u4f9b\u7684\u5bfc\u51fa\u529f\u80fd\u5c31\u662f\u5982\u6b64\u7b80\u5355"),(0,o.kt)("p",null,"\u5728\u524d\u7aefUi\u754c\u9762\u4e2d\u7684",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/demo/doc.html#/documentManager/OfficelineDocument-Knife4j%E7%A4%BA%E4%BE%8B",target:null,rel:null},(0,o.kt)("inlineCode",{parentName:"a"},"\u6587\u6863\u7ba1\u7406 => \u79bb\u7ebf\u6587\u6863"))," \u83dc\u5355\u680f,\u6211\u4eec\u70b9\u51fb\u540e\u53ef\u4ee5\u770b\u5230\u5982\u4e0b\u754c\u9762\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(26480).Z,width:"1361",height:"448"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7279\u522b\u8bf4\u660e\uff1a")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"markdown\uff1a\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Markdown\u683c\u5f0f\u7684\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"Html\uff1a\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Html\u683c\u5f0f\u7684\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"Word:\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Word\u683c\u5f0f\u7684\u6587\u6863(\u81ea2.0.5\u7248\u672c\u5f00\u59cb)"),(0,o.kt)("li",{parentName:"ul"},"OpenAPI:\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u7684\u539f\u59cbOpenAPI\u7684\u89c4\u8303json\u7ed3\u6784(\u81ea2.0.6\u7248\u672c\u5f00\u59cb)"),(0,o.kt)("li",{parentName:"ul"},"PDF:\u672a\u5b9e\u73b0")),(0,o.kt)("p",null,"\u76f4\u63a5\u70b9\u51fb\u4e0b\u8f7dMarkdown,",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5c31\u4f1a\u4e3a\u6211\u4eec\u751f\u6210\u4e00\u4efd\u7cbe\u7ec6\u7684MD\u6587\u6863,\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(44717).Z,width:"1918",height:"1158"})),(0,o.kt)("p",null,"\u5bfc\u51fa\u7684Html\u6548\u679c\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(50179).Z,width:"1797",height:"1758"})))}d.isMDXComponent=!0},26480:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/exportOfficedoc-a3a0d42be706c09657bb184af255ddd8.png"},44717:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},50179:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/09aeb77f.9f220a9a.js b/knife4j-doc/gitee/assets/js/09aeb77f.9f220a9a.js deleted file mode 100644 index c2be8a447..000000000 --- a/knife4j-doc/gitee/assets/js/09aeb77f.9f220a9a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9781],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=c(n),f=a,d=m["".concat(l,".").concat(f)]||m[f]||s[f]||o;return n?r.createElement(d,i(i({ref:t},u),{},{components:n})):r.createElement(d,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},l="3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",c={unversionedId:"features/exportDocument",id:"features/exportDocument",title:"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",description:"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(Typora)\u8fdb\u884c\u5bfc\u51fa",source:"@site/docs/features/exportDocument.md",sourceDirName:"features",slug:"/features/exportDocument",permalink:"/docs/features/exportDocument",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1678369652,formattedLastUpdatedAt:"2023\u5e743\u67089\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/dynamicRequestParameter"},next:{title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/filterRequestParameter"}},u={},s=[],m={toc:s};function f(e){var t=e.components,p=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},m,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"310-\u5bfc\u51fa\u79bb\u7ebf\u6587\u6863"},"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},(0,o.kt)("inlineCode",{parentName:"p"},"knife4j")," \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(",(0,o.kt)("a",{parentName:"p",href:"https://typora.io/",target:"_blank",rel:"noopener"},"Typora"),")\u8fdb\u884c\u5bfc\u51fa")),(0,o.kt)("p",null,"\u5728\u4ee5\u524d\u7684\u5f00\u53d1\u4eba\u5458\u4f7f\u7528Swagger\u7684\u65f6\u5019,\u5e0c\u671bSwagger\u80fd\u591f\u5bfc\u51fa\u4e00\u4efd\u7cbe\u7ec6\u7684\u6587\u6863,\u4e0d\u7ba1\u662f\u96c6\u6210\u4f55\u79cd\u65b9\u5f0f,\u4f7f\u7528\u65b9\u6cd5\u90fd\u662f\u6bd4\u8f83\u7e41\u7410\u7684,\u800c\u4e14\u5bfc\u51fa\u7684\u6587\u6863\u6548\u679c\u4e5f\u4e0d\u5c3d\u5982\u4eba\u610f"),(0,o.kt)("p",null,"\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898,",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5728\u524d\u7aef\u754c\u9762\u76f4\u63a5\u96c6\u6210\u4e86\u4e24\u79cd\u5bfc\u51faSwagger\u6587\u6863\u7684\u65b9\u5f0f,\u4e3b\u8981\u662f\u5bfc\u51faMarkdown\u548c\u79bb\u7ebfHtml"),(0,o.kt)("p",null,"\u5bf9\u4e8e\u4f7f\u7528\u8005\u6765\u8bf4,\u80fd\u628a\u8fc7\u7a0b\u7b80\u5355\u5316\u662f\u6700\u597d\u7684,\u800c",(0,o.kt)("inlineCode",{parentName:"p"},"Knfie4j"),"\u63d0\u4f9b\u7684\u5bfc\u51fa\u529f\u80fd\u5c31\u662f\u5982\u6b64\u7b80\u5355"),(0,o.kt)("p",null,"\u5728\u524d\u7aefUi\u754c\u9762\u4e2d\u7684",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/demo/doc.html#/documentManager/OfficelineDocument-Knife4j%E7%A4%BA%E4%BE%8B",target:null,rel:null},(0,o.kt)("inlineCode",{parentName:"a"},"\u6587\u6863\u7ba1\u7406 => \u79bb\u7ebf\u6587\u6863"))," \u83dc\u5355\u680f,\u6211\u4eec\u70b9\u51fb\u540e\u53ef\u4ee5\u770b\u5230\u5982\u4e0b\u754c\u9762\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(26480).Z,width:"1361",height:"448"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7279\u522b\u8bf4\u660e\uff1a")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"markdown\uff1a\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Markdown\u683c\u5f0f\u7684\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"Html\uff1a\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Html\u683c\u5f0f\u7684\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"Word:\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u6240\u6709\u63a5\u53e3\u7684Word\u683c\u5f0f\u7684\u6587\u6863(\u81ea2.0.5\u7248\u672c\u5f00\u59cb)"),(0,o.kt)("li",{parentName:"ul"},"OpenAPI:\u5bfc\u51fa\u5f53\u524d\u903b\u8f91\u5206\u7ec4\u4e0b\u7684\u539f\u59cbOpenAPI\u7684\u89c4\u8303json\u7ed3\u6784(\u81ea2.0.6\u7248\u672c\u5f00\u59cb)"),(0,o.kt)("li",{parentName:"ul"},"PDF:\u672a\u5b9e\u73b0")),(0,o.kt)("p",null,"\u76f4\u63a5\u70b9\u51fb\u4e0b\u8f7dMarkdown,",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5c31\u4f1a\u4e3a\u6211\u4eec\u751f\u6210\u4e00\u4efd\u7cbe\u7ec6\u7684MD\u6587\u6863,\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(44717).Z,width:"1918",height:"1158"})),(0,o.kt)("p",null,"\u5bfc\u51fa\u7684Html\u6548\u679c\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(50179).Z,width:"1797",height:"1758"})))}f.isMDXComponent=!0},26480:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/exportOfficedoc-a3a0d42be706c09657bb184af255ddd8.png"},44717:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},50179:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0ba85afa.76b144d4.js b/knife4j-doc/gitee/assets/js/0ba85afa.76b144d4.js new file mode 100644 index 000000000..47f9e88df --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0ba85afa.76b144d4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7507],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=c(n),k=a,d=u["".concat(p,".").concat(k)]||u[k]||g[k]||o;return n?r.createElement(d,i(i({ref:t},s),{},{components:n})):r.createElement(d,i({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=k;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",c={unversionedId:"action/dotnetcore-knife4j-guid",id:"action/dotnetcore-knife4j-guid",title:"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",description:"IGeekFan.AspNetCore.Knife4jUI",source:"@site/docs/action/dotnetcore-knife4j-guid.md",sourceDirName:"action",slug:"/action/dotnetcore-knife4j-guid",permalink:"/docs/action/dotnetcore-knife4j-guid",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1606020212,formattedLastUpdatedAt:"2020\u5e7411\u670822\u65e5",frontMatter:{},sidebar:"action",previous:{title:"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",permalink:"/docs/action/dotnetcore-knife4j-how"},next:{title:"Springfox\u6e90\u7801\u7cfb\u5217",permalink:"/docs/action/springfox/"}},s={},u=[{value:"IGeekFan.AspNetCore.Knife4jUI",id:"igeekfanaspnetcoreknife4jui",level:2},{value:"\u76f8\u5173\u4f9d\u8d56\u9879",id:"\u76f8\u5173\u4f9d\u8d56\u9879",level:2},{value:"knife4j",id:"knife4j",level:3},{value:"Swashbuckle.AspNetCore",id:"swashbuckleaspnetcore",level:3},{value:"Demo",id:"demo",level:2},{value:"\ud83d\udcda \u5feb\u901f\u5f00\u59cb",id:"-\u5feb\u901f\u5f00\u59cb",level:2},{value:"\ud83d\ude80\u5b89\u88c5\u5305",id:"\u5b89\u88c5\u5305",level:3},{value:"\ud83d\ude81 ConfigureServices",id:"-configureservices",level:3},{value:"\ud83d\udcaa Configure",id:"-configure",level:3},{value:"NSwag.AspNetCore",id:"nswagaspnetcore",level:3},{value:"\ud83d\udd0e \u6548\u679c\u56fe",id:"-\u6548\u679c\u56fe",level:3},{value:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003",id:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003",level:3},{value:"\u66f4\u591a\u9879\u76ee",id:"\u66f4\u591a\u9879\u76ee",level:3}],g={toc:u},k="wrapper";function d(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)(k,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"52-net-core\u76f4\u63a5\u96c6\u6210knife4j"},"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j"),(0,o.kt)("h2",{id:"igeekfanaspnetcoreknife4jui"},(0,o.kt)("a",{parentName:"h2",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},"IGeekFan.AspNetCore.Knife4jUI")),(0,o.kt)("p",null,"\u4e00\u4e2aswagger ui \u5e93\uff1a",(0,o.kt)("strong",{parentName:"p"},(0,o.kt)("a",{parentName:"strong",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j UI")),"\uff0c\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://www.nuget.org/packages/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/nuget/v/IGeekFan.AspNetCore.Knife4jUI.svg?style=flat-square",alt:"nuget"}))," ",(0,o.kt)("a",{parentName:"p",href:"https://www.nuget.org/stats/packages/IGeekFan.AspNetCore.Knife4jUI?groupby=Version",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/nuget/dt/IGeekFan.AspNetCore.Knife4jUI.svg?style=flat-square",alt:"stats"}))," ",(0,o.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/master/LICENSE.txt",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/license-Apache-blue.svg",alt:"GitHub license"}))),(0,o.kt)("h2",{id:"\u76f8\u5173\u4f9d\u8d56\u9879"},"\u76f8\u5173\u4f9d\u8d56\u9879"),(0,o.kt)("h3",{id:"knife4j"},(0,o.kt)("a",{parentName:"h3",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"knife4j-vue-v3(\u4e0d\u662fvue3,\u800c\u662fswagger-ui-v3\u7248\u672c\uff09")),(0,o.kt)("h3",{id:"swashbuckleaspnetcore"},(0,o.kt)("a",{parentName:"h3",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"Swashbuckle.AspNetCore")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Swashbuckle.AspNetCore.Swagger"),(0,o.kt)("li",{parentName:"ul"},"Swashbuckle.AspNetCore.SwaggerGen")),(0,o.kt)("h2",{id:"demo"},"Demo"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Basic",target:"_blank",rel:"noopener"},"Basic")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Knife4jUIDemo",target:"_blank",rel:"noopener"},"Knife4jUIDemo"))),(0,o.kt)("h2",{id:"-\u5feb\u901f\u5f00\u59cb"},"\ud83d\udcda \u5feb\u901f\u5f00\u59cb"),(0,o.kt)("h3",{id:"\u5b89\u88c5\u5305"},"\ud83d\ude80\u5b89\u88c5\u5305"),(0,o.kt)("p",null,"\u4ee5\u4e0b\u4e3a\u4f7f\u7528Swashbuckle.AspNetCore.Swagger\u5e95\u5c42\u7ec4\u4ef6"),(0,o.kt)("p",null,"1.Install the standard Nuget package into your ASP.NET Core application."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"Package Manager : \n\nInstall-Package Swashbuckle.AspNetCore.Swagger\nInstall-Package Swashbuckle.AspNetCore.SwaggerGen\nInstall-Package IGeekFan.AspNetCore.Knife4jUI\n\nOR\n\nCLI :\n\ndotnet add package Swashbuckle.AspNetCore.Swagger\ndotnet add package Swashbuckle.AspNetCore.SwaggerGen\ndotnet add package IGeekFan.AspNetCore.Knife4jUI\n")),(0,o.kt)("p",null,"2.In the ConfigureServices method of Startup.cs, register the Swagger generator, defining one or more Swagger documents."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"using Microsoft.AspNetCore.Mvc.Controllers\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\nusing IGeekFan.AspNetCore.Knife4jUI;\n")),(0,o.kt)("h3",{id:"-configureservices"},"\ud83d\ude81 ConfigureServices"),(0,o.kt)("p",null,"3.\u670d\u52a1\u914d\u7f6e\uff0cCustomOperationIds\u548cAddServer\u662f\u5fc5\u987b\u7684\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' services.AddSwaggerGen(c =>\n {\n c.SwaggerDoc("v1",new OpenApiInfo{Title = "API V1",Version = "v1"});\n c.AddServer(new OpenApiServer()\n {\n Url = "",\n Description = "vvv"\n });\n c.CustomOperationIds(apiDesc =>\n {\n var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor;\n return controllerAction.ControllerName+"-"+controllerAction.ActionName;\n });\n });\n')),(0,o.kt)("h3",{id:"-configure"},"\ud83d\udcaa Configure"),(0,o.kt)("ol",{start:4},(0,o.kt)("li",{parentName:"ol"},"\u4e2d\u95f4\u4ef6\u914d\u7f6e")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseSwagger();\n\napp.UseKnife4UI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");\n});\n\napp.UseEndpoints(endpoints =>\n{\n endpoints.MapControllers();\n endpoints.MapSwagger("{documentName}/api-docs");\n});\n')),(0,o.kt)("p",null,"5.\u66f4\u591a\u529f\u80fd"),(0,o.kt)("p",null,"\u4e3a\u6587\u6863\u6dfb\u52a0\u6ce8\u91ca \u5728\u9879\u76ee\u4e0a\u53f3\u952e--\u5c5e\u6027--\u751f\u6210"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f34161d14195aa59413f0fc.jpg",alt:null})),(0,o.kt)("p",null,"\u5728AddSwaggerGen\u65b9\u6cd5\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "SwaggerDemo.xml"),true);\n')),(0,o.kt)("p",null," \u6700\u540e\u4e00\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3atrue\uff0c\u4ee3\u8868\u542f\u7528\u63a7\u5236\u5668\u4e0a\u7684\u6ce8\u91ca"),(0,o.kt)("p",null,"\u8fd0\u884c\u540e\u5982\u770b\u4e0d\u5230\u63a7\u5236\u5668\u4e0a\u6ce8\u91ca\u663e\u793a\uff0c\u8bf7\u70b9\u5f00\u6587\u6863\u7ba1\u7406->\u4e2a\u6027\u5316\u8bbe\u7f6e\uff0c\u5f00\u542f\u5206\u7ec4tag\u663e\u793adescription\u8bf4\u660e\u5c5e\u6027"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f34171114195aa594142d2e.jpg",alt:null})),(0,o.kt)("h3",{id:"nswagaspnetcore"},"NSwag.AspNetCore"),(0,o.kt)("p",null,"\uff08\u8bf7\u53c2\u8003\u76ee\u5f55test/WebSites/NSwag.Swagger.Knife4jUI\uff09"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"public void ConfigureServices(IServiceCollection services)\n {\n // \u5176\u5b83Service\n services.AddOpenApiDocument();\n }\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n // \u5176\u5b83 Use\n app.UseOpenApi();\n app.UseKnife4UI(c =>\n {\n c.RoutePrefix = "";\n c.SwaggerEndpoint("/swagger/v1/swagger.json");\n });\n}\n')),(0,o.kt)("p",null,"\u5373\u53ef\u4f7f\u7528 Knife4jUI"),(0,o.kt)("h3",{id:"-\u6548\u679c\u56fe"},"\ud83d\udd0e \u6548\u679c\u56fe"),(0,o.kt)("p",null,"\u8fd0\u884c\u9879\u76ee\uff0c\u6253\u5f00 https://localhost:5001/index.html#/home"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fa77b14195aa594ccbedc.jpg",alt:"https://pic.downk.cc/item/5f2fa77b14195aa594ccbedc.jpg"})),(0,o.kt)("h3",{id:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003"},"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"https://github.com/domaindrivendev/Swashbuckle.AspNetCore"))),(0,o.kt)("h3",{id:"\u66f4\u591a\u9879\u76ee"},"\u66f4\u591a\u9879\u76ee"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://api.igeekfan.cn/swagger/index.html",target:"_blank",rel:"noopener"},"https://api.igeekfan.cn/swagger/index.html")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/lin-cms-dotnetcore",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/lin-cms-dotnetcore"),(0,o.kt)("img",{parentName:"li",src:"https://pic.downk.cc/item/5f2fa97814195aa594cd5cfc.jpg",alt:"image"}))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0ba85afa.82d948b0.js b/knife4j-doc/gitee/assets/js/0ba85afa.82d948b0.js deleted file mode 100644 index cbbe33370..000000000 --- a/knife4j-doc/gitee/assets/js/0ba85afa.82d948b0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7507],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>k});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),g=c(n),k=a,d=g["".concat(p,".").concat(k)]||g[k]||u[k]||o;return n?r.createElement(d,i(i({ref:t},s),{},{components:n})):r.createElement(d,i({ref:t},s))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=g;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>k,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",c={unversionedId:"action/dotnetcore-knife4j-guid",id:"action/dotnetcore-knife4j-guid",title:"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j",description:"IGeekFan.AspNetCore.Knife4jUI",source:"@site/docs/action/dotnetcore-knife4j-guid.md",sourceDirName:"action",slug:"/action/dotnetcore-knife4j-guid",permalink:"/docs/action/dotnetcore-knife4j-guid",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1606020212,formattedLastUpdatedAt:"2020\u5e7411\u670822\u65e5",frontMatter:{},sidebar:"action",previous:{title:"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b",permalink:"/docs/action/dotnetcore-knife4j-how"},next:{title:"Springfox\u6e90\u7801\u7cfb\u5217",permalink:"/docs/action/springfox/"}},s={},u=[{value:"IGeekFan.AspNetCore.Knife4jUI",id:"igeekfanaspnetcoreknife4jui",level:2},{value:"\u76f8\u5173\u4f9d\u8d56\u9879",id:"\u76f8\u5173\u4f9d\u8d56\u9879",level:2},{value:"knife4j",id:"knife4j",level:3},{value:"Swashbuckle.AspNetCore",id:"swashbuckleaspnetcore",level:3},{value:"Demo",id:"demo",level:2},{value:"\ud83d\udcda \u5feb\u901f\u5f00\u59cb",id:"-\u5feb\u901f\u5f00\u59cb",level:2},{value:"\ud83d\ude80\u5b89\u88c5\u5305",id:"\u5b89\u88c5\u5305",level:3},{value:"\ud83d\ude81 ConfigureServices",id:"-configureservices",level:3},{value:"\ud83d\udcaa Configure",id:"-configure",level:3},{value:"NSwag.AspNetCore",id:"nswagaspnetcore",level:3},{value:"\ud83d\udd0e \u6548\u679c\u56fe",id:"-\u6548\u679c\u56fe",level:3},{value:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003",id:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003",level:3},{value:"\u66f4\u591a\u9879\u76ee",id:"\u66f4\u591a\u9879\u76ee",level:3}],g={toc:u};function k(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"52-net-core\u76f4\u63a5\u96c6\u6210knife4j"},"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j"),(0,o.kt)("h2",{id:"igeekfanaspnetcoreknife4jui"},(0,o.kt)("a",{parentName:"h2",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},"IGeekFan.AspNetCore.Knife4jUI")),(0,o.kt)("p",null,"\u4e00\u4e2aswagger ui \u5e93\uff1a",(0,o.kt)("strong",{parentName:"p"},(0,o.kt)("a",{parentName:"strong",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j UI")),"\uff0c\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://www.nuget.org/packages/IGeekFan.AspNetCore.Knife4jUI",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/nuget/v/IGeekFan.AspNetCore.Knife4jUI.svg?style=flat-square",alt:"nuget"}))," ",(0,o.kt)("a",{parentName:"p",href:"https://www.nuget.org/stats/packages/IGeekFan.AspNetCore.Knife4jUI?groupby=Version",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/nuget/dt/IGeekFan.AspNetCore.Knife4jUI.svg?style=flat-square",alt:"stats"}))," ",(0,o.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/master/LICENSE.txt",target:"_blank",rel:"noopener"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/license-Apache-blue.svg",alt:"GitHub license"}))),(0,o.kt)("h2",{id:"\u76f8\u5173\u4f9d\u8d56\u9879"},"\u76f8\u5173\u4f9d\u8d56\u9879"),(0,o.kt)("h3",{id:"knife4j"},(0,o.kt)("a",{parentName:"h3",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"knife4j")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"knife4j-vue-v3(\u4e0d\u662fvue3,\u800c\u662fswagger-ui-v3\u7248\u672c\uff09")),(0,o.kt)("h3",{id:"swashbuckleaspnetcore"},(0,o.kt)("a",{parentName:"h3",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"Swashbuckle.AspNetCore")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Swashbuckle.AspNetCore.Swagger"),(0,o.kt)("li",{parentName:"ul"},"Swashbuckle.AspNetCore.SwaggerGen")),(0,o.kt)("h2",{id:"demo"},"Demo"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Basic",target:"_blank",rel:"noopener"},"Basic")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/blob/master/test/Knife4jUIDemo",target:"_blank",rel:"noopener"},"Knife4jUIDemo"))),(0,o.kt)("h2",{id:"-\u5feb\u901f\u5f00\u59cb"},"\ud83d\udcda \u5feb\u901f\u5f00\u59cb"),(0,o.kt)("h3",{id:"\u5b89\u88c5\u5305"},"\ud83d\ude80\u5b89\u88c5\u5305"),(0,o.kt)("p",null,"\u4ee5\u4e0b\u4e3a\u4f7f\u7528Swashbuckle.AspNetCore.Swagger\u5e95\u5c42\u7ec4\u4ef6"),(0,o.kt)("p",null,"1.Install the standard Nuget package into your ASP.NET Core application."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"Package Manager : \n\nInstall-Package Swashbuckle.AspNetCore.Swagger\nInstall-Package Swashbuckle.AspNetCore.SwaggerGen\nInstall-Package IGeekFan.AspNetCore.Knife4jUI\n\nOR\n\nCLI :\n\ndotnet add package Swashbuckle.AspNetCore.Swagger\ndotnet add package Swashbuckle.AspNetCore.SwaggerGen\ndotnet add package IGeekFan.AspNetCore.Knife4jUI\n")),(0,o.kt)("p",null,"2.In the ConfigureServices method of Startup.cs, register the Swagger generator, defining one or more Swagger documents."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"using Microsoft.AspNetCore.Mvc.Controllers\nusing Microsoft.OpenApi.Models;\nusing Swashbuckle.AspNetCore.SwaggerGen;\nusing IGeekFan.AspNetCore.Knife4jUI;\n")),(0,o.kt)("h3",{id:"-configureservices"},"\ud83d\ude81 ConfigureServices"),(0,o.kt)("p",null,"3.\u670d\u52a1\u914d\u7f6e\uff0cCustomOperationIds\u548cAddServer\u662f\u5fc5\u987b\u7684\u3002"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' services.AddSwaggerGen(c =>\n {\n c.SwaggerDoc("v1",new OpenApiInfo{Title = "API V1",Version = "v1"});\n c.AddServer(new OpenApiServer()\n {\n Url = "",\n Description = "vvv"\n });\n c.CustomOperationIds(apiDesc =>\n {\n var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor;\n return controllerAction.ControllerName+"-"+controllerAction.ActionName;\n });\n });\n')),(0,o.kt)("h3",{id:"-configure"},"\ud83d\udcaa Configure"),(0,o.kt)("ol",{start:4},(0,o.kt)("li",{parentName:"ol"},"\u4e2d\u95f4\u4ef6\u914d\u7f6e")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'app.UseSwagger();\n\napp.UseKnife4UI(c =>\n{\n c.RoutePrefix = ""; // serve the UI at root\n c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");\n});\n\napp.UseEndpoints(endpoints =>\n{\n endpoints.MapControllers();\n endpoints.MapSwagger("{documentName}/api-docs");\n});\n')),(0,o.kt)("p",null,"5.\u66f4\u591a\u529f\u80fd"),(0,o.kt)("p",null,"\u4e3a\u6587\u6863\u6dfb\u52a0\u6ce8\u91ca \u5728\u9879\u76ee\u4e0a\u53f3\u952e--\u5c5e\u6027--\u751f\u6210"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f34161d14195aa59413f0fc.jpg",alt:null})),(0,o.kt)("p",null,"\u5728AddSwaggerGen\u65b9\u6cd5\u4e2d\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "SwaggerDemo.xml"),true);\n')),(0,o.kt)("p",null," \u6700\u540e\u4e00\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3atrue\uff0c\u4ee3\u8868\u542f\u7528\u63a7\u5236\u5668\u4e0a\u7684\u6ce8\u91ca"),(0,o.kt)("p",null,"\u8fd0\u884c\u540e\u5982\u770b\u4e0d\u5230\u63a7\u5236\u5668\u4e0a\u6ce8\u91ca\u663e\u793a\uff0c\u8bf7\u70b9\u5f00\u6587\u6863\u7ba1\u7406->\u4e2a\u6027\u5316\u8bbe\u7f6e\uff0c\u5f00\u542f\u5206\u7ec4tag\u663e\u793adescription\u8bf4\u660e\u5c5e\u6027"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f34171114195aa594142d2e.jpg",alt:null})),(0,o.kt)("h3",{id:"nswagaspnetcore"},"NSwag.AspNetCore"),(0,o.kt)("p",null,"\uff08\u8bf7\u53c2\u8003\u76ee\u5f55test/WebSites/NSwag.Swagger.Knife4jUI\uff09"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"public void ConfigureServices(IServiceCollection services)\n {\n // \u5176\u5b83Service\n services.AddOpenApiDocument();\n }\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'public void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n // \u5176\u5b83 Use\n app.UseOpenApi();\n app.UseKnife4UI(c =>\n {\n c.RoutePrefix = "";\n c.SwaggerEndpoint("/swagger/v1/swagger.json");\n });\n}\n')),(0,o.kt)("p",null,"\u5373\u53ef\u4f7f\u7528 Knife4jUI"),(0,o.kt)("h3",{id:"-\u6548\u679c\u56fe"},"\ud83d\udd0e \u6548\u679c\u56fe"),(0,o.kt)("p",null,"\u8fd0\u884c\u9879\u76ee\uff0c\u6253\u5f00 https://localhost:5001/index.html#/home"),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://pic.downk.cc/item/5f2fa77b14195aa594ccbedc.jpg",alt:"https://pic.downk.cc/item/5f2fa77b14195aa594ccbedc.jpg"})),(0,o.kt)("h3",{id:"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003"},"\u66f4\u591a\u914d\u7f6e\u8bf7\u53c2\u8003"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/domaindrivendev/Swashbuckle.AspNetCore",target:"_blank",rel:"noopener"},"https://github.com/domaindrivendev/Swashbuckle.AspNetCore"))),(0,o.kt)("h3",{id:"\u66f4\u591a\u9879\u76ee"},"\u66f4\u591a\u9879\u76ee"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://api.igeekfan.cn/swagger/index.html",target:"_blank",rel:"noopener"},"https://api.igeekfan.cn/swagger/index.html")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/luoyunchong/lin-cms-dotnetcore",target:"_blank",rel:"noopener"},"https://github.com/luoyunchong/lin-cms-dotnetcore"),(0,o.kt)("img",{parentName:"li",src:"https://pic.downk.cc/item/5f2fa97814195aa594cd5cfc.jpg",alt:"image"}))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0d6d4325.f75733b8.js b/knife4j-doc/gitee/assets/js/0d6d4325.f75733b8.js new file mode 100644 index 000000000..948278ba3 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0d6d4325.f75733b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7290],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>E});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=a.createContext({}),c=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=c(e.components);return a.createElement(p.Provider,{value:n},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=c(t),m=r,E=s["".concat(p,".").concat(m)]||s[m]||d[m]||o;return t?a.createElement(E,i(i({ref:n},u),{},{components:t})):a.createElement(E,i({ref:n},u))}));function E(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=m;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[s]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>E,frontMatter:()=>l,metadata:()=>c,toc:()=>s});var a=t(87462),r=t(63366),o=(t(67294),t(3905)),i=["components"],l={},p="3.3 \u5f00\u653eAPI",c={unversionedId:"middleware-sources/cloud-openapi",id:"middleware-sources/cloud-openapi",title:"3.3 \u5f00\u653eAPI",description:"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0",source:"@site/docs/middleware-sources/cloud-openapi.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/cloud-openapi",permalink:"/docs/middleware-sources/cloud-openapi",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},u={},s=[{value:"3.3.1 \u6ce8\u518cAPI",id:"331-\u6ce8\u518capi",level:2},{value:"3.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"332-spring-boot\u81ea\u52a8\u6ce8\u518c",level:2}],d={toc:s},m="wrapper";function E(e){var n=e.components,t=(0,r.Z)(e,i);return(0,o.kt)(m,(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"33-\u5f00\u653eapi"},"3.3 \u5f00\u653eAPI"),(0,o.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,o.kt)("h2",{id:"331-\u6ce8\u518capi"},"3.3.1 \u6ce8\u518cAPI"),(0,o.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,o.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"application/json")),(0,o.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"POST")),(0,o.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,o.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,o.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,o.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:"_blank",rel:"noopener"},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,o.kt)("h2",{id:"332-spring-boot\u81ea\u52a8\u6ce8\u518c"},"3.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,o.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,o.kt)("p",null,"1.Maven\u5f15\u7528"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,o.kt)("p",null,"2\u3001\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,o.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,o.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0d6d4325.f8a46ef7.js b/knife4j-doc/gitee/assets/js/0d6d4325.f8a46ef7.js deleted file mode 100644 index 250255f2a..000000000 --- a/knife4j-doc/gitee/assets/js/0d6d4325.f8a46ef7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7290],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=a.createContext({}),c=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},u=function(e){var n=c(e.components);return a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(t),m=r,E=d["".concat(p,".").concat(m)]||d[m]||s[m]||o;return t?a.createElement(E,l(l({ref:n},u),{},{components:t})):a.createElement(E,l({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,l=new Array(o);l[0]=d;var i={};for(var p in n)hasOwnProperty.call(n,p)&&(i[p]=n[p]);i.originalType=e,i.mdxType="string"==typeof e?e:r,l[1]=i;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>m,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var a=t(87462),r=t(63366),o=(t(67294),t(3905)),l=["components"],i={},p="3.3 \u5f00\u653eAPI",c={unversionedId:"middleware-sources/cloud-openapi",id:"middleware-sources/cloud-openapi",title:"3.3 \u5f00\u653eAPI",description:"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0",source:"@site/docs/middleware-sources/cloud-openapi.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/cloud-openapi",permalink:"/docs/middleware-sources/cloud-openapi",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},u={},s=[{value:"3.3.1 \u6ce8\u518cAPI",id:"331-\u6ce8\u518capi",level:2},{value:"3.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"332-spring-boot\u81ea\u52a8\u6ce8\u518c",level:2}],d={toc:s};function m(e){var n=e.components,t=(0,r.Z)(e,l);return(0,o.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"33-\u5f00\u653eapi"},"3.3 \u5f00\u653eAPI"),(0,o.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,o.kt)("h2",{id:"331-\u6ce8\u518capi"},"3.3.1 \u6ce8\u518cAPI"),(0,o.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,o.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"application/json")),(0,o.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"POST")),(0,o.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,o.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,o.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,o.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:null,rel:null},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,o.kt)("h2",{id:"332-spring-boot\u81ea\u52a8\u6ce8\u518c"},"3.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,o.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,o.kt)("p",null,"1.Maven\u5f15\u7528"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,o.kt)("p",null,"2\u3001\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,o.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,o.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0e4efd15.36f152f9.js b/knife4j-doc/gitee/assets/js/0e4efd15.36f152f9.js deleted file mode 100644 index 416da3b87..000000000 --- a/knife4j-doc/gitee/assets/js/0e4efd15.36f152f9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7373],{3905:(e,n,t)=>{t.d(n,{Zo:()=>d,kt:()=>u});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},d=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},l=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),l=c(t),u=o,m=l["".concat(s,".").concat(u)]||l[u]||g[u]||a;return t?r.createElement(m,i(i({ref:n},d),{},{components:t})):r.createElement(m,i({ref:n},d))}));function u(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=l;var p={};for(var s in n)hasOwnProperty.call(n,s)&&(p[s]=n[s]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var c=2;c{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>p,metadata:()=>c,toc:()=>g});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],p={},s="4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",c={unversionedId:"action/aggregation-disk",id:"action/aggregation-disk",title:"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",description:"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408",source:"@site/docs/action/aggregation-disk.md",sourceDirName:"action",slug:"/action/aggregation-disk",permalink:"/docs/action/aggregation-disk",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"3.4 \u5bc6\u7801\u6a21\u5f0f(password)",permalink:"/docs/action/oauth2-password"},next:{title:"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-cloud"}},d={},g=[],l={toc:g};function u(e){var n=e.components,p=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},l,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"41-disk\u672c\u5730\u6a21\u5f0f\u805a\u5408openapi\u6587\u6863"},"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863"),(0,a.kt)("p",null,"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408"),(0,a.kt)("p",null,"\u5b8c\u6574\u4ee3\u7801\u8bf7\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-aggregation-disk-demo",target:"_blank",rel:"noopener"},"knife4j-aggregation-disk-demo")),(0,a.kt)("p",null,"\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u521b\u5efaSpring Boot\u9879\u76ee\uff0c\u5f15\u5165",(0,a.kt)("a",{parentName:"p",href:"/docs/middleware/knife4jAggregation",target:null,rel:null},"Knife4jAggregation"),"\u7684\u4f9d\u8d56\u5305\uff0c\u5b8c\u6574pom\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u5b8c\u6574\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-xml"},'\n\n 4.0.0\n \n org.springframework.boot\n spring-boot-starter-parent\n 2.4.0\n \x3c!-- lookup parent from repository --\x3e\n \n com.github.xiaoymin\n knife4j-aggregation-disk-demo\n 0.0.1-SNAPSHOT\n knife4j-aggregation-disk-demo\n \u901a\u8fc7\u57fa\u4e8eSpring Boot\u7684\u5de5\u7a0b\u805a\u5408\u4efb\u610f\u5fae\u670d\u52a1\u63a5\u53e3\u6587\u6863\n\n \n 1.8\n \n\n \n \n org.springframework.boot\n spring-boot-starter-web\n \n\n \n com.github.xiaoymin\n knife4j-aggregation-spring-boot-starter\n 2.0.8\n \n\n \n org.springframework.boot\n spring-boot-starter-test\n test\n \n \n\n \n \n \n org.springframework.boot\n spring-boot-maven-plugin\n \n \n \n\n\n\n'))),(0,a.kt)("p",null,"2\u3001\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 19081\nknife4j:\n enableAggregation: true\n disk:\n enable: true\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,a.kt)("p",null,"\u5de5\u7a0b\u76ee\u5f55\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(89204).Z,width:"1015",height:"383"})),(0,a.kt)("p",null,"3\u3001\u542f\u52a8\u9879\u76ee\uff0c\u8bbf\u95eedoc.html\u8fdb\u884c\u67e5\u770b\uff0c\u6548\u679c\u56fe\u5982\u4e0b"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(43171).Z,width:"1366",height:"626"})))}u.isMDXComponent=!0},43171:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/disk-ui-2273ba1b589e0268800e5fe949ed234b.png"},89204:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/disk-2d420917a5252529ded96444c7209a0c.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/0e4efd15.b092deb7.js b/knife4j-doc/gitee/assets/js/0e4efd15.b092deb7.js new file mode 100644 index 000000000..128422d10 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/0e4efd15.b092deb7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7373],{3905:(e,n,t)=>{t.d(n,{Zo:()=>d,kt:()=>m});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},d=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},g="mdxType",l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),g=c(t),u=o,m=g["".concat(s,".").concat(u)]||g[u]||l[u]||a;return t?r.createElement(m,i(i({ref:n},d),{},{components:t})):r.createElement(m,i({ref:n},d))}));function m(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=u;var p={};for(var s in n)hasOwnProperty.call(n,s)&&(p[s]=n[s]);p.originalType=e,p[g]="string"==typeof e?e:o,i[1]=p;for(var c=2;c{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>p,metadata:()=>c,toc:()=>g});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],p={},s="4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",c={unversionedId:"action/aggregation-disk",id:"action/aggregation-disk",title:"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",description:"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408",source:"@site/docs/action/aggregation-disk.md",sourceDirName:"action",slug:"/action/aggregation-disk",permalink:"/docs/action/aggregation-disk",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"3.4 \u5bc6\u7801\u6a21\u5f0f(password)",permalink:"/docs/action/oauth2-password"},next:{title:"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-cloud"}},d={},g=[],l={toc:g},u="wrapper";function m(e){var n=e.components,p=(0,o.Z)(e,i);return(0,a.kt)(u,(0,r.Z)({},l,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"41-disk\u672c\u5730\u6a21\u5f0f\u805a\u5408openapi\u6587\u6863"},"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863"),(0,a.kt)("p",null,"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408"),(0,a.kt)("p",null,"\u5b8c\u6574\u4ee3\u7801\u8bf7\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-aggregation-disk-demo",target:"_blank",rel:"noopener"},"knife4j-aggregation-disk-demo")),(0,a.kt)("p",null,"\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,"1\u3001\u521b\u5efaSpring Boot\u9879\u76ee\uff0c\u5f15\u5165",(0,a.kt)("a",{parentName:"p",href:"/docs/middleware/knife4jAggregation",target:null,rel:null},"Knife4jAggregation"),"\u7684\u4f9d\u8d56\u5305\uff0c\u5b8c\u6574pom\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u5b8c\u6574\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-xml"},'\n\n 4.0.0\n \n org.springframework.boot\n spring-boot-starter-parent\n 2.4.0\n \x3c!-- lookup parent from repository --\x3e\n \n com.github.xiaoymin\n knife4j-aggregation-disk-demo\n 0.0.1-SNAPSHOT\n knife4j-aggregation-disk-demo\n \u901a\u8fc7\u57fa\u4e8eSpring Boot\u7684\u5de5\u7a0b\u805a\u5408\u4efb\u610f\u5fae\u670d\u52a1\u63a5\u53e3\u6587\u6863\n\n \n 1.8\n \n\n \n \n org.springframework.boot\n spring-boot-starter-web\n \n\n \n com.github.xiaoymin\n knife4j-aggregation-spring-boot-starter\n 2.0.8\n \n\n \n org.springframework.boot\n spring-boot-starter-test\n test\n \n \n\n \n \n \n org.springframework.boot\n spring-boot-maven-plugin\n \n \n \n\n\n\n'))),(0,a.kt)("p",null,"2\u3001\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 19081\nknife4j:\n enableAggregation: true\n disk:\n enable: true\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,a.kt)("p",null,"\u5de5\u7a0b\u76ee\u5f55\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(89204).Z,width:"1015",height:"383"})),(0,a.kt)("p",null,"3\u3001\u542f\u52a8\u9879\u76ee\uff0c\u8bbf\u95eedoc.html\u8fdb\u884c\u67e5\u770b\uff0c\u6548\u679c\u56fe\u5982\u4e0b"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(43171).Z,width:"1366",height:"626"})))}m.isMDXComponent=!0},43171:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/disk-ui-2273ba1b589e0268800e5fe949ed234b.png"},89204:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/disk-2d420917a5252529ded96444c7209a0c.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/14eb3368.39ccdb19.js b/knife4j-doc/gitee/assets/js/14eb3368.39ccdb19.js new file mode 100644 index 000000000..60b1c2908 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/14eb3368.39ccdb19.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9817],{31986:(e,t,a)=>{a.d(t,{Z:()=>p});var n=a(87462),r=a(67294),i=a(86010),l=a(35281),c=a(53791),s=a(48596),o=a(39960),m=a(44996),d=a(95999);function u(e){return r.createElement("svg",(0,n.Z)({viewBox:"0 0 24 24"},e),r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl",breadcrumbHomeIcon:"breadcrumbHomeIcon_OVgt"};function h(e){var t=e.children,a=e.href,n="breadcrumbs__link";return e.isLast?r.createElement("span",{className:n,itemProp:"name"},t):a?r.createElement(o.Z,{className:n,href:a,itemProp:"item"},r.createElement("span",{itemProp:"name"},t)):r.createElement("span",{className:n},t)}function b(e){var t=e.children,a=e.active,l=e.index,c=e.addMicrodata;return r.createElement("li",(0,n.Z)({},c&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,i.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,r.createElement("meta",{itemProp:"position",content:String(l+1)}))}function g(){var e=(0,m.Z)("/");return r.createElement("li",{className:"breadcrumbs__item"},r.createElement(o.Z,{"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,i.Z)("breadcrumbs__link",v.breadcrumbsItemLink),href:e},r.createElement(u,{className:v.breadcrumbHomeIcon})))}function p(){var e=(0,c.s1)(),t=(0,s.Ns)();return e?r.createElement("nav",{className:(0,i.Z)(l.k.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},r.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&r.createElement(g,null),e.map((function(t,a){var n=a===e.length-1;return r.createElement(b,{key:a,active:n,index:a,addMicrodata:!!t.href},r.createElement(h,{href:t.href,isLast:n},t.label))})))):null}},34228:(e,t,a)=>{a.r(t),a.d(t,{default:()=>y});var n=a(67294),r=a(10833),i=a(53791),l=a(44996),c=a(86010),s=a(39960),o=a(13919),m=a(95999);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};function u(e){var t=e.href,a=e.children;return n.createElement(s.Z,{href:t,className:(0,c.Z)("card padding--lg",d.cardContainer)},a)}function v(e){var t=e.href,a=e.icon,r=e.title,i=e.description;return n.createElement(u,{href:t},n.createElement("h2",{className:(0,c.Z)("text--truncate",d.cardTitle),title:r},a," ",r),i&&n.createElement("p",{className:(0,c.Z)("text--truncate",d.cardDescription),title:i},i))}function h(e){var t=e.item,a=(0,i.Wl)(t);return a?n.createElement(v,{href:a,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,m.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function b(e){var t,a=e.item,r=(0,o.Z)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,i.xz)(null!=(t=a.docId)?t:void 0);return n.createElement(v,{href:a.href,icon:r,title:a.label,description:null==l?void 0:l.description})}function g(e){var t=e.item;switch(t.type){case"link":return n.createElement(b,{item:t});case"category":return n.createElement(h,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function p(e){var t=e.items,a=e.className;return n.createElement("section",{className:(0,c.Z)("row",a)},function(e){return e.filter((function(e){return"category"!==e.type||!!(0,i.Wl)(e)}))}(t).map((function(e,t){return n.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},n.createElement(g,{item:e}))})))}var E=a(4966),f=a(23120),N=a(44364),Z=a(31986),k=a(92503);const L={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function _(e){var t=e.categoryGeneratedIndex;return n.createElement(r.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,l.Z)(t.image)})}function T(e){var t=e.categoryGeneratedIndex,a=(0,i.jA)();return n.createElement("div",{className:L.generatedIndexPage},n.createElement(f.Z,null),n.createElement(Z.Z,null),n.createElement(N.Z,null),n.createElement("header",null,n.createElement(k.Z,{as:"h1",className:L.title},t.title),t.description&&n.createElement("p",null,t.description)),n.createElement("article",{className:"margin-top--lg"},n.createElement(p,{items:a.items,className:L.list})),n.createElement("footer",{className:"margin-top--lg"},n.createElement(E.Z,{previous:t.navigation.previous,next:t.navigation.next})))}function y(e){return n.createElement(n.Fragment,null,n.createElement(_,e),n.createElement(T,e))}},4966:(e,t,a)=>{a.d(t,{Z:()=>o});var n=a(87462),r=a(67294),i=a(95999),l=a(86010),c=a(39960);function s(e){var t=e.permalink,a=e.title,n=e.subLabel,i=e.isNext;return r.createElement(c.Z,{className:(0,l.Z)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},n&&r.createElement("div",{className:"pagination-nav__sublabel"},n),r.createElement("div",{className:"pagination-nav__label"},a))}function o(e){var t=e.previous,a=e.next;return r.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,i.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&r.createElement(s,(0,n.Z)({},t,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&r.createElement(s,(0,n.Z)({},a,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},44364:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(67294),r=a(86010),i=a(95999),l=a(35281),c=a(74477);function s(e){var t=e.className,a=(0,c.E)();return a.badge?n.createElement("span",{className:(0,r.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},n.createElement(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}")):null}},23120:(e,t,a)=>{a.d(t,{Z:()=>g});var n=a(67294),r=a(86010),i=a(52263),l=a(39960),c=a(95999),s=a(94104),o=a(35281),m=a(60373),d=a(74477);var u={unreleased:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(c.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(c.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function v(e){var t=u[e.versionMetadata.banner];return n.createElement(t,e)}function h(e){var t=e.versionLabel,a=e.to,r=e.onClick;return n.createElement(c.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:n.createElement("b",null,n.createElement(l.Z,{to:a,onClick:r},n.createElement(c.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function b(e){var t,a=e.className,l=e.versionMetadata,c=(0,i.Z)().siteConfig.title,d=(0,s.gA)({failfast:!0}).pluginId,u=(0,m.J)(d).savePreferredVersionName,b=(0,s.Jo)(d),g=b.latestDocSuggestion,p=b.latestVersionSuggestion,E=null!=g?g:(t=p).docs.find((function(e){return e.id===t.mainDocId}));return n.createElement("div",{className:(0,r.Z)(a,o.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},n.createElement("div",null,n.createElement(v,{siteTitle:c,versionMetadata:l})),n.createElement("div",{className:"margin-top--md"},n.createElement(h,{versionLabel:p.label,to:E.path,onClick:function(){return u(p.name)}})))}function g(e){var t=e.className,a=(0,d.E)();return a.banner?n.createElement(b,{className:t,versionMetadata:a}):null}},92503:(e,t,a)=>{a.d(t,{Z:()=>d});var n=a(87462),r=a(63366),i=a(67294),l=a(86010),c=a(95999),s=a(86668);const o={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var m=["as","id"];function d(e){var t=e.as,a=e.id,d=(0,r.Z)(e,m),u=(0,s.L)().navbar.hideOnScroll;return"h1"!==t&&a?i.createElement(t,(0,n.Z)({},d,{className:(0,l.Z)("anchor",u?o.anchorWithHideOnScrollNavbar:o.anchorWithStickyNavbar),id:a}),d.children,i.createElement("a",{className:"hash-link",href:"#"+a,title:(0,c.I)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"\u200b")):i.createElement(t,(0,n.Z)({},d,{id:void 0}))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/14eb3368.a314fc0d.js b/knife4j-doc/gitee/assets/js/14eb3368.a314fc0d.js deleted file mode 100644 index 3645a6257..000000000 --- a/knife4j-doc/gitee/assets/js/14eb3368.a314fc0d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9817],{31986:(e,t,a)=>{a.d(t,{Z:()=>p});var n=a(87462),r=a(67294),i=a(86010),l=a(35281),s=a(53791),c=a(48596),o=a(39960),m=a(44996),d=a(95999);function u(e){return r.createElement("svg",(0,n.Z)({viewBox:"0 0 24 24"},e),r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl",breadcrumbHomeIcon:"breadcrumbHomeIcon_OVgt"};function b(e){var t=e.children,a=e.href,n="breadcrumbs__link";return e.isLast?r.createElement("span",{className:n,itemProp:"name"},t):a?r.createElement(o.Z,{className:n,href:a,itemProp:"item"},r.createElement("span",{itemProp:"name"},t)):r.createElement("span",{className:n},t)}function h(e){var t=e.children,a=e.active,l=e.index,s=e.addMicrodata;return r.createElement("li",(0,n.Z)({},s&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,i.Z)("breadcrumbs__item",{"breadcrumbs__item--active":a})}),t,r.createElement("meta",{itemProp:"position",content:String(l+1)}))}function g(){var e=(0,m.Z)("/");return r.createElement("li",{className:"breadcrumbs__item"},r.createElement(o.Z,{"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,i.Z)("breadcrumbs__link",v.breadcrumbsItemLink),href:e},r.createElement(u,{className:v.breadcrumbHomeIcon})))}function p(){var e=(0,s.s1)(),t=(0,c.Ns)();return e?r.createElement("nav",{className:(0,i.Z)(l.k.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},r.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&r.createElement(g,null),e.map((function(t,a){var n=a===e.length-1;return r.createElement(h,{key:a,active:n,index:a,addMicrodata:!!t.href},r.createElement(b,{href:t.href,isLast:n},t.label))})))):null}},34228:(e,t,a)=>{a.r(t),a.d(t,{default:()=>V});var n=a(67294),r=a(10833),i=a(53791),l=a(44996),s=a(86010),c=a(39960),o=a(13919),m=a(95999);const d="cardContainer_fWXF",u="cardTitle_rnsV",v="cardDescription_PWke";function b(e){var t=e.href,a=e.children;return n.createElement(c.Z,{href:t,className:(0,s.Z)("card padding--lg",d)},a)}function h(e){var t=e.href,a=e.icon,r=e.title,i=e.description;return n.createElement(b,{href:t},n.createElement("h2",{className:(0,s.Z)("text--truncate",u),title:r},a," ",r),i&&n.createElement("p",{className:(0,s.Z)("text--truncate",v),title:i},i))}function g(e){var t=e.item,a=(0,i.Wl)(t);return a?n.createElement(h,{href:a,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:(0,m.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function p(e){var t,a=e.item,r=(0,o.Z)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,i.xz)(null!=(t=a.docId)?t:void 0);return n.createElement(h,{href:a.href,icon:r,title:a.label,description:null==l?void 0:l.description})}function E(e){var t=e.item;switch(t.type){case"link":return n.createElement(p,{item:t});case"category":return n.createElement(g,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function f(e){var t=e.items,a=e.className;return n.createElement("section",{className:(0,s.Z)("row",a)},function(e){return e.filter((function(e){return"category"!==e.type||!!(0,i.Wl)(e)}))}(t).map((function(e,t){return n.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},n.createElement(E,{item:e}))})))}var Z=a(4966),N=a(23120),k=a(44364),L=a(31986),_=a(92503);const T="generatedIndexPage_vN6x",y="list_eTzJ",x="title_kItE";function I(e){var t=e.categoryGeneratedIndex;return n.createElement(r.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,l.Z)(t.image)})}function w(e){var t=e.categoryGeneratedIndex,a=(0,i.jA)();return n.createElement("div",{className:T},n.createElement(N.Z,null),n.createElement(L.Z,null),n.createElement(k.Z,null),n.createElement("header",null,n.createElement(_.Z,{as:"h1",className:x},t.title),t.description&&n.createElement("p",null,t.description)),n.createElement("article",{className:"margin-top--lg"},n.createElement(f,{items:a.items,className:y})),n.createElement("footer",{className:"margin-top--lg"},n.createElement(Z.Z,{previous:t.navigation.previous,next:t.navigation.next})))}function V(e){return n.createElement(n.Fragment,null,n.createElement(I,e),n.createElement(w,e))}},4966:(e,t,a)=>{a.d(t,{Z:()=>o});var n=a(87462),r=a(67294),i=a(95999),l=a(86010),s=a(39960);function c(e){var t=e.permalink,a=e.title,n=e.subLabel,i=e.isNext;return r.createElement(s.Z,{className:(0,l.Z)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},n&&r.createElement("div",{className:"pagination-nav__sublabel"},n),r.createElement("div",{className:"pagination-nav__label"},a))}function o(e){var t=e.previous,a=e.next;return r.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,i.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&r.createElement(c,(0,n.Z)({},t,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&r.createElement(c,(0,n.Z)({},a,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},44364:(e,t,a)=>{a.d(t,{Z:()=>c});var n=a(67294),r=a(86010),i=a(95999),l=a(35281),s=a(74477);function c(e){var t=e.className,a=(0,s.E)();return a.badge?n.createElement("span",{className:(0,r.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},n.createElement(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}")):null}},23120:(e,t,a)=>{a.d(t,{Z:()=>g});var n=a(67294),r=a(86010),i=a(52263),l=a(39960),s=a(95999),c=a(94104),o=a(35281),m=a(60373),d=a(74477);var u={unreleased:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(s.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,a=e.versionMetadata;return n.createElement(s.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:n.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function v(e){var t=u[e.versionMetadata.banner];return n.createElement(t,e)}function b(e){var t=e.versionLabel,a=e.to,r=e.onClick;return n.createElement(s.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:n.createElement("b",null,n.createElement(l.Z,{to:a,onClick:r},n.createElement(s.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function h(e){var t,a=e.className,l=e.versionMetadata,s=(0,i.Z)().siteConfig.title,d=(0,c.gA)({failfast:!0}).pluginId,u=(0,m.J)(d).savePreferredVersionName,h=(0,c.Jo)(d),g=h.latestDocSuggestion,p=h.latestVersionSuggestion,E=null!=g?g:(t=p).docs.find((function(e){return e.id===t.mainDocId}));return n.createElement("div",{className:(0,r.Z)(a,o.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},n.createElement("div",null,n.createElement(v,{siteTitle:s,versionMetadata:l})),n.createElement("div",{className:"margin-top--md"},n.createElement(b,{versionLabel:p.label,to:E.path,onClick:function(){return u(p.name)}})))}function g(e){var t=e.className,a=(0,d.E)();return a.banner?n.createElement(h,{className:t,versionMetadata:a}):null}},92503:(e,t,a)=>{a.d(t,{Z:()=>u});var n=a(87462),r=a(63366),i=a(67294),l=a(86010),s=a(95999),c=a(86668);const o="anchorWithStickyNavbar_LWe7",m="anchorWithHideOnScrollNavbar_WYt5";var d=["as","id"];function u(e){var t=e.as,a=e.id,u=(0,r.Z)(e,d),v=(0,c.L)().navbar.hideOnScroll;return"h1"!==t&&a?i.createElement(t,(0,n.Z)({},u,{className:(0,l.Z)("anchor",v?m:o),id:a}),u.children,i.createElement("a",{className:"hash-link",href:"#"+a,title:(0,s.I)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"\u200b")):i.createElement(t,(0,n.Z)({},u,{id:void 0}))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/158f1910.5a435bdc.js b/knife4j-doc/gitee/assets/js/158f1910.5a435bdc.js new file mode 100644 index 000000000..9d32367f7 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/158f1910.5a435bdc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5358],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>f});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=s(t),m=a,f=c["".concat(l,".").concat(m)]||c[m]||d[m]||i;return t?r.createElement(f,o(o({ref:n},u),{},{components:t})):r.createElement(f,o({ref:n},u))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=m;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[c]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>s,toc:()=>c});var r=t(87462),a=t(63366),i=(t(67294),t(3905)),o=["components"],p={},l="3.26 \u7981\u7528\u8c03\u8bd5",s={unversionedId:"features/forbidDebug",id:"features/forbidDebug",title:"3.26 \u7981\u7528\u8c03\u8bd5",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb",source:"@site/docs/features/forbidDebug.md",sourceDirName:"features",slug:"/features/forbidDebug",permalink:"/docs/features/forbidDebug",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.25 JSR303",permalink:"/docs/features/jsr303"},next:{title:"3.27 \u7981\u7528\u641c\u7d22\u6846",permalink:"/docs/features/forbidSearch"}},u={},c=[],d={toc:c},m="wrapper";function f(e){var n=e.components,p=(0,a.Z)(e,o);return(0,i.kt)(m,(0,r.Z)({},d,p,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"326-\u7981\u7528\u8c03\u8bd5"},"3.26 \u7981\u7528\u8c03\u8bd5"),(0,i.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,i.kt)("p",null,"\u5728\u4ee5\u524d\u7684\u7248\u672c\u4e2d\uff0c\u5f00\u53d1\u8005\u5982\u679c\u8981\u7981\u7528\u8c03\u8bd5\u529f\u80fd\uff0c\u662f\u901a\u8fc7\u5728\u670d\u52a1\u7aef\u521b\u5efaUiConfiguration\u7684\u5b9e\u4f53Bean\u5bf9\u8c61\uff0c\u914d\u7f6esupportMethod\u6765\u8fbe\u5230\u7981\u7528\u90e8\u5206\u63a5\u53e3\u7684\u8c03\u8bd5\uff0c\u81ea",(0,i.kt)("inlineCode",{parentName:"p"},"2.0.8"),"\u7248\u672c\u540e\uff0c\u8be5\u5c5e\u6027\u88ab\u5e9f\u5f03"),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u60f3\u8981\u7981\u7528\u8c03\u8bd5\u529f\u80fd\uff0c\u9700\u8981\u901a\u8fc7\u589e\u5f3a\u5c5e\u6027\u8fdb\u884c\u914d\u7f6e\uff0c\u5728yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n setting:\n enable-debug: false\n")),(0,i.kt)("p",null,"\u5c5e\u6027\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enable-debug"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a",(0,i.kt)("inlineCode",{parentName:"li"},"Boolean"),"\u503c\uff0c\u4ee3\u8868\u662f\u5426\u542f\u7528\u8c03\u8bd5\u529f\u80fd,\u9ed8\u8ba4\u503c\u4e3a",(0,i.kt)("inlineCode",{parentName:"li"},"true"),"(\u4ee3\u8868\u5f00\u542f\u8c03\u8bd5)\uff0c\u5982\u679c\u8981\u7981\u7528\u8c03\u8bd5\uff0c\u8be5\u503c\u8bbe\u4e3a",(0,i.kt)("inlineCode",{parentName:"li"},"false"))),(0,i.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,i.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u914d\u7f6e\u597d\u540e,\u6700\u6838\u5fc3\u7684\u4e00\u6b65\uff0c\u4e5f\u662f\u6700\u540e\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5728\u521b\u5efa",(0,i.kt)("inlineCode",{parentName:"p"},"Docket"),"\u903b\u8f91\u5206\u7ec4\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u5c06\u6269\u5c55\u5c5e\u6027\u8fdb\u884c\u8d4b\u503c"),(0,i.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildSettingExtensions());\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,i.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,"1\u3001\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,i.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,i.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"buildSettingExtensions"),"\u65b9\u6cd5\uff0c\u83b7\u53d6",(0,i.kt)("inlineCode",{parentName:"p"},"x-settings"),"\u7684\u589e\u5f3a\u5c5e\u6027"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6700\u7ec8\u754c\u9762\u6548\u679c\u5982\u4e0b\uff1a")),(0,i.kt)("p",null,(0,i.kt)("img",{src:t(75863).Z,width:"1357",height:"464"})),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,i.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,i.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"x-openapi"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",{parentName:"admonition"},(0,i.kt)("img",{src:t(65253).Z,width:"963",height:"193"}))))}f.isMDXComponent=!0},65253:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/setting-a6923b1d41d592ba62880f74928fe84d.png"},75863:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/enableDebug-c1de7549f29e3c53b6b9f76e64ff995f.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/158f1910.fb12e259.js b/knife4j-doc/gitee/assets/js/158f1910.fb12e259.js deleted file mode 100644 index f2b4f8dea..000000000 --- a/knife4j-doc/gitee/assets/js/158f1910.fb12e259.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5358],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(t),m=a,f=d["".concat(l,".").concat(m)]||d[m]||c[m]||i;return t?r.createElement(f,o(o({ref:n},u),{},{components:t})):r.createElement(f,o({ref:n},u))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=d;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,o[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>p,metadata:()=>s,toc:()=>c});var r=t(87462),a=t(63366),i=(t(67294),t(3905)),o=["components"],p={},l="3.26 \u7981\u7528\u8c03\u8bd5",s={unversionedId:"features/forbidDebug",id:"features/forbidDebug",title:"3.26 \u7981\u7528\u8c03\u8bd5",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb",source:"@site/docs/features/forbidDebug.md",sourceDirName:"features",slug:"/features/forbidDebug",permalink:"/docs/features/forbidDebug",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.25 JSR303",permalink:"/docs/features/jsr303"},next:{title:"3.27 \u7981\u7528\u641c\u7d22\u6846",permalink:"/docs/features/forbidSearch"}},u={},c=[],d={toc:c};function m(e){var n=e.components,p=(0,a.Z)(e,o);return(0,i.kt)("wrapper",(0,r.Z)({},d,p,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"326-\u7981\u7528\u8c03\u8bd5"},"3.26 \u7981\u7528\u8c03\u8bd5"),(0,i.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,i.kt)("p",null,"\u5728\u4ee5\u524d\u7684\u7248\u672c\u4e2d\uff0c\u5f00\u53d1\u8005\u5982\u679c\u8981\u7981\u7528\u8c03\u8bd5\u529f\u80fd\uff0c\u662f\u901a\u8fc7\u5728\u670d\u52a1\u7aef\u521b\u5efaUiConfiguration\u7684\u5b9e\u4f53Bean\u5bf9\u8c61\uff0c\u914d\u7f6esupportMethod\u6765\u8fbe\u5230\u7981\u7528\u90e8\u5206\u63a5\u53e3\u7684\u8c03\u8bd5\uff0c\u81ea",(0,i.kt)("inlineCode",{parentName:"p"},"2.0.8"),"\u7248\u672c\u540e\uff0c\u8be5\u5c5e\u6027\u88ab\u5e9f\u5f03"),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u60f3\u8981\u7981\u7528\u8c03\u8bd5\u529f\u80fd\uff0c\u9700\u8981\u901a\u8fc7\u589e\u5f3a\u5c5e\u6027\u8fdb\u884c\u914d\u7f6e\uff0c\u5728yml\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n setting:\n enable-debug: false\n")),(0,i.kt)("p",null,"\u5c5e\u6027\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enable-debug"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a",(0,i.kt)("inlineCode",{parentName:"li"},"Boolean"),"\u503c\uff0c\u4ee3\u8868\u662f\u5426\u542f\u7528\u8c03\u8bd5\u529f\u80fd,\u9ed8\u8ba4\u503c\u4e3a",(0,i.kt)("inlineCode",{parentName:"li"},"true"),"(\u4ee3\u8868\u5f00\u542f\u8c03\u8bd5)\uff0c\u5982\u679c\u8981\u7981\u7528\u8c03\u8bd5\uff0c\u8be5\u503c\u8bbe\u4e3a",(0,i.kt)("inlineCode",{parentName:"li"},"false"))),(0,i.kt)("admonition",{title:"\u91cd\u8981\u63d0\u9192",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"\u81eaKnife4j 4.0\u7248\u672c\u5f00\u59cb\uff0c\u4e0b\u9762\u7684\u914d\u7f6e\u5728\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u65f6\u624d\u9700\u8981\uff0c\u800c\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-spring-boot-starter"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi3-jakarta-spring-boot-starter"),"\u7ec4\u4ef6\u5219",(0,i.kt)("strong",{parentName:"p"},"\u4e0d\u9700\u8981\uff01\uff01\uff01"),"\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u3002")),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u914d\u7f6e\u597d\u540e,\u6700\u6838\u5fc3\u7684\u4e00\u6b65\uff0c\u4e5f\u662f\u6700\u540e\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5728\u521b\u5efa",(0,i.kt)("inlineCode",{parentName:"p"},"Docket"),"\u903b\u8f91\u5206\u7ec4\u5bf9\u8c61\u65f6\uff0c\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u5de5\u5177\u5bf9\u8c61",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u5c06\u6269\u5c55\u5c5e\u6027\u8fdb\u884c\u8d4b\u503c"),(0,i.kt)("p",null,"\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("admonition",{title:"\u70b9\u51fb\u67e5\u770b\u4ee3\u7801",type:"tip"},(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfiguration {\n\n private final OpenApiExtensionResolver openApiExtensionResolver;\n\n @Autowired\n public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {\n this.openApiExtensionResolver = openApiExtensionResolver;\n }\n\n @Bean(value = "defaultApi2")\n public Docket defaultApi2() {\n String groupName="2.X\u7248\u672c";\n Docket docket=new Docket(DocumentationType.SWAGGER_2)\n .host("https://www.baidu.com")\n .apiInfo(apiInfo())\n .groupName(groupName)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))\n .paths(PathSelectors.any())\n .build()\n .extensions(openApiExtensionResolver.buildSettingExtensions());\n return docket;\n }\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder()\n //.title("swagger-bootstrap-ui-demo RESTful APIs")\n .description("# swagger-bootstrap-ui-demo RESTful APIs")\n .termsOfServiceUrl("http://www.xx.com/")\n .contact("xx@qq.com")\n .version("1.0")\n .build();\n }\n}\n'))),(0,i.kt)("p",null,"\u901a\u8fc7\u4e0a\u9762\u793a\u4f8b\u4ee3\u7801\uff0c\u4e3b\u8981\u6b65\u9aa4\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,"1\u3001\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"@Autowired"),"\u6ce8\u89e3\u5f15\u5165",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5411Spring\u5bb9\u5668\u6ce8\u5165\u7684Bean\u5bf9\u8c61",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver")),(0,i.kt)("p",null,"2\u3001\u6700\u7ec8\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"Dcoket"),"\u5bf9\u8c61\u6784\u5efa\u540e\uff0c\u901a\u8fc7\u8c03\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Docket"),"\u5bf9\u8c61\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"extensions"),"\u65b9\u6cd5\u8fdb\u884c\u63d2\u4ef6\u8d4b\u503c"),(0,i.kt)("p",null,"3\u3001\u63d2\u4ef6\u8d4b\u503c\u9700\u8981\u8c03\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"OpenApiExtensionResolver"),"\u63d0\u4f9b\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"buildSettingExtensions"),"\u65b9\u6cd5\uff0c\u83b7\u53d6",(0,i.kt)("inlineCode",{parentName:"p"},"x-settings"),"\u7684\u589e\u5f3a\u5c5e\u6027"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6700\u7ec8\u754c\u9762\u6548\u679c\u5982\u4e0b\uff1a")),(0,i.kt)("p",null,(0,i.kt)("img",{src:t(75863).Z,width:"1357",height:"464"})),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"\u4e3a\u4ec0\u4e48\u9700\u8981\u8fd9\u4e48\u505a?\u8fd9\u6837\u505a\u7684\u76ee\u7684\u4e00\u65b9\u9762\u662f\u5145\u5206\u5229\u7528Spring Boot\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u914d\u7f6e\u5c5e\u6027\uff0c\u53e6\u4e00\u65b9\u9762\uff0c\u901a\u8fc7\u6269\u5c55OpenAPI\u7684\u89c4\u8303\u5c5e\u6027\uff0c\u4e5f\u66f4\u52a0\u7b26\u5408OpenAPI\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027\u7684\u8981\u6c42"),(0,i.kt)("p",{parentName:"admonition"},"OpenAPI\u89c4\u8303\u660e\u786e\u89c4\u5b9a,\u5bf9\u4e8e\u6269\u5c55\u5c5e\u6027,\u5f00\u53d1\u8005\u5e94\u5f53\u5728\u54cd\u5e94\u7684\u67d0\u4e2a\u8282\u70b9\u4e2d\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934\u7684\u5c5e\u6027\u65b9\u5f0f,\u4ee5\u6269\u5c55\u81ea\u5b9a\u4e49\u7684\u5c5e\u6027\u914d\u7f6e"),(0,i.kt)("p",{parentName:"admonition"},"\u81ea\u5b9a\u4e49\u6587\u6863\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u7684Network\u529f\u80fd\u67e5\u770bOpenAPI\u7684\u7ed3\u6784\uff0c\u6700\u7ec8Knife4j\u6269\u5c55\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"x-openapi"),"\u5c5e\u6027\uff0c\u4ee3\u8868\u589e\u52a0\u7684\u6269\u5c55\u81ea\u5b9a\u4e49\u5c5e\u6027\uff0c\u6700\u7ec8\u5728Ui\u754c\u9762\u89e3\u6790\u5448\u73b0\uff0c\u7ed3\u6784\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",{parentName:"admonition"},(0,i.kt)("img",{src:t(65253).Z,width:"963",height:"193"}))))}m.isMDXComponent=!0},65253:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/setting-a6923b1d41d592ba62880f74928fe84d.png"},75863:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/enableDebug-c1de7549f29e3c53b6b9f76e64ff995f.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/16926028.3a85f8ad.js b/knife4j-doc/gitee/assets/js/16926028.3a85f8ad.js deleted file mode 100644 index cb4c96b1f..000000000 --- a/knife4j-doc/gitee/assets/js/16926028.3a85f8ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2585],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>u});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},m=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),g=s(n),u=r,f=g["".concat(l,".").concat(u)]||g[u]||k[u]||i;return n?a.createElement(f,p(p({ref:t},m),{},{components:n})):a.createElement(f,p({ref:t},m))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,p=new Array(i);p[0]=g;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:r,p[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>k});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),p=["components"],o={},l="[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]",s={unversionedId:"changelog/x/2021-06-28-knife4j-2.0.9-issue",id:"changelog/x/2021-06-28-knife4j-2.0.9-issue",title:"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2021-06-28-knife4j-2.0.9-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2021-06-28-knife4j-2.0.9-issue",permalink:"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"v4.1.0\u7248\u672c-2023/03/23",permalink:"/docs/changelog/x/4.1"},next:{title:"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]",permalink:"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"}},m={},k=[{value:"\u65e5\u5fd7",id:"\u65e5\u5fd7",level:2},{value:"OpenAPI3",id:"openapi3",level:3},{value:"\u805a\u5408\u7ec4\u4ef6aggregation",id:"\u805a\u5408\u7ec4\u4ef6aggregation",level:3},{value:"\u5e38\u89c4",id:"\u5e38\u89c4",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"\u5176\u4ed6",id:"\u5176\u4ed6",level:2}],g={toc:k};function u(e){var t=e.components,o=(0,r.Z)(e,p);return(0,i.kt)("wrapper",(0,a.Z)({},g,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v209-20210628-knife4j-209\u53d1\u5e03\u89e3\u51b3issue-150"},"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://xiaoym.gitee.io/knife4j/",target:"_blank",rel:"noopener"},"https://xiaoym.gitee.io/knife4j/")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u65e5\u5fd7"},"\u65e5\u5fd7"),(0,i.kt)("h3",{id:"openapi3"},"OpenAPI3"),(0,i.kt)("p",null,"1\u3001\u5728OpenAPI3.0\u89c4\u8303\u4e2d\u9488\u5bf9\u4e0b\u8f7d\u8bf7\u6c42\u5bf9\u8c61\u663e\u793a\u9519\u8bef\u7684\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I374SP",target:"_blank",rel:"noopener"},"Gitee#I374SP")),(0,i.kt)("p",null,"2\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u4e2d\u5bf9\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"binary"),"\u7c7b\u578b\u7684format\u5c5e\u6027\uff0c\u4e0a\u4f20\u7ec4\u4ef6\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I34NOS",target:"_blank",rel:"noopener"},"Gitee#I34NOS"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BRWT",target:"_blank",rel:"noopener"},"Gitee #I3BRWT")),(0,i.kt)("p",null,"3\u3001OpenAPI3.0\u89c4\u8303\u4e2dSwagger models \u4e2d\u7684\u679a\u4e3e\u663e\u793a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/43",target:"_blank",rel:"noopener"},"PR #43"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3DP8P",target:"_blank",rel:"noopener"},"Gitee #I3DP8P")),(0,i.kt)("p",null,"4\u3001\u9488\u5bf9OpenAPI3.0\u89c4\u8303\u6743\u9650\u62e6\u622a\u95ee\u9898\u589e\u52a0\u63a5\u53e3\u5730\u5740",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2810R",target:"_blank",rel:"noopener"},"Gitee #I2810R"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3HSK4",target:"_blank",rel:"noopener"},"Gitee #I3HSK4")),(0,i.kt)("p",null,"5\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u652f\u6301\u8bf7\u6c42\u53c2\u6570\u4e2d\u5305\u542b",(0,i.kt)("inlineCode",{parentName:"p"},"$ref"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2A89C",target:"_blank",rel:"noopener"},"Gitee #I2A89C")),(0,i.kt)("p",null,"6\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u4e2d\u56fe\u7247\u9884\u89c8\u7684\u95ee\u9898\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3IUUQ",target:"_blank",rel:"noopener"},"Gitee #I3IUUQ")),(0,i.kt)("h3",{id:"\u805a\u5408\u7ec4\u4ef6aggregation"},"\u805a\u5408\u7ec4\u4ef6aggregation"),(0,i.kt)("p",null,"1\u3001\u805a\u5408\u7ec4\u4ef6\u9488\u5bf9Cloud\u6a21\u5f0f\u8f6c\u53d1HTTP\u8bf7\u6c42\u65f6\uff0c\u8bf7\u6c42\u5934\u91cd\u590d\u5bfc\u81f4\u8f6c\u53d1\u5931\u8d25\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/39",target:"_blank",rel:"noopener"},"Gitee #PR39")),(0,i.kt)("p",null,"2\u3001aggregation\u805a\u5408\u7ec4\u4ef6\u589e\u52a0order\u5c5e\u6027\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u6392\u5e8f\u8bbe\u7f6e\u805a\u5408OpenAPI\u6587\u6863\u7684\u987a\u5e8f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27ST2",target:"_blank",rel:"noopener"},"Gitee #I27ST2")),(0,i.kt)("p",null,"3\u3001aggregation\u805a\u5408\u7ec4\u4ef6Nacos\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\u652f\u6301Nacos\u7528\u6237\u540d\u53ca\u5bc6\u7801\u8bbf\u95eeOpenAPI\u63a5\u53e3",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I28IF9",target:"_blank",rel:"noopener"},"Gitee #I28IF9")),(0,i.kt)("p",null,"4\u3001\u805a\u5408\u7ec4\u4ef6\u65e5\u5fd7\u6253\u5370\u4fe1\u606f\u4f18\u5316\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"isDebugEnabled"),"\u903b\u8f91\u5224\u65ad,\u65e5\u5fd7\u7ea7\u522b\u5168\u90e8\u7531",(0,i.kt)("inlineCode",{parentName:"p"},"info"),"\u6539\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"debug"),"\u7ea7\u522b",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39QPL",target:"_blank",rel:"noopener"},"Gitee #I39QPL")),(0,i.kt)("p",null,"5\u3001\u805a\u5408\u7ec4\u4ef6\u54cd\u5e94Model\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EMZE",target:"_blank",rel:"noopener"},"Gitee #I3EMZE")),(0,i.kt)("p",null,"6\u3001\u805a\u5408\u7ec4\u4ef6\u6ca1\u6709\u6b63\u786e\u54cd\u5e94\u63a5\u53e3\u7684\u72b6\u6001\u7801\u4fe1\u606f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/44",target:"_blank",rel:"noopener"},"PR #44")),(0,i.kt)("p",null,"7\u3001\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Eureka/Nacos"),"\u6ce8\u518c\u4e2d\u5fc3\u7684\u805a\u5408\u7ec4\u4ef6\uff0c\u589e\u52a0\u5fc3\u8df3\u68c0\u6d4b\u673a\u5236(",(0,i.kt)("inlineCode",{parentName:"p"},"30s/per"),")\uff0c\u81ea\u52a8\u5254\u9664\u5df2\u7ecf\u4e0b\u7ebf\u7684\u670d\u52a1,\u4fdd\u8bc1\u805a\u5408\u6587\u6863\u7684\u6b63\u5e38\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CKQT",target:"_blank",rel:"noopener"},"Gitee #I2CKQT"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CDCK",target:"_blank",rel:"noopener"},"Gitee #I2CDCK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2KUUY",target:"_blank",rel:"noopener"},"Gitee #I2KUUY")),(0,i.kt)("p",null,"8\u3001",(0,i.kt)("inlineCode",{parentName:"p"},"Cloud"),"\u6a21\u5f0f\u589e\u52a0\u5fc3\u8df3\u68c0\u6d4b\u673a\u5236(",(0,i.kt)("inlineCode",{parentName:"p"},"30s/per"),")\uff0c\u81ea\u52a8\u5254\u9664\u5df2\u7ecf\u4e0b\u7ebf\u7684\u670d\u52a1,\u4fdd\u8bc1\u805a\u5408\u6587\u6863\u7684\u6b63\u5e38\u8bbf\u95ee"),(0,i.kt)("p",null,"8\u3001\u805a\u5408\u7ec4\u4ef6\u8f6c\u53d1\u6587\u4ef6\u65f6\u53c2\u6570\u4e22\u5931\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39OXE",target:"_blank",rel:"noopener"},"Gitee #I39OXE")),(0,i.kt)("h3",{id:"\u5e38\u89c4"},"\u5e38\u89c4"),(0,i.kt)("p",null,"1\u3001OAuth2\u6388\u6743",(0,i.kt)("inlineCode",{parentName:"p"},"Content-Type"),"\u7684\u5f02\u5e38\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/35",target:"_blank",rel:"noopener"},"Gitee#PR35"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CKHA",target:"_blank",rel:"noopener"},"Gitee#I2CKHA")),(0,i.kt)("p",null,"2\u3001OAuth2\u5224\u65ad\u5f02\u5e38\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/37",target:"_blank",rel:"noopener"},"Gitee #PR37")),(0,i.kt)("p",null,"3\u3001\u4fee\u590d\u79bb\u7ebf\u5bfc\u51faMarkdown\u6587\u6863\u81ea\u5b9a\u4e49\u6587\u6863\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"undefined"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2EDI8",target:"_blank",rel:"noopener"},"Gitee#I2EDI8"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2WCQG",target:"_blank",rel:"noopener"},"Gitee #I2WCQG")),(0,i.kt)("p",null,"4\u3001\u65e5\u5fd7\u7684\u6253\u5370\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39QPL",target:"_blank",rel:"noopener"},"Gitee #I39QPL")),(0,i.kt)("p",null,"5\u3001\u5fae\u670d\u52a1\u805a\u5408\u65f6",(0,i.kt)("inlineCode",{parentName:"p"},"basePath"),"\u4e0d\u8ffd\u52a0\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3B5BK",target:"_blank",rel:"noopener"},"Gitee #I3B5BK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EEJ3",target:"_blank",rel:"noopener"},"Gitee #I3EEJ3")),(0,i.kt)("p",null,"6\u3001\u9488\u5bf9List\u7c7b\u578b\u793a\u4f8b\u503c\u591a\u51fa\u6362\u884c\u7b26\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2D6D4",target:"_blank",rel:"noopener"},"Gitee #I2D6D4")),(0,i.kt)("p",null,"7\u3001\u89e3\u51b3Form\u7c7b\u578b\u4e0a\u4f20\u53c2\u6570\u65f6\u4f20\u9012",(0,i.kt)("inlineCode",{parentName:"p"},"Null"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3AHDQ",target:"_blank",rel:"noopener"},"Gitee #I3AHDQ")),(0,i.kt)("p",null,"8\u3001\u9488\u5bf9\u4e2a\u6027\u5316\u914d\u7f6e\u7684\u4fdd\u5b58\u95ee\u9898\u4fee\u6539\u903b\u8f91\uff0c\u5f00\u53d1\u8005\u901a\u8fc7\u754c\u9762\u4fdd\u5b58\u4e2a\u6027\u5316\u914d\u7f6e\u540e\u4e22\u5931\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27CN8",target:"_blank",rel:"noopener"},"Gitee #I27CN8"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CBZQ",target:"_blank",rel:"noopener"},"Gitee #I2CBZQ"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2978Y",target:"_blank",rel:"noopener"},"Gitee #I2978Y"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3IEXT",target:"_blank",rel:"noopener"},"Gitee #I3IEXT"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3Q0MO",target:"_blank",rel:"noopener"},"Gitee #I3Q0MO"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3QSAN",target:"_blank",rel:"noopener"},"Gitee #I3QSAN")),(0,i.kt)("p",null,"9\u3001\u9488\u5bf9\u63a5\u53e3\u5206\u7ec4\u4e2d\u4e0d\u5b58\u5728API\u63a5\u53e3\u65f6\u51fa\u73b0\u94fe\u63a5\u70b9\u51fb\u7a7a\u767d\u7684\u95ee\u9898\u5904\u7406\uff0c\u5982\u679c\u5206\u7ec4\u4e0b\u6ca1\u6709API\u63a5\u53e3,\u9ed8\u8ba4\u70b9\u51fb\u663e\u793a\u4e3b\u9875",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CVTF",target:"_blank",rel:"noopener"},"Gitee #I2CVTF")),(0,i.kt)("p",null,"10\u3001OpenAPI\u89c4\u8303\u4e2dtags\u7f3a\u5931\u65f6\u5bfc\u81f4\u63a5\u53e3\u4e0d\u663e\u793a\u7684\u95ee\u9898\u4f18\u5316,\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"default"),"\u9ed8\u8ba4\u5206\u7ec4",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27M98",target:"_blank",rel:"noopener"},"Gitee #I27M98")),(0,i.kt)("p",null,"11\u3001\u9488\u5bf9\u670d\u52a1\u7aef\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"@RequestMapping"),"\u6ce8\u89e3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"method"),"\u9650\u5b9a\u65b9\u6cd5\u7c7b\u578b\u65f6\uff0cUi\u589e\u5f3a\u529f\u80fd\u8fc7\u6ee4\u4e0d\u751f\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I28RJ5",target:"_blank",rel:"noopener"},"Gitee #I28RJ5")),(0,i.kt)("p",null,"12\u3001\u6587\u4ef6\u4e0a\u4f20\u7c7b\u578b\u63a5\u53e3\u8bf7\u6c42\u6570\u636e\u663e\u793a\u7c7b\u578b\u9519\u8bef\u7684\u60c5\u51b5\u6539\u8fdb\uff0c\u6839\u636e\u53c2\u6570\u8bbe\u7f6e\u63a5\u53e3\u8bf7\u6c42\u6570\u636e\u7c7b\u578b\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"multipart/form-data"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I29KMH",target:"_blank",rel:"noopener"},"Gitee #I29KMH")),(0,i.kt)("p",null,"13\u3001\u4f18\u5316\u54cd\u5e94",(0,i.kt)("inlineCode",{parentName:"p"},"html/xml/text"),"\u7b49\u5185\u5bb9\u65f6\u5c55\u73b0\u65b9\u5f0f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2A0QA",target:"_blank",rel:"noopener"},"Gitee #I2A0QA")),(0,i.kt)("p",null,"14\u3001\u5206\u7ec4\u4e0b\u62c9\u6846\u641c\u7d22\u5931\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BAOK",target:"_blank",rel:"noopener"},"Gitee #I3BAOK")),(0,i.kt)("p",null,"15\u3001\u4f18\u5316OpenAPI\u7248\u672c\u5224\u65ad\u7684\u903b\u8f91,\u6839\u636e\u54cd\u5e94OpenAPI\u89c4\u8303JSON\u518d\u5224\u65ad\u83b7\u53d6\u5f53\u524d\u7684\u89c4\u8303\u7248\u672c\uff0c\u9632\u6b62\u51fa\u73b0\u7a7a\u5f02\u5e38\u6216Model\u4e0d\u663e\u793a\u7b49\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I37X0Q",target:"_blank",rel:"noopener"},"Gitee #I37X0Q"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EMZE",target:"_blank",rel:"noopener"},"Gitee #I3EMZE")),(0,i.kt)("p",null,"16\u3001\u9488\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"JSON"),"\u8bf7\u6c42\u683c\u5f0f\u7684\u63d0\u4ea4\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"Beantify"),"\u6309\u94ae\uff0c\u53ef\u4ee5\u5bf9\u6587\u672c\u683c\u5f0f\u5316\u7f8e\u5316\u7684\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39MUP",target:"_blank",rel:"noopener"},"Gitee #I39MUP")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20210507212527321",src:n(40704).Z,width:"933",height:"262"})),(0,i.kt)("p",null,"17\u3001\u8c03\u8bd5\u53d1\u9001\u65f6\u589e\u5f3a",(0,i.kt)("inlineCode",{parentName:"p"},"loading"),"\u6548\u679c\u4f53\u9a8c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BG5V",target:"_blank",rel:"noopener"},"Gitee #I3BG5V")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20210509083436452",src:n(99836).Z,width:"925",height:"379"})),(0,i.kt)("p",null,"18\u3001SwaggerModels \u5185\u5bb9\u592a\u957f\u4e0d\u4f1a\u81ea\u52a8\u6362\u884c\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3QC02",target:"_blank",rel:"noopener"},"Gitee #I3QC02")),(0,i.kt)("p",null,"19\u3001\u9488\u5bf9Map\u5c5e\u6027\u7684\u7ed3\u6784\u5c55\u793a\u5f02\u5e38\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I37WB7",target:"_blank",rel:"noopener"},"Gitee #I37WB7")),(0,i.kt)("p",null,"20\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"afterScript"),"\u7279\u6027\u4e0d\u80fd\u6dfb\u52a0\u591a\u4e2a\u53c2\u6570\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3OJUW",target:"_blank",rel:"noopener"},"Gitee #I3OJUW")),(0,i.kt)("p",null,"21\u3001\u4f18\u5316\u54cd\u5e94\u5185\u5bb9\u5224\u65ad",(0,i.kt)("inlineCode",{parentName:"p"},"base64"),"\u5bfc\u81f4\u6548\u7387\u4f4e\u4e0b\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2VRD5",target:"_blank",rel:"noopener"},"Gitee #I2VRD5"),"\u3002"),(0,i.kt)("p",null,"22\u3001\u9488\u5bf9\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u63d0\u4f9b\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"ignoreParameters"),"\u5c5e\u6027\u63d0\u4f9b\u6b63\u5219\u6a21\u5f0f\u7684\u5ffd\u7565\u7b56\u7565\u652f\u6301",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I21ZKC",target:"_blank",rel:"noopener"},"Gitee #I21ZKC")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-5b76509501c86174096f8b795d2aba8455b.png",alt:null})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-995a784219ea035cacd428d15d04e9cbcb3.png",alt:null})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-98e1dbdf35ab957f5c05df126f9bae44ffd.png",alt:null})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-d9a030b06b76f9a4935205df453af149788.png",alt:null})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-cfb2256485835e29a39f96eaaa60251e08c.png",alt:null})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-44bb80532b9767a33650e178809f612c3e7.png",alt:null})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,i.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-4deb56c65774b4dc2ad54f5278f31e89a5d.png",alt:null})),(0,i.kt)("h2",{id:"\u5176\u4ed6"},"\u5176\u4ed6"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}u.isMDXComponent=!0},40704:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-20210507212527321-359de18df782fcf429862b923aa78dbb.png"},99836:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-20210509083436452-d5ae67f5541139e16f88cbe79c792732.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/16926028.db257ee3.js b/knife4j-doc/gitee/assets/js/16926028.db257ee3.js new file mode 100644 index 000000000..a8bfcb809 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/16926028.db257ee3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2585],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},m=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},k="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),k=s(n),u=r,f=k["".concat(l,".").concat(u)]||k[u]||g[u]||i;return n?a.createElement(f,p(p({ref:t},m),{},{components:n})):a.createElement(f,p({ref:t},m))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,p=new Array(i);p[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[k]="string"==typeof e?e:r,p[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>k});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),p=["components"],o={},l="[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]",s={unversionedId:"changelog/x/2021-06-28-knife4j-2.0.9-issue",id:"changelog/x/2021-06-28-knife4j-2.0.9-issue",title:"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2021-06-28-knife4j-2.0.9-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2021-06-28-knife4j-2.0.9-issue",permalink:"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"v4.3.0\u7248\u672c-2023/08/06",permalink:"/docs/changelog/x/4.3"},next:{title:"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]",permalink:"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"}},m={},k=[{value:"\u65e5\u5fd7",id:"\u65e5\u5fd7",level:2},{value:"OpenAPI3",id:"openapi3",level:3},{value:"\u805a\u5408\u7ec4\u4ef6aggregation",id:"\u805a\u5408\u7ec4\u4ef6aggregation",level:3},{value:"\u5e38\u89c4",id:"\u5e38\u89c4",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"\u5176\u4ed6",id:"\u5176\u4ed6",level:2}],g={toc:k},u="wrapper";function f(e){var t=e.components,o=(0,r.Z)(e,p);return(0,i.kt)(u,(0,a.Z)({},g,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v209-20210628-knife4j-209\u53d1\u5e03\u89e3\u51b3issue-150"},"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://xiaoym.gitee.io/knife4j/",target:"_blank",rel:"noopener"},"https://xiaoym.gitee.io/knife4j/")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u65e5\u5fd7"},"\u65e5\u5fd7"),(0,i.kt)("h3",{id:"openapi3"},"OpenAPI3"),(0,i.kt)("p",null,"1\u3001\u5728OpenAPI3.0\u89c4\u8303\u4e2d\u9488\u5bf9\u4e0b\u8f7d\u8bf7\u6c42\u5bf9\u8c61\u663e\u793a\u9519\u8bef\u7684\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I374SP",target:"_blank",rel:"noopener"},"Gitee#I374SP")),(0,i.kt)("p",null,"2\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u4e2d\u5bf9\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"binary"),"\u7c7b\u578b\u7684format\u5c5e\u6027\uff0c\u4e0a\u4f20\u7ec4\u4ef6\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I34NOS",target:"_blank",rel:"noopener"},"Gitee#I34NOS"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BRWT",target:"_blank",rel:"noopener"},"Gitee #I3BRWT")),(0,i.kt)("p",null,"3\u3001OpenAPI3.0\u89c4\u8303\u4e2dSwagger models \u4e2d\u7684\u679a\u4e3e\u663e\u793a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/43",target:"_blank",rel:"noopener"},"PR #43"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3DP8P",target:"_blank",rel:"noopener"},"Gitee #I3DP8P")),(0,i.kt)("p",null,"4\u3001\u9488\u5bf9OpenAPI3.0\u89c4\u8303\u6743\u9650\u62e6\u622a\u95ee\u9898\u589e\u52a0\u63a5\u53e3\u5730\u5740",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2810R",target:"_blank",rel:"noopener"},"Gitee #I2810R"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3HSK4",target:"_blank",rel:"noopener"},"Gitee #I3HSK4")),(0,i.kt)("p",null,"5\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u652f\u6301\u8bf7\u6c42\u53c2\u6570\u4e2d\u5305\u542b",(0,i.kt)("inlineCode",{parentName:"p"},"$ref"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2A89C",target:"_blank",rel:"noopener"},"Gitee #I2A89C")),(0,i.kt)("p",null,"6\u3001\u9488\u5bf9OpenAPI3\u89c4\u8303\u4e2d\u56fe\u7247\u9884\u89c8\u7684\u95ee\u9898\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3IUUQ",target:"_blank",rel:"noopener"},"Gitee #I3IUUQ")),(0,i.kt)("h3",{id:"\u805a\u5408\u7ec4\u4ef6aggregation"},"\u805a\u5408\u7ec4\u4ef6aggregation"),(0,i.kt)("p",null,"1\u3001\u805a\u5408\u7ec4\u4ef6\u9488\u5bf9Cloud\u6a21\u5f0f\u8f6c\u53d1HTTP\u8bf7\u6c42\u65f6\uff0c\u8bf7\u6c42\u5934\u91cd\u590d\u5bfc\u81f4\u8f6c\u53d1\u5931\u8d25\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/39",target:"_blank",rel:"noopener"},"Gitee #PR39")),(0,i.kt)("p",null,"2\u3001aggregation\u805a\u5408\u7ec4\u4ef6\u589e\u52a0order\u5c5e\u6027\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u6392\u5e8f\u8bbe\u7f6e\u805a\u5408OpenAPI\u6587\u6863\u7684\u987a\u5e8f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27ST2",target:"_blank",rel:"noopener"},"Gitee #I27ST2")),(0,i.kt)("p",null,"3\u3001aggregation\u805a\u5408\u7ec4\u4ef6Nacos\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\u652f\u6301Nacos\u7528\u6237\u540d\u53ca\u5bc6\u7801\u8bbf\u95eeOpenAPI\u63a5\u53e3",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I28IF9",target:"_blank",rel:"noopener"},"Gitee #I28IF9")),(0,i.kt)("p",null,"4\u3001\u805a\u5408\u7ec4\u4ef6\u65e5\u5fd7\u6253\u5370\u4fe1\u606f\u4f18\u5316\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"isDebugEnabled"),"\u903b\u8f91\u5224\u65ad,\u65e5\u5fd7\u7ea7\u522b\u5168\u90e8\u7531",(0,i.kt)("inlineCode",{parentName:"p"},"info"),"\u6539\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"debug"),"\u7ea7\u522b",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39QPL",target:"_blank",rel:"noopener"},"Gitee #I39QPL")),(0,i.kt)("p",null,"5\u3001\u805a\u5408\u7ec4\u4ef6\u54cd\u5e94Model\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EMZE",target:"_blank",rel:"noopener"},"Gitee #I3EMZE")),(0,i.kt)("p",null,"6\u3001\u805a\u5408\u7ec4\u4ef6\u6ca1\u6709\u6b63\u786e\u54cd\u5e94\u63a5\u53e3\u7684\u72b6\u6001\u7801\u4fe1\u606f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/44",target:"_blank",rel:"noopener"},"PR #44")),(0,i.kt)("p",null,"7\u3001\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Eureka/Nacos"),"\u6ce8\u518c\u4e2d\u5fc3\u7684\u805a\u5408\u7ec4\u4ef6\uff0c\u589e\u52a0\u5fc3\u8df3\u68c0\u6d4b\u673a\u5236(",(0,i.kt)("inlineCode",{parentName:"p"},"30s/per"),")\uff0c\u81ea\u52a8\u5254\u9664\u5df2\u7ecf\u4e0b\u7ebf\u7684\u670d\u52a1,\u4fdd\u8bc1\u805a\u5408\u6587\u6863\u7684\u6b63\u5e38\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CKQT",target:"_blank",rel:"noopener"},"Gitee #I2CKQT"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CDCK",target:"_blank",rel:"noopener"},"Gitee #I2CDCK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2KUUY",target:"_blank",rel:"noopener"},"Gitee #I2KUUY")),(0,i.kt)("p",null,"8\u3001",(0,i.kt)("inlineCode",{parentName:"p"},"Cloud"),"\u6a21\u5f0f\u589e\u52a0\u5fc3\u8df3\u68c0\u6d4b\u673a\u5236(",(0,i.kt)("inlineCode",{parentName:"p"},"30s/per"),")\uff0c\u81ea\u52a8\u5254\u9664\u5df2\u7ecf\u4e0b\u7ebf\u7684\u670d\u52a1,\u4fdd\u8bc1\u805a\u5408\u6587\u6863\u7684\u6b63\u5e38\u8bbf\u95ee"),(0,i.kt)("p",null,"8\u3001\u805a\u5408\u7ec4\u4ef6\u8f6c\u53d1\u6587\u4ef6\u65f6\u53c2\u6570\u4e22\u5931\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39OXE",target:"_blank",rel:"noopener"},"Gitee #I39OXE")),(0,i.kt)("h3",{id:"\u5e38\u89c4"},"\u5e38\u89c4"),(0,i.kt)("p",null,"1\u3001OAuth2\u6388\u6743",(0,i.kt)("inlineCode",{parentName:"p"},"Content-Type"),"\u7684\u5f02\u5e38\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/35",target:"_blank",rel:"noopener"},"Gitee#PR35"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CKHA",target:"_blank",rel:"noopener"},"Gitee#I2CKHA")),(0,i.kt)("p",null,"2\u3001OAuth2\u5224\u65ad\u5f02\u5e38\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/37",target:"_blank",rel:"noopener"},"Gitee #PR37")),(0,i.kt)("p",null,"3\u3001\u4fee\u590d\u79bb\u7ebf\u5bfc\u51faMarkdown\u6587\u6863\u81ea\u5b9a\u4e49\u6587\u6863\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"undefined"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2EDI8",target:"_blank",rel:"noopener"},"Gitee#I2EDI8"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2WCQG",target:"_blank",rel:"noopener"},"Gitee #I2WCQG")),(0,i.kt)("p",null,"4\u3001\u65e5\u5fd7\u7684\u6253\u5370\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39QPL",target:"_blank",rel:"noopener"},"Gitee #I39QPL")),(0,i.kt)("p",null,"5\u3001\u5fae\u670d\u52a1\u805a\u5408\u65f6",(0,i.kt)("inlineCode",{parentName:"p"},"basePath"),"\u4e0d\u8ffd\u52a0\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3B5BK",target:"_blank",rel:"noopener"},"Gitee #I3B5BK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EEJ3",target:"_blank",rel:"noopener"},"Gitee #I3EEJ3")),(0,i.kt)("p",null,"6\u3001\u9488\u5bf9List\u7c7b\u578b\u793a\u4f8b\u503c\u591a\u51fa\u6362\u884c\u7b26\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2D6D4",target:"_blank",rel:"noopener"},"Gitee #I2D6D4")),(0,i.kt)("p",null,"7\u3001\u89e3\u51b3Form\u7c7b\u578b\u4e0a\u4f20\u53c2\u6570\u65f6\u4f20\u9012",(0,i.kt)("inlineCode",{parentName:"p"},"Null"),"\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3AHDQ",target:"_blank",rel:"noopener"},"Gitee #I3AHDQ")),(0,i.kt)("p",null,"8\u3001\u9488\u5bf9\u4e2a\u6027\u5316\u914d\u7f6e\u7684\u4fdd\u5b58\u95ee\u9898\u4fee\u6539\u903b\u8f91\uff0c\u5f00\u53d1\u8005\u901a\u8fc7\u754c\u9762\u4fdd\u5b58\u4e2a\u6027\u5316\u914d\u7f6e\u540e\u4e22\u5931\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27CN8",target:"_blank",rel:"noopener"},"Gitee #I27CN8"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CBZQ",target:"_blank",rel:"noopener"},"Gitee #I2CBZQ"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2978Y",target:"_blank",rel:"noopener"},"Gitee #I2978Y"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3IEXT",target:"_blank",rel:"noopener"},"Gitee #I3IEXT"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3Q0MO",target:"_blank",rel:"noopener"},"Gitee #I3Q0MO"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3QSAN",target:"_blank",rel:"noopener"},"Gitee #I3QSAN")),(0,i.kt)("p",null,"9\u3001\u9488\u5bf9\u63a5\u53e3\u5206\u7ec4\u4e2d\u4e0d\u5b58\u5728API\u63a5\u53e3\u65f6\u51fa\u73b0\u94fe\u63a5\u70b9\u51fb\u7a7a\u767d\u7684\u95ee\u9898\u5904\u7406\uff0c\u5982\u679c\u5206\u7ec4\u4e0b\u6ca1\u6709API\u63a5\u53e3,\u9ed8\u8ba4\u70b9\u51fb\u663e\u793a\u4e3b\u9875",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2CVTF",target:"_blank",rel:"noopener"},"Gitee #I2CVTF")),(0,i.kt)("p",null,"10\u3001OpenAPI\u89c4\u8303\u4e2dtags\u7f3a\u5931\u65f6\u5bfc\u81f4\u63a5\u53e3\u4e0d\u663e\u793a\u7684\u95ee\u9898\u4f18\u5316,\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"default"),"\u9ed8\u8ba4\u5206\u7ec4",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I27M98",target:"_blank",rel:"noopener"},"Gitee #I27M98")),(0,i.kt)("p",null,"11\u3001\u9488\u5bf9\u670d\u52a1\u7aef\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"@RequestMapping"),"\u6ce8\u89e3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"method"),"\u9650\u5b9a\u65b9\u6cd5\u7c7b\u578b\u65f6\uff0cUi\u589e\u5f3a\u529f\u80fd\u8fc7\u6ee4\u4e0d\u751f\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I28RJ5",target:"_blank",rel:"noopener"},"Gitee #I28RJ5")),(0,i.kt)("p",null,"12\u3001\u6587\u4ef6\u4e0a\u4f20\u7c7b\u578b\u63a5\u53e3\u8bf7\u6c42\u6570\u636e\u663e\u793a\u7c7b\u578b\u9519\u8bef\u7684\u60c5\u51b5\u6539\u8fdb\uff0c\u6839\u636e\u53c2\u6570\u8bbe\u7f6e\u63a5\u53e3\u8bf7\u6c42\u6570\u636e\u7c7b\u578b\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"multipart/form-data"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I29KMH",target:"_blank",rel:"noopener"},"Gitee #I29KMH")),(0,i.kt)("p",null,"13\u3001\u4f18\u5316\u54cd\u5e94",(0,i.kt)("inlineCode",{parentName:"p"},"html/xml/text"),"\u7b49\u5185\u5bb9\u65f6\u5c55\u73b0\u65b9\u5f0f",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2A0QA",target:"_blank",rel:"noopener"},"Gitee #I2A0QA")),(0,i.kt)("p",null,"14\u3001\u5206\u7ec4\u4e0b\u62c9\u6846\u641c\u7d22\u5931\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BAOK",target:"_blank",rel:"noopener"},"Gitee #I3BAOK")),(0,i.kt)("p",null,"15\u3001\u4f18\u5316OpenAPI\u7248\u672c\u5224\u65ad\u7684\u903b\u8f91,\u6839\u636e\u54cd\u5e94OpenAPI\u89c4\u8303JSON\u518d\u5224\u65ad\u83b7\u53d6\u5f53\u524d\u7684\u89c4\u8303\u7248\u672c\uff0c\u9632\u6b62\u51fa\u73b0\u7a7a\u5f02\u5e38\u6216Model\u4e0d\u663e\u793a\u7b49\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I37X0Q",target:"_blank",rel:"noopener"},"Gitee #I37X0Q"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3EMZE",target:"_blank",rel:"noopener"},"Gitee #I3EMZE")),(0,i.kt)("p",null,"16\u3001\u9488\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"JSON"),"\u8bf7\u6c42\u683c\u5f0f\u7684\u63d0\u4ea4\uff0c\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"Beantify"),"\u6309\u94ae\uff0c\u53ef\u4ee5\u5bf9\u6587\u672c\u683c\u5f0f\u5316\u7f8e\u5316\u7684\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I39MUP",target:"_blank",rel:"noopener"},"Gitee #I39MUP")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20210507212527321",src:n(40704).Z,width:"933",height:"262"})),(0,i.kt)("p",null,"17\u3001\u8c03\u8bd5\u53d1\u9001\u65f6\u589e\u5f3a",(0,i.kt)("inlineCode",{parentName:"p"},"loading"),"\u6548\u679c\u4f53\u9a8c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3BG5V",target:"_blank",rel:"noopener"},"Gitee #I3BG5V")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20210509083436452",src:n(99836).Z,width:"925",height:"379"})),(0,i.kt)("p",null,"18\u3001SwaggerModels \u5185\u5bb9\u592a\u957f\u4e0d\u4f1a\u81ea\u52a8\u6362\u884c\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3QC02",target:"_blank",rel:"noopener"},"Gitee #I3QC02")),(0,i.kt)("p",null,"19\u3001\u9488\u5bf9Map\u5c5e\u6027\u7684\u7ed3\u6784\u5c55\u793a\u5f02\u5e38\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I37WB7",target:"_blank",rel:"noopener"},"Gitee #I37WB7")),(0,i.kt)("p",null,"20\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"afterScript"),"\u7279\u6027\u4e0d\u80fd\u6dfb\u52a0\u591a\u4e2a\u53c2\u6570\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I3OJUW",target:"_blank",rel:"noopener"},"Gitee #I3OJUW")),(0,i.kt)("p",null,"21\u3001\u4f18\u5316\u54cd\u5e94\u5185\u5bb9\u5224\u65ad",(0,i.kt)("inlineCode",{parentName:"p"},"base64"),"\u5bfc\u81f4\u6548\u7387\u4f4e\u4e0b\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I2VRD5",target:"_blank",rel:"noopener"},"Gitee #I2VRD5"),"\u3002"),(0,i.kt)("p",null,"22\u3001\u9488\u5bf9\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u63d0\u4f9b\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"ignoreParameters"),"\u5c5e\u6027\u63d0\u4f9b\u6b63\u5219\u6a21\u5f0f\u7684\u5ffd\u7565\u7b56\u7565\u652f\u6301",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I21ZKC",target:"_blank",rel:"noopener"},"Gitee #I21ZKC")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-5b76509501c86174096f8b795d2aba8455b.png",alt:null})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-995a784219ea035cacd428d15d04e9cbcb3.png",alt:null})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-98e1dbdf35ab957f5c05df126f9bae44ffd.png",alt:null})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-d9a030b06b76f9a4935205df453af149788.png",alt:null})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-cfb2256485835e29a39f96eaaa60251e08c.png",alt:null})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-44bb80532b9767a33650e178809f612c3e7.png",alt:null})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,i.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://oscimg.oschina.net/oscnet/up-4deb56c65774b4dc2ad54f5278f31e89a5d.png",alt:null})),(0,i.kt)("h2",{id:"\u5176\u4ed6"},"\u5176\u4ed6"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}f.isMDXComponent=!0},40704:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-20210507212527321-359de18df782fcf429862b923aa78dbb.png"},99836:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-20210509083436452-d5ae67f5541139e16f88cbe79c792732.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/17896441.40f6c29a.js b/knife4j-doc/gitee/assets/js/17896441.40f6c29a.js deleted file mode 100644 index f51a843f5..000000000 --- a/knife4j-doc/gitee/assets/js/17896441.40f6c29a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7918],{99200:(e,l,t)=>{t.d(l,{Z:()=>p});var n=t(67294),c=t(86010),a=t(87524),r=t(92949),o=t(65130),m=t(92894),s=t(23120),d=t(44364),i=t(97887),u=t(6781),E=t(28832),Z=t(26728),k=t(31986);const h="docItemContainer_c0TR",v="docItemCol_z5aJ";function p(e){var l,t,p,b,f,_,C=e.children,N=(l=(0,o.k)(),t=l.frontMatter,p=l.toc,b=(0,a.i)(),f=t.hide_table_of_contents,_=!f&&p.length>0,{hidden:f,mobile:_?n.createElement(u.Z,null):void 0,desktop:!_||"desktop"!==b&&"ssr"!==b?void 0:n.createElement(E.Z,null)});(0,r.I)().colorMode;return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,c.Z)("col",!N.hidden&&v)},n.createElement(s.Z,null),n.createElement("div",{className:h},n.createElement("article",null,n.createElement(k.Z,null),n.createElement(d.Z,null),N.mobile,n.createElement(Z.Z,null,C),n.createElement(i.Z,null)),n.createElement(m.Z,null))),N.desktop&&n.createElement("div",{className:"col col--3"},N.desktop))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/17896441.b717e997.js b/knife4j-doc/gitee/assets/js/17896441.b717e997.js new file mode 100644 index 000000000..5fd1fc3df --- /dev/null +++ b/knife4j-doc/gitee/assets/js/17896441.b717e997.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7918],{99200:(e,t,l)=>{l.d(t,{Z:()=>v});var n=l(67294),c=l(86010),o=l(87524),a=l(92949),r=l(65130),m=l(92894),d=l(23120),s=l(44364),i=l(97887),u=l(6781),E=l(28832),Z=l(8377),k=l(31986);const h={docItemContainer:"docItemContainer_c0TR",docItemCol:"docItemCol_z5aJ"};function v(e){var t,l,v,C,p,I,b=e.children,f=(t=(0,r.k)(),l=t.frontMatter,v=t.toc,C=(0,o.i)(),p=l.hide_table_of_contents,I=!p&&v.length>0,{hidden:p,mobile:I?n.createElement(u.Z,null):void 0,desktop:!I||"desktop"!==C&&"ssr"!==C?void 0:n.createElement(E.Z,null)});(0,a.I)().colorMode;return n.createElement("div",{className:"row"},n.createElement("div",{className:(0,c.Z)("col",!f.hidden&&h.docItemCol)},n.createElement(d.Z,null),n.createElement("div",{className:h.docItemContainer},n.createElement("article",null,n.createElement(k.Z,null),n.createElement(s.Z,null),f.mobile,n.createElement(Z.Z,null,b),n.createElement(i.Z,null)),n.createElement(m.Z,null))),f.desktop&&n.createElement("div",{className:"col col--3"},f.desktop))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js b/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js new file mode 100644 index 000000000..0de33340b --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js @@ -0,0 +1,2 @@ +/*! For license information please see 1a4e3797.04ba04de.js.LICENSE.txt */ +(self.webpackChunk=self.webpackChunk||[]).push([[7920],{17331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:(e,t,r)=>{"use strict";var n=r(49374),i=r(17775),a=r(23076);function s(e,t,r){return new n(e,t,r)}s.version=r(24336),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},68078:(e,t,r)=>{"use strict";var n=r(17331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(14853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},82437:(e,t,r)=>{"use strict";var n=r(52344),i=r(49803),a=r(90116),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},17775:(e,t,r)=>{"use strict";var n=r(60185),i=r(52344),a=r(22686),s=r(7888),c=r(28023),u=r(49803),o=r(90116),h=r(46801),f=r(82437);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},10210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(60185),i=r(52344),a=r(42148),s=r(74587),c=r(7888),u=r(69725),o=r(82293),h=r(94039),f=h.escapeFacetValue,l=h.unescapeFacetValue,m=r(10210);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]})),Object.keys(r||{}).forEach((function(e){o[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),f=d(e.facets),v=d(e.disjunctiveFacets),g=1,y=a.facets||{};Object.keys(y).forEach((function(t){var r,n,i=y[t],s=(r=e.hierarchicalFacets,n=t,c(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=v[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=v[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},p(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=c(e.hierarchicalFacets,r);if(!a)return a;var s=e._state.getHierarchicalFacetByName(t),u=l(e._state.getHierarchicalRefinement(t)[0]||"").split(e._state._getHierarchicalFacetSeparator(s));return u.unshift(t),y(a,u,0),a}}function y(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,s=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),c=this;if(Array.isArray(r))n=[e];else n=c._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(c,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,v.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},49374:(e,t,r)=>{"use strict";var n=r(17775),i=r(23076),a=r(68078),s=r(96394),c=r(17331),u=r(14853),o=r(90116),h=r(49803),f=r(60185),l=r(24336),m=r(94039).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?s._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,c));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},74587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},94039:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(7888);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},14853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},60185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},49803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},42148:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},28023:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},96394:(e,t,r)=>{"use strict";var n=r(60185);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},46801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},24336:e=>{"use strict";e.exports="3.13.0"},70290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},Q=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},T=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},I=1,D=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return I>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.17.1","-").concat(e)}),u()]}),userAgent:_("4.17.1").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:Q,multipleQueries:S,multipleSearchForFacetValues:Q,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:T}})}}}}))}return V.version="4.17.1",V}()},56675:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(67294),i=r(86010),a=r(70290),s=r.n(a),c=r(8131),u=r.n(c),o=r(35742),h=r(39960),f=r(10412),l=r(52263),m=["zero","one","two","few","many","other"];function d(e){return m.filter((function(t){return e.includes(t)}))}var p={locale:"en",pluralForms:d(["one","other"]),select:function(e){return 1===e?"one":"other"}};function v(){var e=(0,l.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:d(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),p}var t,r}),[e])}function g(){var e=v();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}var y=r(98022),R=r(69688),F=r(10833),b=r(66177),P=r(82128),j=r(94104),_=r(95999),E=r(7479);const x={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};function O(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",x.searchVersionColumn)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:x.searchVersionInput},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function w(){var e,t,r,a,c,m,d=(0,l.Z)(),p=d.siteConfig.themeConfig,v=d.i18n.currentLocale,F=p.algolia,w=F.appId,N=F.apiKey,A=F.indexName,H=F.externalUrlRegex,S=(e=g().selectMessage,function(t){return e(t,(0,_.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),Q=(t=(0,j._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],m=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:m,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),T=(0,b.O)(),C=T.searchQuery,k=T.setSearchQuery,I={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},D=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return I;case"loading":return Object.assign({},e,{loading:!0});case"update":return C!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),I),q=D[0],V=D[1],L=s()(w,N),B=u()(L,A,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});B.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=new URL(t),s=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:s.pop(),url:(0,y.F)(H,a.href)?a.href:a.pathname+a.hash,summary:i.content?c(i.content.value)+"...":"",breadcrumbs:s}}));V({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else V({type:"reset"})}));var z=(0,n.useState)(null),M=z[0],J=z[1],U=(0,n.useRef)(0),W=(0,n.useRef)(f.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&U.current>n&&V({type:"advance"}),U.current=n}),{threshold:1})),Z=function(){return C?(0,_.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:C}):(0,_.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},X=(0,R.zX)((function(e){void 0===e&&(e=0),B.addDisjunctiveFacetRefinement("docusaurus_tag","default"),B.addDisjunctiveFacetRefinement("language",v),Object.entries(Q.searchVersions).forEach((function(e){var t=e[0],r=e[1];B.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),B.setQuery(C).setPage(e).search()}));return(0,n.useEffect)((function(){if(M){var e=W.current;return e?(e.observe(M),function(){return e.unobserve(M)}):function(){return!0}}}),[M]),(0,n.useEffect)((function(){V({type:"reset"}),C&&(V({type:"loading"}),setTimeout((function(){X()}),300))}),[C,Q.searchVersions,X]),(0,n.useEffect)((function(){q.lastPage&&0!==q.lastPage&&X(q.lastPage)}),[X,q.lastPage]),n.createElement(E.Z,null,n.createElement(o.Z,null,n.createElement("title",null,(0,P.p)(Z())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,Z()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",x.searchQueryColumn,{"col--9":Q.versioningEnabled,"col--12":!Q.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:x.searchQueryInput,placeholder:(0,_.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,_.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return k(e.target.value)},value:C,autoComplete:"off",autoFocus:!0})),Q.versioningEnabled&&n.createElement(O,{docsSearchVersionsHelpers:Q})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",x.searchResultsColumn)},!!q.totalResults&&S(q.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",x.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,_.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:x.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:x.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),q.items.length>0?n.createElement("main",null,q.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:x.searchResultItem},n.createElement("h2",{className:x.searchResultItemHeading},n.createElement(h.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",x.searchResultItemPath)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:x.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[C&&!q.loading&&n.createElement("p",{key:"no-results"},n.createElement(_.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!q.loading&&n.createElement("div",{key:"spinner",className:x.loadingSpinner})],q.hasMore&&n.createElement("div",{className:x.loader,ref:J},n.createElement(_.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function N(){return n.createElement(F.FG,{className:"search-page-wrapper"},n.createElement(w,null))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js.LICENSE.txt b/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js.LICENSE.txt new file mode 100644 index 000000000..8d162de17 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1a4e3797.04ba04de.js.LICENSE.txt @@ -0,0 +1 @@ +/*! algoliasearch-lite.umd.js | 4.17.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js b/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js deleted file mode 100644 index 9e4edc1a7..000000000 --- a/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.a3e1beab.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[7920],{17331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:(e,t,r)=>{"use strict";var n=r(49374),i=r(17775),a=r(23076);function s(e,t,r){return new n(e,t,r)}s.version=r(24336),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},68078:(e,t,r)=>{"use strict";var n=r(17331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(14853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},82437:(e,t,r)=>{"use strict";var n=r(52344),i=r(49803),a=r(90116),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return a(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},17775:(e,t,r)=>{"use strict";var n=r(60185),i=r(52344),a=r(22686),s=r(7888),c=r(28023),u=r(49803),o=r(90116),h=r(46801),f=r(82437);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&o(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=c(r);if(this.isNumericRefined(e,t,i))return this;var a=n({},this.numericRefinements);return a[e]=n({},a[e]),a[e][t]?(a[e][t]=a[e][t].slice(),a[e][t].push(i)):a[e][t]=[i],this.setQueryParameters({numericRefinements:a})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&l(n.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,a,u=c(r),o=void 0!==(i=this.numericRefinements[e][t],a=u,s(i,(function(e){return l(e,a)})));return n&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return s(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},10210:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var s=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[s.name]&&e.hierarchicalFacetsRefinements[s.name][0]||"",h=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s),l=e._getHierarchicalShowParentLevel(s),m=a(e._getHierarchicalFacetSortBy(s)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,r,a,s){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(60185),i=r(52344),a=r(42148),s=r(74587),c=r(7888),u=r(69725),o=r(82293),h=r(94039),f=h.escapeFacetValue,l=h.unescapeFacetValue,m=r(10210);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function v(e,t,r){t&&t[r]&&(e.stats=t[r])}function p(e,t,r){var a=t[0];this._rawResults=t;var o=this;Object.keys(a).forEach((function(e){o[e]=a[e]})),Object.keys(r||{}).forEach((function(e){o[e]=r[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),f=d(e.facets),p=d(e.disjunctiveFacets),g=1,y=a.facets||{};Object.keys(y).forEach((function(t){var r,n,i=y[t],s=(r=e.hierarchicalFacets,n=t,c(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(s){var h=s.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===s.name}));o.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],o.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(o.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=s(this.hierarchicalFacets),h.forEach((function(r){var s=t[g],c=s&&s.facets?s.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(c).forEach((function(t){var r,f=c[t];if(h){r=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[r][m].data=n({},o.hierarchicalFacets[r][m].data,f)}else{r=p[t];var d=a.facets&&a.facets[t]||{};o.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:s.exhaustiveFacetsCount},v(o.disjunctiveFacets[r],s.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!o.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(o.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var c=r[t],h=u(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=i(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];o.facets[n]={name:t,data:a.facets[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){o.facets[n]=o.facets[n]||{name:t},o.facets[n].data=o.facets[n].data||{},o.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=s(this.facets),this.disjunctiveFacets=s(this.disjunctiveFacets),this._state=e}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return g(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function y(e,t){var r=c(e,(function(e){return e.name===t}));return r&&r.stats}function R(e,t,r,n,i){var a=c(i,(function(e){return e.name===r})),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=c(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=c(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t))return c(e.hierarchicalFacets,r)}(this,e);if(r){var n,s=i({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),u=this;if(Array.isArray(r))n=[e];else n=u._state.getHierarchicalFacetByName(r.name).attributes;return g((function(e,t){if(s.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(u,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var s,c=t.sortRemainingBy;return"hidden"===c?r:(s="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(a(n,s[0],s[1])))}(e,r)}if(Array.isArray(s.sortBy)){var n=o(s.sortBy,p.DEFAULT_SORT);return a(e,n[0],n[1])}if("function"==typeof s.sortBy)return function(e,t){return t.sort(e)}(s.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(R(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(R(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(R(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=c(n,(function(e){return e.name===t})),o=s.reduce((function(e,t){var r=e&&c(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},49374:(e,t,r)=>{"use strict";var n=r(17775),i=r(23076),a=r(68078),s=r(96394),c=r(17331),u=r(14853),o=r(90116),h=r(49803),f=r(60185),l=r(24336),m=r(94039).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return s._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=s._getQueries(r.index,r),a=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){a._currentNbQueries--,0===a._currentNbQueries&&a.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(s._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var c=this.client.initIndex(n.index);if("function"!=typeof c.findAnswers)throw new Error(a);return c.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=s.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var h,f=this;return i?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):a?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=s._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=s._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),c=this._queryId++;this._currentNbQueries++;try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(u){this.emit("error",{error:u})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new a(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},74587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},94039:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(7888);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},14853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},60185:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},49803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},42148:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},28023:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},96394:(e,t,r)=>{"use strict";var n=r(60185);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,i){var s=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===i),c=u[i-1];s.facetFilters=i>0?[c.attribute+":"+c.value]:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).forEach((function(e){(a[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},46801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},24336:e=>{"use strict";e.exports="3.11.0"},70290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var r=JSON.stringify(e),n=a()[r];return Promise.all([n||t(),void 0!==n])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]=t,n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},v={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:p))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,v)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,I=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return I>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.14.2","-").concat(e)}),u()]}),userAgent:_("4.14.2").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.14.2",V}()},56675:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>B});var n=r(67294),i=r(86010),a=r(70290),s=r.n(a),c=r(8131),u=r.n(c),o=r(35742),h=r(39960),f=r(10412),l=r(52263),m=["zero","one","two","few","many","other"];function d(e){return m.filter((function(t){return e.includes(t)}))}var v={locale:"en",pluralForms:d(["one","other"]),select:function(e){return 1===e?"one":"other"}};function p(){var e=(0,l.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:d(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),v}var t,r}),[e])}function g(){var e=p();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}var y=r(98022),R=r(69688),F=r(10833),b=r(66177),P=r(82128),j=r(94104),_=r(95999),E=r(7479);const x="searchQueryInput_u2C7",O="searchVersionInput_m0Ui",w="searchResultsColumn_JPFH",N="algoliaLogo_rT1R",A="algoliaLogoPathFill_WdUC",H="searchResultItem_Tv2o",S="searchResultItemHeading_KbCB",T="searchResultItemPath_lhe1",Q="searchResultItemSummary_AEaO",C="searchQueryColumn_RTkw",k="searchVersionColumn_ypXd",D="searchLogoColumn_rJIA",I="loadingSpinner_XVxU",q="loader_vvXV";function V(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",k)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:O},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function L(){var e,t,r,a,c,m,d=(0,l.Z)(),v=d.siteConfig.themeConfig,p=d.i18n.currentLocale,F=v.algolia,O=F.appId,k=F.apiKey,L=F.indexName,B=F.externalUrlRegex,z=(e=g().selectMessage,function(t){return e(t,(0,_.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),M=(t=(0,j._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],m=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:m,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),J=(0,b.O)(),U=J.searchQuery,W=J.setSearchQuery,Z={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},X=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return Z;case"loading":return Object.assign({},e,{loading:!0});case"update":return U!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),Z),K=X[0],G=X[1],$=s()(O,k),Y=u()($,L,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});Y.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=new URL(t),s=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:s.pop(),url:(0,y.F)(B,a.href)?a.href:a.pathname+a.hash,summary:i.content?c(i.content.value)+"...":"",breadcrumbs:s}}));G({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else G({type:"reset"})}));var ee=(0,n.useState)(null),te=ee[0],re=ee[1],ne=(0,n.useRef)(0),ie=(0,n.useRef)(f.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&ne.current>n&&G({type:"advance"}),ne.current=n}),{threshold:1})),ae=function(){return U?(0,_.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:U}):(0,_.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},se=(0,R.zX)((function(e){void 0===e&&(e=0),Y.addDisjunctiveFacetRefinement("docusaurus_tag","default"),Y.addDisjunctiveFacetRefinement("language",p),Object.entries(M.searchVersions).forEach((function(e){var t=e[0],r=e[1];Y.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),Y.setQuery(U).setPage(e).search()}));return(0,n.useEffect)((function(){if(te){var e=ie.current;return e?(e.observe(te),function(){return e.unobserve(te)}):function(){return!0}}}),[te]),(0,n.useEffect)((function(){G({type:"reset"}),U&&(G({type:"loading"}),setTimeout((function(){se()}),300))}),[U,M.searchVersions,se]),(0,n.useEffect)((function(){K.lastPage&&0!==K.lastPage&&se(K.lastPage)}),[se,K.lastPage]),n.createElement(E.Z,null,n.createElement(o.Z,null,n.createElement("title",null,(0,P.p)(ae())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,ae()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",C,{"col--9":M.versioningEnabled,"col--12":!M.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:x,placeholder:(0,_.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,_.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return W(e.target.value)},value:U,autoComplete:"off",autoFocus:!0})),M.versioningEnabled&&n.createElement(V,{docsSearchVersionsHelpers:M})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",w)},!!K.totalResults&&z(K.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",D)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,_.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:N},n.createElement("g",{fill:"none"},n.createElement("path",{className:A,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),K.items.length>0?n.createElement("main",null,K.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:H},n.createElement("h2",{className:S},n.createElement(h.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",T)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:Q,dangerouslySetInnerHTML:{__html:s}}))}))):[U&&!K.loading&&n.createElement("p",{key:"no-results"},n.createElement(_.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!K.loading&&n.createElement("div",{key:"spinner",className:I})],K.hasMore&&n.createElement("div",{className:q,ref:re},n.createElement(_.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function B(){return n.createElement(F.FG,{className:"search-page-wrapper"},n.createElement(L,null))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js.LICENSE.txt b/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js.LICENSE.txt deleted file mode 100644 index 1d9697b99..000000000 --- a/knife4j-doc/gitee/assets/js/1a4e3797.a3e1beab.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! algoliasearch-lite.umd.js | 4.14.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */ diff --git a/knife4j-doc/gitee/assets/js/1aa998f3.09e263df.js b/knife4j-doc/gitee/assets/js/1aa998f3.09e263df.js deleted file mode 100644 index aff6e29e3..000000000 --- a/knife4j-doc/gitee/assets/js/1aa998f3.09e263df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4633],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},s=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),d=c(r),f=a,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||o;return r?n.createElement(m,p(p({ref:t},s),{},{components:r})):n.createElement(m,p({ref:t},s))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:a,p[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],i={},l="3.6 \u63a5\u53e3\u6392\u5e8f",c={unversionedId:"features/apiSort",id:"features/apiSort",title:"3.6 \u63a5\u53e3\u6392\u5e8f",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/apiSort.md",sourceDirName:"features",slug:"/features/apiSort",permalink:"/docs/features/apiSort",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236",permalink:"/docs/features/accessControl"},next:{title:"3.7 \u5206\u7ec4\u6392\u5e8f",permalink:"/docs/features/tagSort"}},s={},u=[],d={toc:u};function f(e){var t=e.components,i=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,n.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"36-\u63a5\u53e3\u6392\u5e8f"},"3.6 \u63a5\u53e3\u6392\u5e8f"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548")),(0,o.kt)("p",null,"\u9488\u5bf9Controller\u4e0b\u7684\u5177\u4f53\u63a5\u53e3,\u6392\u5e8f\u89c4\u5219\u662f\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u4e2d\u7684order\u5b57\u6bb5,\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(order = 33)\n@ApiOperation(value = "\u5ffd\u7565\u53c2\u6570\u503c-Form\u7c7b\u578b")\n@PostMapping("/ex")\npublic Rest findAll(LongUser longUser) {\n Rest r=new Rest<>();\n r.setData(longUser);\n return r;\n}\n')),(0,o.kt)("p",null,"Knife4j\u901a\u8fc7Spring Plugin\u63d2\u4ef6\u4f53\u7cfb,\u5bf9\u6bcf\u4e2a\u63a5\u53e3\u8fdb\u884c\u626b\u63cf,\u6700\u7ec8\u5c06\u626b\u63cf\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u6ce8\u89e3\u83b7\u53d6\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"order"),"\u503c\u901a\u8fc7OpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u89c4\u8303\u8fdb\u884c\u8d4b\u503c"),(0,o.kt)("p",null,"\u6700\u7ec8\u5728OpenAPI\u7684\u89c4\u8303\u4e2d\uff0c\u63a5\u53e3\u7684path\u8282\u70b9\u4e0b,\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"x-order"),"\u5c5e\u6027\u5f97\u5230\u63a5\u53e3\u7684\u6392\u5e8f\uff0c\u6700\u7ec8\u524d\u7aef\u6839\u636e\u6392\u5e8f\u503c\u8fdb\u884c\u6392\u5e8f(\u987a\u5e8f)\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(9032).Z,width:"866",height:"294"})),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u9047\u5230\u6392\u5e8f\u4e0d\u751f\u6548\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u63a5\u53e3\u8fd4\u56de\u7684OpenAPI\u89c4\u8303\u4e2d\uff0c\u63a5\u53e3",(0,o.kt)("inlineCode",{parentName:"p"},"path"),"\u8282\u70b9\u4e0b\u662f\u5426\u5305\u542b",(0,o.kt)("inlineCode",{parentName:"p"},"x-order"),"\u7684\u6269\u5c55\u5c5e\u6027"))}f.isMDXComponent=!0},9032:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/apiorder-ead23cd8391cb6c30c226247a170f7cf.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1aa998f3.e539987f.js b/knife4j-doc/gitee/assets/js/1aa998f3.e539987f.js new file mode 100644 index 000000000..52c1a8cdb --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1aa998f3.e539987f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4633],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>m});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},g="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),g=s(t),d=a,m=g["".concat(l,".").concat(d)]||g[d]||u[d]||i;return t?r.createElement(m,o(o({ref:n},c),{},{components:t})):r.createElement(m,o({ref:n},c))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=d;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[g]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>p,metadata:()=>s,toc:()=>g});var r=t(87462),a=t(63366),i=(t(67294),t(3905)),o=["components"],p={},l="3.6 \u63a5\u53e3\u6392\u5e8f",s={unversionedId:"features/apiSort",id:"features/apiSort",title:"3.6 \u63a5\u53e3\u6392\u5e8f",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/apiSort.md",sourceDirName:"features",slug:"/features/apiSort",permalink:"/docs/features/apiSort",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1685322264,formattedLastUpdatedAt:"2023\u5e745\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236",permalink:"/docs/features/accessControl"},next:{title:"3.7 \u5206\u7ec4\u6392\u5e8f",permalink:"/docs/features/tagSort"}},c={},g=[{value:"\u57fa\u7840\u4f7f\u7528",id:"\u57fa\u7840\u4f7f\u7528",level:2},{value:"springdoc-openapi\u7248\u672c\u9002\u914d",id:"springdoc-openapi\u7248\u672c\u9002\u914d",level:2},{value:"knife4j-gateway\u7248\u672c\u805a\u5408\u7684order\u4e0d\u751f\u6548",id:"knife4j-gateway\u7248\u672c\u805a\u5408\u7684order\u4e0d\u751f\u6548",level:2}],u={toc:g},d="wrapper";function m(e){var n=e.components,p=(0,a.Z)(e,o);return(0,i.kt)(d,(0,r.Z)({},u,p,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"36-\u63a5\u53e3\u6392\u5e8f"},"3.6 \u63a5\u53e3\u6392\u5e8f"),(0,i.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,i.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,i.kt)("p",{parentName:"admonition"},"3\u3001\u5982\u679c\u4f7f\u7528openapi3\u7248\u672c\uff0c\u90a3\u4e48Knife4j \u7248\u672c>=4.1.0")),(0,i.kt)("h2",{id:"\u57fa\u7840\u4f7f\u7528"},"\u57fa\u7840\u4f7f\u7528"),(0,i.kt)("p",null,"\u9488\u5bf9Controller\u4e0b\u7684\u5177\u4f53\u63a5\u53e3,\u6392\u5e8f\u89c4\u5219\u662f\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u4e2d\u7684order\u5b57\u6bb5,\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},'@ApiOperationSupport(order = 33)\n@ApiOperation(value = "\u5ffd\u7565\u53c2\u6570\u503c-Form\u7c7b\u578b")\n@PostMapping("/ex")\npublic Rest findAll(LongUser longUser) {\n Rest r=new Rest<>();\n r.setData(longUser);\n return r;\n}\n')),(0,i.kt)("p",null,"Knife4j\u901a\u8fc7Spring Plugin\u63d2\u4ef6\u4f53\u7cfb,\u5bf9\u6bcf\u4e2a\u63a5\u53e3\u8fdb\u884c\u626b\u63cf,\u6700\u7ec8\u5c06\u626b\u63cf\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u6ce8\u89e3\u83b7\u53d6\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"order"),"\u503c\u901a\u8fc7OpenAPI\u7684\u6269\u5c55\u5c5e\u6027\u89c4\u8303\u8fdb\u884c\u8d4b\u503c"),(0,i.kt)("p",null,"\u6700\u7ec8\u5728OpenAPI\u7684\u89c4\u8303\u4e2d\uff0c\u63a5\u53e3\u7684path\u8282\u70b9\u4e0b,\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),"\u5c5e\u6027\u5f97\u5230\u63a5\u53e3\u7684\u6392\u5e8f\uff0c\u6700\u7ec8\u524d\u7aef\u6839\u636e\u6392\u5e8f\u503c\u8fdb\u884c\u6392\u5e8f(\u987a\u5e8f)\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:t(9032).Z,width:"866",height:"294"})),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u9047\u5230\u6392\u5e8f\u4e0d\u751f\u6548\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u63a5\u53e3\u8fd4\u56de\u7684OpenAPI\u89c4\u8303\u4e2d\uff0c\u63a5\u53e3",(0,i.kt)("inlineCode",{parentName:"p"},"path"),"\u8282\u70b9\u4e0b\u662f\u5426\u5305\u542b",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),"\u7684\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("h2",{id:"springdoc-openapi\u7248\u672c\u9002\u914d"},"springdoc-openapi\u7248\u672c\u9002\u914d"),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u4f7f\u7528Knife4j\u9488\u5bf9springdoc-openapi\u7248\u672c\u7684\u60c5\u51b5\u4e0b\uff0c\u5fc5\u987b\u4f7f\u7528Knife4j \u7248\u672c>=4.1.0\u7248\u672c\uff0c\u8fd9\u91cc\u4f1a\u6709\u51e0\u4e2a\u6ce8\u610f\u4e8b\u9879\uff1a"),(0,i.kt)("p",null,"1\u3001\u5f00\u53d1\u8005\u5982\u679c\u81ea\u5df1\u901a\u8fc7springdoc-openapi\u7684\u60c5\u51b5\u4e0b\u8bbe\u7f6e\u4e86\u6392\u5e8f\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"springdoc:\n swagger-ui:\n path: /swagger-ui.html\n tags-sorter: alpha\n # \u8be5\u53c2\u6570\u662fswagger\u9ed8\u8ba4\u7684\u6392\u5e8f\u89c4\u5219\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3aalpha\uff0c\u90a3\u4e48Knife4j\u63d0\u4f9b\u7684\u6309\u7167order\u6392\u5e8f\u7684\u589e\u5f3a\u89c4\u5219\u4e0d\u751f\u6548\n operations-sorter: alpha\n")),(0,i.kt)("p",null,"2\u3001\u4fee\u6539\u914d\u7f6e"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"springdoc:\n swagger-ui:\n path: /swagger-ui.html\n tags-sorter: alpha\n # \u4f7f\u7528\u589e\u5f3aorder\u5c5e\u6027\u8fdb\u884c\u6392\u5e8f\uff0c\u6216\u8005\u4e0d\u8bbe\u7f6e\u8be5\u53c2\u6570\n operations-sorter: order\n")),(0,i.kt)("h2",{id:"knife4j-gateway\u7248\u672c\u805a\u5408\u7684order\u4e0d\u751f\u6548"},"knife4j-gateway\u7248\u672c\u805a\u5408\u7684order\u4e0d\u751f\u6548"),(0,i.kt)("p",null,"\u5728\u76ee\u524dknife4j\u63d0\u4f9b\u7684",(0,i.kt)("a",{parentName:"p",href:"../middleware-sources/spring-cloud-gateway/spring-gateway-introduction",target:null,rel:null},"gateway"),"\u7f51\u5173\u805a\u5408\u7ec4\u4ef6\u4e2d\uff0c\u4e5f\u4f1a\u51fa\u73b0order\u6392\u5e8f\u4e0d\u751f\u6548\u7684\u95ee\u9898"),(0,i.kt)("p",null,"\u4e3b\u8981\u539f\u56e0\u662f\u5728Knife4j\u7f51\u5173\u670d\u52a1\u7aef\u4ee3\u7801\u4e2d\uff0c\u5c06\u5206\u7ec4\u7684\u63a5\u53e3\u6392\u5e8f\u89c4\u5219\u786c\u7f16\u7801\u4e86\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java"',title:'"knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java"'},'\npublic class OpenAPI3Response implements Serializable {\n \n /**\n * ConfigUrl\uff0ceg: /v3/api-docs/swagger-config\n */\n private String configUrl;\n /**\n * oauth2RedirectUrl,eg : http://192.168.10.103:17812/swagger-ui/oauth2-redirect.html\n */\n private String oauth2RedirectUrl;\n \n /**\n * operation\u63a5\u53e3\u6392\u5e8f\u89c4\u5219\n */\n private String operationsSorter = "alpha";\n \n /**\n * tag\u6392\u5e8f\u89c4\u5219,\u6b64\u5904\u786c\u7f16\u7801\u5bfc\u81f4\u6392\u5e8forder\u4e0d\u751f\u6548\n */\n private String tagsSorter = "alpha";\n\n // other....\n\n}\n\n')),(0,i.kt)("p",null,"\u8fd9\u4e2a\u5728\u672a\u67654.2.0\u7248\u672c\u4e2d\u4f1a\u4fee\u590d\u8be5\u95ee\u9898"),(0,i.kt)("p",null,"\u4e34\u65f6\u7684\u89e3\u51b3\u529e\u6cd5(",(0,i.kt)("strong",{parentName:"p"},"\u6295\u673a\u53d6\u5de7"),")\uff0c\u6309\u5f53\u524dknife4j\u7684",(0,i.kt)("strong",{parentName:"p"},"\u4e00\u6837\u7684\u5305\u8def\u5f84"),"\uff0c\u5728\u9879\u76ee\u4ee3\u7801\u4e2d",(0,i.kt)("strong",{parentName:"p"},"\u91cd\u5199\u8be5\u5b9e\u4f53\u7c7b"),"\uff0c\u4fee\u6539\u4e3a\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java"',title:'"knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java"'},'\npublic class OpenAPI3Response implements Serializable {\n \n /**\n * ConfigUrl\uff0ceg: /v3/api-docs/swagger-config\n */\n private String configUrl;\n /**\n * oauth2RedirectUrl,eg : http://192.168.10.103:17812/swagger-ui/oauth2-redirect.html\n */\n private String oauth2RedirectUrl;\n \n /**\n * operation\u63a5\u53e3\u6392\u5e8f\u89c4\u5219\n */\n private String operationsSorter = "alpha";\n \n /**\n * \u4fee\u6539\u4e3aorder\n */\n private String tagsSorter = "order";\n\n // other....\n\n}\n\n')),(0,i.kt)("p",null,"\u5b8c\u6574\u5b9e\u4f53\u7c7b\u4ee3\u7801\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/blob/dev/knife4j/knife4j-gateway-spring-boot-starter/src/main/java/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java",target:"_blank",rel:"noopener"},"OpenAPI3Response.java")))}m.isMDXComponent=!0},9032:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/apiorder-ead23cd8391cb6c30c226247a170f7cf.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1be78505.4063b9e9.js b/knife4j-doc/gitee/assets/js/1be78505.4063b9e9.js new file mode 100644 index 000000000..991cbbe89 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1be78505.4063b9e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9514,4972],{19963:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_e});var a=n(67294),r=n(86010),l=n(10833),o=n(35281),i=n(53791),c=n(43320),d=n(74477),s=n(1116),m=n(7479),u=n(95999),b=n(12466),p=n(85936);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function v(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),r=n[0],l=n[1],o=(0,a.useRef)(!1),i=(0,b.Ct)(),c=i.startScroll,d=i.cancelScroll;return(0,b.RF)((function(e,n){var a=e.scrollY,r=null==n?void 0:n.scrollY;r&&(o.current?o.current=!1:a>=r?(d(),l(!1)):a{n.r(t),n.d(t,{default:()=>i});var a=n(67294),r=n(95999),l=n(10833),o=n(7479);function i(){return a.createElement(a.Fragment,null,a.createElement(l.d,{title:(0,r.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(o.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(r.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(r.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(r.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1be78505.569ffacb.js b/knife4j-doc/gitee/assets/js/1be78505.569ffacb.js deleted file mode 100644 index 5751eec88..000000000 --- a/knife4j-doc/gitee/assets/js/1be78505.569ffacb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9514,4972],{19963:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ye});var a=n(67294),l=n(86010),r=n(10833),i=n(35281),o=n(53791),c=n(43320),s=n(74477),d=n(1116),m=n(7479),u=n(95999),b=n(12466),p=n(85936);const h="backToTopButton_sjWU",v="backToTopButtonShow_xfvO";function E(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),l=n[0],r=n[1],i=(0,a.useRef)(!1),o=(0,b.Ct)(),c=o.startScroll,s=o.cancelScroll;return(0,b.RF)((function(e,n){var a=e.scrollY,l=null==n?void 0:n.scrollY;l&&(i.current?i.current=!1:a>=l?(s(),r(!1)):a{n.r(t),n.d(t,{default:()=>o});var a=n(67294),l=n(95999),r=n(10833),i=n(7479);function o(){return a.createElement(a.Fragment,null,a.createElement(r.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(i.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1ceac2ea.31fd410f.js b/knife4j-doc/gitee/assets/js/1ceac2ea.31fd410f.js deleted file mode 100644 index 06073a5ae..000000000 --- a/knife4j-doc/gitee/assets/js/1ceac2ea.31fd410f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9211],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},s=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),s=p(r),f=o,m=s["".concat(l,".").concat(f)]||s[f]||u[f]||a;return r?n.createElement(m,i(i({ref:t},d),{},{components:r})):n.createElement(m,i({ref:t},d))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=s;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r(67294),r(39960),r(52263);var n="4.0.0".split(".");[n[0],n[1]].join(".")},12982:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>f,frontMatter:()=>c,metadata:()=>p,toc:()=>u});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=(r(14959),["components"]),c={id:"middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f"},l=void 0,p={unversionedId:"middleware/middleware",id:"middleware/middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/middleware/index.mdx",sourceDirName:"middleware",slug:"/middleware/",permalink:"/docs/middleware/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f"}},d={},u=[],s={toc:u};function f(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u751f\u6001\u4e2d\u95f4\u4ef6"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1ceac2ea.4608915d.js b/knife4j-doc/gitee/assets/js/1ceac2ea.4608915d.js new file mode 100644 index 000000000..57d4c457e --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1ceac2ea.4608915d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9211],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=p(r),f=o,m=u["".concat(l,".").concat(f)]||u[f]||s[f]||a;return r?n.createElement(m,i(i({ref:t},d),{},{components:r})):n.createElement(m,i({ref:t},d))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var p=2;p{r(67294),r(39960),r(52263);var n="4.0.0".split(".");[n[0],n[1]].join(".")},12982:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>c,metadata:()=>p,toc:()=>u});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=(r(14959),["components"]),c={id:"middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f"},l=void 0,p={unversionedId:"middleware/middleware",id:"middleware/middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/middleware/index.mdx",sourceDirName:"middleware",slug:"/middleware/",permalink:"/docs/middleware/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"middleware",title:"\u751f\u6001\u4e2d\u95f4\u4ef6",description:"Knife4j\u793e\u533a\u4fe1\u606f"}},d={},u=[],s={toc:u},f="wrapper";function m(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)(f,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u751f\u6001\u4e2d\u95f4\u4ef6"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1e1f488f.263ab94c.js b/knife4j-doc/gitee/assets/js/1e1f488f.263ab94c.js new file mode 100644 index 000000000..6a374d5ae --- /dev/null +++ b/knife4j-doc/gitee/assets/js/1e1f488f.263ab94c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9706],{3905:(n,e,t)=>{t.d(e,{Zo:()=>s,kt:()=>f});var a=t(67294);function r(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,a)}return t}function o(n){for(var e=1;e=0||(r[t]=n[t]);return r}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}var u=a.createContext({}),p=function(n){var e=a.useContext(u),t=e;return n&&(t="function"==typeof n?n(e):o(o({},e),n)),t},s=function(n){var e=p(n.components);return a.createElement(u.Provider,{value:e},n.children)},g="mdxType",c={inlineCode:"code",wrapper:function(n){var e=n.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(n,e){var t=n.components,r=n.mdxType,i=n.originalType,u=n.parentName,s=l(n,["components","mdxType","originalType","parentName"]),g=p(t),d=r,f=g["".concat(u,".").concat(d)]||g[d]||c[d]||i;return t?a.createElement(f,o(o({ref:e},s),{},{components:t})):a.createElement(f,o({ref:e},s))}));function f(n,e){var t=arguments,r=e&&e.mdxType;if("string"==typeof n||r){var i=t.length,o=new Array(i);o[0]=d;var l={};for(var u in e)hasOwnProperty.call(e,u)&&(l[u]=e[u]);l.originalType=n,l[g]="string"==typeof n?n:r,o[1]=l;for(var p=2;p{t.r(e),t.d(e,{assets:()=>s,contentTitle:()=>u,default:()=>f,frontMatter:()=>l,metadata:()=>p,toc:()=>g});var a=t(87462),r=t(63366),i=(t(67294),t(3905)),o=["components"],l={},u="3.25 JSR303",p={unversionedId:"features/jsr303",id:"features/jsr303",title:"3.25 JSR303",description:"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b",source:"@site/docs/features/jsr303.md",sourceDirName:"features",slug:"/features/jsr303",permalink:"/docs/features/jsr303",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.24 \u81ea\u5b9a\u4e49Footer",permalink:"/docs/features/customFooter"},next:{title:"3.26 \u7981\u7528\u8c03\u8bd5",permalink:"/docs/features/forbidDebug"}},s={},g=[],c={toc:g},d="wrapper";function f(n){var e=n.components,l=(0,r.Z)(n,o);return(0,i.kt)(d,(0,a.Z)({},c,l,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"325-jsr303"},"3.25 JSR303"),(0,i.kt)("p",null,"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b"),(0,i.kt)("p",null,"\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u4e2d\uff0c\u9488\u5bf9\u6bcf\u4e2a\u53c2\u6570\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\u679c\u8be5\u53c2\u6570\u5305\u542bJSR303\u6ce8\u89e3\u89c4\u8303\uff0c\u5219\u4f1a\u4ee5\u4e0b\u6ed1\u66f2\u7ebf\u7684\u65b9\u5f0f\u5448\u73b0\uff0c\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:t(63533).Z,width:"957",height:"243"})),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u8981\u4f7f\u7528JSR303\u6ce8\u89e3\uff0c\u9700\u8981\u5728\u521b\u5efaSwagger\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u5bfc\u5165springfox\u7684\u5173\u4e8eJSR303\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnableSwagger2WebMvc\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n //more...\n}\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"BeanValidatorPluginsConfiguration"),"\u662f\u6838\u5fc3\uff0cSpringfox\u9879\u76ee\u4e3b\u8981\u662f\u901a\u8fc7spring-plugin\u63d2\u4ef6\u4f53\u7cfb\u5bf9JSR303\u63d0\u4f9b\u652f\u6301\uff0c\u800c",(0,i.kt)("inlineCode",{parentName:"p"},"BeanValidatorPluginsConfiguration"),"\u914d\u7f6e\u6587\u4ef6\u5219\u662f\u5c06\u548cJSR303\u76f8\u5173\u7684\u5b9e\u4f53Plugin\u5b9e\u73b0\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d"),(0,i.kt)("p",null,"\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\npublic class BeanValidatorPluginsConfiguration {\n\n @Bean\n public ExpandedParameterMinMaxAnnotationPlugin expanderMinMax() {\n return new ExpandedParameterMinMaxAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterNotNullAnnotationPlugin expanderNotNull() {\n return new ExpandedParameterNotNullAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterNotBlankAnnotationPlugin expanderNotBlank() {\n return new ExpandedParameterNotBlankAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterPatternAnnotationPlugin expanderPattern() {\n return new ExpandedParameterPatternAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterSizeAnnotationPlugin expanderSize() {\n return new ExpandedParameterSizeAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin parameterMinMax() {\n return new springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin parameterNotNull() {\n return new springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin parameterNotBlank() {\n return new springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin parameterPattern() {\n return new springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin parameterSize() {\n return new springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin();\n }\n\n @Bean\n public MinMaxAnnotationPlugin minMaxPlugin() {\n return new MinMaxAnnotationPlugin();\n }\n\n @Bean\n public DecimalMinMaxAnnotationPlugin decimalMinMaxPlugin() {\n return new DecimalMinMaxAnnotationPlugin();\n }\n\n @Bean\n public SizeAnnotationPlugin sizePlugin() {\n return new SizeAnnotationPlugin();\n }\n\n @Bean\n public NotNullAnnotationPlugin notNullPlugin() {\n return new NotNullAnnotationPlugin();\n }\n\n @Bean\n public NotBlankAnnotationPlugin notBlankPlugin() {\n return new NotBlankAnnotationPlugin();\n }\n\n @Bean\n public PatternAnnotationPlugin patternPlugin() {\n return new PatternAnnotationPlugin();\n }\n}\n\n")))}f.isMDXComponent=!0},63533:(n,e,t)=>{t.d(e,{Z:()=>a});const a=t.p+"assets/images/jsr303-af77d95a1290b6d683a4cde48de7c46e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/1e1f488f.fc2f087a.js b/knife4j-doc/gitee/assets/js/1e1f488f.fc2f087a.js deleted file mode 100644 index 6a16e517a..000000000 --- a/knife4j-doc/gitee/assets/js/1e1f488f.fc2f087a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9706],{3905:(n,e,t)=>{t.d(e,{Zo:()=>s,kt:()=>d});var a=t(67294);function r(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,a)}return t}function o(n){for(var e=1;e=0||(r[t]=n[t]);return r}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}var u=a.createContext({}),p=function(n){var e=a.useContext(u),t=e;return n&&(t="function"==typeof n?n(e):o(o({},e),n)),t},s=function(n){var e=p(n.components);return a.createElement(u.Provider,{value:e},n.children)},g={inlineCode:"code",wrapper:function(n){var e=n.children;return a.createElement(a.Fragment,{},e)}},c=a.forwardRef((function(n,e){var t=n.components,r=n.mdxType,i=n.originalType,u=n.parentName,s=l(n,["components","mdxType","originalType","parentName"]),c=p(t),d=r,f=c["".concat(u,".").concat(d)]||c[d]||g[d]||i;return t?a.createElement(f,o(o({ref:e},s),{},{components:t})):a.createElement(f,o({ref:e},s))}));function d(n,e){var t=arguments,r=e&&e.mdxType;if("string"==typeof n||r){var i=t.length,o=new Array(i);o[0]=c;var l={};for(var u in e)hasOwnProperty.call(e,u)&&(l[u]=e[u]);l.originalType=n,l.mdxType="string"==typeof n?n:r,o[1]=l;for(var p=2;p{t.r(e),t.d(e,{assets:()=>s,contentTitle:()=>u,default:()=>d,frontMatter:()=>l,metadata:()=>p,toc:()=>g});var a=t(87462),r=t(63366),i=(t(67294),t(3905)),o=["components"],l={},u="3.25 JSR303",p={unversionedId:"features/jsr303",id:"features/jsr303",title:"3.25 JSR303",description:"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b",source:"@site/docs/features/jsr303.md",sourceDirName:"features",slug:"/features/jsr303",permalink:"/docs/features/jsr303",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.24 \u81ea\u5b9a\u4e49Footer",permalink:"/docs/features/customFooter"},next:{title:"3.26 \u7981\u7528\u8c03\u8bd5",permalink:"/docs/features/forbidDebug"}},s={},g=[],c={toc:g};function d(n){var e=n.components,l=(0,r.Z)(n,o);return(0,i.kt)("wrapper",(0,a.Z)({},c,l,{components:e,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"325-jsr303"},"3.25 JSR303"),(0,i.kt)("p",null,"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b"),(0,i.kt)("p",null,"\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u4e2d\uff0c\u9488\u5bf9\u6bcf\u4e2a\u53c2\u6570\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\u679c\u8be5\u53c2\u6570\u5305\u542bJSR303\u6ce8\u89e3\u89c4\u8303\uff0c\u5219\u4f1a\u4ee5\u4e0b\u6ed1\u66f2\u7ebf\u7684\u65b9\u5f0f\u5448\u73b0\uff0c\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:t(63533).Z,width:"957",height:"243"})),(0,i.kt)("p",null,"\u5f00\u53d1\u8005\u5982\u679c\u8981\u4f7f\u7528JSR303\u6ce8\u89e3\uff0c\u9700\u8981\u5728\u521b\u5efaSwagger\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u5bfc\u5165springfox\u7684\u5173\u4e8eJSR303\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnableSwagger2WebMvc\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n //more...\n}\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"BeanValidatorPluginsConfiguration"),"\u662f\u6838\u5fc3\uff0cSpringfox\u9879\u76ee\u4e3b\u8981\u662f\u901a\u8fc7spring-plugin\u63d2\u4ef6\u4f53\u7cfb\u5bf9JSR303\u63d0\u4f9b\u652f\u6301\uff0c\u800c",(0,i.kt)("inlineCode",{parentName:"p"},"BeanValidatorPluginsConfiguration"),"\u914d\u7f6e\u6587\u4ef6\u5219\u662f\u5c06\u548cJSR303\u76f8\u5173\u7684\u5b9e\u4f53Plugin\u5b9e\u73b0\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d"),(0,i.kt)("p",null,"\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\npublic class BeanValidatorPluginsConfiguration {\n\n @Bean\n public ExpandedParameterMinMaxAnnotationPlugin expanderMinMax() {\n return new ExpandedParameterMinMaxAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterNotNullAnnotationPlugin expanderNotNull() {\n return new ExpandedParameterNotNullAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterNotBlankAnnotationPlugin expanderNotBlank() {\n return new ExpandedParameterNotBlankAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterPatternAnnotationPlugin expanderPattern() {\n return new ExpandedParameterPatternAnnotationPlugin();\n }\n\n @Bean\n public ExpandedParameterSizeAnnotationPlugin expanderSize() {\n return new ExpandedParameterSizeAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin parameterMinMax() {\n return new springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin parameterNotNull() {\n return new springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin parameterNotBlank() {\n return new springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin parameterPattern() {\n return new springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin();\n }\n\n @Bean\n public springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin parameterSize() {\n return new springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin();\n }\n\n @Bean\n public MinMaxAnnotationPlugin minMaxPlugin() {\n return new MinMaxAnnotationPlugin();\n }\n\n @Bean\n public DecimalMinMaxAnnotationPlugin decimalMinMaxPlugin() {\n return new DecimalMinMaxAnnotationPlugin();\n }\n\n @Bean\n public SizeAnnotationPlugin sizePlugin() {\n return new SizeAnnotationPlugin();\n }\n\n @Bean\n public NotNullAnnotationPlugin notNullPlugin() {\n return new NotNullAnnotationPlugin();\n }\n\n @Bean\n public NotBlankAnnotationPlugin notBlankPlugin() {\n return new NotBlankAnnotationPlugin();\n }\n\n @Bean\n public PatternAnnotationPlugin patternPlugin() {\n return new PatternAnnotationPlugin();\n }\n}\n\n")))}d.isMDXComponent=!0},63533:(n,e,t)=>{t.d(e,{Z:()=>a});const a=t.p+"assets/images/jsr303-af77d95a1290b6d683a4cde48de7c46e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/246f2c6f.7df9dac8.js b/knife4j-doc/gitee/assets/js/246f2c6f.7df9dac8.js deleted file mode 100644 index f8c79cf87..000000000 --- a/knife4j-doc/gitee/assets/js/246f2c6f.7df9dac8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9285],{26267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","path":"/docs","tagsPath":"/docs/tags","isLast":true,"routePriority":-1,"sidebarFilePath":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/sidebars.js","contentPath":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/docs","contentPathLocalized":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/i18n/zh-Hans/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"action/action-index","id":"action/action-index","title":"\u5b9e\u6218\u6307\u5357","description":"Knife4j\u5b9e\u6218\u6307\u5357","source":"@site/docs/action/index.mdx","sourceDirName":"action","slug":"/action/","permalink":"/docs/action/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{"id":"action-index","title":"\u5b9e\u6218\u6307\u5357","description":"Knife4j\u5b9e\u6218\u6307\u5357"},"sidebar":"action","next":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/action/action-simple"}},{"unversionedId":"action/action-simple","id":"action/action-simple","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/action/simple.mdx","sourceDirName":"action","slug":"/action/action-simple","permalink":"/docs/action/action-simple","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"action-simple","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"action","previous":{"title":"\u5b9e\u6218\u6307\u5357","permalink":"/docs/action/"},"next":{"title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","permalink":"/docs/action/mavenbom"}},{"unversionedId":"action/aggregation-cloud","id":"action/aggregation-cloud","title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","description":"Cloud(\u4e91\u7aef)\u6a21\u5f0f\u548cDisk\u6a21\u5f0f\u5927\u540c\u5c0f\u5f02\uff0c\u4e3b\u8981\u7684\u533a\u522b\u662f\u83b7\u53d6OpenAPI\u89c4\u8303\u7684\u65b9\u5f0f\u6362\u6210\u4e86\u57fa\u4e8eHTTP\u63a5\u53e3\u800c\u5df2","source":"@site/docs/action/aggregation-cloud.md","sourceDirName":"action","slug":"/action/aggregation-cloud","permalink":"/docs/action/aggregation-cloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-disk"},"next":{"title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-eureka"}},{"unversionedId":"action/aggregation-disk","id":"action/aggregation-disk","title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","description":"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408","source":"@site/docs/action/aggregation-disk.md","sourceDirName":"action","slug":"/action/aggregation-disk","permalink":"/docs/action/aggregation-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","permalink":"/docs/action/oauth2-password"},"next":{"title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-cloud"}},{"unversionedId":"action/aggregation-docker","id":"action/aggregation-docker","title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","description":"\u5728\u524d\u9762\u7684\u5b9e\u6218\u6587\u7ae0\u4e2d\uff0c\u66f4\u591a\u7684\u662f\u9762\u5411Java\u5f00\u53d1\u8005\uff0c\u901a\u8fc7Spring Boot\u6846\u67b6\uff0c\u5feb\u901f\u805a\u5408OpenAPI\u6587\u6863\u3002","source":"@site/docs/action/aggregation-docker.md","sourceDirName":"action","slug":"/action/aggregation-docker","permalink":"/docs/action/aggregation-docker","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-nacos"},"next":{"title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","permalink":"/docs/action/dotnetcore-knife4j-how"}},{"unversionedId":"action/aggregation-eureka","id":"action/aggregation-eureka","title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","description":"\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u8fdb\u884c\u805a\u5408\u7684\u6a21\u5f0f\u548cCloud\u6a21\u5f0f\u5927\u540c\u5c0f\u5f02\uff0c\u4e3b\u8981\u7684\u533a\u522b\u662f\u901a\u8fc7serviceName\u6765\u66ff\u4ee3\u4e86\u771f\u5b9e\u7684\u76ee\u6807\u670d\u52a1\u5730\u5740\uff0c\u800c\u662f\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u8fdb\u884c\u52a8\u6001\u83b7\u53d6","source":"@site/docs/action/aggregation-eureka.md","sourceDirName":"action","slug":"/action/aggregation-eureka","permalink":"/docs/action/aggregation-eureka","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-cloud"},"next":{"title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-nacos"}},{"unversionedId":"action/aggregation-nacos","id":"action/aggregation-nacos","title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","description":"Nacos\u7684\u914d\u7f6e\u548cEureka\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fknife4j.nacos\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837","source":"@site/docs/action/aggregation-nacos.md","sourceDirName":"action","slug":"/action/aggregation-nacos","permalink":"/docs/action/aggregation-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-eureka"},"next":{"title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","permalink":"/docs/action/aggregation-docker"}},{"unversionedId":"action/dotnetcore-knife4j-guid","id":"action/dotnetcore-knife4j-guid","title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","description":"IGeekFan.AspNetCore.Knife4jUI","source":"@site/docs/action/dotnetcore-knife4j-guid.md","sourceDirName":"action","slug":"/action/dotnetcore-knife4j-guid","permalink":"/docs/action/dotnetcore-knife4j-guid","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1606020212,"formattedLastUpdatedAt":"2020\u5e7411\u670822\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","permalink":"/docs/action/dotnetcore-knife4j-how"},"next":{"title":"Springfox\u6e90\u7801\u7cfb\u5217","permalink":"/docs/action/springfox/"}},{"unversionedId":"action/dotnetcore-knife4j-how","id":"action/dotnetcore-knife4j-how","title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","description":"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002","source":"@site/docs/action/dotnetcore-knife4j-how.md","sourceDirName":"action","slug":"/action/dotnetcore-knife4j-how","permalink":"/docs/action/dotnetcore-knife4j-how","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1606020212,"formattedLastUpdatedAt":"2020\u5e7411\u670822\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","permalink":"/docs/action/aggregation-docker"},"next":{"title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","permalink":"/docs/action/dotnetcore-knife4j-guid"}},{"unversionedId":"action/mavenbom","id":"action/mavenbom","title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","description":"\u8be5\u65b9\u5f0f\u81ea2.0.2\u7248\u672c\u624d\u63d0\u4f9b,\u5728knife4j\u4ee5\u524d\u7684\u7248\u672c\u4e2d\u6ca1\u6709knife4j-dependencies\u6a21\u5757,\u5f00\u53d1\u8005\u5728\u4f7f\u7528\u7684\u65f6\u5019\u9700\u8981\u6ce8\u610f","source":"@site/docs/action/mavenbom.md","sourceDirName":"action","slug":"/action/mavenbom","permalink":"/docs/action/mavenbom","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/action/action-simple"},"next":{"title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springmvc"}},{"unversionedId":"action/oauth2-authorization_code","id":"action/oauth2-authorization_code","title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-authorization_code.md","sourceDirName":"action","slug":"/action/oauth2-authorization_code","permalink":"/docs/action/oauth2-authorization_code","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","permalink":"/docs/action/oauth2-implicit"},"next":{"title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","permalink":"/docs/action/oauth2-client_credentials"}},{"unversionedId":"action/oauth2-client_credentials","id":"action/oauth2-client_credentials","title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-client_credentials.md","sourceDirName":"action","slug":"/action/oauth2-client_credentials","permalink":"/docs/action/oauth2-client_credentials","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","permalink":"/docs/action/oauth2-authorization_code"},"next":{"title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","permalink":"/docs/action/oauth2-password"}},{"unversionedId":"action/oauth2-implicit","id":"action/oauth2-implicit","title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-implicit.md","sourceDirName":"action","slug":"/action/oauth2-implicit","permalink":"/docs/action/oauth2-implicit","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-zuul"},"next":{"title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","permalink":"/docs/action/oauth2-authorization_code"}},{"unversionedId":"action/oauth2-password","id":"action/oauth2-password","title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-password.md","sourceDirName":"action","slug":"/action/oauth2-password","permalink":"/docs/action/oauth2-password","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","permalink":"/docs/action/oauth2-client_credentials"},"next":{"title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-disk"}},{"unversionedId":"action/springboot","id":"action/springboot","title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","description":"\u672c\u6b21\u793a\u4f8b\u4f7f\u7528Spring Boot\u4f5c\u4e3a\u811a\u624b\u67b6\u6765\u5feb\u901f\u96c6\u6210Knife4j,Spring Boot\u7248\u672c2.3.5.RELEASE,Knife4j\u7248\u672c2.0.7\uff0c\u5b8c\u6574\u4ee3\u7801\u53ef\u4ee5\u53bb\u53c2\u8003knife4j-spring-boot-fast-demo","source":"@site/docs/action/springboot.md","sourceDirName":"action","slug":"/action/springboot","permalink":"/docs/action/springboot","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springmvc"},"next":{"title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-gateway"}},{"unversionedId":"action/springcloud-gateway","id":"action/springcloud-gateway","title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","description":"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863","source":"@site/docs/action/springcloud-gateway.md","sourceDirName":"action","slug":"/action/springcloud-gateway","permalink":"/docs/action/springcloud-gateway","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604832815,"formattedLastUpdatedAt":"2020\u5e7411\u67088\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springboot"},"next":{"title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-zuul"}},{"unversionedId":"action/springcloud-zuul","id":"action/springcloud-zuul","title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","description":"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?","source":"@site/docs/action/springcloud-zuul.md","sourceDirName":"action","slug":"/action/springcloud-zuul","permalink":"/docs/action/springcloud-zuul","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-gateway"},"next":{"title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","permalink":"/docs/action/oauth2-implicit"}},{"unversionedId":"action/springfox/springfox-index","id":"action/springfox/springfox-index","title":"Springfox\u6e90\u7801\u7cfb\u5217","description":"springfox \u6e90\u7801\u7cfb\u5217,springfox-swagger","source":"@site/docs/action/springfox/index.mdx","sourceDirName":"action/springfox","slug":"/action/springfox/","permalink":"/docs/action/springfox/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{"id":"springfox-index","title":"Springfox\u6e90\u7801\u7cfb\u5217","description":"springfox \u6e90\u7801\u7cfb\u5217,springfox-swagger"},"sidebar":"action","previous":{"title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","permalink":"/docs/action/dotnetcore-knife4j-guid"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","permalink":"/docs/action/springfox/springfox1"}},{"unversionedId":"action/springfox/springfox1","id":"action/springfox/springfox1","title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","description":"\u65e5\u671f\uff1a2019-5-21 2115","source":"@site/docs/action/springfox/springfox1.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox1","permalink":"/docs/action/springfox/springfox1","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"Springfox\u6e90\u7801\u7cfb\u5217","permalink":"/docs/action/springfox/"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","permalink":"/docs/action/springfox/springfox2"}},{"unversionedId":"action/springfox/springfox10","id":"action/springfox/springfox10","title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","description":"\u5728\u4e0a\u4e00\u7bc7\u4e2d,\u6211\u4eec\u4e86\u89e3\u5230\u4e86springfox\u901a\u8fc7groupName\u7684\u8fc7\u6ee4,\u62ff\u5230\u4e86\u6240\u6709\u7684\u63a5\u53e3,\u5e76\u4e14\u901a\u8fc7guava\u5e93\u7684ArrayListMultimap\u5bf9\u63a5\u53e3\u7684Controller\u8fdb\u4e00\u6b65\u8fdb\u884c\u4e86\u5206\u7ec4,\u63a5\u4e0b\u6765\u5c31\u662f\u89e3\u6790\u6bcf\u4e2a\u63a5\u53e3\u7684\u64cd\u4f5c\u4e86","source":"@site/docs/action/springfox/springfox10.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox10","permalink":"/docs/action/springfox/springfox10","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","permalink":"/docs/action/springfox/springfox9"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","permalink":"/docs/action/springfox/springfox11"}},{"unversionedId":"action/springfox/springfox11","id":"action/springfox/springfox11","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","description":"\u5728springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61\u8fd9\u4e00\u7bc7\u4e2d,\u6211\u4eec\u5176\u5b9e\u5df2\u7ecf\u5927\u81f4\u4e86\u89e3\u4e86Springfox\u9488\u5bf9\u63a5\u53e3\u4e2d\u6d89\u53ca\u5230\u7684Model\u7c7b\u8fdb\u884c\u89e3\u6790\u521d\u59cb\u5316\u7684\u8fc7\u7a0b","source":"@site/docs/action/springfox/springfox11.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox11","permalink":"/docs/action/springfox/springfox11","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660578710,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox10"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","permalink":"/docs/action/springfox/springfox12"}},{"unversionedId":"action/springfox/springfox12","id":"action/springfox/springfox12","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","description":"ApiDescription\u662fspringfox\u63d0\u4f9b\u7684\u63a5\u53e3\u63cf\u8ff0\u4fe1\u606f\u7c7b,\u5728springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61\u4e2d\u6211\u4eec\u62ff\u5230\u4e86\u63a5\u53e3\u7684\u7c7b\u578bModel\u96c6\u5408\u4fe1\u606f\uff0c\u4f46\u9664\u4e86Model\u4fe1\u606f,\u63a5\u53e3\u8fd8\u6709\u66f4\u591a\u7684\u4fe1\u606f","source":"@site/docs/action/springfox/springfox12.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox12","permalink":"/docs/action/springfox/springfox12","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","permalink":"/docs/action/springfox/springfox11"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox13"}},{"unversionedId":"action/springfox/springfox13","id":"action/springfox/springfox13","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","description":"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a","source":"@site/docs/action/springfox/springfox13.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox13","permalink":"/docs/action/springfox/springfox13","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","permalink":"/docs/action/springfox/springfox12"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","permalink":"/docs/action/springfox/springfox14"}},{"unversionedId":"action/springfox/springfox14","id":"action/springfox/springfox14","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","description":"\u5728\u524d\u9762\u6211\u4eec\u62ff\u5230\u4e86\u63a5\u53e3\u7684Model\u7c7b\u578b\u96c6\u5408,\u7136\u540e\u8fd8\u83b7\u53d6\u5230\u4e86\u8be5\u63a5\u53e3\u7684ApiDescription\u63cf\u8ff0\u4fe1\u606f","source":"@site/docs/action/springfox/springfox14.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox14","permalink":"/docs/action/springfox/springfox14","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox13"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox15"}},{"unversionedId":"action/springfox/springfox15","id":"action/springfox/springfox15","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","description":"\u901a\u8fc7\u4e0a\u7bc7\u7684\u5206\u6790,\u6211\u4eec\u5df2\u7ecf\u5f97\u5230\u4e86ApiListing\u7684map\u96c6\u5408\uff0c\u63a5\u4e0b\u6765\u6700\u7ec8\u505a\u6587\u6863\u5f52\u6863,\u5f97\u5230Documentation\u5bf9\u8c61","source":"@site/docs/action/springfox/springfox15.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox15","permalink":"/docs/action/springfox/springfox15","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","permalink":"/docs/action/springfox/springfox14"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","permalink":"/docs/action/springfox/springfox16"}},{"unversionedId":"action/springfox/springfox16","id":"action/springfox/springfox16","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","description":"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684","source":"@site/docs/action/springfox/springfox16.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox16","permalink":"/docs/action/springfox/springfox16","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox15"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","permalink":"/docs/action/springfox/springfox17"}},{"unversionedId":"action/springfox/springfox17","id":"action/springfox/springfox17","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","description":"\u524d\u9762\u5df2\u7ecf\u83b7\u53d6\u5f97\u5230\u4e86swagger\u7684\u5206\u7ec4\u63a5\u53e3\u4fe1\u606f\u4e86,\u63a5\u4e0b\u6765\u5c31\u662f\u6839\u636e\u5206\u7ec4\u540d\u79f0\u83b7\u53d6\u6bcf\u4e2a\u5206\u7ec4\u7684Swagger\u8d44\u6e90\u8be6\u7ec6\u4fe1\u606f,\u5728springfox\u4e2d\u63d0\u4f9b\u4e86/v2/api-docs\u63a5\u53e3\u6765\u8fdb\u884c\u83b7\u53d6","source":"@site/docs/action/springfox/springfox17.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox17","permalink":"/docs/action/springfox/springfox17","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","permalink":"/docs/action/springfox/springfox16"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox18"}},{"unversionedId":"action/springfox/springfox18","id":"action/springfox/springfox18","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","description":"\u65e2\u7136\u6211\u4eec\u5bf9springfox\u63d0\u4f9b\u7684\u63a5\u53e3\u5df2\u7ecf\u6709\u4e86\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3,\u90a3\u4e48\u9488\u5bf9\u6211\u4eec\u5728\u5206\u7ec4\u63a5\u53e3\u6587\u7ae0\u4e2d\u63d0\u7684\u9700\u6c42,\u5982\u679c\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f\u5982\u4f55\u505a\u5462\uff1f","source":"@site/docs/action/springfox/springfox18.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox18","permalink":"/docs/action/springfox/springfox18","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","permalink":"/docs/action/springfox/springfox17"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","permalink":"/docs/action/springfox/springfox19"}},{"unversionedId":"action/springfox/springfox19","id":"action/springfox/springfox19","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","description":"\u6211\u4eec\u5728\u7814\u7a76springfox\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0springfox\u5927\u91cf\u4f7f\u7528\u4e86guava\u8fd9\u4e2a\u5e93\u7684\u4e00\u4e9b\u65b9\u6cd5\u548c\u7c7b,\u9488\u5bf9\u6211\u4eec\u5728\u7814\u7a76\u6e90\u7801\u7684\u5b66\u4e60\u8fc7\u7a0b\u4e2d,\u5c06\u6d89\u53ca\u5230\u7684guava\u5e93\u4e2d\u7684\u7c7b\u8fdb\u884c\u5f52\u7eb3\u603b\u7ed3,\u540e\u671f\u5728\u5de5\u4f5c\u4e2d\u6211\u4eec\u4e5f\u53ef\u4ee5\u719f\u7ec3\u8fd0\u7528guava\u5e93\u4e3a\u6211\u4eec\u63d0\u4f9b\u7684\u7b80\u4ecbapi","source":"@site/docs/action/springfox/springfox19.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox19","permalink":"/docs/action/springfox/springfox19","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox18"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","permalink":"/docs/action/springfox/springfox20"}},{"unversionedId":"action/springfox/springfox2","id":"action/springfox/springfox2","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","description":"\u65f6\u95f4\uff1a2019-5-22 1221","source":"@site/docs/action/springfox/springfox2.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox2","permalink":"/docs/action/springfox/springfox2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","permalink":"/docs/action/springfox/springfox1"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","permalink":"/docs/action/springfox/springfox3"}},{"unversionedId":"action/springfox/springfox20","id":"action/springfox/springfox20","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","description":"\u5f85\u7eed...","source":"@site/docs/action/springfox/springfox20.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox20","permalink":"/docs/action/springfox/springfox20","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","permalink":"/docs/action/springfox/springfox19"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b","permalink":"/docs/action/springfox/springfox21"}},{"unversionedId":"action/springfox/springfox21","id":"action/springfox/springfox21","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b","description":"\u6211\u4eec\u5728\u524d\u9762\u7684\u6e90\u7801\u8fc7\u7a0b\u4e2d,\u4e86\u89e3\u4e86springfox\u7684\u57fa\u672c\u5de5\u4f5c\u539f\u7406,\u63a5\u4e0b\u6765,\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528springfox\u7ed9\u6211\u4eec\u63d0\u4f9b\u7684\u5916\u90e8\u63a5\u53e3,\u6765\u5904\u7406\u4e00\u4e9b\u6211\u4eec\u5de5\u4f5c\u4e2d\u78b0\u5230\u7684\u95ee\u9898,\u6216\u8005\u8fdb\u884c\u81ea\u5b9a\u4e49\u6269\u5c55","source":"@site/docs/action/springfox/springfox21.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox21","permalink":"/docs/action/springfox/springfox21","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","permalink":"/docs/action/springfox/springfox20"}},{"unversionedId":"action/springfox/springfox3","id":"action/springfox/springfox3","title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","description":"\u65f6\u95f4\uff1a2019-5-22 1250","source":"@site/docs/action/springfox/springfox3.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox3","permalink":"/docs/action/springfox/springfox3","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","permalink":"/docs/action/springfox/springfox2"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox4"}},{"unversionedId":"action/springfox/springfox4","id":"action/springfox/springfox4","title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","description":"\u65f6\u95f4\uff1a2019-5-23 1250","source":"@site/docs/action/springfox/springfox4.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox4","permalink":"/docs/action/springfox/springfox4","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","permalink":"/docs/action/springfox/springfox3"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","permalink":"/docs/action/springfox/springfox5"}},{"unversionedId":"action/springfox/springfox5","id":"action/springfox/springfox5","title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","description":"\u65f6\u95f4\uff1a2019-5-23 1450","source":"@site/docs/action/springfox/springfox5.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox5","permalink":"/docs/action/springfox/springfox5","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox4"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","permalink":"/docs/action/springfox/springfox6"}},{"unversionedId":"action/springfox/springfox6","id":"action/springfox/springfox6","title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","description":"\u65f6\u95f4\uff1a2019-5-23 1850","source":"@site/docs/action/springfox/springfox6.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox6","permalink":"/docs/action/springfox/springfox6","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","permalink":"/docs/action/springfox/springfox5"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox7"}},{"unversionedId":"action/springfox/springfox7","id":"action/springfox/springfox7","title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","description":"\u65f6\u95f4\uff1a2019-5-23 2004","source":"@site/docs/action/springfox/springfox7.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox7","permalink":"/docs/action/springfox/springfox7","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","permalink":"/docs/action/springfox/springfox6"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox8"}},{"unversionedId":"action/springfox/springfox8","id":"action/springfox/springfox8","title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","description":"\u6211\u4eec\u901a\u8fc7\u8bfbDocumentationPluginsBootstrapper\u4ee3\u7801\u4e2d\u7684start\u65b9\u6cd5,\u4e86\u89e3\u5230springfox\u6839\u636e\u6211\u4eec\u5916\u90e8\u63d0\u4f9b\u7684Docket\u5bf9\u8c61\u8fdb\u884c\u521d\u59cb\u5316\u65f6,\u4f1a\u901a\u8fc7Docket\u5bf9\u8c61\u6784\u5efaDocumentationContext\u5bf9\u8c61\u6765\u8fdb\u884c\u521d\u59cb\u5316\u64cd\u4f5c","source":"@site/docs/action/springfox/springfox8.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox8","permalink":"/docs/action/springfox/springfox8","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox7"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","permalink":"/docs/action/springfox/springfox9"}},{"unversionedId":"action/springfox/springfox9","id":"action/springfox/springfox9","title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","description":"\u5728\u524d\u9762\u6211\u4eec\u4e86\u89e3\u4e86DocumennationContext\u7684\u521d\u59cb\u5316\u8fc7\u7a0b,\u5305\u62ec\u4e00\u7cfb\u5217\u7684\u9ed8\u8ba4\u5c5e\u6027\u7684\u8d4b\u503c,\u63a5\u4e0b\u6765,\u5f00\u59cb\u771f\u6b63\u7684\u6587\u6863\u89e3\u6790\u64cd\u4f5c","source":"@site/docs/action/springfox/springfox9.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox9","permalink":"/docs/action/springfox/springfox9","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox8"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox10"}},{"unversionedId":"action/springmvc","id":"action/springmvc","title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","description":"\u5982\u679c\u4f60\u662fSpring MVC\u9879\u76ee,\u60f3\u4f7f\u7528knife4j\u63d0\u4f9b\u7684\u589e\u5f3aui\u5305,\u4f7f\u7528\u65b9\u6cd5\u5f88\u7b80\u5355","source":"@site/docs/action/springmvc.md","sourceDirName":"action","slug":"/action/springmvc","permalink":"/docs/action/springmvc","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604832815,"formattedLastUpdatedAt":"2020\u5e7411\u67088\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","permalink":"/docs/action/mavenbom"},"next":{"title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springboot"}},{"unversionedId":"changelog/changelog-index","id":"changelog/changelog-index","title":"\u66f4\u65b0\u65e5\u5fd7","description":"Knife4j\u53d1\u7248\u672c\u65e5\u5fd7","source":"@site/docs/changelog/index.mdx","sourceDirName":"changelog","slug":"/changelog/","permalink":"/docs/changelog/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{"id":"changelog-index","title":"\u66f4\u65b0\u65e5\u5fd7","description":"Knife4j\u53d1\u7248\u672c\u65e5\u5fd7"},"sidebar":"changelog","next":{"title":"v4.0.0\u7248\u672c-2022/12/20","permalink":"/docs/changelog/x/4.0"}},{"unversionedId":"changelog/x/2017-04-19-swagger-bootstrap-ui-open","id":"changelog/x/2017-04-19-swagger-bootstrap-ui-open","title":"[v1.0-2017/04/19 \u5f00\u6e90]","description":"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90","source":"@site/docs/changelog/1.x/2017-04-19-swagger-bootstrap-ui-open.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-04-19-swagger-bootstrap-ui-open","permalink":"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},{"unversionedId":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","id":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","description":"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-04-27-swagger-bootstrap-ui-1.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},"next":{"title":"[v1.0-2017/04/19 \u5f00\u6e90]","permalink":"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open"}},{"unversionedId":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","id":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","description":"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-05-14-swagger-bootstrap-ui-1.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},"next":{"title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},{"unversionedId":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","id":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","description":"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-07-05-swagger-bootstrap-ui-1.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},"next":{"title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"}},{"unversionedId":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","id":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","description":"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-07-11-swagger-bootstrap-ui-1.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},"next":{"title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"}},{"unversionedId":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","id":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","description":"swagger-bootstrap-ui 1.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-09-01-swagger-bootstrap-ui-1.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"},"next":{"title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"}},{"unversionedId":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","id":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","description":"swagger-bootstrap-ui 1.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-09-06-swagger-bootstrap-ui-1.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"},"next":{"title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"}},{"unversionedId":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","id":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","description":"swagger-bootstrap-ui 1.7 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-12-18-swagger-bootstrap-ui-1.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"},"next":{"title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"}},{"unversionedId":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","id":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","description":"\u4e3b\u8981\u5305\u542b\u6587\u6863\u8bf4\u660e\u3001\u5728\u7ebf\u8c03\u8bd5\u4e24\u5927\u6838\u5fc3\u529f\u80fd","source":"@site/docs/changelog/1.x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"},"next":{"title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"}},{"unversionedId":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","id":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"},"next":{"title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"}},{"unversionedId":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","id":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","description":"swagger-bootstrap-ui 1.7.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"},"next":{"title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"}},{"unversionedId":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","id":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","description":"swagger-bootstrap-ui 1.7.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"},"next":{"title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"}},{"unversionedId":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","id":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","description":"swagger-bootstrap-ui 1.7.7 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"},"next":{"title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"}},{"unversionedId":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","id":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},"next":{"title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"}},{"unversionedId":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","id":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},"next":{"title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"}},{"unversionedId":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","id":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","description":"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},"next":{"title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"}},{"unversionedId":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","id":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","description":"swagger-bootstrap-ui 1.8.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"},"next":{"title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"}},{"unversionedId":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","id":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","description":"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},"next":{"title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"}},{"unversionedId":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","id":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","description":"swagger-bootstrap-ui 1.8.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"},"next":{"title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"}},{"unversionedId":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","id":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","description":"swagger-bootstrap-ui 1.8.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"},"next":{"title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"}},{"unversionedId":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","id":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","description":"swagger-bootstrap-ui 1.8.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"},"next":{"title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"}},{"unversionedId":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","id":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","description":"swagger-bootstrap-ui 1.8.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"},"next":{"title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"}},{"unversionedId":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","id":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","description":"Swagger-Bootstrap-Ui 1.8.7 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"},"next":{"title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"}},{"unversionedId":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","id":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","description":"Swagger-Bootstrap-Ui 1.8.8 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"},"next":{"title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"}},{"unversionedId":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","id":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","description":"Swagger-Bootstrap-Ui 1.8.9 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"},"next":{"title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"}},{"unversionedId":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","id":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","description":"SwaggerBootstrapUi 1.9.0 \u53d1\u5e03\u4e86\u3002SwaggerBootstrapUi\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"},"next":{"title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"}},{"unversionedId":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","id":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","description":"swagger-bootstrap-ui 1.9.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"},"next":{"title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"}},{"unversionedId":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","id":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","description":"swagger-bootstrap-ui 1.9.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"},"next":{"title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"}},{"unversionedId":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","id":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","description":"swagger-bootstrap-ui 1.9.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"},"next":{"title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"}},{"unversionedId":"changelog/x/2019-05-20-knife4j-admin-1.0-issue","id":"changelog/x/2019-05-20-knife4j-admin-1.0-issue","title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","description":"knife4j-admin\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027,\u7ed3\u5408knife4j\u5bf9Swagger\u7684\u6587\u6863\u8fdb\u884c\u52a8\u6001\u805a\u5408\u7684\u7ba1\u7406\u5e73\u53f0","source":"@site/docs/changelog/1.x/2019-05-20-knife4j-admin-1.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-05-20-knife4j-admin-1.0-issue","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"},"next":{"title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"}},{"unversionedId":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","id":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","description":"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},"next":{"title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"}},{"unversionedId":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","id":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","description":"swagger-bootstrap-ui 1.9.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"},"next":{"title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"}},{"unversionedId":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","id":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","description":"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"},"next":{"title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"}},{"unversionedId":"changelog/x/2019-12-16-knife4j-2.0.0-issue","id":"changelog/x/2019-12-16-knife4j-2.0.0-issue","title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64.","source":"@site/docs/changelog/2.x/2019-12-16-knife4j-2.0.0-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2019-12-16-knife4j-2.0.0-issue","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"},"next":{"title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"}},{"unversionedId":"changelog/x/2019-12-23-knife4j-2.0.1-issue","id":"changelog/x/2019-12-23-knife4j-2.0.1-issue","title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2019-12-23-knife4j-2.0.1-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2019-12-23-knife4j-2.0.1-issue","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"},"next":{"title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"}},{"unversionedId":"changelog/x/2020-03-08-knife4j-2.0.2-issue","id":"changelog/x/2020-03-08-knife4j-2.0.2-issue","title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-03-08-knife4j-2.0.2-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-03-08-knife4j-2.0.2-issue","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"},"next":{"title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"}},{"unversionedId":"changelog/x/2020-05-24-knife4j-2.0.3-issue","id":"changelog/x/2020-05-24-knife4j-2.0.3-issue","title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-05-24-knife4j-2.0.3-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-05-24-knife4j-2.0.3-issue","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue"},"next":{"title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"}},{"unversionedId":"changelog/x/2020-06-28-knife4j-2.0.4-issue","id":"changelog/x/2020-06-28-knife4j-2.0.4-issue","title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-06-28-knife4j-2.0.4-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-06-28-knife4j-2.0.4-issue","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"},"next":{"title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"}},{"unversionedId":"changelog/x/2020-09-14-knife4j-2.0.5-issue","id":"changelog/x/2020-09-14-knife4j-2.0.5-issue","title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-09-14-knife4j-2.0.5-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-09-14-knife4j-2.0.5-issue","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue"},"next":{"title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue"}},{"unversionedId":"changelog/x/2020-10-26-knife4j-2.0.6-issue","id":"changelog/x/2020-10-26-knife4j-2.0.6-issue","title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-10-26-knife4j-2.0.6-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-10-26-knife4j-2.0.6-issue","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue"},"next":{"title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"}},{"unversionedId":"changelog/x/2020-11-02-knife4j-2.0.7-issue","id":"changelog/x/2020-11-02-knife4j-2.0.7-issue","title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-11-02-knife4j-2.0.7-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-11-02-knife4j-2.0.7-issue","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"},"next":{"title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue"}},{"unversionedId":"changelog/x/2020-11-22-knife4j-2.0.8-issue","id":"changelog/x/2020-11-22-knife4j-2.0.8-issue","title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-11-22-knife4j-2.0.8-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-11-22-knife4j-2.0.8-issue","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue"},"next":{"title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue"}},{"unversionedId":"changelog/x/2021-06-28-knife4j-2.0.9-issue","id":"changelog/x/2021-06-28-knife4j-2.0.9-issue","title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2021-06-28-knife4j-2.0.9-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2021-06-28-knife4j-2.0.9-issue","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.1.0\u7248\u672c-2023/03/23","permalink":"/docs/changelog/x/4.1"},"next":{"title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"}},{"unversionedId":"changelog/x/4.0","id":"changelog/x/4.0","title":"v4.0.0\u7248\u672c-2022/12/20","description":"Knife4j 4.0\u7248\u672c\u4eca\u5929\u6b63\u5f0f\u53d1\u5e03\u4e86\uff01 \ud83c\udf89\ud83c\udf89\ud83c\udf89","source":"@site/docs/changelog/4.x/4.0.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.0","permalink":"/docs/changelog/x/4.0","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"\u66f4\u65b0\u65e5\u5fd7","permalink":"/docs/changelog/"},"next":{"title":"v4.1.0\u7248\u672c-2023/03/23","permalink":"/docs/changelog/x/4.1"}},{"unversionedId":"changelog/x/4.1","id":"changelog/x/4.1","title":"v4.1.0\u7248\u672c-2023/03/23","description":"\u5927\u5bb6\u597d\uff0cKnife4j v4.1.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u4e24\u4e2a\u95ee\u9898\uff1a","source":"@site/docs/changelog/4.x/4.1.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.1","permalink":"/docs/changelog/x/4.1","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1680320647,"formattedLastUpdatedAt":"2023\u5e744\u67081\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.0.0\u7248\u672c-2022/12/20","permalink":"/docs/changelog/x/4.0"},"next":{"title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue"}},{"unversionedId":"community/apache","id":"community/apache","title":"Apache 2.0 \u8bb8\u53ef\u8bc1","description":"Knife4j\u662f\u5728Apache 2.0\u8bb8\u53ef\u4e0b\u53d1\u884c\u7684\u5f00\u6e90\u8f6f\u4ef6\u3002","source":"@site/docs/community/apache.md","sourceDirName":"community","slug":"/community/apache","permalink":"/docs/community/apache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u6e90\u4ee3\u7801","permalink":"/docs/community/sourcecode"},"next":{"title":"\u7248\u672c\u8bf4\u660e","permalink":"/docs/community/changelog"}},{"unversionedId":"community/changelog","id":"community/changelog","title":"\u7248\u672c\u8bf4\u660e","description":"\u5728\u66f4\u540d\u4e3aKnife4j\u4e4b\u524d,\u539f\u6765\u7684\u540d\u79f0\u662f\u53ebswagger-bootstrap-ui\uff0c\u8fd9\u662f\u4e24\u79cd\u4e0d\u4e00\u6837\u98ce\u683c\u7684Ui,\u5bf9\u6bd4\u60c5\u51b5\u5982\u4e0b\uff1a","source":"@site/docs/community/changelog.md","sourceDirName":"community","slug":"/community/changelog","permalink":"/docs/community/changelog","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"Apache 2.0 \u8bb8\u53ef\u8bc1","permalink":"/docs/community/apache"},"next":{"title":"\u8d5e\u52a9\u6211\u4eec","permalink":"/docs/community/donate"}},{"unversionedId":"community/community","id":"community/community","title":"\u793e\u533a","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/index.mdx","sourceDirName":"community","slug":"/community/","permalink":"/docs/community/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660916905,"formattedLastUpdatedAt":"2022\u5e748\u670819\u65e5","frontMatter":{"id":"community","title":"\u793e\u533a","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","permalink":"/docs/introduction/milestone"},"next":{"title":"\u83b7\u53d6\u5e2e\u52a9","permalink":"/docs/community/community-get-helps"}},{"unversionedId":"community/community-get-helps","id":"community/community-get-helps","title":"\u83b7\u53d6\u5e2e\u52a9","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/get_help.mdx","sourceDirName":"community","slug":"/community/community-get-helps","permalink":"/docs/community/community-get-helps","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"community-get-helps","title":"\u83b7\u53d6\u5e2e\u52a9","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u793e\u533a","permalink":"/docs/community/"},"next":{"title":"\u6e90\u4ee3\u7801","permalink":"/docs/community/sourcecode"}},{"unversionedId":"community/contributing","id":"community/contributing","title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","description":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j","source":"@site/docs/community/contributing.mdx","sourceDirName":"community","slug":"/community/contributing","permalink":"/docs/community/contributing","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"contributing","title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","description":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},"sidebar":"docs","previous":{"title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","permalink":"/docs/community/joinus"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"}},{"unversionedId":"community/donate","id":"community/donate","title":"\u8d5e\u52a9\u6211\u4eec","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/donate.mdx","sourceDirName":"community","slug":"/community/donate","permalink":"/docs/community/donate","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"donate","title":"\u8d5e\u52a9\u6211\u4eec","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u7248\u672c\u8bf4\u660e","permalink":"/docs/community/changelog"},"next":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/community/simple-demo"}},{"unversionedId":"community/joinus","id":"community/joinus","title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","description":"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0eKnife4j\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684\u8d21\u732e\u6587\u6863\u3002","source":"@site/docs/community/joinus.md","sourceDirName":"community","slug":"/community/joinus","permalink":"/docs/community/joinus","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u5feb\u901f\u5f00\u59cb","permalink":"/docs/quick-start/"},"next":{"title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","permalink":"/docs/community/contributing"}},{"unversionedId":"community/simple-demo","id":"community/simple-demo","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/simple-demo.mdx","sourceDirName":"community","slug":"/community/simple-demo","permalink":"/docs/community/simple-demo","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678022183,"formattedLastUpdatedAt":"2023\u5e743\u67085\u65e5","frontMatter":{"id":"simple-demo","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u8d5e\u52a9\u6211\u4eec","permalink":"/docs/community/donate"},"next":{"title":"\u589e\u5f3a\u7279\u6027","permalink":"/docs/features/"}},{"unversionedId":"community/sourcecode","id":"community/sourcecode","title":"\u6e90\u4ee3\u7801","description":"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0ahttps://gitee.com/xiaoym/knife4j\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801","source":"@site/docs/community/sourcecode.md","sourceDirName":"community","slug":"/community/sourcecode","permalink":"/docs/community/sourcecode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u83b7\u53d6\u5e2e\u52a9","permalink":"/docs/community/community-get-helps"},"next":{"title":"Apache 2.0 \u8bb8\u53ef\u8bc1","permalink":"/docs/community/apache"}},{"unversionedId":"donate/index","id":"donate/index","title":"index","description":"","source":"@site/docs/donate/index.mdx","sourceDirName":"donate","slug":"/donate/","permalink":"/docs/donate/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"faq/faq-index","id":"faq/faq-index","title":"FAQ","description":"Knife4j FAQ","source":"@site/docs/faq/index.mdx","sourceDirName":"faq","slug":"/faq/","permalink":"/docs/faq/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{"id":"faq-index","title":"FAQ","description":"Knife4j FAQ"},"sidebar":"faq","next":{"title":"java.lang.NumberFormatException: For input string: \\"\\"","permalink":"/docs/faq/format-exception"}},{"unversionedId":"faq/format-exception","id":"faq/format-exception","title":"java.lang.NumberFormatException: For input string: \\"\\"","description":"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38java.lang.NumberFormatException \\"\\"","source":"@site/docs/faq/format-exception.md","sourceDirName":"faq","slug":"/faq/format-exception","permalink":"/docs/faq/format-exception","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"FAQ","permalink":"/docs/faq/"},"next":{"title":"FAQ","permalink":"/docs/faq/"}},{"unversionedId":"faq/knife4j-exception","id":"faq/knife4j-exception","title":"Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38","description":"\u5f88\u591a\u670b\u53cb\u5728\u96c6\u6210Knife4j\u6587\u6863\u7684\u65f6\u5019\u4f1a\u5f39\u51fa\u8be5\u5f02\u5e38,\u6548\u679c\u56fe\u5982\u4e0b:","source":"@site/docs/faq/knife4j-exception.md","sourceDirName":"faq","slug":"/faq/knife4j-exception","permalink":"/docs/faq/knife4j-exception","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"FAQ","permalink":"/docs/faq/"},"next":{"title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","permalink":"/docs/faq/md-format-error"}},{"unversionedId":"faq/md-format-error","id":"faq/md-format-error","title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","description":"\u5373\u4f7f\u6587\u6863\u683c\u5f0f\u9519\u4e71\uff0c\u4f46\u662f\u5728\u76f8\u5173markdown\u8f6c\u6362\u8f6f\u4ef6\u4e2d\u4f9d\u7136\u662f\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u7684\uff0c\u8be5\u529f\u80fd\u4f7f\u7528art-template\u6765\u6e32\u67d3\uff0c\u591a\u5c11\u4f1a\u51fa\u73b0\u4e00\u4e9b\u7a7a\u683c\u3001\u6362\u884c\u4e4b\u7c7b\u7684\u95ee\u9898","source":"@site/docs/faq/md-format-error.md","sourceDirName":"faq","slug":"/faq/md-format-error","permalink":"/docs/faq/md-format-error","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38","permalink":"/docs/faq/knife4j-exception"},"next":{"title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","permalink":"/docs/faq/sp-nmerror"}},{"unversionedId":"faq/sp-nmerror","id":"faq/sp-nmerror","title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","description":"\u5f88\u591a\u670b\u53cb\u5728\u5c06SpringFox-Swagger\u7248\u672c\u5347\u7ea7\u52302.9.2\u7248\u672c\u540e,\u8fd0\u884c\u7a0b\u5e8f\u90fd\u4f1a\u51fa\u73b0\u5982\u4e0b\u9519\u8bef\uff1a","source":"@site/docs/faq/sp-nmerror.md","sourceDirName":"faq","slug":"/faq/sp-nmerror","permalink":"/docs/faq/sp-nmerror","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","permalink":"/docs/faq/md-format-error"},"next":{"title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","permalink":"/docs/faq/springboot-404"}},{"unversionedId":"faq/springboot-404","id":"faq/springboot-404","title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","description":"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5e76\u4e0d\u9700\u8981\u6dfb\u52a0\u6b64\u914d\u7f6e\u5373\u53ef\u8bbf\u95ee","source":"@site/docs/faq/springboot-404.md","sourceDirName":"faq","slug":"/faq/springboot-404","permalink":"/docs/faq/springboot-404","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","permalink":"/docs/faq/sp-nmerror"},"next":{"title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","permalink":"/docs/faq/springmvc-404"}},{"unversionedId":"faq/springmvc-404","id":"faq/springmvc-404","title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","description":"SpringMvc\u4e2d\u6587\u6863\u51fa\u73b0\u5f02\u5e38\u4e00\u822c\u52062\u79cd\u60c5\u51b5\uff1a","source":"@site/docs/faq/springmvc-404.md","sourceDirName":"faq","slug":"/faq/springmvc-404","permalink":"/docs/faq/springmvc-404","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","permalink":"/docs/faq/springboot-404"},"next":{"title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","permalink":"/docs/faq/springmvc-notshow"}},{"unversionedId":"faq/springmvc-notshow","id":"faq/springmvc-notshow","title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","description":"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e","source":"@site/docs/faq/springmvc-notshow.md","sourceDirName":"faq","slug":"/faq/springmvc-notshow","permalink":"/docs/faq/springmvc-notshow","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","permalink":"/docs/faq/springmvc-404"},"next":{"title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","permalink":"/docs/faq/swagger-des-not-found"}},{"unversionedId":"faq/swagger-des-not-found","id":"faq/swagger-des-not-found","title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","description":"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca.","source":"@site/docs/faq/swagger-des-not-found.md","sourceDirName":"faq","slug":"/faq/swagger-des-not-found","permalink":"/docs/faq/swagger-des-not-found","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","permalink":"/docs/faq/springmvc-notshow"},"next":{"title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","permalink":"/docs/faq/swaggerResourceInvalid"}},{"unversionedId":"faq/swaggerResourceInvalid","id":"faq/swaggerResourceInvalid","title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","description":"\u5728swagger-bootstrap-ui\u76841.9.X\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c","source":"@site/docs/faq/swaggerResourceInvalid.md","sourceDirName":"faq","slug":"/faq/swaggerResourceInvalid","permalink":"/docs/faq/swaggerResourceInvalid","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","permalink":"/docs/faq/swagger-des-not-found"},"next":{"title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","permalink":"/docs/faq/upload-error"}},{"unversionedId":"faq/upload-error","id":"faq/upload-error","title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","description":"\u5728\u4f7f\u7528SwaggerBootstrapUi\u7684\u670b\u53cb\u7ecf\u5e38\u8be2\u95ee\u7684\u4e00\u4e2a\u95ee\u9898,\u4e3a\u4ec0\u4e48\u4e0a\u4f20\u53c2\u6570file\u5bf9\u8c61\u4e0d\u663e\u793afile\u6587\u672c\u57df,\u800c\u662f\u666e\u901a\u6587\u672c,\u5982\u4e0b\u56fe\uff1a","source":"@site/docs/faq/upload-error.md","sourceDirName":"faq","slug":"/faq/upload-error","permalink":"/docs/faq/upload-error","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","permalink":"/docs/faq/swaggerResourceInvalid"},"next":{"title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","permalink":"/docs/faq/v4/knife4j-base64-response"}},{"unversionedId":"faq/v4/knife4j-base64-response","id":"faq/v4/knife4j-base64-response","title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","description":"Knife4j \u57284.1.0\u7248\u672c\u5347\u7ea7\u4e86springdoc\u7684\u7248\u672c\u53f7\uff0c\u5bfc\u81f4\u5f88\u591a\u5f00\u53d1\u8005\u53cd\u9988\u4f1a\u51fa\u73b0\u521d\u59cb\u5316OpenAPI\u63a5\u53e3\u54cd\u5e94\u7684\u662fBase64\u7f16\u7801\u7684\u60c5\u51b5.\u5bfc\u81f4\u5728Knife4j \u754c\u9762\u521d\u59cb\u5316\u63a5\u53e3\u5931\u8d25\u3002","source":"@site/docs/faq/v4/knife4j-base64-response.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-base64-response","permalink":"/docs/faq/v4/knife4j-base64-response","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","permalink":"/docs/faq/upload-error"},"next":{"title":"No OpenAPI resource found for group: swagger-config","permalink":"/docs/faq/v4/knife4j-no-openapi"}},{"unversionedId":"faq/v4/knife4j-no-openapi","id":"faq/v4/knife4j-no-openapi","title":"No OpenAPI resource found for group: swagger-config","description":"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7\u5230Knife4j 4.0\u7684OpenAPI3\u7248\u672c\u4e2d\uff0c\u4f1a\u51fa\u73b0\u8be5\u9519\u8bef\u4fe1\u606f,\u5bfc\u81f4\u9875\u9762\u52a0\u8f7d\u5931\u8d25","source":"@site/docs/faq/v4/knife4j-no-openapi.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-no-openapi","permalink":"/docs/faq/v4/knife4j-no-openapi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677160565,"formattedLastUpdatedAt":"2023\u5e742\u670823\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","permalink":"/docs/faq/v4/knife4j-base64-response"},"next":{"title":"Knife4j v4.0\u7248\u672c\u9488\u5bf9\u53c2\u6570\u89e3\u6790ParameterObject\u7684\u95ee\u9898\u8bf4\u660e","permalink":"/docs/faq/v4/knife4j-parameterobject-flat-param"}},{"unversionedId":"faq/v4/knife4j-parameterobject-flat-param","id":"faq/v4/knife4j-parameterobject-flat-param","title":"Knife4j v4.0\u7248\u672c\u9488\u5bf9\u53c2\u6570\u89e3\u6790ParameterObject\u7684\u95ee\u9898\u8bf4\u660e","description":"\u8be5\u6587\u6863\u4ec5\u9650Knife4j v4.0.0\u7248\u672c\u4f5c\u4e3a\u4e00\u79cd\u89e3\u51b3\u65b9\u6848\uff0c\u5728\u672a\u6765Knife4j v4.1.0\u7248\u672c\u4e2d\uff0c\u4f1a\u5c06springdoc-openapi\u7684\u57fa\u7840\u7248\u672c\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\uff0c\u8fd9\u6837\u5f00\u53d1\u8005\u5c31\u4e0d\u7528\u5728maven\u4e2d\u4f7f\u7528exclusions\u8fdb\u884c\u6392\u9664\u4f4e\u7248\u672c\u518d\u91cd\u65b0\u5f15\u5165\u4e86","source":"@site/docs/faq/v4/knife4j-parameterobject-flat-param.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-parameterobject-flat-param","permalink":"/docs/faq/v4/knife4j-parameterobject-flat-param","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677243515,"formattedLastUpdatedAt":"2023\u5e742\u670824\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"No OpenAPI resource found for group: swagger-config","permalink":"/docs/faq/v4/knife4j-no-openapi"}},{"unversionedId":"features/accessControl","id":"features/accessControl","title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/accessControl.md","sourceDirName":"features","slug":"/features/accessControl","permalink":"/docs/features/accessControl","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","permalink":"/docs/features/selfdocument"},"next":{"title":"3.6 \u63a5\u53e3\u6392\u5e8f","permalink":"/docs/features/apiSort"}},{"unversionedId":"features/afterScript","id":"features/afterScript","title":"3.18 afterScript","description":"\u8f93\u5165\u56fe\u7247\u8bf4\u660e","source":"@site/docs/features/afterScript.md","sourceDirName":"features","slug":"/features/afterScript","permalink":"/docs/features/afterScript","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.17 \u81ea\u5b9a\u4e49Host","permalink":"/docs/features/host"},"next":{"title":"3.19 OAuth2","permalink":"/docs/features/oauth2"}},{"unversionedId":"features/apiSort","id":"features/apiSort","title":"3.6 \u63a5\u53e3\u6392\u5e8f","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/apiSort.md","sourceDirName":"features","slug":"/features/apiSort","permalink":"/docs/features/apiSort","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","permalink":"/docs/features/accessControl"},"next":{"title":"3.7 \u5206\u7ec4\u6392\u5e8f","permalink":"/docs/features/tagSort"}},{"unversionedId":"features/author","id":"features/author","title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/author.md","sourceDirName":"features","slug":"/features/author","permalink":"/docs/features/author","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.2 i18n\u56fd\u9645\u5316","permalink":"/docs/features/i18n"},"next":{"title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","permalink":"/docs/features/selfdocument"}},{"unversionedId":"features/clearCache","id":"features/clearCache","title":"3.14 \u6e05\u9664\u7f13\u5b58","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/clearCache.md","sourceDirName":"features","slug":"/features/clearCache","permalink":"/docs/features/clearCache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.13 \u641c\u7d22API\u63a5\u53e3","permalink":"/docs/features/search"},"next":{"title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicRequestDescription"}},{"unversionedId":"features/customFooter","id":"features/customFooter","title":"3.24 \u81ea\u5b9a\u4e49Footer","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/customFooter.md","sourceDirName":"features","slug":"/features/customFooter","permalink":"/docs/features/customFooter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","permalink":"/docs/features/customHome"},"next":{"title":"3.25 JSR303","permalink":"/docs/features/jsr303"}},{"unversionedId":"features/customHome","id":"features/customHome","title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/customHome.md","sourceDirName":"features","slug":"/features/customHome","permalink":"/docs/features/customHome","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","permalink":"/docs/features/swaggermodels"},"next":{"title":"3.24 \u81ea\u5b9a\u4e49Footer","permalink":"/docs/features/customFooter"}},{"unversionedId":"features/dynamicRequestDescription","id":"features/dynamicRequestDescription","title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/dynamicRequestDescription.md","sourceDirName":"features","slug":"/features/dynamicRequestDescription","permalink":"/docs/features/dynamicRequestDescription","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.14 \u6e05\u9664\u7f13\u5b58","permalink":"/docs/features/clearCache"},"next":{"title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicResponseDescription"}},{"unversionedId":"features/dynamicRequestParameter","id":"features/dynamicRequestParameter","title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/dynamicRequestParameter.md","sourceDirName":"features","slug":"/features/dynamicRequestParameter","permalink":"/docs/features/dynamicRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","permalink":"/docs/features/requestCache"},"next":{"title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","permalink":"/docs/features/exportDocument"}},{"unversionedId":"features/dynamicResponseDescription","id":"features/dynamicResponseDescription","title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/dynamicResponseDescription.md","sourceDirName":"features","slug":"/features/dynamicResponseDescription","permalink":"/docs/features/dynamicResponseDescription","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicRequestDescription"},"next":{"title":"3.17 \u81ea\u5b9a\u4e49Host","permalink":"/docs/features/host"}},{"unversionedId":"features/enhance","id":"features/enhance","title":"3.1 \u589e\u5f3a\u6a21\u5f0f","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/features/enhance.mdx","sourceDirName":"features","slug":"/features/enhance","permalink":"/docs/features/enhance","draft":false,"tags":[],"version":"current","lastUpdatedBy":"zhanghaicheng","lastUpdatedAt":1673322047,"formattedLastUpdatedAt":"2023\u5e741\u670810\u65e5","frontMatter":{"id":"enhance","title":"3.1 \u589e\u5f3a\u6a21\u5f0f","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u589e\u5f3a\u7279\u6027","permalink":"/docs/features/"},"next":{"title":"3.2 i18n\u56fd\u9645\u5316","permalink":"/docs/features/i18n"}},{"unversionedId":"features/exportDocument","id":"features/exportDocument","title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(Typora)\u8fdb\u884c\u5bfc\u51fa","source":"@site/docs/features/exportDocument.md","sourceDirName":"features","slug":"/features/exportDocument","permalink":"/docs/features/exportDocument","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678369652,"formattedLastUpdatedAt":"2023\u5e743\u67089\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/dynamicRequestParameter"},"next":{"title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/filterRequestParameter"}},{"unversionedId":"features/features","id":"features/features","title":"\u589e\u5f3a\u7279\u6027","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/features/index.mdx","sourceDirName":"features","slug":"/features/","permalink":"/docs/features/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"features","title":"\u589e\u5f3a\u7279\u6027","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/community/simple-demo"},"next":{"title":"3.1 \u589e\u5f3a\u6a21\u5f0f","permalink":"/docs/features/enhance"}},{"unversionedId":"features/filterRequestParameter","id":"features/filterRequestParameter","title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/filterRequestParameter.md","sourceDirName":"features","slug":"/features/filterRequestParameter","permalink":"/docs/features/filterRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","permalink":"/docs/features/exportDocument"},"next":{"title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/includeRequestParameter"}},{"unversionedId":"features/forbidDebug","id":"features/forbidDebug","title":"3.26 \u7981\u7528\u8c03\u8bd5","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidDebug.md","sourceDirName":"features","slug":"/features/forbidDebug","permalink":"/docs/features/forbidDebug","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.25 JSR303","permalink":"/docs/features/jsr303"},"next":{"title":"3.27 \u7981\u7528\u641c\u7d22\u6846","permalink":"/docs/features/forbidSearch"}},{"unversionedId":"features/forbidOpenApi","id":"features/forbidOpenApi","title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidOpenApi.md","sourceDirName":"features","slug":"/features/forbidOpenApi","permalink":"/docs/features/forbidOpenApi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.27 \u7981\u7528\u641c\u7d22\u6846","permalink":"/docs/features/forbidSearch"},"next":{"title":"3.29 \u7248\u672c\u63a7\u5236","permalink":"/docs/features/gitVersion"}},{"unversionedId":"features/forbidSearch","id":"features/forbidSearch","title":"3.27 \u7981\u7528\u641c\u7d22\u6846","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidSearch.md","sourceDirName":"features","slug":"/features/forbidSearch","permalink":"/docs/features/forbidSearch","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.26 \u7981\u7528\u8c03\u8bd5","permalink":"/docs/features/forbidDebug"},"next":{"title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","permalink":"/docs/features/forbidOpenApi"}},{"unversionedId":"features/gitVersion","id":"features/gitVersion","title":"3.29 \u7248\u672c\u63a7\u5236","description":"knife4j \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a","source":"@site/docs/features/gitVersion.md","sourceDirName":"features","slug":"/features/gitVersion","permalink":"/docs/features/gitVersion","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","permalink":"/docs/features/forbidOpenApi"},"next":{"title":"\u7248\u672c\u5347\u7ea7","permalink":"/docs/upgrading"}},{"unversionedId":"features/globalParameter","id":"features/globalParameter","title":"3.21 \u5168\u5c40\u53c2\u6570","description":"Knife4j\u63d0\u4f9b\u57fa\u4e8eUI\u4e34\u65f6\u8bbe\u7f6e\u5168\u5c40\u53c2\u6570\u529f\u80fd,\u4f8b\u5982\u540e\u53f0\u5168\u5c40token\u53c2\u6570\u7b49.\u63d0\u4f9b\u8be5\u529f\u80fd\u4e3b\u8981\u662f\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u8c03\u8bd5","source":"@site/docs/features/globalParameter.md","sourceDirName":"features","slug":"/features/globalParameter","permalink":"/docs/features/globalParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.20 \u5bfc\u51faPostman","permalink":"/docs/features/postman"},"next":{"title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","permalink":"/docs/features/swaggermodels"}},{"unversionedId":"features/host","id":"features/host","title":"3.17 \u81ea\u5b9a\u4e49Host","description":"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5.","source":"@site/docs/features/host.md","sourceDirName":"features","slug":"/features/host","permalink":"/docs/features/host","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicResponseDescription"},"next":{"title":"3.18 afterScript","permalink":"/docs/features/afterScript"}},{"unversionedId":"features/i18n","id":"features/i18n","title":"3.2 i18n\u56fd\u9645\u5316","description":"\u5728Knife4j 2.0.3\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587","source":"@site/docs/features/i18n.md","sourceDirName":"features","slug":"/features/i18n","permalink":"/docs/features/i18n","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.1 \u589e\u5f3a\u6a21\u5f0f","permalink":"/docs/features/enhance"},"next":{"title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","permalink":"/docs/features/author"}},{"unversionedId":"features/includeRequestParameter","id":"features/includeRequestParameter","title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/includeRequestParameter.md","sourceDirName":"features","slug":"/features/includeRequestParameter","permalink":"/docs/features/includeRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/filterRequestParameter"},"next":{"title":"3.13 \u641c\u7d22API\u63a5\u53e3","permalink":"/docs/features/search"}},{"unversionedId":"features/jsr303","id":"features/jsr303","title":"3.25 JSR303","description":"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b","source":"@site/docs/features/jsr303.md","sourceDirName":"features","slug":"/features/jsr303","permalink":"/docs/features/jsr303","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.24 \u81ea\u5b9a\u4e49Footer","permalink":"/docs/features/customFooter"},"next":{"title":"3.26 \u7981\u7528\u8c03\u8bd5","permalink":"/docs/features/forbidDebug"}},{"unversionedId":"features/oauth2","id":"features/oauth2","title":"3.19 OAuth2","description":"Knife4j\u63d0\u4f9b\u7684OAuth2\u8ba4\u8bc1\u529f\u80fd\u76f8\u5bf9\u4e8e\u539f\u751fSwaggerUi\u6765\u8bf4\u4f7f\u7528\u8d77\u6765\u66f4\u52a0\u65b9\u4fbf,\u56e0\u6b64\u4e5f\u5f52\u4e3a\u589e\u5f3a\u5c5e\u6027\u4e00\u7c7b\u3002\u81f3\u5c11\u4ece\u4ea4\u4e92\u4e0a\u800c\u8a00\u3002","source":"@site/docs/features/oauth2.md","sourceDirName":"features","slug":"/features/oauth2","permalink":"/docs/features/oauth2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.18 afterScript","permalink":"/docs/features/afterScript"},"next":{"title":"3.20 \u5bfc\u51faPostman","permalink":"/docs/features/postman"}},{"unversionedId":"features/postman","id":"features/postman","title":"3.20 \u5bfc\u51faPostman","description":"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684\u6587\u6863\u548c\u8c03\u8bd5\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86Open\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a","source":"@site/docs/features/postman.md","sourceDirName":"features","slug":"/features/postman","permalink":"/docs/features/postman","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.19 OAuth2","permalink":"/docs/features/oauth2"},"next":{"title":"3.21 \u5168\u5c40\u53c2\u6570","permalink":"/docs/features/globalParameter"}},{"unversionedId":"features/requestCache","id":"features/requestCache","title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","description":"\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b,\u5728\u63a5\u53e3\u8c03\u8bd5\u7684\u60c5\u51b5\u4e0b,Knifetj\u5bf9\u4e8e\u63a5\u53e3\u7684\u8bf7\u6c42\u53c2\u6570\u90fd\u4f1a\u7f13\u5b58\u8d77\u6765\uff0c\u8be5\u914d\u7f6e\u53ef\u4ee5\u5728\u524d\u7aef\u754c\u9762\u4e2d\u7684\u4e2a\u6027\u5316\u8bbe\u7f6e\u4e2d\u770b\u5230,\u5982\u4e0b\u56fe\uff1a","source":"@site/docs/features/requestCache.md","sourceDirName":"features","slug":"/features/requestCache","permalink":"/docs/features/requestCache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.7 \u5206\u7ec4\u6392\u5e8f","permalink":"/docs/features/tagSort"},"next":{"title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/dynamicRequestParameter"}},{"unversionedId":"features/search","id":"features/search","title":"3.13 \u641c\u7d22API\u63a5\u53e3","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/search.md","sourceDirName":"features","slug":"/features/search","permalink":"/docs/features/search","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/includeRequestParameter"},"next":{"title":"3.14 \u6e05\u9664\u7f13\u5b58","permalink":"/docs/features/clearCache"}},{"unversionedId":"features/selfdocument","id":"features/selfdocument","title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/selfdocument.md","sourceDirName":"features","slug":"/features/selfdocument","permalink":"/docs/features/selfdocument","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","permalink":"/docs/features/author"},"next":{"title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","permalink":"/docs/features/accessControl"}},{"unversionedId":"features/springSecurity","id":"features/springSecurity","title":"3.30 Spring Security\u6ce8\u89e3","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb","source":"@site/docs/features/springSecurity.md","sourceDirName":"features","slug":"/features/springSecurity","permalink":"/docs/features/springSecurity","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u5c0f\u9b4f,\u5c0f\u9b4f,\u6211\u4eec\u8981\u53bb\u54ea\u91cc\u5440","lastUpdatedAt":1672196438,"formattedLastUpdatedAt":"2022\u5e7412\u670828\u65e5","frontMatter":{}},{"unversionedId":"features/swaggermodels","id":"features/swaggermodels","title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/swaggermodels.md","sourceDirName":"features","slug":"/features/swaggermodels","permalink":"/docs/features/swaggermodels","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.21 \u5168\u5c40\u53c2\u6570","permalink":"/docs/features/globalParameter"},"next":{"title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","permalink":"/docs/features/customHome"}},{"unversionedId":"features/tagSort","id":"features/tagSort","title":"3.7 \u5206\u7ec4\u6392\u5e8f","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/tagSort.md","sourceDirName":"features","slug":"/features/tagSort","permalink":"/docs/features/tagSort","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.6 \u63a5\u53e3\u6392\u5e8f","permalink":"/docs/features/apiSort"},"next":{"title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","permalink":"/docs/features/requestCache"}},{"unversionedId":"introduction/gvp","id":"introduction/gvp","title":"GVP\u7533\u8bf7","description":"Knife4j\u57282020\u5e743\u670824\u65e5\u6536\u5230\u7801\u4e91\u7684\u5b98\u65b9\u90ae\u4ef6,\u5ba1\u6838\u901a\u8fc7,\u6210\u4e3a\u7801\u4e91\u7684GVP(\u7801\u4e91\u6700\u6709\u4ef7\u503c\u5f00\u6e90\u9879\u76ee)\u9879\u76ee","source":"@site/docs/introduction/gvp.md","sourceDirName":"introduction","slug":"/introduction/gvp","permalink":"/docs/introduction/gvp","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u754c\u9762\u8d4f\u9274","permalink":"/docs/introduction/ui"},"next":{"title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","permalink":"/docs/introduction/milestone"}},{"unversionedId":"introduction/introduction-background","id":"introduction/introduction-background","title":"\u9879\u76ee\u80cc\u666f","description":"Knife4j\u53d1\u5c55\u80cc\u666f","source":"@site/docs/introduction/background.mdx","sourceDirName":"introduction","slug":"/introduction/introduction-background","permalink":"/docs/introduction/introduction-background","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"introduction-background","title":"\u9879\u76ee\u80cc\u666f","description":"Knife4j\u53d1\u5c55\u80cc\u666f"},"sidebar":"docs","previous":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"},"next":{"title":"\u652f\u6301\u7528\u6237","permalink":"/docs/introduction/support"}},{"unversionedId":"introduction/introduction-index","id":"introduction/introduction-index","title":"\u4ecb\u7ecd","description":"Knife4j\u7b80\u4ecb","source":"@site/docs/introduction/index.mdx","sourceDirName":"introduction","slug":"/introduction/","permalink":"/docs/introduction/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"introduction-index","title":"\u4ecb\u7ecd","description":"Knife4j\u7b80\u4ecb"},"sidebar":"docs","previous":{"title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","permalink":"/docs/community/contributing"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"}},{"unversionedId":"introduction/milestone","id":"introduction/milestone","title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","description":"Knife4j\u7b80\u4ecb","source":"@site/docs/introduction/milestone.mdx","sourceDirName":"introduction","slug":"/introduction/milestone","permalink":"/docs/introduction/milestone","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"milestone","title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","description":"Knife4j\u7b80\u4ecb"},"sidebar":"docs","previous":{"title":"GVP\u7533\u8bf7","permalink":"/docs/introduction/gvp"},"next":{"title":"\u793e\u533a","permalink":"/docs/community/"}},{"unversionedId":"introduction/support","id":"introduction/support","title":"\u652f\u6301\u7528\u6237","description":"\u76ee\u524d\u4e3b\u8981\u652f\u6301\u4ee5Java\u5f00\u53d1\u4e3a\u4e3b,\u5e76\u4e14\u662f\u4f9d\u8d56\u4e8e\u5927\u73af\u5883\u4e0b\u4f7f\u7528\u7684Spring MVC\u3001Spring Boot\u3001Spring Cloud\u6846\u67b6.","source":"@site/docs/introduction/support.md","sourceDirName":"introduction","slug":"/introduction/support","permalink":"/docs/introduction/support","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u9879\u76ee\u80cc\u666f","permalink":"/docs/introduction/introduction-background"},"next":{"title":"\u754c\u9762\u8d4f\u9274","permalink":"/docs/introduction/ui"}},{"unversionedId":"introduction/ui","id":"introduction/ui","title":"\u754c\u9762\u8d4f\u9274","description":"Knife4j\u91c7\u7528Vue+And Design Vue\u7ec4\u4ef6\u91cd\u5199,\u76f8\u5173\u529f\u80fd\u754c\u9762\u5982\u4e0b,\u4f9b\u5927\u5bb6\u8d4f\u9274\uff1a","source":"@site/docs/introduction/ui.md","sourceDirName":"introduction","slug":"/introduction/ui","permalink":"/docs/introduction/ui","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u652f\u6301\u7528\u6237","permalink":"/docs/introduction/support"},"next":{"title":"GVP\u7533\u8bf7","permalink":"/docs/introduction/gvp"}},{"unversionedId":"middleware-sources/aggregation-cloud","id":"middleware-sources/aggregation-cloud","title":"1.3 Cloud\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eCloud\u6a21\u5f0f\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-cloud.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-cloud","permalink":"/docs/middleware-sources/aggregation-cloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.2 Disk\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-disk"},"next":{"title":"1.4 Eureka\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-eureka"}},{"unversionedId":"middleware-sources/aggregation-disk","id":"middleware-sources/aggregation-disk","title":"1.2 Disk\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-disk.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-disk","permalink":"/docs/middleware-sources/aggregation-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"},"next":{"title":"1.3 Cloud\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-cloud"}},{"unversionedId":"middleware-sources/aggregation-eureka","id":"middleware-sources/aggregation-eureka","title":"1.4 Eureka\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-eureka.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-eureka","permalink":"/docs/middleware-sources/aggregation-eureka","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.3 Cloud\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-cloud"},"next":{"title":"1.5 Nacos\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-nacos"}},{"unversionedId":"middleware-sources/aggregation-introduction","id":"middleware-sources/aggregation-introduction","title":"1.1 \u4ecb\u7ecd","description":"1\u3001Knife4jAggregation\u662f\u57fa\u4e8eServlet\u4f53\u7cfb\u7684Filter\u62e6\u622a\u6280\u672f\u5b9e\u73b0\u7684\u805a\u5408\u4e0eHTTP\u8bf7\u6c42\u8f6c\u53d1\u670d\u52a1,\u65e2\u80fd\u9884\u89c8\u4e5f\u80fd\u72ec\u7acb\u8c03\u8bd5","source":"@site/docs/middleware-sources/aggregation-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-introduction","permalink":"/docs/middleware-sources/aggregation-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Spring Webflux\u96c6\u6210","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction"},"next":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"}},{"unversionedId":"middleware-sources/aggregation-nacos","id":"middleware-sources/aggregation-nacos","title":"1.5 Nacos\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-nacos.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-nacos","permalink":"/docs/middleware-sources/aggregation-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.4 Eureka\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-eureka"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"}},{"unversionedId":"middleware-sources/cloud-function","id":"middleware-sources/cloud-function","title":"3.2 \u529f\u80fd\u4ecb\u7ecd","description":"Knife4jCloud V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a","source":"@site/docs/middleware-sources/cloud-function.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-function","permalink":"/docs/middleware-sources/cloud-function","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-introduction","id":"middleware-sources/cloud-introduction","title":"3.1 \u4ecb\u7ecd","description":"Knife4jCloud\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8eSpring Boot 2.2.0.RELEASE+Mybatis 3.5\u8fdb\u884c\u5f00\u53d1.","source":"@site/docs/middleware-sources/cloud-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-introduction","permalink":"/docs/middleware-sources/cloud-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-openapi","id":"middleware-sources/cloud-openapi","title":"3.3 \u5f00\u653eAPI","description":"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0","source":"@site/docs/middleware-sources/cloud-openapi.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-openapi","permalink":"/docs/middleware-sources/cloud-openapi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-use","id":"middleware-sources/cloud-use","title":"3.4 \u4ea7\u54c1\u8bd5\u7528","description":"\u53ef\u4ee5\u8bbf\u95eehttp://cloud.xiaominfo.com\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!","source":"@site/docs/middleware-sources/cloud-use.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-use","permalink":"/docs/middleware-sources/cloud-use","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-install","id":"middleware-sources/desktop-install","title":"\u5b89\u88c5","description":"\u7531\u4e8e\u76ee\u524dKnife4jInsight\u662f\u4ee5Docker\u7684\u65b9\u5f0f\u63d0\u4f9b\u7684\u670d\u52a1\uff0c\u56e0\u6b64\u4f7f\u7528\u8005\u5728\u4f7f\u7528\u7684\u65f6\u5019\u6709\u4e9b\u4e8b\u9879\u8fd8\u662f\u9700\u8981\u6ce8\u610f\uff0c\u5426\u5219\u4f1a\u5bfc\u81f4\u4e00\u4e9b\u95ee\u9898\u53d1\u751f","source":"@site/docs/middleware-sources/desktop-install.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-install","permalink":"/docs/middleware-sources/desktop-install","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"},"next":{"title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/service-introduction"}},{"unversionedId":"middleware-sources/desktop-introduction","id":"middleware-sources/desktop-introduction","title":"\u4ecb\u7ecd","description":"1.0\u8001\u7248\u672c\u8bf7\u79fb\u6b65\u8001\u7684\u6587\u6863\u5730\u5740\u4ecb\u7ecd","source":"@site/docs/middleware-sources/desktop-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-introduction","permalink":"/docs/middleware-sources/desktop-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.5 Nacos\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-nacos"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"}},{"unversionedId":"middleware-sources/desktop-mode","id":"middleware-sources/desktop-mode","title":"\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","description":"","source":"@site/docs/middleware-sources/desktop-mode.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-mode","permalink":"/docs/middleware-sources/desktop-mode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-service-mode","id":"middleware-sources/desktop-service-mode","title":"\u670d\u52a1\u4e2d\u5fc3\u6a21\u5f0f","description":"","source":"@site/docs/middleware-sources/desktop-service-mode.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-service-mode","permalink":"/docs/middleware-sources/desktop-service-mode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-test","id":"middleware-sources/desktop-test","title":"2.4 \u6d4b\u8bd5\u573a\u666f","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/middleware-sources/desktop-test.mdx","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-test","permalink":"/docs/middleware-sources/desktop-test","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"desktop-test","title":"2.4 \u6d4b\u8bd5\u573a\u666f","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"}},{"unversionedId":"middleware-sources/desktop-use","id":"middleware-sources/desktop-use","title":"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f","description":"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Knife4jAggregationDesktop","source":"@site/docs/middleware-sources/desktop-use.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-use","permalink":"/docs/middleware-sources/desktop-use","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop/config-disk","id":"middleware-sources/desktop/config-disk","title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","description":"Disk\u672c\u5730\u78c1\u76d8\u7684\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f\u662f\u6700\u7b80\u5355\u7684\uff0c\u7528\u6237\u53ea\u9700\u8981\u5728\u672c\u5730\u78c1\u76d8\u5efa\u7acb\u4e00\u4e2a\u6570\u636e\u76ee\u5f55\u5373\u53ef\u3002","source":"@site/docs/middleware-sources/desktop/config-disk.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-disk","permalink":"/docs/middleware-sources/desktop/config-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677160565,"formattedLastUpdatedAt":"2023\u5e742\u670823\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/config-introduction"},"next":{"title":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-nacos"}},{"unversionedId":"middleware-sources/desktop/config-introduction","id":"middleware-sources/desktop/config-introduction","title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","description":"Insight\u7ec4\u4ef6\u81ea2.0\u7248\u672c\u5f00\u59cb\uff0c\u9488\u5bf9\u4f7f\u7528\u8005\u63d0\u7684\u5efa\u8bae\uff0c\u589e\u52a0\u4e86\u5c06\u539f\u6240\u6709\u805a\u5408\u7684\u914d\u7f6e\u6587\u4ef6\u4fe1\u606f\u5b58\u653e\u5230\u72ec\u7acb\u7684\u914d\u7f6e\u4e2d\u5fc3\u4e2d\u95f4\u4ef6\u4e0a\u7684\u529f\u80fd\u3002","source":"@site/docs/middleware-sources/desktop/config-introduction.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-introduction","permalink":"/docs/middleware-sources/desktop/config-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/service-introduction"},"next":{"title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-disk"}},{"unversionedId":"middleware-sources/desktop/config-nacos","id":"middleware-sources/desktop/config-nacos","title":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","description":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f\u5728\u4ee3\u8868\u8fd0\u884cInsight\u7ec4\u4ef6\u65f6\uff0c\u6240\u6709\u6570\u636e\u5168\u90e8\u6765\u6e90\u4e8eNacos\u914d\u7f6e\u4e2d\u5fc3\uff0c\u7531\u4e8eNacos\u63d0\u4f9b\u4e86\u53ef\u64cd\u4f5c\u7684Web\u754c\u9762\uff0c\u56e0\u6b64\u4f7f\u7528\u4e0a\u4e5f\u662f\u8f83\u65b9\u4fbf\u7684\u3002","source":"@site/docs/middleware-sources/desktop/config-nacos.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-nacos","permalink":"/docs/middleware-sources/desktop/config-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-disk"}},{"unversionedId":"middleware-sources/desktop/service-introduction","id":"middleware-sources/desktop/service-introduction","title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","description":"\u4e0d\u7ba1\u662f\u5355\u4f53\u67b6\u6784\u3001\u5fae\u670d\u52a1\u67b6\u6784\u7b49\uff0c\u6bcf\u4e00\u4e2a\u5b50\u670d\u52a1\u53ea\u8981\u96c6\u6210\u4e86OpenAPI\u6846\u67b6\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7Insight\u7ec4\u4ef6\u8fdb\u884c\u805a\u5408\uff0c\u8fd9\u548c\u8bed\u8a00\u65e0\u5173","source":"@site/docs/middleware-sources/desktop/service-introduction.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/service-introduction","permalink":"/docs/middleware-sources/desktop/service-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u5b89\u88c5","permalink":"/docs/middleware-sources/desktop-install"},"next":{"title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/config-introduction"}},{"unversionedId":"middleware-sources/knife4jAggregation","id":"middleware-sources/knife4jAggregation","title":"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea2.0.8\u7248\u672c\u5f00\u59cb\uff0cKnife4j","source":"@site/docs/middleware-sources/knife4jAggregation.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jAggregation","permalink":"/docs/middleware-sources/knife4jAggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/knife4jAggregationDesktop","id":"middleware-sources/knife4jAggregationDesktop","title":"4.3 Knife4jAggregationDesktop","description":"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01","source":"@site/docs/middleware-sources/knife4jAggregationDesktop.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jAggregationDesktop","permalink":"/docs/middleware-sources/knife4jAggregationDesktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/knife4jCloud","id":"middleware-sources/knife4jCloud","title":"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0","description":"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd","source":"@site/docs/middleware-sources/knife4jCloud.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jCloud","permalink":"/docs/middleware-sources/knife4jCloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/middle-index","id":"middleware-sources/middle-index","title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/middleware-sources/index.mdx","sourceDirName":"middleware-sources","slug":"/middleware-sources/","permalink":"/docs/middleware-sources/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"middle-index","title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"middleware-sources","next":{"title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"}},{"unversionedId":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction","id":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction","title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","description":"\u7b80\u4ecb","source":"@site/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.md","sourceDirName":"middleware-sources/spring-cloud-gateway","slug":"/middleware-sources/spring-cloud-gateway/spring-gateway-introduction","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1680398489,"formattedLastUpdatedAt":"2023\u5e744\u67082\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","permalink":"/docs/middleware-sources/"},"next":{"title":"Spring Webflux\u96c6\u6210","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction"}},{"unversionedId":"middleware-sources/spring-webflux/spring-webflux-introduction","id":"middleware-sources/spring-webflux/spring-webflux-introduction","title":"Spring Webflux\u96c6\u6210","description":"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd","source":"@site/docs/middleware-sources/spring-webflux/spring-webflux-introduction.mdx","sourceDirName":"middleware-sources/spring-webflux","slug":"/middleware-sources/spring-webflux/spring-webflux-introduction","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678022183,"formattedLastUpdatedAt":"2023\u5e743\u67085\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},"next":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"}},{"unversionedId":"middleware/knife4jAggregation","id":"middleware/knife4jAggregation","title":"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd","source":"@site/docs/middleware/knife4jAggregation.md","sourceDirName":"middleware","slug":"/middleware/knife4jAggregation","permalink":"/docs/middleware/knife4jAggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/knife4jAggregationDesktop","id":"middleware/knife4jAggregationDesktop","title":"4.3 Knife4jAggregationDesktop","description":"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01","source":"@site/docs/middleware/knife4jAggregationDesktop.md","sourceDirName":"middleware","slug":"/middleware/knife4jAggregationDesktop","permalink":"/docs/middleware/knife4jAggregationDesktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/knife4jCloud","id":"middleware/knife4jCloud","title":"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0","description":"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd","source":"@site/docs/middleware/knife4jCloud.md","sourceDirName":"middleware","slug":"/middleware/knife4jCloud","permalink":"/docs/middleware/knife4jCloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/middleware","id":"middleware/middleware","title":"\u751f\u6001\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/index.mdx","sourceDirName":"middleware","slug":"/middleware/","permalink":"/docs/middleware/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware","title":"\u751f\u6001\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"middleware/middleware-aggregation","id":"middleware/middleware-aggregation","title":"Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/aggregation.mdx","sourceDirName":"middleware","slug":"/middleware/middleware-aggregation","permalink":"/docs/middleware/middleware-aggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware-aggregation","title":"Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"middleware/middleware-desktop","id":"middleware/middleware-desktop","title":"Knife4jAggregationDesktop","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/desktop.mdx","sourceDirName":"middleware","slug":"/middleware/middleware-desktop","permalink":"/docs/middleware/middleware-desktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware-desktop","title":"Knife4jAggregationDesktop","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"oas/annotation-introduction","id":"oas/annotation-introduction","title":"\u8bf4\u660e","description":"","source":"@site/docs/oas/annotation-introduction.md","sourceDirName":"oas","slug":"/oas/annotation-introduction","permalink":"/docs/oas/annotation-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"OpenAPI3","permalink":"/docs/oas/openapi3"},"next":{"title":"Swagger2\u6ce8\u89e3","permalink":"/docs/oas/openapi2-annotation"}},{"unversionedId":"oas/oas-intro","id":"oas/oas-intro","title":"OAS\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/index.mdx","sourceDirName":"oas","slug":"/oas/","permalink":"/docs/oas/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"oas-intro","title":"OAS\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","next":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"}},{"unversionedId":"oas/oas-text","id":"oas/oas-text","title":"OAS\u7b80\u4ecb111111","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/test.mdx","sourceDirName":"oas","slug":"/oas/oas-text","permalink":"/docs/oas/oas-text","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"oas-text","title":"OAS\u7b80\u4ecb111111","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"}},{"unversionedId":"oas/openapi-spe","id":"oas/openapi-spe","title":"\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/openapi-spe.mdx","sourceDirName":"oas","slug":"/oas/openapi-spe","permalink":"/docs/oas/openapi-spe","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"openapi-spe","title":"\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","previous":{"title":"OAS\u7b80\u4ecb","permalink":"/docs/oas/"},"next":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"}},{"unversionedId":"oas/openapi2","id":"oas/openapi2","title":"Swagger2","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/openapi2.mdx","sourceDirName":"oas","slug":"/oas/openapi2","permalink":"/docs/oas/openapi2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"openapi2","title":"Swagger2","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","previous":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"},"next":{"title":"OpenAPI3","permalink":"/docs/oas/openapi3"}},{"unversionedId":"oas/openapi2-annotation","id":"oas/openapi2-annotation","title":"Swagger2\u6ce8\u89e3","description":"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a","source":"@site/docs/oas/openapi2-annotation.md","sourceDirName":"oas","slug":"/oas/openapi2-annotation","permalink":"/docs/oas/openapi2-annotation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"\u8bf4\u660e","permalink":"/docs/oas/annotation-introduction"},"next":{"title":"OpenAPI3\u6ce8\u89e3","permalink":"/docs/oas/openapi3-annotation"}},{"unversionedId":"oas/openapi3","id":"oas/openapi3","title":"OpenAPI3","description":"GitHub\u5728\u7ebf\u5730\u5740\uff1ahttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md","source":"@site/docs/oas/openapi3.md","sourceDirName":"oas","slug":"/oas/openapi3","permalink":"/docs/oas/openapi3","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"Swagger2","permalink":"/docs/oas/openapi2"},"next":{"title":"\u8bf4\u660e","permalink":"/docs/oas/annotation-introduction"}},{"unversionedId":"oas/openapi3-annotation","id":"oas/openapi3-annotation","title":"OpenAPI3\u6ce8\u89e3","description":"| Swagger3 | \u6ce8\u89e3\u8bf4\u660e |","source":"@site/docs/oas/openapi3-annotation.md","sourceDirName":"oas","slug":"/oas/openapi3-annotation","permalink":"/docs/oas/openapi3-annotation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u6687\u4eab","lastUpdatedAt":1672732934,"formattedLastUpdatedAt":"2023\u5e741\u67083\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"Swagger2\u6ce8\u89e3","permalink":"/docs/oas/openapi2-annotation"}},{"unversionedId":"oas/OpenAPI3-specification","id":"oas/OpenAPI3-specification","title":"OpenAPI \u89c4\u8303","description":"\u7248\u672c 3.0.3","source":"@site/docs/oas/OpenAPI3-specification.md","sourceDirName":"oas","slug":"/oas/OpenAPI3-specification","permalink":"/docs/oas/OpenAPI3-specification","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1671625843,"formattedLastUpdatedAt":"2022\u5e7412\u670821\u65e5","frontMatter":{}},{"unversionedId":"quick-start/quick-start","id":"quick-start/quick-start","title":"\u5feb\u901f\u5f00\u59cb","description":"\u5feb\u901f\u5f00\u59cbKnife4j","source":"@site/docs/quick-start/index.mdx","sourceDirName":"quick-start","slug":"/quick-start/","permalink":"/docs/quick-start/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{"id":"quick-start","title":"\u5feb\u901f\u5f00\u59cb","description":"\u5feb\u901f\u5f00\u59cbKnife4j"},"sidebar":"docs","next":{"title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","permalink":"/docs/community/joinus"}},{"unversionedId":"solution/admin","id":"solution/admin","title":"\u7b80\u4ecb","description":"knife4j-admin\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027,\u7ed3\u5408knife4j\u5bf9Swagger\u7684\u6587\u6863\u8fdb\u884c\u52a8\u6001\u805a\u5408\u7684\u7ba1\u7406\u5e73\u53f0","source":"@site/docs/solution/admin.md","sourceDirName":"solution","slug":"/solution/admin","permalink":"/docs/solution/admin","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1671625807,"formattedLastUpdatedAt":"2022\u5e7412\u670821\u65e5","frontMatter":{}},{"unversionedId":"solution/extension","id":"solution/extension","title":"extension","description":"\u7b80\u4ecb","source":"@site/docs/solution/extension.md","sourceDirName":"solution","slug":"/solution/extension","permalink":"/docs/solution/extension","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/knife4j-admin-deploy","id":"solution/knife4j-admin-deploy","title":"\u90e8\u7f72\u624b\u518c","description":"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72","source":"@site/docs/solution/knife4j-admin-deploy.md","sourceDirName":"solution","slug":"/solution/knife4j-admin-deploy","permalink":"/docs/solution/knife4j-admin-deploy","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/knife4j-admin-download","id":"solution/knife4j-admin-download","title":"\u53d1\u884c\u7248","description":"v1.0\u7248\u672c","source":"@site/docs/solution/knife4j-admin-download.md","sourceDirName":"solution","slug":"/solution/knife4j-admin-download","permalink":"/docs/solution/knife4j-admin-download","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/README","id":"solution/README","title":"README","description":"\u8bf4\u660e","source":"@site/docs/solution/README.md","sourceDirName":"solution","slug":"/solution/","permalink":"/docs/solution/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/service","id":"solution/service","title":"\u7b80\u4ecb","description":"\u63d0\u4f9b\u4e00\u7cfb\u5217\u6839\u636eSwagger\u8d44\u6e90\u8f93\u51fa\u76ee\u6807\u8d44\u6e90\u7684\u5f00\u653e\u63a5\u53e3,\u4f5c\u8005\u6b63\u5728\u5f00\u53d1\u4e2d.....","source":"@site/docs/solution/service.md","sourceDirName":"solution","slug":"/solution/service","permalink":"/docs/solution/service","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front","id":"solution/ui-front","title":"\u8bf4\u660e","description":"swagger-bootstrap-ui\u81ea1.9.2\u7248\u672c\u540e,\u63d0\u4f9b\u4e86\u524d\u540e\u7aef\u5206\u79bb\u7684\u89e3\u51b3\u65b9\u6848,\u76ee\u524d\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\uff1a","source":"@site/docs/solution/ui-front.md","sourceDirName":"solution","slug":"/solution/ui-front","permalink":"/docs/solution/ui-front","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-gateway","id":"solution/ui-front-gateway","title":"\u57fa\u4e8eSpring Cloud Gateway","description":"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863","source":"@site/docs/solution/ui-front-gateway.md","sourceDirName":"solution","slug":"/solution/ui-front-gateway","permalink":"/docs/solution/ui-front-gateway","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-nginx","id":"solution/ui-front-nginx","title":"\u57fa\u4e8eNginx\u53cd\u5411\u4ee3\u7406","description":"\u5728\u9759\u6001\u90e8\u7f72\u9884\u89c8Swagger JSON\u7ae0\u8282\u4e2d\u6211\u4eec\u5df2\u7ecf\u8bb2\u8fc7\u5982\u4f55\u901a\u8fc7nginx\u6765\u90e8\u7f72\u9759\u6001\u6587\u4ef6\u9884\u89c8\u6587\u6863\uff0c\u4f46\u6b64\u65f6\u6211\u4eec\u4f1a\u53d1\u73b0\u5b58\u5728\u4e00\u4e2a\u95ee\u9898\uff0c\u5373\u65e0\u6cd5\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5\u3002","source":"@site/docs/solution/ui-front-nginx.md","sourceDirName":"solution","slug":"/solution/ui-front-nginx","permalink":"/docs/solution/ui-front-nginx","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-static","id":"solution/ui-front-static","title":"\u57fa\u4e8e\u9759\u6001Swagger JSON\u6587\u4ef6","description":"\u57fa\u4e8e\u9759\u6001Swagger JSON\u6587\u4ef6\u7684\u65b9\u5f0f\u9884\u89c8\u5f88\u7b80\u5355,\u9996\u5148\u9700\u8981\u4e00\u4e2aHTTP\u7684web\u670d\u52a1\u5373\u53ef","source":"@site/docs/solution/ui-front-static.md","sourceDirName":"solution","slug":"/solution/ui-front-static","permalink":"/docs/solution/ui-front-static","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604670995,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-zuul","id":"solution/ui-front-zuul","title":"\u57fa\u4e8eSpring Cloud Zuul\u65b9\u5f0f","description":"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?","source":"@site/docs/solution/ui-front-zuul.md","sourceDirName":"solution","slug":"/solution/ui-front-zuul","permalink":"/docs/solution/ui-front-zuul","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"upgrading/upgrading-to-v2","id":"upgrading/upgrading-to-v2","title":"\u5347\u7ea7\u5230v2.x\u7248\u672c","description":"\u5728\u66f4\u540d\u4e3aKnife4j\u4e4b\u524d,\u539f\u6765\u7684\u540d\u79f0\u662f\u53ebswagger-bootstrap-ui\uff0c\u8fd9\u662f\u4e24\u79cd\u4e0d\u4e00\u6837\u98ce\u683c\u7684Ui,\u5bf9\u6bd4\u60c5\u51b5\u5982\u4e0b\uff1a","source":"@site/docs/upgrading/upgrading_v2.x.md","sourceDirName":"upgrading","slug":"/upgrading/upgrading-to-v2","permalink":"/docs/upgrading/upgrading-to-v2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"upgrading-to-v2","title":"\u5347\u7ea7\u5230v2.x\u7248\u672c"},"sidebar":"docs","previous":{"title":"\u7248\u672c\u5347\u7ea7","permalink":"/docs/upgrading"},"next":{"title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c","permalink":"/docs/upgrading/upgrading-to-v4"}},{"unversionedId":"upgrading/upgrading-to-v4","id":"upgrading/upgrading-to-v4","title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c","description":"Knife4j 4.0.0\u7248\u672c\u76ee\u524d\u5df2\u7ecf\u53d1\u5e03!!","source":"@site/docs/upgrading/upgrading_v4.md","sourceDirName":"upgrading","slug":"/upgrading/upgrading-to-v4","permalink":"/docs/upgrading/upgrading-to-v4","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{"id":"upgrading-to-v4","title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c"},"sidebar":"docs","previous":{"title":"\u5347\u7ea7\u5230v2.x\u7248\u672c","permalink":"/docs/upgrading/upgrading-to-v2"}},{"unversionedId":"v4/plan","id":"v4/plan","title":"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212","description":"\u5173\u8054issues//gitee.com/xiaoym/knife4j/issues/I5LIQZ","source":"@site/docs/v4/index.mdx","sourceDirName":"v4","slug":"/v4/","permalink":"/docs/v4/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"plan","title":"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"}}],"drafts":[],"sidebars":{"docs":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"quick-start/quick-start"},{"type":"doc","id":"community/joinus"},{"type":"doc","id":"community/contributing"},{"type":"category","label":"\u5e8f\u7ae0","collapsed":true,"link":{"type":"doc","id":"introduction/introduction-index"},"items":[{"type":"doc","id":"introduction/introduction-index"},{"type":"doc","id":"introduction/introduction-background"},{"type":"doc","id":"introduction/support"},{"type":"doc","id":"introduction/ui"},{"type":"doc","id":"introduction/gvp"},{"type":"doc","id":"introduction/milestone"}],"collapsible":true},{"type":"category","label":"\u793e\u533a","collapsed":true,"link":{"type":"doc","id":"community/community"},"items":[{"type":"doc","id":"community/community-get-helps"},{"type":"doc","id":"community/sourcecode"},{"type":"doc","id":"community/apache"},{"type":"doc","id":"community/changelog"},{"type":"doc","id":"community/donate"},{"type":"doc","id":"community/simple-demo"}],"collapsible":true},{"type":"category","label":"\u589e\u5f3a\u7279\u6027","collapsed":true,"link":{"type":"doc","id":"features/features"},"items":[{"type":"doc","id":"features/enhance"},{"type":"doc","id":"features/i18n"},{"type":"doc","id":"features/author"},{"type":"doc","id":"features/selfdocument"},{"type":"doc","id":"features/accessControl"},{"type":"doc","id":"features/apiSort"},{"type":"doc","id":"features/tagSort"},{"type":"doc","id":"features/requestCache"},{"type":"doc","id":"features/dynamicRequestParameter"},{"type":"doc","id":"features/exportDocument"},{"type":"doc","id":"features/filterRequestParameter"},{"type":"doc","id":"features/includeRequestParameter"},{"type":"doc","id":"features/search"},{"type":"doc","id":"features/clearCache"},{"type":"doc","id":"features/dynamicRequestDescription"},{"type":"doc","id":"features/dynamicResponseDescription"},{"type":"doc","id":"features/host"},{"type":"doc","id":"features/afterScript"},{"type":"doc","id":"features/oauth2"},{"type":"doc","id":"features/postman"},{"type":"doc","id":"features/globalParameter"},{"type":"doc","id":"features/swaggermodels"},{"type":"doc","id":"features/customHome"},{"type":"doc","id":"features/customFooter"},{"type":"doc","id":"features/jsr303"},{"type":"doc","id":"features/forbidDebug"},{"type":"doc","id":"features/forbidSearch"},{"type":"doc","id":"features/forbidOpenApi"},{"type":"doc","id":"features/gitVersion"}],"collapsible":true},{"type":"category","label":"\u7248\u672c\u5347\u7ea7","link":{"type":"generated-index","title":"\u5347\u7ea7","slug":"/upgrading","keywords":["upgrading"],"permalink":"/docs/upgrading"},"items":[{"type":"doc","id":"upgrading/upgrading-to-v2"},{"type":"doc","id":"upgrading/upgrading-to-v4"}],"collapsed":true,"collapsible":true}],"oas":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"oas/oas-intro"},{"type":"category","label":"OpenAPI\u89c4\u8303","collapsed":true,"link":{"type":"doc","id":"oas/openapi-spe"},"items":[{"type":"doc","id":"oas/openapi-spe"},{"type":"doc","id":"oas/openapi2"},{"type":"doc","id":"oas/openapi3"}],"collapsible":true},{"type":"category","label":"Java\u6ce8\u89e3","collapsed":true,"link":{"type":"doc","id":"oas/annotation-introduction"},"items":[{"type":"doc","id":"oas/openapi2-annotation"},{"type":"doc","id":"oas/openapi3-annotation"}],"collapsible":true}],"middleware-sources":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"middleware-sources/middle-index"},{"type":"doc","id":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},{"type":"doc","id":"middleware-sources/spring-webflux/spring-webflux-introduction"},{"type":"category","label":"Aggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","collapsed":true,"link":{"type":"doc","id":"middleware-sources/aggregation-introduction"},"items":[{"type":"doc","id":"middleware-sources/aggregation-introduction"},{"type":"doc","id":"middleware-sources/aggregation-disk"},{"type":"doc","id":"middleware-sources/aggregation-cloud"},{"type":"doc","id":"middleware-sources/aggregation-eureka"},{"type":"doc","id":"middleware-sources/aggregation-nacos"}],"collapsible":true},{"type":"category","label":"Insight\u72ec\u7acb\u6e32\u67d3\u7ec4\u4ef6","collapsed":true,"link":{"type":"doc","id":"middleware-sources/desktop-introduction"},"items":[{"type":"doc","id":"middleware-sources/desktop-introduction"},{"type":"doc","id":"middleware-sources/desktop-install"},{"type":"doc","label":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","id":"middleware-sources/desktop/service-introduction"},{"type":"category","label":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","collapsed":true,"link":{"type":"doc","id":"middleware-sources/desktop/config-introduction"},"items":[{"type":"doc","id":"middleware-sources/desktop/config-disk"},{"type":"doc","id":"middleware-sources/desktop/config-nacos"}],"collapsible":true}],"collapsible":true}],"changelog":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"category","label":"4.x\u7248\u672c","link":{"type":"doc","id":"changelog/changelog-index"},"items":[{"type":"doc","id":"changelog/x/4.0"},{"type":"doc","id":"changelog/x/4.1"}],"collapsed":true,"collapsible":true},{"type":"category","label":"2.x\u7248\u672c","collapsed":true,"items":[{"type":"doc","id":"changelog/x/2021-06-28-knife4j-2.0.9-issue"},{"type":"doc","id":"changelog/x/2020-11-22-knife4j-2.0.8-issue"},{"type":"doc","id":"changelog/x/2020-11-02-knife4j-2.0.7-issue"},{"type":"doc","id":"changelog/x/2020-10-26-knife4j-2.0.6-issue"},{"type":"doc","id":"changelog/x/2020-09-14-knife4j-2.0.5-issue"},{"type":"doc","id":"changelog/x/2020-06-28-knife4j-2.0.4-issue"},{"type":"doc","id":"changelog/x/2020-05-24-knife4j-2.0.3-issue"},{"type":"doc","id":"changelog/x/2020-03-08-knife4j-2.0.2-issue"},{"type":"doc","id":"changelog/x/2019-12-23-knife4j-2.0.1-issue"},{"type":"doc","id":"changelog/x/2019-12-16-knife4j-2.0.0-issue"}],"collapsible":true},{"type":"category","label":"1.x\u7248\u672c","items":[{"type":"doc","id":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"},{"type":"doc","id":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},{"type":"doc","id":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"},{"type":"doc","id":"changelog/x/2019-05-20-knife4j-admin-1.0-issue"},{"type":"doc","id":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"},{"type":"doc","id":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"},{"type":"doc","id":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"},{"type":"doc","id":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"},{"type":"doc","id":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"},{"type":"doc","id":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"},{"type":"doc","id":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"},{"type":"doc","id":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"},{"type":"doc","id":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"},{"type":"doc","id":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"},{"type":"doc","id":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},{"type":"doc","id":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"},{"type":"doc","id":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},{"type":"doc","id":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},{"type":"doc","id":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},{"type":"doc","id":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"},{"type":"doc","id":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"},{"type":"doc","id":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"},{"type":"doc","id":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"},{"type":"doc","id":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"},{"type":"doc","id":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"},{"type":"doc","id":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"},{"type":"doc","id":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"},{"type":"doc","id":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},{"type":"doc","id":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},{"type":"doc","id":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},{"type":"doc","id":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},{"type":"doc","id":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"},{"type":"doc","id":"changelog/x/2017-04-19-swagger-bootstrap-ui-open"}],"collapsed":true,"collapsible":true}],"faq":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"category","label":"FAQ","link":{"type":"doc","id":"faq/faq-index"},"items":[{"type":"doc","id":"faq/format-exception"},{"type":"doc","id":"faq/faq-index"},{"type":"doc","id":"faq/knife4j-exception"},{"type":"doc","id":"faq/md-format-error"},{"type":"doc","id":"faq/sp-nmerror"},{"type":"doc","id":"faq/springboot-404"},{"type":"doc","id":"faq/springmvc-404"},{"type":"doc","id":"faq/springmvc-notshow"},{"type":"doc","id":"faq/swagger-des-not-found"},{"type":"doc","id":"faq/swaggerResourceInvalid"},{"type":"doc","id":"faq/upload-error"},{"type":"category","label":"v4","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"faq/v4/knife4j-base64-response"},{"type":"doc","id":"faq/v4/knife4j-no-openapi"},{"type":"doc","id":"faq/v4/knife4j-parameterobject-flat-param"}]}],"collapsed":true,"collapsible":true}],"action":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"action/action-index"},{"type":"doc","id":"action/action-simple"},{"type":"category","label":"Spring \u5355\u4f53\u67b6\u6784","collapsed":true,"items":[{"type":"doc","id":"action/mavenbom"},{"type":"doc","id":"action/springmvc"},{"type":"doc","id":"action/springboot"}],"collapsible":true},{"type":"category","label":"Spring\u5fae\u670d\u52a1\u67b6\u6784","collapsed":true,"items":[{"type":"doc","id":"action/springcloud-gateway"},{"type":"doc","id":"action/springcloud-zuul"}],"collapsible":true},{"type":"category","label":"OAuth2.0","collapsed":true,"items":[{"type":"doc","id":"action/oauth2-implicit"},{"type":"doc","id":"action/oauth2-authorization_code"},{"type":"doc","id":"action/oauth2-client_credentials"},{"type":"doc","id":"action/oauth2-password"}],"collapsible":true},{"type":"category","label":"\u5fae\u670d\u52a1\u805a\u5408\u5b9e\u6218","collapsed":true,"items":[{"type":"doc","id":"action/aggregation-disk"},{"type":"doc","id":"action/aggregation-cloud"},{"type":"doc","id":"action/aggregation-eureka"},{"type":"doc","id":"action/aggregation-nacos"},{"type":"doc","id":"action/aggregation-docker"}],"collapsible":true},{"type":"category","label":"ASP.NET Core","collapsed":true,"items":[{"type":"doc","id":"action/dotnetcore-knife4j-how"},{"type":"doc","id":"action/dotnetcore-knife4j-guid"}],"collapsible":true},{"type":"category","label":"Springfox \u6e90\u7801\u7cfb\u5217","collapsed":true,"link":{"type":"doc","id":"action/springfox/springfox-index"},"items":[{"type":"doc","id":"action/springfox/springfox1"},{"type":"doc","id":"action/springfox/springfox2"},{"type":"doc","id":"action/springfox/springfox3"},{"type":"doc","id":"action/springfox/springfox4"},{"type":"doc","id":"action/springfox/springfox5"},{"type":"doc","id":"action/springfox/springfox6"},{"type":"doc","id":"action/springfox/springfox7"},{"type":"doc","id":"action/springfox/springfox8"},{"type":"doc","id":"action/springfox/springfox9"},{"type":"doc","id":"action/springfox/springfox10"},{"type":"doc","id":"action/springfox/springfox11"},{"type":"doc","id":"action/springfox/springfox12"},{"type":"doc","id":"action/springfox/springfox13"},{"type":"doc","id":"action/springfox/springfox14"},{"type":"doc","id":"action/springfox/springfox15"},{"type":"doc","id":"action/springfox/springfox16"},{"type":"doc","id":"action/springfox/springfox17"},{"type":"doc","id":"action/springfox/springfox18"},{"type":"doc","id":"action/springfox/springfox19"},{"type":"doc","id":"action/springfox/springfox20"},{"type":"doc","id":"action/springfox/springfox21"}],"collapsible":true}]}}]}},"docusaurus-plugin-content-blog":{"default":{"blogSidebarTitle":"Recent posts","blogPosts":[],"blogListPaginated":[],"blogTags":{},"blogTagsListPath":"/blog/tags","blogTagsPaginated":[]}},"docusaurus-plugin-content-pages":{"default":[{"type":"jsx","permalink":"/","source":"@site/src/pages/index.js"},{"type":"jsx","permalink":"/versions","source":"@site/src/pages/versions.js"}]},"docusaurus-plugin-debug":{},"docusaurus-plugin-sitemap":{},"docusaurus-theme-classic":{},"docusaurus-theme-search-algolia":{},"docusaurus-plugin-client-redirects":{},"docusaurus-plugin":{},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/246f2c6f.ce91e6db.js b/knife4j-doc/gitee/assets/js/246f2c6f.ce91e6db.js new file mode 100644 index 000000000..74be3c0cd --- /dev/null +++ b/knife4j-doc/gitee/assets/js/246f2c6f.ce91e6db.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9285],{26267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"className":"docs-version-current","path":"/docs","tagsPath":"/docs/tags","isLast":true,"routePriority":-1,"sidebarFilePath":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/sidebars.js","contentPath":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/docs","contentPathLocalized":"/Users/xiaoyumin/code/gitee/knife4j/knife4j-doc/i18n/zh-Hans/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"action/action-index","id":"action/action-index","title":"\u5b9e\u6218\u6307\u5357","description":"Knife4j\u5b9e\u6218\u6307\u5357","source":"@site/docs/action/index.mdx","sourceDirName":"action","slug":"/action/","permalink":"/docs/action/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{"id":"action-index","title":"\u5b9e\u6218\u6307\u5357","description":"Knife4j\u5b9e\u6218\u6307\u5357"},"sidebar":"action","next":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/action/action-simple"}},{"unversionedId":"action/action-simple","id":"action/action-simple","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/action/simple.mdx","sourceDirName":"action","slug":"/action/action-simple","permalink":"/docs/action/action-simple","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"action-simple","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"action","previous":{"title":"\u5b9e\u6218\u6307\u5357","permalink":"/docs/action/"},"next":{"title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","permalink":"/docs/action/mavenbom"}},{"unversionedId":"action/aggregation-cloud","id":"action/aggregation-cloud","title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","description":"Cloud(\u4e91\u7aef)\u6a21\u5f0f\u548cDisk\u6a21\u5f0f\u5927\u540c\u5c0f\u5f02\uff0c\u4e3b\u8981\u7684\u533a\u522b\u662f\u83b7\u53d6OpenAPI\u89c4\u8303\u7684\u65b9\u5f0f\u6362\u6210\u4e86\u57fa\u4e8eHTTP\u63a5\u53e3\u800c\u5df2","source":"@site/docs/action/aggregation-cloud.md","sourceDirName":"action","slug":"/action/aggregation-cloud","permalink":"/docs/action/aggregation-cloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-disk"},"next":{"title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-eureka"}},{"unversionedId":"action/aggregation-disk","id":"action/aggregation-disk","title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","description":"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408\u662f\u6700\u7b80\u5355\u7684\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Boot\u7684\u9879\u76ee\u4e2d\u5b58\u5728OpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u805a\u5408","source":"@site/docs/action/aggregation-disk.md","sourceDirName":"action","slug":"/action/aggregation-disk","permalink":"/docs/action/aggregation-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","permalink":"/docs/action/oauth2-password"},"next":{"title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-cloud"}},{"unversionedId":"action/aggregation-docker","id":"action/aggregation-docker","title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","description":"\u5728\u524d\u9762\u7684\u5b9e\u6218\u6587\u7ae0\u4e2d\uff0c\u66f4\u591a\u7684\u662f\u9762\u5411Java\u5f00\u53d1\u8005\uff0c\u901a\u8fc7Spring Boot\u6846\u67b6\uff0c\u5feb\u901f\u805a\u5408OpenAPI\u6587\u6863\u3002","source":"@site/docs/action/aggregation-docker.md","sourceDirName":"action","slug":"/action/aggregation-docker","permalink":"/docs/action/aggregation-docker","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-nacos"},"next":{"title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","permalink":"/docs/action/dotnetcore-knife4j-how"}},{"unversionedId":"action/aggregation-eureka","id":"action/aggregation-eureka","title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","description":"\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u8fdb\u884c\u805a\u5408\u7684\u6a21\u5f0f\u548cCloud\u6a21\u5f0f\u5927\u540c\u5c0f\u5f02\uff0c\u4e3b\u8981\u7684\u533a\u522b\u662f\u901a\u8fc7serviceName\u6765\u66ff\u4ee3\u4e86\u771f\u5b9e\u7684\u76ee\u6807\u670d\u52a1\u5730\u5740\uff0c\u800c\u662f\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u8fdb\u884c\u52a8\u6001\u83b7\u53d6","source":"@site/docs/action/aggregation-eureka.md","sourceDirName":"action","slug":"/action/aggregation-eureka","permalink":"/docs/action/aggregation-eureka","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.2 Cloud\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-cloud"},"next":{"title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-nacos"}},{"unversionedId":"action/aggregation-nacos","id":"action/aggregation-nacos","title":"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","description":"Nacos\u7684\u914d\u7f6e\u548cEureka\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fknife4j.nacos\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837","source":"@site/docs/action/aggregation-nacos.md","sourceDirName":"action","slug":"/action/aggregation-nacos","permalink":"/docs/action/aggregation-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-eureka"},"next":{"title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","permalink":"/docs/action/aggregation-docker"}},{"unversionedId":"action/dotnetcore-knife4j-guid","id":"action/dotnetcore-knife4j-guid","title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","description":"IGeekFan.AspNetCore.Knife4jUI","source":"@site/docs/action/dotnetcore-knife4j-guid.md","sourceDirName":"action","slug":"/action/dotnetcore-knife4j-guid","permalink":"/docs/action/dotnetcore-knife4j-guid","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1606020212,"formattedLastUpdatedAt":"2020\u5e7411\u670822\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","permalink":"/docs/action/dotnetcore-knife4j-how"},"next":{"title":"Springfox\u6e90\u7801\u7cfb\u5217","permalink":"/docs/action/springfox/"}},{"unversionedId":"action/dotnetcore-knife4j-how","id":"action/dotnetcore-knife4j-how","title":"5.1 Knife4j+.NET Core\u5c01\u88c5\u8fc7\u7a0b","description":"\u652f\u6301 .NET Core3.0+\u6216.NET Standard2.0\u3002","source":"@site/docs/action/dotnetcore-knife4j-how.md","sourceDirName":"action","slug":"/action/dotnetcore-knife4j-how","permalink":"/docs/action/dotnetcore-knife4j-how","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1606020212,"formattedLastUpdatedAt":"2020\u5e7411\u670822\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI","permalink":"/docs/action/aggregation-docker"},"next":{"title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","permalink":"/docs/action/dotnetcore-knife4j-guid"}},{"unversionedId":"action/mavenbom","id":"action/mavenbom","title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","description":"\u8be5\u65b9\u5f0f\u81ea2.0.2\u7248\u672c\u624d\u63d0\u4f9b,\u5728knife4j\u4ee5\u524d\u7684\u7248\u672c\u4e2d\u6ca1\u6709knife4j-dependencies\u6a21\u5757,\u5f00\u53d1\u8005\u5728\u4f7f\u7528\u7684\u65f6\u5019\u9700\u8981\u6ce8\u610f","source":"@site/docs/action/mavenbom.md","sourceDirName":"action","slug":"/action/mavenbom","permalink":"/docs/action/mavenbom","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/action/action-simple"},"next":{"title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springmvc"}},{"unversionedId":"action/oauth2-authorization_code","id":"action/oauth2-authorization_code","title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-authorization_code.md","sourceDirName":"action","slug":"/action/oauth2-authorization_code","permalink":"/docs/action/oauth2-authorization_code","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","permalink":"/docs/action/oauth2-implicit"},"next":{"title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","permalink":"/docs/action/oauth2-client_credentials"}},{"unversionedId":"action/oauth2-client_credentials","id":"action/oauth2-client_credentials","title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-client_credentials.md","sourceDirName":"action","slug":"/action/oauth2-client_credentials","permalink":"/docs/action/oauth2-client_credentials","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","permalink":"/docs/action/oauth2-authorization_code"},"next":{"title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","permalink":"/docs/action/oauth2-password"}},{"unversionedId":"action/oauth2-implicit","id":"action/oauth2-implicit","title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-implicit.md","sourceDirName":"action","slug":"/action/oauth2-implicit","permalink":"/docs/action/oauth2-implicit","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-zuul"},"next":{"title":"3.2 \u6388\u6743\u7801\u6a21\u5f0f(authorization_code)","permalink":"/docs/action/oauth2-authorization_code"}},{"unversionedId":"action/oauth2-password","id":"action/oauth2-password","title":"3.4 \u5bc6\u7801\u6a21\u5f0f(password)","description":"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d","source":"@site/docs/action/oauth2-password.md","sourceDirName":"action","slug":"/action/oauth2-password","permalink":"/docs/action/oauth2-password","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)","permalink":"/docs/action/oauth2-client_credentials"},"next":{"title":"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863","permalink":"/docs/action/aggregation-disk"}},{"unversionedId":"action/others/doc-search","id":"action/others/doc-search","title":"Final.\u6fc0\u6d3bKnife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd","description":"1.\u524d\u8a00","source":"@site/docs/action/others/doc-search.md","sourceDirName":"action/others","slug":"/action/others/doc-search","permalink":"/docs/action/others/doc-search","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1685499627,"formattedLastUpdatedAt":"2023\u5e745\u670831\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b","permalink":"/docs/action/springfox/springfox21"}},{"unversionedId":"action/springboot","id":"action/springboot","title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","description":"\u672c\u6b21\u793a\u4f8b\u4f7f\u7528Spring Boot\u4f5c\u4e3a\u811a\u624b\u67b6\u6765\u5feb\u901f\u96c6\u6210Knife4j,Spring Boot\u7248\u672c2.3.5.RELEASE,Knife4j\u7248\u672c2.0.7\uff0c\u5b8c\u6574\u4ee3\u7801\u53ef\u4ee5\u53bb\u53c2\u8003knife4j-spring-boot-fast-demo","source":"@site/docs/action/springboot.md","sourceDirName":"action","slug":"/action/springboot","permalink":"/docs/action/springboot","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springmvc"},"next":{"title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-gateway"}},{"unversionedId":"action/springcloud-gateway","id":"action/springcloud-gateway","title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","description":"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863","source":"@site/docs/action/springcloud-gateway.md","sourceDirName":"action","slug":"/action/springcloud-gateway","permalink":"/docs/action/springcloud-gateway","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604832815,"formattedLastUpdatedAt":"2020\u5e7411\u67088\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springboot"},"next":{"title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-zuul"}},{"unversionedId":"action/springcloud-zuul","id":"action/springcloud-zuul","title":"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j","description":"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?","source":"@site/docs/action/springcloud-zuul.md","sourceDirName":"action","slug":"/action/springcloud-zuul","permalink":"/docs/action/springcloud-zuul","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j","permalink":"/docs/action/springcloud-gateway"},"next":{"title":"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)","permalink":"/docs/action/oauth2-implicit"}},{"unversionedId":"action/springfox/springfox-index","id":"action/springfox/springfox-index","title":"Springfox\u6e90\u7801\u7cfb\u5217","description":"springfox \u6e90\u7801\u7cfb\u5217,springfox-swagger","source":"@site/docs/action/springfox/index.mdx","sourceDirName":"action/springfox","slug":"/action/springfox/","permalink":"/docs/action/springfox/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{"id":"springfox-index","title":"Springfox\u6e90\u7801\u7cfb\u5217","description":"springfox \u6e90\u7801\u7cfb\u5217,springfox-swagger"},"sidebar":"action","previous":{"title":"5.2 .NET Core\u76f4\u63a5\u96c6\u6210Knife4j","permalink":"/docs/action/dotnetcore-knife4j-guid"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","permalink":"/docs/action/springfox/springfox1"}},{"unversionedId":"action/springfox/springfox1","id":"action/springfox/springfox1","title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","description":"\u65e5\u671f\uff1a2019-5-21 2115","source":"@site/docs/action/springfox/springfox1.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox1","permalink":"/docs/action/springfox/springfox1","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"Springfox\u6e90\u7801\u7cfb\u5217","permalink":"/docs/action/springfox/"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","permalink":"/docs/action/springfox/springfox2"}},{"unversionedId":"action/springfox/springfox10","id":"action/springfox/springfox10","title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","description":"\u5728\u4e0a\u4e00\u7bc7\u4e2d,\u6211\u4eec\u4e86\u89e3\u5230\u4e86springfox\u901a\u8fc7groupName\u7684\u8fc7\u6ee4,\u62ff\u5230\u4e86\u6240\u6709\u7684\u63a5\u53e3,\u5e76\u4e14\u901a\u8fc7guava\u5e93\u7684ArrayListMultimap\u5bf9\u63a5\u53e3\u7684Controller\u8fdb\u4e00\u6b65\u8fdb\u884c\u4e86\u5206\u7ec4,\u63a5\u4e0b\u6765\u5c31\u662f\u89e3\u6790\u6bcf\u4e2a\u63a5\u53e3\u7684\u64cd\u4f5c\u4e86","source":"@site/docs/action/springfox/springfox10.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox10","permalink":"/docs/action/springfox/springfox10","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","permalink":"/docs/action/springfox/springfox9"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","permalink":"/docs/action/springfox/springfox11"}},{"unversionedId":"action/springfox/springfox11","id":"action/springfox/springfox11","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","description":"\u5728springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61\u8fd9\u4e00\u7bc7\u4e2d,\u6211\u4eec\u5176\u5b9e\u5df2\u7ecf\u5927\u81f4\u4e86\u89e3\u4e86Springfox\u9488\u5bf9\u63a5\u53e3\u4e2d\u6d89\u53ca\u5230\u7684Model\u7c7b\u8fdb\u884c\u89e3\u6790\u521d\u59cb\u5316\u7684\u8fc7\u7a0b","source":"@site/docs/action/springfox/springfox11.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox11","permalink":"/docs/action/springfox/springfox11","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660578710,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox10"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","permalink":"/docs/action/springfox/springfox12"}},{"unversionedId":"action/springfox/springfox12","id":"action/springfox/springfox12","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","description":"ApiDescription\u662fspringfox\u63d0\u4f9b\u7684\u63a5\u53e3\u63cf\u8ff0\u4fe1\u606f\u7c7b,\u5728springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61\u4e2d\u6211\u4eec\u62ff\u5230\u4e86\u63a5\u53e3\u7684\u7c7b\u578bModel\u96c6\u5408\u4fe1\u606f\uff0c\u4f46\u9664\u4e86Model\u4fe1\u606f,\u63a5\u53e3\u8fd8\u6709\u66f4\u591a\u7684\u4fe1\u606f","source":"@site/docs/action/springfox/springfox12.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox12","permalink":"/docs/action/springfox/springfox12","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e00) \u81ea\u5b9a\u4e49\u6dfb\u52a0Swagger Models\u529f\u80fd\u5b9e\u73b0","permalink":"/docs/action/springfox/springfox11"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox13"}},{"unversionedId":"action/springfox/springfox13","id":"action/springfox/springfox13","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","description":"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a","source":"@site/docs/action/springfox/springfox13.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox13","permalink":"/docs/action/springfox/springfox13","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408","permalink":"/docs/action/springfox/springfox12"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","permalink":"/docs/action/springfox/springfox14"}},{"unversionedId":"action/springfox/springfox14","id":"action/springfox/springfox14","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","description":"\u5728\u524d\u9762\u6211\u4eec\u62ff\u5230\u4e86\u63a5\u53e3\u7684Model\u7c7b\u578b\u96c6\u5408,\u7136\u540e\u8fd8\u83b7\u53d6\u5230\u4e86\u8be5\u63a5\u53e3\u7684ApiDescription\u63cf\u8ff0\u4fe1\u606f","source":"@site/docs/action/springfox/springfox14.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox14","permalink":"/docs/action/springfox/springfox14","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox13"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox15"}},{"unversionedId":"action/springfox/springfox15","id":"action/springfox/springfox15","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","description":"\u901a\u8fc7\u4e0a\u7bc7\u7684\u5206\u6790,\u6211\u4eec\u5df2\u7ecf\u5f97\u5230\u4e86ApiListing\u7684map\u96c6\u5408\uff0c\u63a5\u4e0b\u6765\u6700\u7ec8\u505a\u6587\u6863\u5f52\u6863,\u5f97\u5230Documentation\u5bf9\u8c61","source":"@site/docs/action/springfox/springfox15.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox15","permalink":"/docs/action/springfox/springfox15","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408","permalink":"/docs/action/springfox/springfox14"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","permalink":"/docs/action/springfox/springfox16"}},{"unversionedId":"action/springfox/springfox16","id":"action/springfox/springfox16","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","description":"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684","source":"@site/docs/action/springfox/springfox16.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox16","permalink":"/docs/action/springfox/springfox16","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox15"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","permalink":"/docs/action/springfox/springfox17"}},{"unversionedId":"action/springfox/springfox17","id":"action/springfox/springfox17","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","description":"\u524d\u9762\u5df2\u7ecf\u83b7\u53d6\u5f97\u5230\u4e86swagger\u7684\u5206\u7ec4\u63a5\u53e3\u4fe1\u606f\u4e86,\u63a5\u4e0b\u6765\u5c31\u662f\u6839\u636e\u5206\u7ec4\u540d\u79f0\u83b7\u53d6\u6bcf\u4e2a\u5206\u7ec4\u7684Swagger\u8d44\u6e90\u8be6\u7ec6\u4fe1\u606f,\u5728springfox\u4e2d\u63d0\u4f9b\u4e86/v2/api-docs\u63a5\u53e3\u6765\u8fdb\u884c\u83b7\u53d6","source":"@site/docs/action/springfox/springfox17.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox17","permalink":"/docs/action/springfox/springfox17","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces","permalink":"/docs/action/springfox/springfox16"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox18"}},{"unversionedId":"action/springfox/springfox18","id":"action/springfox/springfox18","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","description":"\u65e2\u7136\u6211\u4eec\u5bf9springfox\u63d0\u4f9b\u7684\u63a5\u53e3\u5df2\u7ecf\u6709\u4e86\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3,\u90a3\u4e48\u9488\u5bf9\u6211\u4eec\u5728\u5206\u7ec4\u63a5\u53e3\u6587\u7ae0\u4e2d\u63d0\u7684\u9700\u6c42,\u5982\u679c\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f\u5982\u4f55\u505a\u5462\uff1f","source":"@site/docs/action/springfox/springfox18.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox18","permalink":"/docs/action/springfox/springfox18","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs","permalink":"/docs/action/springfox/springfox17"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","permalink":"/docs/action/springfox/springfox19"}},{"unversionedId":"action/springfox/springfox19","id":"action/springfox/springfox19","title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","description":"\u6211\u4eec\u5728\u7814\u7a76springfox\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0springfox\u5927\u91cf\u4f7f\u7528\u4e86guava\u8fd9\u4e2a\u5e93\u7684\u4e00\u4e9b\u65b9\u6cd5\u548c\u7c7b,\u9488\u5bf9\u6211\u4eec\u5728\u7814\u7a76\u6e90\u7801\u7684\u5b66\u4e60\u8fc7\u7a0b\u4e2d,\u5c06\u6d89\u53ca\u5230\u7684guava\u5e93\u4e2d\u7684\u7c7b\u8fdb\u884c\u5f52\u7eb3\u603b\u7ed3,\u540e\u671f\u5728\u5de5\u4f5c\u4e2d\u6211\u4eec\u4e5f\u53ef\u4ee5\u719f\u7ec3\u8fd0\u7528guava\u5e93\u4e3a\u6211\u4eec\u63d0\u4f9b\u7684\u7b80\u4ecbapi","source":"@site/docs/action/springfox/springfox19.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox19","permalink":"/docs/action/springfox/springfox19","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u516b) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u5206\u7ec4\u7684\u6392\u5e8f","permalink":"/docs/action/springfox/springfox18"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","permalink":"/docs/action/springfox/springfox20"}},{"unversionedId":"action/springfox/springfox2","id":"action/springfox/springfox2","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","description":"\u65f6\u95f4\uff1a2019-5-22 1221","source":"@site/docs/action/springfox/springfox2.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox2","permalink":"/docs/action/springfox/springfox2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e00) \u7a0b\u5e8f\u5165\u53e3","permalink":"/docs/action/springfox/springfox1"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","permalink":"/docs/action/springfox/springfox3"}},{"unversionedId":"action/springfox/springfox20","id":"action/springfox/springfox20","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","description":"\u5f85\u7eed...","source":"@site/docs/action/springfox/springfox20.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox20","permalink":"/docs/action/springfox/springfox20","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60","permalink":"/docs/action/springfox/springfox19"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b","permalink":"/docs/action/springfox/springfox21"}},{"unversionedId":"action/springfox/springfox21","id":"action/springfox/springfox21","title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b","description":"\u6211\u4eec\u5728\u524d\u9762\u7684\u6e90\u7801\u8fc7\u7a0b\u4e2d,\u4e86\u89e3\u4e86springfox\u7684\u57fa\u672c\u5de5\u4f5c\u539f\u7406,\u63a5\u4e0b\u6765,\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528springfox\u7ed9\u6211\u4eec\u63d0\u4f9b\u7684\u5916\u90e8\u63a5\u53e3,\u6765\u5904\u7406\u4e00\u4e9b\u6211\u4eec\u5de5\u4f5c\u4e2d\u78b0\u5230\u7684\u95ee\u9898,\u6216\u8005\u8fdb\u884c\u81ea\u5b9a\u4e49\u6269\u5c55","source":"@site/docs/action/springfox/springfox21.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox21","permalink":"/docs/action/springfox/springfox21","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a","permalink":"/docs/action/springfox/springfox20"},"next":{"title":"Final.\u6fc0\u6d3bKnife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd","permalink":"/docs/action/others/doc-search"}},{"unversionedId":"action/springfox/springfox3","id":"action/springfox/springfox3","title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","description":"\u65f6\u95f4\uff1a2019-5-22 1250","source":"@site/docs/action/springfox/springfox3.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox3","permalink":"/docs/action/springfox/springfox3","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct","permalink":"/docs/action/springfox/springfox2"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox4"}},{"unversionedId":"action/springfox/springfox4","id":"action/springfox/springfox4","title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","description":"\u65f6\u95f4\uff1a2019-5-23 1250","source":"@site/docs/action/springfox/springfox4.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox4","permalink":"/docs/action/springfox/springfox4","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf","permalink":"/docs/action/springfox/springfox3"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","permalink":"/docs/action/springfox/springfox5"}},{"unversionedId":"action/springfox/springfox5","id":"action/springfox/springfox5","title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","description":"\u65f6\u95f4\uff1a2019-5-23 1450","source":"@site/docs/action/springfox/springfox5.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox5","permalink":"/docs/action/springfox/springfox5","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox4"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","permalink":"/docs/action/springfox/springfox6"}},{"unversionedId":"action/springfox/springfox6","id":"action/springfox/springfox6","title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","description":"\u65f6\u95f4\uff1a2019-5-23 1850","source":"@site/docs/action/springfox/springfox6.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox6","permalink":"/docs/action/springfox/springfox6","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e94) web\u914d\u7f6e\u7c7bPlugin\u63d2\u4ef6\u7684\u4f7f\u7528","permalink":"/docs/action/springfox/springfox5"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox7"}},{"unversionedId":"action/springfox/springfox7","id":"action/springfox/springfox7","title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","description":"\u65f6\u95f4\uff1a2019-5-23 2004","source":"@site/docs/action/springfox/springfox7.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox7","permalink":"/docs/action/springfox/springfox7","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516d) web\u914d\u7f6e\u7c7b\u626b\u63cf\u5305\u4f5c\u7528\u63a2\u7d22","permalink":"/docs/action/springfox/springfox6"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox8"}},{"unversionedId":"action/springfox/springfox8","id":"action/springfox/springfox8","title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","description":"\u6211\u4eec\u901a\u8fc7\u8bfbDocumentationPluginsBootstrapper\u4ee3\u7801\u4e2d\u7684start\u65b9\u6cd5,\u4e86\u89e3\u5230springfox\u6839\u636e\u6211\u4eec\u5916\u90e8\u63d0\u4f9b\u7684Docket\u5bf9\u8c61\u8fdb\u884c\u521d\u59cb\u5316\u65f6,\u4f1a\u901a\u8fc7Docket\u5bf9\u8c61\u6784\u5efaDocumentationContext\u5bf9\u8c61\u6765\u8fdb\u884c\u521d\u59cb\u5316\u64cd\u4f5c","source":"@site/docs/action/springfox/springfox8.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox8","permalink":"/docs/action/springfox/springfox8","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e03) \u6587\u6863\u521d\u59cb\u5316","permalink":"/docs/action/springfox/springfox7"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","permalink":"/docs/action/springfox/springfox9"}},{"unversionedId":"action/springfox/springfox9","id":"action/springfox/springfox9","title":"springfox \u6e90\u7801\u5206\u6790(\u4e5d) \u6587\u6863\u521d\u59cb\u5316-\u5206\u7ec4","description":"\u5728\u524d\u9762\u6211\u4eec\u4e86\u89e3\u4e86DocumennationContext\u7684\u521d\u59cb\u5316\u8fc7\u7a0b,\u5305\u62ec\u4e00\u7cfb\u5217\u7684\u9ed8\u8ba4\u5c5e\u6027\u7684\u8d4b\u503c,\u63a5\u4e0b\u6765,\u5f00\u59cb\u771f\u6b63\u7684\u6587\u6863\u89e3\u6790\u64cd\u4f5c","source":"@site/docs/action/springfox/springfox9.md","sourceDirName":"action/springfox","slug":"/action/springfox/springfox9","permalink":"/docs/action/springfox/springfox9","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660577531,"formattedLastUpdatedAt":"2022\u5e748\u670815\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"springfox \u6e90\u7801\u5206\u6790(\u516b) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox8"},"next":{"title":"springfox \u6e90\u7801\u5206\u6790(\u5341) \u904d\u5386\u63a5\u53e3\u83b7\u53d6Model\u5bf9\u8c61","permalink":"/docs/action/springfox/springfox10"}},{"unversionedId":"action/springmvc","id":"action/springmvc","title":"1.2 SpringMVC\u6846\u67b6\u96c6\u6210Knife4j","description":"\u5982\u679c\u4f60\u662fSpring MVC\u9879\u76ee,\u60f3\u4f7f\u7528knife4j\u63d0\u4f9b\u7684\u589e\u5f3aui\u5305,\u4f7f\u7528\u65b9\u6cd5\u5f88\u7b80\u5355","source":"@site/docs/action/springmvc.md","sourceDirName":"action","slug":"/action/springmvc","permalink":"/docs/action/springmvc","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604832815,"formattedLastUpdatedAt":"2020\u5e7411\u67088\u65e5","frontMatter":{},"sidebar":"action","previous":{"title":"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528","permalink":"/docs/action/mavenbom"},"next":{"title":"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j","permalink":"/docs/action/springboot"}},{"unversionedId":"blog/blog","id":"blog/blog","title":"Knife4j\u6846\u67b6\u76f8\u5173\u7684blog","description":"Knife4j\u6846\u67b6\u76f8\u5173\u7684blog","source":"@site/docs/blog/index.mdx","sourceDirName":"blog","slug":"/blog/","permalink":"/docs/blog/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1694061184,"formattedLastUpdatedAt":"2023\u5e749\u67087\u65e5","frontMatter":{"id":"blog","title":"Knife4j\u6846\u67b6\u76f8\u5173\u7684blog","description":"Knife4j\u6846\u67b6\u76f8\u5173\u7684blog"}},{"unversionedId":"blog/customer-add-api","id":"blog/customer-add-api","title":"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a","description":"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a","source":"@site/docs/blog/customer-api.mdx","sourceDirName":"blog","slug":"/blog/customer-add-api","permalink":"/docs/blog/customer-add-api","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1689339282,"formattedLastUpdatedAt":"2023\u5e747\u670814\u65e5","sidebarPosition":4,"frontMatter":{"id":"customer-add-api","title":"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a","description":"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a","keywords":["springfox\u81ea\u5b9a\u4e49\u63a5\u53e3","springdoc\u81ea\u5b9a\u4e49\u63a5\u53e3","knife4j\u81ea\u5b9a\u4e49\u63a5\u53e3"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e747\u670813\u65e5"}},{"unversionedId":"blog/gateway/knife4j-gateway-introduce","id":"blog/gateway/knife4j-gateway-introduce","title":"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86","description":"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86","source":"@site/docs/blog/gateway/knife4j-gateway-introduce.mdx","sourceDirName":"blog/gateway","slug":"/blog/gateway/knife4j-gateway-introduce","permalink":"/docs/blog/gateway/knife4j-gateway-introduce","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691914117,"formattedLastUpdatedAt":"2023\u5e748\u670813\u65e5","sidebarPosition":4,"frontMatter":{"id":"knife4j-gateway-introduce","title":"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86","description":"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86","keywords":["knife4j","Spring Cloud Gateway\u7f51\u5173\u805a\u5408\u6587\u6863","swagger\u805a\u5408","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e748\u670813\u65e5"}},{"unversionedId":"blog/handler-enum","id":"blog/handler-enum","title":"\u679a\u4e3e\u70e6\u607c\u7ec8\u7ed3!\u5728Knife4j\u6587\u6863\u4e2d\u5982\u4f55\u4f18\u96c5\u7684\u5904\u7406\u679a\u4e3e\u7c7b\u578b\u7684\u5c55\u793a\u53ca\u8c03\u8bd5\u95ee\u9898","description":"\u679a\u4e3e\u70e6\u607c\u7ec8\u7ed3!\u5728Knife4j\u6587\u6863\u4e2d\u5982\u4f55\u4f18\u96c5\u7684\u5904\u7406\u679a\u4e3e\u7c7b\u578b\u7684\u5c55\u793a\u53ca\u8c03\u8bd5\u95ee\u9898","source":"@site/docs/blog/handler-enum.mdx","sourceDirName":"blog","slug":"/blog/handler-enum","permalink":"/docs/blog/handler-enum","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691412899,"formattedLastUpdatedAt":"2023\u5e748\u67087\u65e5","sidebarPosition":4,"frontMatter":{"id":"handler-enum","title":"\u679a\u4e3e\u70e6\u607c\u7ec8\u7ed3!\u5728Knife4j\u6587\u6863\u4e2d\u5982\u4f55\u4f18\u96c5\u7684\u5904\u7406\u679a\u4e3e\u7c7b\u578b\u7684\u5c55\u793a\u53ca\u8c03\u8bd5\u95ee\u9898","description":"\u679a\u4e3e\u70e6\u607c\u7ec8\u7ed3!\u5728Knife4j\u6587\u6863\u4e2d\u5982\u4f55\u4f18\u96c5\u7684\u5904\u7406\u679a\u4e3e\u7c7b\u578b\u7684\u5c55\u793a\u53ca\u8c03\u8bd5\u95ee\u9898","keywords":["\u679a\u4e3e\u5904\u7406","knife4j\u679a\u4e3e\u5c55\u793a","knife4j\u679a\u4e3e\u8c03\u8bd5","knife4j\u679a\u4e3e"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e748\u670807\u65e5"}},{"unversionedId":"blog/product/knife4j-new-product-idea","id":"blog/product/knife4j-new-product-idea","title":"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5","description":"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5","source":"@site/docs/blog/product/knife4j-new-product.mdx","sourceDirName":"blog/product","slug":"/blog/product/knife4j-new-product-idea","permalink":"/docs/blog/product/knife4j-new-product-idea","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1694061184,"formattedLastUpdatedAt":"2023\u5e749\u67087\u65e5","sidebarPosition":4,"frontMatter":{"id":"knife4j-new-product-idea","title":"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5","description":"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5","keywords":["knife4j","Knife4jInsight","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e749\u670817\u65e5"}},{"unversionedId":"blog/production-forbidden-ui","id":"blog/production-forbidden-ui","title":"\u751f\u4ea7\u73af\u5883\u5982\u4f55\u5c4f\u853dKnife4j\u3001Swagger\u7b49Ui\u8d44\u6e90\u548c\u63a5\u53e3","description":"\u751f\u4ea7\u73af\u5883\u5982\u4f55\u5c4f\u853dKnife4j\u7b49Ui\u8d44\u6e90","source":"@site/docs/blog/production-forbidden-ui.mdx","sourceDirName":"blog","slug":"/blog/production-forbidden-ui","permalink":"/docs/blog/production-forbidden-ui","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1689775801,"formattedLastUpdatedAt":"2023\u5e747\u670819\u65e5","sidebarPosition":4,"frontMatter":{"id":"production-forbidden-ui","title":"\u751f\u4ea7\u73af\u5883\u5982\u4f55\u5c4f\u853dKnife4j\u3001Swagger\u7b49Ui\u8d44\u6e90\u548c\u63a5\u53e3","description":"\u751f\u4ea7\u73af\u5883\u5982\u4f55\u5c4f\u853dKnife4j\u7b49Ui\u8d44\u6e90","keywords":["knife4j","\u5c4f\u853dswagger","\u5c4f\u853dknife4j"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e747\u670819\u65e5"}},{"unversionedId":"blog/use-claude-fixed-issues","id":"blog/use-claude-fixed-issues","title":"\u4f7f\u7528Claude\u4fee\u6539Knife4j\u4e2d\u7684issues","description":"\u4f7f\u7528Claude\u4fee\u6539Knife4j\u4e2d\u7684issues","source":"@site/docs/blog/use-claude-fixed-issue.mdx","sourceDirName":"blog","slug":"/blog/use-claude-fixed-issues","permalink":"/docs/blog/use-claude-fixed-issues","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1689407642,"formattedLastUpdatedAt":"2023\u5e747\u670815\u65e5","sidebarPosition":4,"frontMatter":{"id":"use-claude-fixed-issues","title":"\u4f7f\u7528Claude\u4fee\u6539Knife4j\u4e2d\u7684issues","description":"\u4f7f\u7528Claude\u4fee\u6539Knife4j\u4e2d\u7684issues","keywords":["claude\u4fee\u6539\u4ee3\u7801"],"sidebar_position":4,"author":"\u516b\u4e00\u83dc\u5200","data":"2023\u5e747\u670815\u65e5"}},{"unversionedId":"changelog/changelog-index","id":"changelog/changelog-index","title":"\u66f4\u65b0\u65e5\u5fd7","description":"Knife4j\u53d1\u7248\u672c\u65e5\u5fd7","source":"@site/docs/changelog/index.mdx","sourceDirName":"changelog","slug":"/changelog/","permalink":"/docs/changelog/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691914117,"formattedLastUpdatedAt":"2023\u5e748\u670813\u65e5","frontMatter":{"id":"changelog-index","title":"\u66f4\u65b0\u65e5\u5fd7","description":"Knife4j\u53d1\u7248\u672c\u65e5\u5fd7"},"sidebar":"changelog","next":{"title":"v4.0.0\u7248\u672c-2022/12/20","permalink":"/docs/changelog/x/4.0"}},{"unversionedId":"changelog/x/2017-04-19-swagger-bootstrap-ui-open","id":"changelog/x/2017-04-19-swagger-bootstrap-ui-open","title":"[v1.0-2017/04/19 \u5f00\u6e90]","description":"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90","source":"@site/docs/changelog/1.x/2017-04-19-swagger-bootstrap-ui-open.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-04-19-swagger-bootstrap-ui-open","permalink":"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},{"unversionedId":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","id":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","description":"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-04-27-swagger-bootstrap-ui-1.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},"next":{"title":"[v1.0-2017/04/19 \u5f00\u6e90]","permalink":"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open"}},{"unversionedId":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","id":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","description":"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-05-14-swagger-bootstrap-ui-1.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},"next":{"title":"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]","permalink":"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},{"unversionedId":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","id":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","description":"swagger-bootstrap-ui 1.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-07-05-swagger-bootstrap-ui-1.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},"next":{"title":"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"}},{"unversionedId":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","id":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","description":"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-07-11-swagger-bootstrap-ui-1.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},"next":{"title":"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]","permalink":"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"}},{"unversionedId":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","id":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","description":"swagger-bootstrap-ui 1.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-09-01-swagger-bootstrap-ui-1.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"},"next":{"title":"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]","permalink":"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"}},{"unversionedId":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","id":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","description":"swagger-bootstrap-ui 1.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-09-06-swagger-bootstrap-ui-1.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"},"next":{"title":"[v1.5-2017/09/01 \u4fee\u6539groupId]","permalink":"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"}},{"unversionedId":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","id":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","description":"swagger-bootstrap-ui 1.7 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2017-12-18-swagger-bootstrap-ui-1.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"},"next":{"title":"[v1.6-2017/09/06 \u652f\u6301\u6587\u4ef6\u4e0a\u4f20]","permalink":"/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"}},{"unversionedId":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","id":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","description":"\u4e3b\u8981\u5305\u542b\u6587\u6863\u8bf4\u660e\u3001\u5728\u7ebf\u8c03\u8bd5\u4e24\u5927\u6838\u5fc3\u529f\u80fd","source":"@site/docs/changelog/1.x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"},"next":{"title":"[v1.7-2017/12/18 \u5206\u7ec4\u529f\u80fd\u5b9e\u73b0]","permalink":"/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"}},{"unversionedId":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","id":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"},"next":{"title":"[v1.7.2-2018/01/20 \u54cd\u5e94\u72b6\u6001\u7801\u65e0\u6548]","permalink":"/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"}},{"unversionedId":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","id":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","description":"swagger-bootstrap-ui 1.7.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"},"next":{"title":"[v1.7.3-2018/04/28 HTTP\u5e38\u89c4\u65b9\u6cd5\u652f\u6301]","permalink":"/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"}},{"unversionedId":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","id":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","description":"swagger-bootstrap-ui 1.7.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"},"next":{"title":"[v1.7.5-2018/07/16 Ui\u5168\u9762\u6539\u7248]","permalink":"/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"}},{"unversionedId":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","id":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","description":"swagger-bootstrap-ui 1.7.7 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"},"next":{"title":"[v1.7.6-2018/07/18 \u5168\u5c40\u9ed8\u8ba4\u53c2\u6570]","permalink":"/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"}},{"unversionedId":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","id":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},"next":{"title":"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]","permalink":"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"}},{"unversionedId":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","id":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","description":"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},"next":{"title":"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"}},{"unversionedId":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","id":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","description":"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},"next":{"title":"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]","permalink":"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"}},{"unversionedId":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","id":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","description":"swagger-bootstrap-ui 1.8.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"},"next":{"title":"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]","permalink":"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"}},{"unversionedId":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","id":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","description":"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},"next":{"title":"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]","permalink":"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"}},{"unversionedId":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","id":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","description":"swagger-bootstrap-ui 1.8.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"},"next":{"title":"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]","permalink":"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"}},{"unversionedId":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","id":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","description":"swagger-bootstrap-ui 1.8.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"},"next":{"title":"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]","permalink":"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"}},{"unversionedId":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","id":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","description":"swagger-bootstrap-ui 1.8.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"},"next":{"title":"[v1.8.4-2018/09/25 Model\u89e3\u6790\u5f02\u5e38\u4fee\u590d]","permalink":"/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"}},{"unversionedId":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","id":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","description":"swagger-bootstrap-ui 1.8.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"},"next":{"title":"[v1.8.5-2018/10/16 \u6587\u6863\u589e\u5f3a,\u63a5\u53e3\u6392\u5e8f]","permalink":"/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"}},{"unversionedId":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","id":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","description":"Swagger-Bootstrap-Ui 1.8.7 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"},"next":{"title":"[v1.8.6-2018/10/31 Spring MVC\u63a5\u53e3\u589e\u5f3a\u5f02\u5e38]","permalink":"/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"}},{"unversionedId":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","id":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","description":"Swagger-Bootstrap-Ui 1.8.8 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"},"next":{"title":"[v1.8.7-2018/11/12 Swagger Models\u652f\u6301]","permalink":"/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"}},{"unversionedId":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","id":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","description":"Swagger-Bootstrap-Ui 1.8.9 \u53d1\u5e03\u4e86\u3002Swagger-Bootstrap-Ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"},"next":{"title":"[v1.8.8-2018/12/17 \u591a\u4e2a\u54cd\u5e94code\u652f\u6301]","permalink":"/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"}},{"unversionedId":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","id":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","description":"SwaggerBootstrapUi 1.9.0 \u53d1\u5e03\u4e86\u3002SwaggerBootstrapUi\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"},"next":{"title":"[v1.8.9-2019/01/11 \u6587\u4ef6\u4e0b\u8f7d\u3001\u589e\u5f3a\u4f18\u5316]","permalink":"/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"}},{"unversionedId":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","id":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","description":"swagger-bootstrap-ui 1.9.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"},"next":{"title":"[v1.9.0-2019/02/25 \u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4]","permalink":"/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"}},{"unversionedId":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","id":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","description":"swagger-bootstrap-ui 1.9.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"},"next":{"title":"[v1.9.1-2019/03/11 \u4f18\u5316\u5927\u6570\u636e\u54cd\u5e94\u63a5\u53e3]","permalink":"/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"}},{"unversionedId":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","id":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","description":"swagger-bootstrap-ui 1.9.3 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"},"next":{"title":"[v1.9.2-2019/04/08 \u63d0\u4f9b\u524d\u540e\u7aef\u5206\u79bb\u89e3\u51b3\u65b9\u6848]","permalink":"/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"}},{"unversionedId":"changelog/x/2019-05-20-knife4j-admin-1.0-issue","id":"changelog/x/2019-05-20-knife4j-admin-1.0-issue","title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","description":"knife4j-admin\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027,\u7ed3\u5408knife4j\u5bf9Swagger\u7684\u6587\u6863\u8fdb\u884c\u52a8\u6001\u805a\u5408\u7684\u7ba1\u7406\u5e73\u53f0","source":"@site/docs/changelog/1.x/2019-05-20-knife4j-admin-1.0-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-05-20-knife4j-admin-1.0-issue","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"},"next":{"title":"[v1.9.3-2019/04/23 i18n\u53ca\u81ea\u5b9a\u4e49\u6587\u6863\u652f\u6301]","permalink":"/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"}},{"unversionedId":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","id":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","description":"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},"next":{"title":"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]","permalink":"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"}},{"unversionedId":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","id":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","description":"swagger-bootstrap-ui 1.9.5 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"},"next":{"title":"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]","permalink":"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"}},{"unversionedId":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","id":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","description":"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f","source":"@site/docs/changelog/1.x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.md","sourceDirName":"changelog/1.x","slug":"/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"},"next":{"title":"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]","permalink":"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"}},{"unversionedId":"changelog/x/2019-12-16-knife4j-2.0.0-issue","id":"changelog/x/2019-12-16-knife4j-2.0.0-issue","title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64.","source":"@site/docs/changelog/2.x/2019-12-16-knife4j-2.0.0-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2019-12-16-knife4j-2.0.0-issue","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"},"next":{"title":"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]","permalink":"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"}},{"unversionedId":"changelog/x/2019-12-23-knife4j-2.0.1-issue","id":"changelog/x/2019-12-23-knife4j-2.0.1-issue","title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2019-12-23-knife4j-2.0.1-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2019-12-23-knife4j-2.0.1-issue","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"},"next":{"title":"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]","permalink":"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"}},{"unversionedId":"changelog/x/2020-03-08-knife4j-2.0.2-issue","id":"changelog/x/2020-03-08-knife4j-2.0.2-issue","title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-03-08-knife4j-2.0.2-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-03-08-knife4j-2.0.2-issue","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"},"next":{"title":"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]","permalink":"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"}},{"unversionedId":"changelog/x/2020-05-24-knife4j-2.0.3-issue","id":"changelog/x/2020-05-24-knife4j-2.0.3-issue","title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-05-24-knife4j-2.0.3-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-05-24-knife4j-2.0.3-issue","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue"},"next":{"title":"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]","permalink":"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"}},{"unversionedId":"changelog/x/2020-06-28-knife4j-2.0.4-issue","id":"changelog/x/2020-06-28-knife4j-2.0.4-issue","title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-06-28-knife4j-2.0.4-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-06-28-knife4j-2.0.4-issue","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"},"next":{"title":"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]","permalink":"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"}},{"unversionedId":"changelog/x/2020-09-14-knife4j-2.0.5-issue","id":"changelog/x/2020-09-14-knife4j-2.0.5-issue","title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-09-14-knife4j-2.0.5-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-09-14-knife4j-2.0.5-issue","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue"},"next":{"title":"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]","permalink":"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue"}},{"unversionedId":"changelog/x/2020-10-26-knife4j-2.0.6-issue","id":"changelog/x/2020-10-26-knife4j-2.0.6-issue","title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-10-26-knife4j-2.0.6-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-10-26-knife4j-2.0.6-issue","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue"},"next":{"title":"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]","permalink":"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"}},{"unversionedId":"changelog/x/2020-11-02-knife4j-2.0.7-issue","id":"changelog/x/2020-11-02-knife4j-2.0.7-issue","title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-11-02-knife4j-2.0.7-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-11-02-knife4j-2.0.7-issue","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"},"next":{"title":"[v2.0.6-2020/10/26 Knife4j 2.0.6\u53d1\u5e03,\u652f\u6301OpenAPI3\u53caAuth2\u8ba4\u8bc1]","permalink":"/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue"}},{"unversionedId":"changelog/x/2020-11-22-knife4j-2.0.8-issue","id":"changelog/x/2020-11-22-knife4j-2.0.8-issue","title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2020-11-22-knife4j-2.0.8-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2020-11-22-knife4j-2.0.8-issue","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue"},"next":{"title":"[v2.0.7-2020/11/02 Knife4j 2.0.7\u53d1\u5e03,\u7ec6\u8282\u5904\u7406]","permalink":"/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue"}},{"unversionedId":"changelog/x/2021-06-28-knife4j-2.0.9-issue","id":"changelog/x/2021-06-28-knife4j-2.0.9-issue","title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","description":"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177","source":"@site/docs/changelog/2.x/2021-06-28-knife4j-2.0.9-issue.md","sourceDirName":"changelog/2.x","slug":"/changelog/x/2021-06-28-knife4j-2.0.9-issue","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.3.0\u7248\u672c-2023/08/06","permalink":"/docs/changelog/x/4.3"},"next":{"title":"[v2.0.8-2020/11/22 Knife4j 2.0.8\u53d1\u5e03,\u8f7b\u91cf\u7ea7\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863\u4e2d\u95f4\u4ef6\u8bde\u751f]","permalink":"/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue"}},{"unversionedId":"changelog/x/4.0","id":"changelog/x/4.0","title":"v4.0.0\u7248\u672c-2022/12/20","description":"Knife4j 4.0\u7248\u672c\u4eca\u5929\u6b63\u5f0f\u53d1\u5e03\u4e86\uff01 \ud83c\udf89\ud83c\udf89\ud83c\udf89","source":"@site/docs/changelog/4.x/4.0.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.0","permalink":"/docs/changelog/x/4.0","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"\u66f4\u65b0\u65e5\u5fd7","permalink":"/docs/changelog/"},"next":{"title":"v4.1.0\u7248\u672c-2023/03/23","permalink":"/docs/changelog/x/4.1"}},{"unversionedId":"changelog/x/4.1","id":"changelog/x/4.1","title":"v4.1.0\u7248\u672c-2023/03/23","description":"\u5927\u5bb6\u597d\uff0cKnife4j v4.1.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u4e24\u4e2a\u95ee\u9898\uff1a","source":"@site/docs/changelog/4.x/4.1.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.1","permalink":"/docs/changelog/x/4.1","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691583139,"formattedLastUpdatedAt":"2023\u5e748\u67089\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.0.0\u7248\u672c-2022/12/20","permalink":"/docs/changelog/x/4.0"},"next":{"title":"v4.2.0\u7248\u672c-2023/07/31","permalink":"/docs/changelog/x/4.2"}},{"unversionedId":"changelog/x/4.2","id":"changelog/x/4.2","title":"v4.2.0\u7248\u672c-2023/07/31","description":"\u5927\u5bb6\u597d\uff0cKnife4j v4.2.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a","source":"@site/docs/changelog/4.x/4.2.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.2","permalink":"/docs/changelog/x/4.2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1690884948,"formattedLastUpdatedAt":"2023\u5e748\u67081\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.1.0\u7248\u672c-2023/03/23","permalink":"/docs/changelog/x/4.1"},"next":{"title":"v4.3.0\u7248\u672c-2023/08/06","permalink":"/docs/changelog/x/4.3"}},{"unversionedId":"changelog/x/4.3","id":"changelog/x/4.3","title":"v4.3.0\u7248\u672c-2023/08/06","description":"\u5927\u5bb6\u597d\uff0cKnife4j v4.3.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a","source":"@site/docs/changelog/4.x/4.3.md","sourceDirName":"changelog/4.x","slug":"/changelog/x/4.3","permalink":"/docs/changelog/x/4.3","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691361998,"formattedLastUpdatedAt":"2023\u5e748\u67086\u65e5","frontMatter":{},"sidebar":"changelog","previous":{"title":"v4.2.0\u7248\u672c-2023/07/31","permalink":"/docs/changelog/x/4.2"},"next":{"title":"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]","permalink":"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue"}},{"unversionedId":"community/apache","id":"community/apache","title":"Apache 2.0 \u8bb8\u53ef\u8bc1","description":"Knife4j\u662f\u5728Apache 2.0\u8bb8\u53ef\u4e0b\u53d1\u884c\u7684\u5f00\u6e90\u8f6f\u4ef6\u3002","source":"@site/docs/community/apache.md","sourceDirName":"community","slug":"/community/apache","permalink":"/docs/community/apache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u6e90\u4ee3\u7801","permalink":"/docs/community/sourcecode"},"next":{"title":"\u7248\u672c\u8bf4\u660e","permalink":"/docs/community/changelog"}},{"unversionedId":"community/changelog","id":"community/changelog","title":"\u7248\u672c\u8bf4\u660e","description":"\u5728\u66f4\u540d\u4e3aKnife4j\u4e4b\u524d,\u539f\u6765\u7684\u540d\u79f0\u662f\u53ebswagger-bootstrap-ui\uff0c\u8fd9\u662f\u4e24\u79cd\u4e0d\u4e00\u6837\u98ce\u683c\u7684Ui,\u5bf9\u6bd4\u60c5\u51b5\u5982\u4e0b\uff1a","source":"@site/docs/community/changelog.md","sourceDirName":"community","slug":"/community/changelog","permalink":"/docs/community/changelog","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"Apache 2.0 \u8bb8\u53ef\u8bc1","permalink":"/docs/community/apache"},"next":{"title":"\u8d5e\u52a9\u6211\u4eec","permalink":"/docs/community/donate"}},{"unversionedId":"community/community","id":"community/community","title":"\u793e\u533a","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/index.mdx","sourceDirName":"community","slug":"/community/","permalink":"/docs/community/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660916905,"formattedLastUpdatedAt":"2022\u5e748\u670819\u65e5","frontMatter":{"id":"community","title":"\u793e\u533a","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","permalink":"/docs/introduction/milestone"},"next":{"title":"\u83b7\u53d6\u5e2e\u52a9","permalink":"/docs/community/community-get-helps"}},{"unversionedId":"community/community-get-helps","id":"community/community-get-helps","title":"\u83b7\u53d6\u5e2e\u52a9","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/get_help.mdx","sourceDirName":"community","slug":"/community/community-get-helps","permalink":"/docs/community/community-get-helps","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"community-get-helps","title":"\u83b7\u53d6\u5e2e\u52a9","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u793e\u533a","permalink":"/docs/community/"},"next":{"title":"\u6e90\u4ee3\u7801","permalink":"/docs/community/sourcecode"}},{"unversionedId":"community/contributing","id":"community/contributing","title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","description":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j","source":"@site/docs/community/contributing.mdx","sourceDirName":"community","slug":"/community/contributing","permalink":"/docs/community/contributing","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1693280772,"formattedLastUpdatedAt":"2023\u5e748\u670829\u65e5","frontMatter":{"id":"contributing","title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","description":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801\u7ed9Knife4j"},"sidebar":"docs","previous":{"title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","permalink":"/docs/community/joinus"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"}},{"unversionedId":"community/donate","id":"community/donate","title":"\u8d5e\u52a9\u6211\u4eec","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/donate.mdx","sourceDirName":"community","slug":"/community/donate","permalink":"/docs/community/donate","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"donate","title":"\u8d5e\u52a9\u6211\u4eec","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u7248\u672c\u8bf4\u660e","permalink":"/docs/community/changelog"},"next":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/community/simple-demo"}},{"unversionedId":"community/joinus","id":"community/joinus","title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","description":"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0eKnife4j\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684\u8d21\u732e\u6587\u6863\u3002","source":"@site/docs/community/joinus.md","sourceDirName":"community","slug":"/community/joinus","permalink":"/docs/community/joinus","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"Knife4j\u7248\u672c\u53c2\u8003","permalink":"/docs/quick-start/start-knife4j-version"},"next":{"title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","permalink":"/docs/community/contributing"}},{"unversionedId":"community/simple-demo","id":"community/simple-demo","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/community/simple-demo.mdx","sourceDirName":"community","slug":"/community/simple-demo","permalink":"/docs/community/simple-demo","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678022183,"formattedLastUpdatedAt":"2023\u5e743\u67085\u65e5","frontMatter":{"id":"simple-demo","title":"\u793a\u4f8b\u4ee3\u7801","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u8d5e\u52a9\u6211\u4eec","permalink":"/docs/community/donate"},"next":{"title":"\u589e\u5f3a\u7279\u6027","permalink":"/docs/features/"}},{"unversionedId":"community/sourcecode","id":"community/sourcecode","title":"\u6e90\u4ee3\u7801","description":"\u4f60\u53ef\u4ee5\u5728\u7801\u4e91Gitee\u4e0ahttps://gitee.com/xiaoym/knife4j\u83b7\u5f97\u6211\u4eec\u6700\u65b0\u7684\u6e90\u4ee3\u7801","source":"@site/docs/community/sourcecode.md","sourceDirName":"community","slug":"/community/sourcecode","permalink":"/docs/community/sourcecode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u83b7\u53d6\u5e2e\u52a9","permalink":"/docs/community/community-get-helps"},"next":{"title":"Apache 2.0 \u8bb8\u53ef\u8bc1","permalink":"/docs/community/apache"}},{"unversionedId":"donate/index","id":"donate/index","title":"index","description":"","source":"@site/docs/donate/index.mdx","sourceDirName":"donate","slug":"/donate/","permalink":"/docs/donate/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"faq/faq-index","id":"faq/faq-index","title":"FAQ","description":"Knife4j FAQ","source":"@site/docs/faq/index.mdx","sourceDirName":"faq","slug":"/faq/","permalink":"/docs/faq/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{"id":"faq-index","title":"FAQ","description":"Knife4j FAQ"},"sidebar":"faq","next":{"title":"java.lang.NumberFormatException: For input string: \\"\\"","permalink":"/docs/faq/format-exception"}},{"unversionedId":"faq/format-exception","id":"faq/format-exception","title":"java.lang.NumberFormatException: For input string: \\"\\"","description":"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38java.lang.NumberFormatException \\"\\"","source":"@site/docs/faq/format-exception.md","sourceDirName":"faq","slug":"/faq/format-exception","permalink":"/docs/faq/format-exception","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"FAQ","permalink":"/docs/faq/"},"next":{"title":"FAQ","permalink":"/docs/faq/"}},{"unversionedId":"faq/knife4j-exception","id":"faq/knife4j-exception","title":"Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38","description":"\u5f88\u591a\u670b\u53cb\u5728\u96c6\u6210Knife4j\u6587\u6863\u7684\u65f6\u5019\u4f1a\u5f39\u51fa\u8be5\u5f02\u5e38,\u6548\u679c\u56fe\u5982\u4e0b:","source":"@site/docs/faq/knife4j-exception.md","sourceDirName":"faq","slug":"/faq/knife4j-exception","permalink":"/docs/faq/knife4j-exception","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"FAQ","permalink":"/docs/faq/"},"next":{"title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","permalink":"/docs/faq/md-format-error"}},{"unversionedId":"faq/md-format-error","id":"faq/md-format-error","title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","description":"\u5373\u4f7f\u6587\u6863\u683c\u5f0f\u9519\u4e71\uff0c\u4f46\u662f\u5728\u76f8\u5173markdown\u8f6c\u6362\u8f6f\u4ef6\u4e2d\u4f9d\u7136\u662f\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u7684\uff0c\u8be5\u529f\u80fd\u4f7f\u7528art-template\u6765\u6e32\u67d3\uff0c\u591a\u5c11\u4f1a\u51fa\u73b0\u4e00\u4e9b\u7a7a\u683c\u3001\u6362\u884c\u4e4b\u7c7b\u7684\u95ee\u9898","source":"@site/docs/faq/md-format-error.md","sourceDirName":"faq","slug":"/faq/md-format-error","permalink":"/docs/faq/md-format-error","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Knife4j\u6587\u6863\u8bf7\u6c42\u5f02\u5e38","permalink":"/docs/faq/knife4j-exception"},"next":{"title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","permalink":"/docs/faq/sp-nmerror"}},{"unversionedId":"faq/sp-nmerror","id":"faq/sp-nmerror","title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","description":"\u5f88\u591a\u670b\u53cb\u5728\u5c06SpringFox-Swagger\u7248\u672c\u5347\u7ea7\u52302.9.2\u7248\u672c\u540e,\u8fd0\u884c\u7a0b\u5e8f\u90fd\u4f1a\u51fa\u73b0\u5982\u4e0b\u9519\u8bef\uff1a","source":"@site/docs/faq/sp-nmerror.md","sourceDirName":"faq","slug":"/faq/sp-nmerror","permalink":"/docs/faq/sp-nmerror","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u79bb\u7ebf\u6587\u6863markdown\u683c\u5f0f\u9519\u4e71","permalink":"/docs/faq/md-format-error"},"next":{"title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","permalink":"/docs/faq/springboot-404"}},{"unversionedId":"faq/springboot-404","id":"faq/springboot-404","title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","description":"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5e76\u4e0d\u9700\u8981\u6dfb\u52a0\u6b64\u914d\u7f6e\u5373\u53ef\u8bbf\u95ee","source":"@site/docs/faq/springboot-404.md","sourceDirName":"faq","slug":"/faq/springboot-404","permalink":"/docs/faq/springboot-404","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Springfox-Swagger\u5347\u7ea7\u52302.9.2\u5bfc\u81f4\u7684NoSuchMethodError\u5f02\u5e38","permalink":"/docs/faq/sp-nmerror"},"next":{"title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","permalink":"/docs/faq/springmvc-404"}},{"unversionedId":"faq/springmvc-404","id":"faq/springmvc-404","title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","description":"SpringMvc\u4e2d\u6587\u6863\u51fa\u73b0\u5f02\u5e38\u4e00\u822c\u52062\u79cd\u60c5\u51b5\uff1a","source":"@site/docs/faq/springmvc-404.md","sourceDirName":"faq","slug":"/faq/springmvc-404","permalink":"/docs/faq/springmvc-404","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"SpringBoot\u8bbf\u95eedoc.html\u9875\u9762404","permalink":"/docs/faq/springboot-404"},"next":{"title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","permalink":"/docs/faq/springmvc-notshow"}},{"unversionedId":"faq/springmvc-notshow","id":"faq/springmvc-notshow","title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","description":"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e","source":"@site/docs/faq/springmvc-notshow.md","sourceDirName":"faq","slug":"/faq/springmvc-notshow","permalink":"/docs/faq/springmvc-notshow","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"SpringMvc\u8bbf\u95ee\u9875\u9762404","permalink":"/docs/faq/springmvc-404"},"next":{"title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","permalink":"/docs/faq/swagger-des-not-found"}},{"unversionedId":"faq/swagger-des-not-found","id":"faq/swagger-des-not-found","title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","description":"\u4e0d\u7ba1\u662f\u5728SwaggerBootstrapUi\u4ee5\u524d\u7684\u7248\u672c\u4e2d,\u8fd8\u662f\u5728SwaggerBootstrapUi\u76841.8.9\u7248\u672c\u53d1\u5e03\u65b0\u529f\u80fd\u5b57\u6bb5\u6ce8\u91ca\u9010\u884c\u663e\u793a\u65f6,\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u95ee\u4e3a\u5565\u81ea\u5df1\u7684UI\u6587\u6863\u4e0a\u4e0d\u663e\u793a\u6ce8\u91ca.","source":"@site/docs/faq/swagger-des-not-found.md","sourceDirName":"faq","slug":"/faq/swagger-des-not-found","permalink":"/docs/faq/swagger-des-not-found","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863","permalink":"/docs/faq/springmvc-notshow"},"next":{"title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","permalink":"/docs/faq/swaggerResourceInvalid"}},{"unversionedId":"faq/swaggerResourceInvalid","id":"faq/swaggerResourceInvalid","title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","description":"\u5728swagger-bootstrap-ui\u76841.9.X\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c","source":"@site/docs/faq/swaggerResourceInvalid.md","sourceDirName":"faq","slug":"/faq/swaggerResourceInvalid","permalink":"/docs/faq/swaggerResourceInvalid","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a","permalink":"/docs/faq/swagger-des-not-found"},"next":{"title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","permalink":"/docs/faq/upload-error"}},{"unversionedId":"faq/upload-error","id":"faq/upload-error","title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","description":"\u5728\u4f7f\u7528SwaggerBootstrapUi\u7684\u670b\u53cb\u7ecf\u5e38\u8be2\u95ee\u7684\u4e00\u4e2a\u95ee\u9898,\u4e3a\u4ec0\u4e48\u4e0a\u4f20\u53c2\u6570file\u5bf9\u8c61\u4e0d\u663e\u793afile\u6587\u672c\u57df,\u800c\u662f\u666e\u901a\u6587\u672c,\u5982\u4e0b\u56fe\uff1a","source":"@site/docs/faq/upload-error.md","sourceDirName":"faq","slug":"/faq/upload-error","permalink":"/docs/faq/upload-error","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e","permalink":"/docs/faq/swaggerResourceInvalid"},"next":{"title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","permalink":"/docs/faq/v4/knife4j-base64-response"}},{"unversionedId":"faq/v4/knife4j-base64-response","id":"faq/v4/knife4j-base64-response","title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","description":"Knife4j \u57284.1.0\u7248\u672c\u5347\u7ea7\u4e86springdoc\u7684\u7248\u672c\u53f7\uff0c\u5bfc\u81f4\u5f88\u591a\u5f00\u53d1\u8005\u53cd\u9988\u4f1a\u51fa\u73b0\u521d\u59cb\u5316OpenAPI\u63a5\u53e3\u54cd\u5e94\u7684\u662fBase64\u7f16\u7801\u7684\u60c5\u51b5.\u5bfc\u81f4\u5728Knife4j \u754c\u9762\u521d\u59cb\u5316\u63a5\u53e3\u5931\u8d25\u3002","source":"@site/docs/faq/v4/knife4j-base64-response.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-base64-response","permalink":"/docs/faq/v4/knife4j-base64-response","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679663936,"formattedLastUpdatedAt":"2023\u5e743\u670824\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df","permalink":"/docs/faq/upload-error"},"next":{"title":"No OpenAPI resource found for group: swagger-config","permalink":"/docs/faq/v4/knife4j-no-openapi"}},{"unversionedId":"faq/v4/knife4j-no-openapi","id":"faq/v4/knife4j-no-openapi","title":"No OpenAPI resource found for group: swagger-config","description":"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7\u5230Knife4j 4.0\u7684OpenAPI3\u7248\u672c\u4e2d\uff0c\u4f1a\u51fa\u73b0\u8be5\u9519\u8bef\u4fe1\u606f,\u5bfc\u81f4\u9875\u9762\u52a0\u8f7d\u5931\u8d25","source":"@site/docs/faq/v4/knife4j-no-openapi.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-no-openapi","permalink":"/docs/faq/v4/knife4j-no-openapi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677160565,"formattedLastUpdatedAt":"2023\u5e742\u670823\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"\u9488\u5bf94.1.0\u7248\u672c\u63a5\u53e3\u54cd\u5e94Base64\u7f16\u7801\u7684\u60c5\u51b5","permalink":"/docs/faq/v4/knife4j-base64-response"},"next":{"title":"Knife4j v4.0\u7248\u672c\u9488\u5bf9\u53c2\u6570\u89e3\u6790ParameterObject\u7684\u95ee\u9898\u8bf4\u660e","permalink":"/docs/faq/v4/knife4j-parameterobject-flat-param"}},{"unversionedId":"faq/v4/knife4j-parameterobject-flat-param","id":"faq/v4/knife4j-parameterobject-flat-param","title":"Knife4j v4.0\u7248\u672c\u9488\u5bf9\u53c2\u6570\u89e3\u6790ParameterObject\u7684\u95ee\u9898\u8bf4\u660e","description":"\u8be5\u6587\u6863\u4ec5\u9650Knife4j v4.0.0\u7248\u672c\u4f5c\u4e3a\u4e00\u79cd\u89e3\u51b3\u65b9\u6848\uff0c\u5728\u672a\u6765Knife4j v4.1.0\u7248\u672c\u4e2d\uff0c\u4f1a\u5c06springdoc-openapi\u7684\u57fa\u7840\u7248\u672c\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\uff0c\u8fd9\u6837\u5f00\u53d1\u8005\u5c31\u4e0d\u7528\u5728maven\u4e2d\u4f7f\u7528exclusions\u8fdb\u884c\u6392\u9664\u4f4e\u7248\u672c\u518d\u91cd\u65b0\u5f15\u5165\u4e86","source":"@site/docs/faq/v4/knife4j-parameterobject-flat-param.md","sourceDirName":"faq/v4","slug":"/faq/v4/knife4j-parameterobject-flat-param","permalink":"/docs/faq/v4/knife4j-parameterobject-flat-param","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677243515,"formattedLastUpdatedAt":"2023\u5e742\u670824\u65e5","frontMatter":{},"sidebar":"faq","previous":{"title":"No OpenAPI resource found for group: swagger-config","permalink":"/docs/faq/v4/knife4j-no-openapi"}},{"unversionedId":"features/accessControl","id":"features/accessControl","title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","description":"- \u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/accessControl.md","sourceDirName":"features","slug":"/features/accessControl","permalink":"/docs/features/accessControl","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1689774819,"formattedLastUpdatedAt":"2023\u5e747\u670819\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","permalink":"/docs/features/selfdocument"},"next":{"title":"3.6 \u63a5\u53e3\u6392\u5e8f","permalink":"/docs/features/apiSort"}},{"unversionedId":"features/afterScript","id":"features/afterScript","title":"3.18 afterScript","description":"\u8f93\u5165\u56fe\u7247\u8bf4\u660e","source":"@site/docs/features/afterScript.md","sourceDirName":"features","slug":"/features/afterScript","permalink":"/docs/features/afterScript","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.17 \u81ea\u5b9a\u4e49Host","permalink":"/docs/features/host"},"next":{"title":"3.19 OAuth2","permalink":"/docs/features/oauth2"}},{"unversionedId":"features/apiSort","id":"features/apiSort","title":"3.6 \u63a5\u53e3\u6392\u5e8f","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/apiSort.md","sourceDirName":"features","slug":"/features/apiSort","permalink":"/docs/features/apiSort","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1685322264,"formattedLastUpdatedAt":"2023\u5e745\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","permalink":"/docs/features/accessControl"},"next":{"title":"3.7 \u5206\u7ec4\u6392\u5e8f","permalink":"/docs/features/tagSort"}},{"unversionedId":"features/author","id":"features/author","title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/author.md","sourceDirName":"features","slug":"/features/author","permalink":"/docs/features/author","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.2 i18n\u56fd\u9645\u5316","permalink":"/docs/features/i18n"},"next":{"title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","permalink":"/docs/features/selfdocument"}},{"unversionedId":"features/clearCache","id":"features/clearCache","title":"3.14 \u6e05\u9664\u7f13\u5b58","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/clearCache.md","sourceDirName":"features","slug":"/features/clearCache","permalink":"/docs/features/clearCache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.13 \u641c\u7d22API\u63a5\u53e3","permalink":"/docs/features/search"},"next":{"title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicRequestDescription"}},{"unversionedId":"features/customFooter","id":"features/customFooter","title":"3.24 \u81ea\u5b9a\u4e49Footer","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/customFooter.md","sourceDirName":"features","slug":"/features/customFooter","permalink":"/docs/features/customFooter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","permalink":"/docs/features/customHome"},"next":{"title":"3.25 JSR303","permalink":"/docs/features/jsr303"}},{"unversionedId":"features/customHome","id":"features/customHome","title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/customHome.md","sourceDirName":"features","slug":"/features/customHome","permalink":"/docs/features/customHome","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691292393,"formattedLastUpdatedAt":"2023\u5e748\u67086\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","permalink":"/docs/features/swaggermodels"},"next":{"title":"3.24 \u81ea\u5b9a\u4e49Footer","permalink":"/docs/features/customFooter"}},{"unversionedId":"features/dynamicRequestDescription","id":"features/dynamicRequestDescription","title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/dynamicRequestDescription.md","sourceDirName":"features","slug":"/features/dynamicRequestDescription","permalink":"/docs/features/dynamicRequestDescription","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.14 \u6e05\u9664\u7f13\u5b58","permalink":"/docs/features/clearCache"},"next":{"title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicResponseDescription"}},{"unversionedId":"features/dynamicRequestParameter","id":"features/dynamicRequestParameter","title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/dynamicRequestParameter.md","sourceDirName":"features","slug":"/features/dynamicRequestParameter","permalink":"/docs/features/dynamicRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1689253366,"formattedLastUpdatedAt":"2023\u5e747\u670813\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","permalink":"/docs/features/requestCache"},"next":{"title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","permalink":"/docs/features/exportDocument"}},{"unversionedId":"features/dynamicResponseDescription","id":"features/dynamicResponseDescription","title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/dynamicResponseDescription.md","sourceDirName":"features","slug":"/features/dynamicResponseDescription","permalink":"/docs/features/dynamicResponseDescription","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicRequestDescription"},"next":{"title":"3.17 \u81ea\u5b9a\u4e49Host","permalink":"/docs/features/host"}},{"unversionedId":"features/enhance","id":"features/enhance","title":"3.1 \u589e\u5f3a\u6a21\u5f0f","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/features/enhance.mdx","sourceDirName":"features","slug":"/features/enhance","permalink":"/docs/features/enhance","draft":false,"tags":[],"version":"current","lastUpdatedBy":"zhanghaicheng","lastUpdatedAt":1673322047,"formattedLastUpdatedAt":"2023\u5e741\u670810\u65e5","frontMatter":{"id":"enhance","title":"3.1 \u589e\u5f3a\u6a21\u5f0f","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u589e\u5f3a\u7279\u6027","permalink":"/docs/features/"},"next":{"title":"3.2 i18n\u56fd\u9645\u5316","permalink":"/docs/features/i18n"}},{"unversionedId":"features/exportDocument","id":"features/exportDocument","title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219,\u79bb\u7ebf\u6587\u6863\u5bfc\u51fa\u529f\u80fd\u76ee\u524d\u6682\u65f6\u672a\u63d0\u4f9b\u5bfc\u51faPDF,\u63a8\u8350\u5927\u5bb6\u4f7f\u7528\u4e00\u6b3eMD\u7684\u6e32\u67d3\u8f6f\u4ef6(Typora)\u8fdb\u884c\u5bfc\u51fa","source":"@site/docs/features/exportDocument.md","sourceDirName":"features","slug":"/features/exportDocument","permalink":"/docs/features/exportDocument","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678369652,"formattedLastUpdatedAt":"2023\u5e743\u67089\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/dynamicRequestParameter"},"next":{"title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/filterRequestParameter"}},{"unversionedId":"features/features","id":"features/features","title":"\u589e\u5f3a\u7279\u6027","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/features/index.mdx","sourceDirName":"features","slug":"/features/","permalink":"/docs/features/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"features","title":"\u589e\u5f3a\u7279\u6027","description":"Knife4j\u793e\u533a\u4fe1\u606f"},"sidebar":"docs","previous":{"title":"\u793a\u4f8b\u4ee3\u7801","permalink":"/docs/community/simple-demo"},"next":{"title":"3.1 \u589e\u5f3a\u6a21\u5f0f","permalink":"/docs/features/enhance"}},{"unversionedId":"features/filterRequestParameter","id":"features/filterRequestParameter","title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/filterRequestParameter.md","sourceDirName":"features","slug":"/features/filterRequestParameter","permalink":"/docs/features/filterRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863","permalink":"/docs/features/exportDocument"},"next":{"title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/includeRequestParameter"}},{"unversionedId":"features/forbidDebug","id":"features/forbidDebug","title":"3.26 \u7981\u7528\u8c03\u8bd5","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidDebug.md","sourceDirName":"features","slug":"/features/forbidDebug","permalink":"/docs/features/forbidDebug","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.25 JSR303","permalink":"/docs/features/jsr303"},"next":{"title":"3.27 \u7981\u7528\u641c\u7d22\u6846","permalink":"/docs/features/forbidSearch"}},{"unversionedId":"features/forbidOpenApi","id":"features/forbidOpenApi","title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidOpenApi.md","sourceDirName":"features","slug":"/features/forbidOpenApi","permalink":"/docs/features/forbidOpenApi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.27 \u7981\u7528\u641c\u7d22\u6846","permalink":"/docs/features/forbidSearch"},"next":{"title":"3.29 \u7248\u672c\u63a7\u5236","permalink":"/docs/features/gitVersion"}},{"unversionedId":"features/forbidSearch","id":"features/forbidSearch","title":"3.27 \u7981\u7528\u641c\u7d22\u6846","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.8\u5f00\u59cb","source":"@site/docs/features/forbidSearch.md","sourceDirName":"features","slug":"/features/forbidSearch","permalink":"/docs/features/forbidSearch","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.26 \u7981\u7528\u8c03\u8bd5","permalink":"/docs/features/forbidDebug"},"next":{"title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","permalink":"/docs/features/forbidOpenApi"}},{"unversionedId":"features/gitVersion","id":"features/gitVersion","title":"3.29 \u7248\u672c\u63a7\u5236","description":"knife4j \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a","source":"@site/docs/features/gitVersion.md","sourceDirName":"features","slug":"/features/gitVersion","permalink":"/docs/features/gitVersion","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a","permalink":"/docs/features/forbidOpenApi"},"next":{"title":"\u7248\u672c\u5347\u7ea7","permalink":"/docs/upgrading"}},{"unversionedId":"features/globalParameter","id":"features/globalParameter","title":"3.21 \u5168\u5c40\u53c2\u6570","description":"Knife4j\u63d0\u4f9b\u57fa\u4e8eUI\u4e34\u65f6\u8bbe\u7f6e\u5168\u5c40\u53c2\u6570\u529f\u80fd,\u4f8b\u5982\u540e\u53f0\u5168\u5c40token\u53c2\u6570\u7b49.\u63d0\u4f9b\u8be5\u529f\u80fd\u4e3b\u8981\u662f\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u8c03\u8bd5","source":"@site/docs/features/globalParameter.md","sourceDirName":"features","slug":"/features/globalParameter","permalink":"/docs/features/globalParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.20 \u5bfc\u51faPostman","permalink":"/docs/features/postman"},"next":{"title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","permalink":"/docs/features/swaggermodels"}},{"unversionedId":"features/host","id":"features/host","title":"3.17 \u81ea\u5b9a\u4e49Host","description":"\u5728Knife4j\u76842.0.4\u7248\u672c\u65b0\u589e\u8be5\u529f\u80fd,\u65b0\u589eHost\u7684\u4e2a\u6027\u5316\u914d\u7f6e\u4e5f\u662f\u65b9\u4fbf\u5f00\u53d1\u6216\u8c03\u8bd5\u4eba\u5458\u5728Swagger\u6587\u6863\u90e8\u7f72\u540e\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7edc\u73af\u5883,\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u8be5\u5c5e\u6027,\u65b9\u4fbf\u7684\u8fdb\u884c\u8c03\u8bd5.","source":"@site/docs/features/host.md","sourceDirName":"features","slug":"/features/host","permalink":"/docs/features/host","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca","permalink":"/docs/features/dynamicResponseDescription"},"next":{"title":"3.18 afterScript","permalink":"/docs/features/afterScript"}},{"unversionedId":"features/i18n","id":"features/i18n","title":"3.2 i18n\u56fd\u9645\u5316","description":"\u5728Knife4j 2.0.3\u7248\u672c\u63d0\u4f9b\u4e86i18n\u7684\u652f\u6301,\u76ee\u524d\u652f\u6301\u7684\u8bed\u8a00\u4e3b\u8981\u5305\u542b2\u79cd\uff1a\u4e2d\u6587(zh-CN)\u3001\u82f1\u6587(en-US)\u3002Knife4j\u9ed8\u8ba4\u662f\u4e2d\u6587","source":"@site/docs/features/i18n.md","sourceDirName":"features","slug":"/features/i18n","permalink":"/docs/features/i18n","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.1 \u589e\u5f3a\u6a21\u5f0f","permalink":"/docs/features/enhance"},"next":{"title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","permalink":"/docs/features/author"}},{"unversionedId":"features/includeRequestParameter","id":"features/includeRequestParameter","title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb","source":"@site/docs/features/includeRequestParameter.md","sourceDirName":"features","slug":"/features/includeRequestParameter","permalink":"/docs/features/includeRequestParameter","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/filterRequestParameter"},"next":{"title":"3.13 \u641c\u7d22API\u63a5\u53e3","permalink":"/docs/features/search"}},{"unversionedId":"features/jsr303","id":"features/jsr303","title":"3.25 JSR303","description":"JSR303\u89c4\u8303\u6ce8\u89e3\u5728\u76ee\u524d\u7684Knife4j\u754c\u9762\u4e2d\u505a\u7684\u6bd4\u8f83\u9690\u6666\uff0c\u4e3b\u8981\u662f\u8003\u8651\u5230\u5e76\u6ca1\u6709\u4e00\u4e2a\u597d\u7684\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u5448\u73b0\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u5728\u63a5\u53e3\u6587\u6863\u7684\u8bf7\u6c42\u53c2\u6570\u680f\u8fdb\u884c\u67e5\u770b","source":"@site/docs/features/jsr303.md","sourceDirName":"features","slug":"/features/jsr303","permalink":"/docs/features/jsr303","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.24 \u81ea\u5b9a\u4e49Footer","permalink":"/docs/features/customFooter"},"next":{"title":"3.26 \u7981\u7528\u8c03\u8bd5","permalink":"/docs/features/forbidDebug"}},{"unversionedId":"features/oauth2","id":"features/oauth2","title":"3.19 OAuth2","description":"Knife4j\u63d0\u4f9b\u7684OAuth2\u8ba4\u8bc1\u529f\u80fd\u76f8\u5bf9\u4e8e\u539f\u751fSwaggerUi\u6765\u8bf4\u4f7f\u7528\u8d77\u6765\u66f4\u52a0\u65b9\u4fbf,\u56e0\u6b64\u4e5f\u5f52\u4e3a\u589e\u5f3a\u5c5e\u6027\u4e00\u7c7b\u3002\u81f3\u5c11\u4ece\u4ea4\u4e92\u4e0a\u800c\u8a00\u3002","source":"@site/docs/features/oauth2.md","sourceDirName":"features","slug":"/features/oauth2","permalink":"/docs/features/oauth2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.18 afterScript","permalink":"/docs/features/afterScript"},"next":{"title":"3.20 \u5bfc\u51faPostman","permalink":"/docs/features/postman"}},{"unversionedId":"features/postman","id":"features/postman","title":"3.20 \u5bfc\u51faPostman","description":"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684\u6587\u6863\u548c\u8c03\u8bd5\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86Open\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a","source":"@site/docs/features/postman.md","sourceDirName":"features","slug":"/features/postman","permalink":"/docs/features/postman","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.19 OAuth2","permalink":"/docs/features/oauth2"},"next":{"title":"3.21 \u5168\u5c40\u53c2\u6570","permalink":"/docs/features/globalParameter"}},{"unversionedId":"features/requestCache","id":"features/requestCache","title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","description":"\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b,\u5728\u63a5\u53e3\u8c03\u8bd5\u7684\u60c5\u51b5\u4e0b,Knifetj\u5bf9\u4e8e\u63a5\u53e3\u7684\u8bf7\u6c42\u53c2\u6570\u90fd\u4f1a\u7f13\u5b58\u8d77\u6765\uff0c\u8be5\u914d\u7f6e\u53ef\u4ee5\u5728\u524d\u7aef\u754c\u9762\u4e2d\u7684\u4e2a\u6027\u5316\u8bbe\u7f6e\u4e2d\u770b\u5230,\u5982\u4e0b\u56fe\uff1a","source":"@site/docs/features/requestCache.md","sourceDirName":"features","slug":"/features/requestCache","permalink":"/docs/features/requestCache","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.7 \u5206\u7ec4\u6392\u5e8f","permalink":"/docs/features/tagSort"},"next":{"title":"3.9 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/dynamicRequestParameter"}},{"unversionedId":"features/search","id":"features/search","title":"3.13 \u641c\u7d22API\u63a5\u53e3","description":"knife4j \u7248\u672c>2.0.1 \u4f7f\u7528\u6b64\u89c4\u5219","source":"@site/docs/features/search.md","sourceDirName":"features","slug":"/features/search","permalink":"/docs/features/search","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570","permalink":"/docs/features/includeRequestParameter"},"next":{"title":"3.14 \u6e05\u9664\u7f13\u5b58","permalink":"/docs/features/clearCache"}},{"unversionedId":"features/selfdocument","id":"features/selfdocument","title":"3.4 \u81ea\u5b9a\u4e49\u6587\u6863","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/selfdocument.md","sourceDirName":"features","slug":"/features/selfdocument","permalink":"/docs/features/selfdocument","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005","permalink":"/docs/features/author"},"next":{"title":"3.5 \u8bbf\u95ee\u6743\u9650\u63a7\u5236","permalink":"/docs/features/accessControl"}},{"unversionedId":"features/springSecurity","id":"features/springSecurity","title":"3.30 Spring Security\u6ce8\u89e3","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb","source":"@site/docs/features/springSecurity.md","sourceDirName":"features","slug":"/features/springSecurity","permalink":"/docs/features/springSecurity","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u5c0f\u9b4f,\u5c0f\u9b4f,\u6211\u4eec\u8981\u53bb\u54ea\u91cc\u5440","lastUpdatedAt":1672196438,"formattedLastUpdatedAt":"2022\u5e7412\u670828\u65e5","frontMatter":{}},{"unversionedId":"features/swaggermodels","id":"features/swaggermodels","title":"3.22 \u81ea\u5b9a\u4e49Swagger Models\u540d\u79f0","description":"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/swaggermodels.md","sourceDirName":"features","slug":"/features/swaggermodels","permalink":"/docs/features/swaggermodels","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.21 \u5168\u5c40\u53c2\u6570","permalink":"/docs/features/globalParameter"},"next":{"title":"3.23 \u81ea\u5b9a\u4e49\u4e3b\u9875\u5185\u5bb9","permalink":"/docs/features/customHome"}},{"unversionedId":"features/tagSort","id":"features/tagSort","title":"3.7 \u5206\u7ec4\u6392\u5e8f","description":"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb","source":"@site/docs/features/tagSort.md","sourceDirName":"features","slug":"/features/tagSort","permalink":"/docs/features/tagSort","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672317292,"formattedLastUpdatedAt":"2022\u5e7412\u670829\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"3.6 \u63a5\u53e3\u6392\u5e8f","permalink":"/docs/features/apiSort"},"next":{"title":"3.8 \u8bf7\u6c42\u53c2\u6570\u7f13\u5b58","permalink":"/docs/features/requestCache"}},{"unversionedId":"introduction/gvp","id":"introduction/gvp","title":"GVP\u7533\u8bf7","description":"Knife4j\u57282020\u5e743\u670824\u65e5\u6536\u5230\u7801\u4e91\u7684\u5b98\u65b9\u90ae\u4ef6,\u5ba1\u6838\u901a\u8fc7,\u6210\u4e3a\u7801\u4e91\u7684GVP(\u7801\u4e91\u6700\u6709\u4ef7\u503c\u5f00\u6e90\u9879\u76ee)\u9879\u76ee","source":"@site/docs/introduction/gvp.md","sourceDirName":"introduction","slug":"/introduction/gvp","permalink":"/docs/introduction/gvp","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u754c\u9762\u8d4f\u9274","permalink":"/docs/introduction/ui"},"next":{"title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","permalink":"/docs/introduction/milestone"}},{"unversionedId":"introduction/introduction-background","id":"introduction/introduction-background","title":"\u9879\u76ee\u80cc\u666f","description":"Knife4j\u53d1\u5c55\u80cc\u666f","source":"@site/docs/introduction/background.mdx","sourceDirName":"introduction","slug":"/introduction/introduction-background","permalink":"/docs/introduction/introduction-background","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"introduction-background","title":"\u9879\u76ee\u80cc\u666f","description":"Knife4j\u53d1\u5c55\u80cc\u666f"},"sidebar":"docs","previous":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"},"next":{"title":"\u652f\u6301\u7528\u6237","permalink":"/docs/introduction/support"}},{"unversionedId":"introduction/introduction-index","id":"introduction/introduction-index","title":"\u4ecb\u7ecd","description":"Knife4j\u7b80\u4ecb","source":"@site/docs/introduction/index.mdx","sourceDirName":"introduction","slug":"/introduction/","permalink":"/docs/introduction/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"introduction-index","title":"\u4ecb\u7ecd","description":"Knife4j\u7b80\u4ecb"},"sidebar":"docs","previous":{"title":"\u5982\u4f55\u8d21\u732e\u4ee3\u7801","permalink":"/docs/community/contributing"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/introduction/"}},{"unversionedId":"introduction/milestone","id":"introduction/milestone","title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","description":"Knife4j\u7b80\u4ecb","source":"@site/docs/introduction/milestone.mdx","sourceDirName":"introduction","slug":"/introduction/milestone","permalink":"/docs/introduction/milestone","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"milestone","title":"\u53d1\u5c55\u5927\u4e8b\u8bb0","description":"Knife4j\u7b80\u4ecb"},"sidebar":"docs","previous":{"title":"GVP\u7533\u8bf7","permalink":"/docs/introduction/gvp"},"next":{"title":"\u793e\u533a","permalink":"/docs/community/"}},{"unversionedId":"introduction/support","id":"introduction/support","title":"\u652f\u6301\u7528\u6237","description":"\u76ee\u524d\u4e3b\u8981\u652f\u6301\u4ee5Java\u5f00\u53d1\u4e3a\u4e3b,\u5e76\u4e14\u662f\u4f9d\u8d56\u4e8e\u5927\u73af\u5883\u4e0b\u4f7f\u7528\u7684Spring MVC\u3001Spring Boot\u3001Spring Cloud\u6846\u67b6.","source":"@site/docs/introduction/support.md","sourceDirName":"introduction","slug":"/introduction/support","permalink":"/docs/introduction/support","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u9879\u76ee\u80cc\u666f","permalink":"/docs/introduction/introduction-background"},"next":{"title":"\u754c\u9762\u8d4f\u9274","permalink":"/docs/introduction/ui"}},{"unversionedId":"introduction/ui","id":"introduction/ui","title":"\u754c\u9762\u8d4f\u9274","description":"Knife4j\u91c7\u7528Vue+And Design Vue\u7ec4\u4ef6\u91cd\u5199,\u76f8\u5173\u529f\u80fd\u754c\u9762\u5982\u4e0b,\u4f9b\u5927\u5bb6\u8d4f\u9274\uff1a","source":"@site/docs/introduction/ui.md","sourceDirName":"introduction","slug":"/introduction/ui","permalink":"/docs/introduction/ui","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"docs","previous":{"title":"\u652f\u6301\u7528\u6237","permalink":"/docs/introduction/support"},"next":{"title":"GVP\u7533\u8bf7","permalink":"/docs/introduction/gvp"}},{"unversionedId":"middleware-sources/aggregation-cloud","id":"middleware-sources/aggregation-cloud","title":"1.3 Cloud\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eCloud\u6a21\u5f0f\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-cloud.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-cloud","permalink":"/docs/middleware-sources/aggregation-cloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.2 Disk\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-disk"},"next":{"title":"1.4 Eureka\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-eureka"}},{"unversionedId":"middleware-sources/aggregation-disk","id":"middleware-sources/aggregation-disk","title":"1.2 Disk\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-disk.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-disk","permalink":"/docs/middleware-sources/aggregation-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"},"next":{"title":"1.3 Cloud\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-cloud"}},{"unversionedId":"middleware-sources/aggregation-eureka","id":"middleware-sources/aggregation-eureka","title":"1.4 Eureka\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-eureka.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-eureka","permalink":"/docs/middleware-sources/aggregation-eureka","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.3 Cloud\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-cloud"},"next":{"title":"1.5 Nacos\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-nacos"}},{"unversionedId":"middleware-sources/aggregation-introduction","id":"middleware-sources/aggregation-introduction","title":"1.1 \u4ecb\u7ecd","description":"1\u3001Knife4jAggregation\u662f\u57fa\u4e8eServlet\u4f53\u7cfb\u7684Filter\u62e6\u622a\u6280\u672f\u5b9e\u73b0\u7684\u805a\u5408\u4e0eHTTP\u8bf7\u6c42\u8f6c\u53d1\u670d\u52a1,\u65e2\u80fd\u9884\u89c8\u4e5f\u80fd\u72ec\u7acb\u8c03\u8bd5","source":"@site/docs/middleware-sources/aggregation-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-introduction","permalink":"/docs/middleware-sources/aggregation-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Spring Webflux\u96c6\u6210","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction"},"next":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"}},{"unversionedId":"middleware-sources/aggregation-nacos","id":"middleware-sources/aggregation-nacos","title":"1.5 Nacos\u6a21\u5f0f","description":"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI","source":"@site/docs/middleware-sources/aggregation-nacos.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/aggregation-nacos","permalink":"/docs/middleware-sources/aggregation-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672149817,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.4 Eureka\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-eureka"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"}},{"unversionedId":"middleware-sources/cloud-function","id":"middleware-sources/cloud-function","title":"3.2 \u529f\u80fd\u4ecb\u7ecd","description":"Knife4jCloud V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a","source":"@site/docs/middleware-sources/cloud-function.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-function","permalink":"/docs/middleware-sources/cloud-function","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-introduction","id":"middleware-sources/cloud-introduction","title":"3.1 \u4ecb\u7ecd","description":"Knife4jCloud\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8eSpring Boot 2.2.0.RELEASE+Mybatis 3.5\u8fdb\u884c\u5f00\u53d1.","source":"@site/docs/middleware-sources/cloud-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-introduction","permalink":"/docs/middleware-sources/cloud-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-openapi","id":"middleware-sources/cloud-openapi","title":"3.3 \u5f00\u653eAPI","description":"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0","source":"@site/docs/middleware-sources/cloud-openapi.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-openapi","permalink":"/docs/middleware-sources/cloud-openapi","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/cloud-use","id":"middleware-sources/cloud-use","title":"3.4 \u4ea7\u54c1\u8bd5\u7528","description":"\u53ef\u4ee5\u8bbf\u95eehttp://cloud.xiaominfo.com\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!","source":"@site/docs/middleware-sources/cloud-use.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/cloud-use","permalink":"/docs/middleware-sources/cloud-use","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-install","id":"middleware-sources/desktop-install","title":"\u5b89\u88c5","description":"\u7531\u4e8e\u76ee\u524dKnife4jInsight\u662f\u4ee5Docker\u7684\u65b9\u5f0f\u63d0\u4f9b\u7684\u670d\u52a1\uff0c\u56e0\u6b64\u4f7f\u7528\u8005\u5728\u4f7f\u7528\u7684\u65f6\u5019\u6709\u4e9b\u4e8b\u9879\u8fd8\u662f\u9700\u8981\u6ce8\u610f\uff0c\u5426\u5219\u4f1a\u5bfc\u81f4\u4e00\u4e9b\u95ee\u9898\u53d1\u751f","source":"@site/docs/middleware-sources/desktop-install.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-install","permalink":"/docs/middleware-sources/desktop-install","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"},"next":{"title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/service-introduction"}},{"unversionedId":"middleware-sources/desktop-introduction","id":"middleware-sources/desktop-introduction","title":"\u4ecb\u7ecd","description":"1.0\u8001\u7248\u672c\u8bf7\u79fb\u6b65\u8001\u7684\u6587\u6863\u5730\u5740\u4ecb\u7ecd","source":"@site/docs/middleware-sources/desktop-introduction.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-introduction","permalink":"/docs/middleware-sources/desktop-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"1.5 Nacos\u6a21\u5f0f","permalink":"/docs/middleware-sources/aggregation-nacos"},"next":{"title":"\u4ecb\u7ecd","permalink":"/docs/middleware-sources/desktop-introduction"}},{"unversionedId":"middleware-sources/desktop-mode","id":"middleware-sources/desktop-mode","title":"\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","description":"","source":"@site/docs/middleware-sources/desktop-mode.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-mode","permalink":"/docs/middleware-sources/desktop-mode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-service-mode","id":"middleware-sources/desktop-service-mode","title":"\u670d\u52a1\u4e2d\u5fc3\u6a21\u5f0f","description":"","source":"@site/docs/middleware-sources/desktop-service-mode.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-service-mode","permalink":"/docs/middleware-sources/desktop-service-mode","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop-test","id":"middleware-sources/desktop-test","title":"2.4 \u6d4b\u8bd5\u573a\u666f","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/middleware-sources/desktop-test.mdx","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-test","permalink":"/docs/middleware-sources/desktop-test","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"desktop-test","title":"2.4 \u6d4b\u8bd5\u573a\u666f","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"}},{"unversionedId":"middleware-sources/desktop-use","id":"middleware-sources/desktop-use","title":"Disk\u672c\u5730\u78c1\u76d8\u6a21\u5f0f","description":"\u672c\u7bc7\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Knife4jAggregationDesktop","source":"@site/docs/middleware-sources/desktop-use.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/desktop-use","permalink":"/docs/middleware-sources/desktop-use","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/desktop/config-disk","id":"middleware-sources/desktop/config-disk","title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","description":"Disk\u672c\u5730\u78c1\u76d8\u7684\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f\u662f\u6700\u7b80\u5355\u7684\uff0c\u7528\u6237\u53ea\u9700\u8981\u5728\u672c\u5730\u78c1\u76d8\u5efa\u7acb\u4e00\u4e2a\u6570\u636e\u76ee\u5f55\u5373\u53ef\u3002","source":"@site/docs/middleware-sources/desktop/config-disk.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-disk","permalink":"/docs/middleware-sources/desktop/config-disk","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677160565,"formattedLastUpdatedAt":"2023\u5e742\u670823\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/config-introduction"},"next":{"title":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-nacos"}},{"unversionedId":"middleware-sources/desktop/config-introduction","id":"middleware-sources/desktop/config-introduction","title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","description":"Insight\u7ec4\u4ef6\u81ea2.0\u7248\u672c\u5f00\u59cb\uff0c\u9488\u5bf9\u4f7f\u7528\u8005\u63d0\u7684\u5efa\u8bae\uff0c\u589e\u52a0\u4e86\u5c06\u539f\u6240\u6709\u805a\u5408\u7684\u914d\u7f6e\u6587\u4ef6\u4fe1\u606f\u5b58\u653e\u5230\u72ec\u7acb\u7684\u914d\u7f6e\u4e2d\u5fc3\u4e2d\u95f4\u4ef6\u4e0a\u7684\u529f\u80fd\u3002","source":"@site/docs/middleware-sources/desktop/config-introduction.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-introduction","permalink":"/docs/middleware-sources/desktop/config-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/service-introduction"},"next":{"title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-disk"}},{"unversionedId":"middleware-sources/desktop/config-nacos","id":"middleware-sources/desktop/config-nacos","title":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f","description":"Nacos\u914d\u7f6e\u4e2d\u5fc3\u6a21\u5f0f\u5728\u4ee3\u8868\u8fd0\u884cInsight\u7ec4\u4ef6\u65f6\uff0c\u6240\u6709\u6570\u636e\u5168\u90e8\u6765\u6e90\u4e8eNacos\u914d\u7f6e\u4e2d\u5fc3\uff0c\u7531\u4e8eNacos\u63d0\u4f9b\u4e86\u53ef\u64cd\u4f5c\u7684Web\u754c\u9762\uff0c\u56e0\u6b64\u4f7f\u7528\u4e0a\u4e5f\u662f\u8f83\u65b9\u4fbf\u7684\u3002","source":"@site/docs/middleware-sources/desktop/config-nacos.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/config-nacos","permalink":"/docs/middleware-sources/desktop/config-nacos","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Disk\u672c\u5730\u914d\u7f6e\u6a21\u5f0f","permalink":"/docs/middleware-sources/desktop/config-disk"}},{"unversionedId":"middleware-sources/desktop/service-introduction","id":"middleware-sources/desktop/service-introduction","title":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","description":"\u4e0d\u7ba1\u662f\u5355\u4f53\u67b6\u6784\u3001\u5fae\u670d\u52a1\u67b6\u6784\u7b49\uff0c\u6bcf\u4e00\u4e2a\u5b50\u670d\u52a1\u53ea\u8981\u96c6\u6210\u4e86OpenAPI\u6846\u67b6\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7Insight\u7ec4\u4ef6\u8fdb\u884c\u805a\u5408\uff0c\u8fd9\u548c\u8bed\u8a00\u65e0\u5173","source":"@site/docs/middleware-sources/desktop/service-introduction.md","sourceDirName":"middleware-sources/desktop","slug":"/middleware-sources/desktop/service-introduction","permalink":"/docs/middleware-sources/desktop/service-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1679407919,"formattedLastUpdatedAt":"2023\u5e743\u670821\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u5b89\u88c5","permalink":"/docs/middleware-sources/desktop-install"},"next":{"title":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","permalink":"/docs/middleware-sources/desktop/config-introduction"}},{"unversionedId":"middleware-sources/knife4jAggregation","id":"middleware-sources/knife4jAggregation","title":"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea2.0.8\u7248\u672c\u5f00\u59cb\uff0cKnife4j","source":"@site/docs/middleware-sources/knife4jAggregation.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jAggregation","permalink":"/docs/middleware-sources/knife4jAggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/knife4jAggregationDesktop","id":"middleware-sources/knife4jAggregationDesktop","title":"4.3 Knife4jAggregationDesktop","description":"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01","source":"@site/docs/middleware-sources/knife4jAggregationDesktop.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jAggregationDesktop","permalink":"/docs/middleware-sources/knife4jAggregationDesktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/knife4jCloud","id":"middleware-sources/knife4jCloud","title":"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0","description":"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd","source":"@site/docs/middleware-sources/knife4jCloud.md","sourceDirName":"middleware-sources","slug":"/middleware-sources/knife4jCloud","permalink":"/docs/middleware-sources/knife4jCloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware-sources/middle-index","id":"middleware-sources/middle-index","title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/middleware-sources/index.mdx","sourceDirName":"middleware-sources","slug":"/middleware-sources/","permalink":"/docs/middleware-sources/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691293106,"formattedLastUpdatedAt":"2023\u5e748\u67086\u65e5","frontMatter":{"id":"middle-index","title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"middleware-sources","next":{"title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"}},{"unversionedId":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction","id":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction","title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","description":"\u7b80\u4ecb","source":"@site/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.md","sourceDirName":"middleware-sources/spring-cloud-gateway","slug":"/middleware-sources/spring-cloud-gateway/spring-gateway-introduction","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691914117,"formattedLastUpdatedAt":"2023\u5e748\u670813\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd","permalink":"/docs/middleware-sources/"},"next":{"title":"Spring Webflux\u96c6\u6210","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction"}},{"unversionedId":"middleware-sources/spring-webflux/spring-webflux-introduction","id":"middleware-sources/spring-webflux/spring-webflux-introduction","title":"Spring Webflux\u96c6\u6210","description":"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd","source":"@site/docs/middleware-sources/spring-webflux/spring-webflux-introduction.mdx","sourceDirName":"middleware-sources/spring-webflux","slug":"/middleware-sources/spring-webflux/spring-webflux-introduction","permalink":"/docs/middleware-sources/spring-webflux/spring-webflux-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1678022183,"formattedLastUpdatedAt":"2023\u5e743\u67085\u65e5","frontMatter":{},"sidebar":"middleware-sources","previous":{"title":"Spring Cloud Gateway\u7f51\u5173\u805a\u5408","permalink":"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},"next":{"title":"1.1 \u4ecb\u7ecd","permalink":"/docs/middleware-sources/aggregation-introduction"}},{"unversionedId":"middleware/knife4jAggregation","id":"middleware/knife4jAggregation","title":"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd","source":"@site/docs/middleware/knife4jAggregation.md","sourceDirName":"middleware","slug":"/middleware/knife4jAggregation","permalink":"/docs/middleware/knife4jAggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/knife4jAggregationDesktop","id":"middleware/knife4jAggregationDesktop","title":"4.3 Knife4jAggregationDesktop","description":"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01","source":"@site/docs/middleware/knife4jAggregationDesktop.md","sourceDirName":"middleware","slug":"/middleware/knife4jAggregationDesktop","permalink":"/docs/middleware/knife4jAggregationDesktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/knife4jCloud","id":"middleware/knife4jCloud","title":"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0","description":"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd","source":"@site/docs/middleware/knife4jCloud.md","sourceDirName":"middleware","slug":"/middleware/knife4jCloud","permalink":"/docs/middleware/knife4jCloud","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"middleware/middleware","id":"middleware/middleware","title":"\u751f\u6001\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/index.mdx","sourceDirName":"middleware","slug":"/middleware/","permalink":"/docs/middleware/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware","title":"\u751f\u6001\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"middleware/middleware-aggregation","id":"middleware/middleware-aggregation","title":"Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/aggregation.mdx","sourceDirName":"middleware","slug":"/middleware/middleware-aggregation","permalink":"/docs/middleware/middleware-aggregation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware-aggregation","title":"Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"middleware/middleware-desktop","id":"middleware/middleware-desktop","title":"Knife4jAggregationDesktop","description":"Knife4j\u793e\u533a\u4fe1\u606f","source":"@site/docs/middleware/desktop.mdx","sourceDirName":"middleware","slug":"/middleware/middleware-desktop","permalink":"/docs/middleware/middleware-desktop","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"middleware-desktop","title":"Knife4jAggregationDesktop","description":"Knife4j\u793e\u533a\u4fe1\u606f"}},{"unversionedId":"oas/annotation-introduction","id":"oas/annotation-introduction","title":"\u8bf4\u660e","description":"","source":"@site/docs/oas/annotation-introduction.md","sourceDirName":"oas","slug":"/oas/annotation-introduction","permalink":"/docs/oas/annotation-introduction","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"OpenAPI3","permalink":"/docs/oas/openapi3"},"next":{"title":"Swagger2\u6ce8\u89e3","permalink":"/docs/oas/openapi2-annotation"}},{"unversionedId":"oas/oas-intro","id":"oas/oas-intro","title":"OAS\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/index.mdx","sourceDirName":"oas","slug":"/oas/","permalink":"/docs/oas/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"oas-intro","title":"OAS\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","next":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"}},{"unversionedId":"oas/oas-text","id":"oas/oas-text","title":"OAS\u7b80\u4ecb111111","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/test.mdx","sourceDirName":"oas","slug":"/oas/oas-text","permalink":"/docs/oas/oas-text","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"oas-text","title":"OAS\u7b80\u4ecb111111","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"}},{"unversionedId":"oas/openapi-spe","id":"oas/openapi-spe","title":"\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/openapi-spe.mdx","sourceDirName":"oas","slug":"/oas/openapi-spe","permalink":"/docs/oas/openapi-spe","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"openapi-spe","title":"\u7b80\u4ecb","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","previous":{"title":"OAS\u7b80\u4ecb","permalink":"/docs/oas/"},"next":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"}},{"unversionedId":"oas/openapi2","id":"oas/openapi2","title":"Swagger2","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303","source":"@site/docs/oas/openapi2.mdx","sourceDirName":"oas","slug":"/oas/openapi2","permalink":"/docs/oas/openapi2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"openapi2","title":"Swagger2","description":"\u5feb\u901f\u4e86\u89e3Swagger2\u4ee5\u53caOpenAPI3\u89c4\u8303"},"sidebar":"oas","previous":{"title":"\u7b80\u4ecb","permalink":"/docs/oas/openapi-spe"},"next":{"title":"OpenAPI3","permalink":"/docs/oas/openapi3"}},{"unversionedId":"oas/openapi2-annotation","id":"oas/openapi2-annotation","title":"Swagger2\u6ce8\u89e3","description":"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a","source":"@site/docs/oas/openapi2-annotation.md","sourceDirName":"oas","slug":"/oas/openapi2-annotation","permalink":"/docs/oas/openapi2-annotation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"\u8bf4\u660e","permalink":"/docs/oas/annotation-introduction"},"next":{"title":"OpenAPI3\u6ce8\u89e3","permalink":"/docs/oas/openapi3-annotation"}},{"unversionedId":"oas/openapi3","id":"oas/openapi3","title":"OpenAPI3","description":"GitHub\u5728\u7ebf\u5730\u5740\uff1ahttps://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md","source":"@site/docs/oas/openapi3.md","sourceDirName":"oas","slug":"/oas/openapi3","permalink":"/docs/oas/openapi3","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"Swagger2","permalink":"/docs/oas/openapi2"},"next":{"title":"\u8bf4\u660e","permalink":"/docs/oas/annotation-introduction"}},{"unversionedId":"oas/openapi3-annotation","id":"oas/openapi3-annotation","title":"OpenAPI3\u6ce8\u89e3","description":"| Swagger3 | \u6ce8\u89e3\u8bf4\u660e |","source":"@site/docs/oas/openapi3-annotation.md","sourceDirName":"oas","slug":"/oas/openapi3-annotation","permalink":"/docs/oas/openapi3-annotation","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u6687\u4eab","lastUpdatedAt":1672732934,"formattedLastUpdatedAt":"2023\u5e741\u67083\u65e5","frontMatter":{},"sidebar":"oas","previous":{"title":"Swagger2\u6ce8\u89e3","permalink":"/docs/oas/openapi2-annotation"}},{"unversionedId":"oas/OpenAPI3-specification","id":"oas/OpenAPI3-specification","title":"OpenAPI \u89c4\u8303","description":"\u7248\u672c 3.0.3","source":"@site/docs/oas/OpenAPI3-specification.md","sourceDirName":"oas","slug":"/oas/OpenAPI3-specification","permalink":"/docs/oas/OpenAPI3-specification","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1671625843,"formattedLastUpdatedAt":"2022\u5e7412\u670821\u65e5","frontMatter":{}},{"unversionedId":"quick-start/quick-start","id":"quick-start/quick-start","title":"\u5feb\u901f\u5f00\u59cb","description":"\u5feb\u901f\u5f00\u59cbKnife4j","source":"@site/docs/quick-start/index.mdx","sourceDirName":"quick-start","slug":"/quick-start/","permalink":"/docs/quick-start/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691583139,"formattedLastUpdatedAt":"2023\u5e748\u67089\u65e5","frontMatter":{"id":"quick-start","title":"\u5feb\u901f\u5f00\u59cb","description":"\u5feb\u901f\u5f00\u59cbKnife4j"},"sidebar":"docs","next":{"title":"Knife4j\u7248\u672c\u53c2\u8003","permalink":"/docs/quick-start/start-knife4j-version"}},{"unversionedId":"quick-start/start-knife4j-version","id":"quick-start/start-knife4j-version","title":"Knife4j\u7248\u672c\u53c2\u8003","description":"Knife4j\u9002\u914dSpring Boot\u7248\u672c","source":"@site/docs/quick-start/start-knife4j-version.mdx","sourceDirName":"quick-start","slug":"/quick-start/start-knife4j-version","permalink":"/docs/quick-start/start-knife4j-version","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1691914117,"formattedLastUpdatedAt":"2023\u5e748\u670813\u65e5","frontMatter":{"id":"start-knife4j-version","title":"Knife4j\u7248\u672c\u53c2\u8003","description":"Knife4j\u9002\u914dSpring Boot\u7248\u672c"},"sidebar":"docs","previous":{"title":"\u5feb\u901f\u5f00\u59cb","permalink":"/docs/quick-start/"},"next":{"title":"\u5982\u4f55\u8d21\u732e\u6587\u6863","permalink":"/docs/community/joinus"}},{"unversionedId":"solution/admin","id":"solution/admin","title":"\u7b80\u4ecb","description":"knife4j-admin\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027,\u7ed3\u5408knife4j\u5bf9Swagger\u7684\u6587\u6863\u8fdb\u884c\u52a8\u6001\u805a\u5408\u7684\u7ba1\u7406\u5e73\u53f0","source":"@site/docs/solution/admin.md","sourceDirName":"solution","slug":"/solution/admin","permalink":"/docs/solution/admin","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1671625807,"formattedLastUpdatedAt":"2022\u5e7412\u670821\u65e5","frontMatter":{}},{"unversionedId":"solution/extension","id":"solution/extension","title":"extension","description":"\u7b80\u4ecb","source":"@site/docs/solution/extension.md","sourceDirName":"solution","slug":"/solution/extension","permalink":"/docs/solution/extension","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/knife4j-admin-deploy","id":"solution/knife4j-admin-deploy","title":"\u90e8\u7f72\u624b\u518c","description":"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72","source":"@site/docs/solution/knife4j-admin-deploy.md","sourceDirName":"solution","slug":"/solution/knife4j-admin-deploy","permalink":"/docs/solution/knife4j-admin-deploy","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/knife4j-admin-download","id":"solution/knife4j-admin-download","title":"\u53d1\u884c\u7248","description":"v1.0\u7248\u672c","source":"@site/docs/solution/knife4j-admin-download.md","sourceDirName":"solution","slug":"/solution/knife4j-admin-download","permalink":"/docs/solution/knife4j-admin-download","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/README","id":"solution/README","title":"README","description":"\u8bf4\u660e","source":"@site/docs/solution/README.md","sourceDirName":"solution","slug":"/solution/","permalink":"/docs/solution/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/service","id":"solution/service","title":"\u7b80\u4ecb","description":"\u63d0\u4f9b\u4e00\u7cfb\u5217\u6839\u636eSwagger\u8d44\u6e90\u8f93\u51fa\u76ee\u6807\u8d44\u6e90\u7684\u5f00\u653e\u63a5\u53e3,\u4f5c\u8005\u6b63\u5728\u5f00\u53d1\u4e2d.....","source":"@site/docs/solution/service.md","sourceDirName":"solution","slug":"/solution/service","permalink":"/docs/solution/service","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front","id":"solution/ui-front","title":"\u8bf4\u660e","description":"swagger-bootstrap-ui\u81ea1.9.2\u7248\u672c\u540e,\u63d0\u4f9b\u4e86\u524d\u540e\u7aef\u5206\u79bb\u7684\u89e3\u51b3\u65b9\u6848,\u76ee\u524d\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\uff1a","source":"@site/docs/solution/ui-front.md","sourceDirName":"solution","slug":"/solution/ui-front","permalink":"/docs/solution/ui-front","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-gateway","id":"solution/ui-front-gateway","title":"\u57fa\u4e8eSpring Cloud Gateway","description":"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863","source":"@site/docs/solution/ui-front-gateway.md","sourceDirName":"solution","slug":"/solution/ui-front-gateway","permalink":"/docs/solution/ui-front-gateway","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-nginx","id":"solution/ui-front-nginx","title":"\u57fa\u4e8eNginx\u53cd\u5411\u4ee3\u7406","description":"\u5728\u9759\u6001\u90e8\u7f72\u9884\u89c8Swagger JSON\u7ae0\u8282\u4e2d\u6211\u4eec\u5df2\u7ecf\u8bb2\u8fc7\u5982\u4f55\u901a\u8fc7nginx\u6765\u90e8\u7f72\u9759\u6001\u6587\u4ef6\u9884\u89c8\u6587\u6863\uff0c\u4f46\u6b64\u65f6\u6211\u4eec\u4f1a\u53d1\u73b0\u5b58\u5728\u4e00\u4e2a\u95ee\u9898\uff0c\u5373\u65e0\u6cd5\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5\u3002","source":"@site/docs/solution/ui-front-nginx.md","sourceDirName":"solution","slug":"/solution/ui-front-nginx","permalink":"/docs/solution/ui-front-nginx","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-static","id":"solution/ui-front-static","title":"\u57fa\u4e8e\u9759\u6001Swagger JSON\u6587\u4ef6","description":"\u57fa\u4e8e\u9759\u6001Swagger JSON\u6587\u4ef6\u7684\u65b9\u5f0f\u9884\u89c8\u5f88\u7b80\u5355,\u9996\u5148\u9700\u8981\u4e00\u4e2aHTTP\u7684web\u670d\u52a1\u5373\u53ef","source":"@site/docs/solution/ui-front-static.md","sourceDirName":"solution","slug":"/solution/ui-front-static","permalink":"/docs/solution/ui-front-static","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604670995,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"solution/ui-front-zuul","id":"solution/ui-front-zuul","title":"\u57fa\u4e8eSpring Cloud Zuul\u65b9\u5f0f","description":"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?","source":"@site/docs/solution/ui-front-zuul.md","sourceDirName":"solution","slug":"/solution/ui-front-zuul","permalink":"/docs/solution/ui-front-zuul","draft":false,"tags":[],"version":"current","lastUpdatedBy":"\u8096\u7389\u660e","lastUpdatedAt":1604638019,"formattedLastUpdatedAt":"2020\u5e7411\u67086\u65e5","frontMatter":{}},{"unversionedId":"upgrading/upgrading-to-v2","id":"upgrading/upgrading-to-v2","title":"\u5347\u7ea7\u5230v2.x\u7248\u672c","description":"\u5728\u66f4\u540d\u4e3aKnife4j\u4e4b\u524d,\u539f\u6765\u7684\u540d\u79f0\u662f\u53ebswagger-bootstrap-ui\uff0c\u8fd9\u662f\u4e24\u79cd\u4e0d\u4e00\u6837\u98ce\u683c\u7684Ui,\u5bf9\u6bd4\u60c5\u51b5\u5982\u4e0b\uff1a","source":"@site/docs/upgrading/upgrading_v2.x.md","sourceDirName":"upgrading","slug":"/upgrading/upgrading-to-v2","permalink":"/docs/upgrading/upgrading-to-v2","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1660471539,"formattedLastUpdatedAt":"2022\u5e748\u670814\u65e5","frontMatter":{"id":"upgrading-to-v2","title":"\u5347\u7ea7\u5230v2.x\u7248\u672c"},"sidebar":"docs","previous":{"title":"\u7248\u672c\u5347\u7ea7","permalink":"/docs/upgrading"},"next":{"title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c","permalink":"/docs/upgrading/upgrading-to-v4"}},{"unversionedId":"upgrading/upgrading-to-v4","id":"upgrading/upgrading-to-v4","title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c","description":"Knife4j 4.0.0\u7248\u672c\u76ee\u524d\u5df2\u7ecf\u53d1\u5e03!!","source":"@site/docs/upgrading/upgrading_v4.md","sourceDirName":"upgrading","slug":"/upgrading/upgrading-to-v4","permalink":"/docs/upgrading/upgrading-to-v4","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1672134067,"formattedLastUpdatedAt":"2022\u5e7412\u670827\u65e5","frontMatter":{"id":"upgrading-to-v4","title":"\u5347\u7ea7\u5230v4.0.0\u7248\u672c"},"sidebar":"docs","previous":{"title":"\u5347\u7ea7\u5230v2.x\u7248\u672c","permalink":"/docs/upgrading/upgrading-to-v2"}},{"unversionedId":"v4/plan","id":"v4/plan","title":"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212","description":"\u5173\u8054issues//gitee.com/xiaoym/knife4j/issues/I5LIQZ","source":"@site/docs/v4/index.mdx","sourceDirName":"v4","slug":"/v4/","permalink":"/docs/v4/","draft":false,"tags":[],"version":"current","lastUpdatedBy":"xiaoyumin","lastUpdatedAt":1677849789,"formattedLastUpdatedAt":"2023\u5e743\u67083\u65e5","frontMatter":{"id":"plan","title":"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"}}],"drafts":[],"sidebars":{"docs":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"quick-start/quick-start"},{"type":"doc","id":"quick-start/start-knife4j-version"},{"type":"doc","id":"community/joinus"},{"type":"doc","id":"community/contributing"},{"type":"category","label":"\u5e8f\u7ae0","collapsed":true,"link":{"type":"doc","id":"introduction/introduction-index"},"items":[{"type":"doc","id":"introduction/introduction-index"},{"type":"doc","id":"introduction/introduction-background"},{"type":"doc","id":"introduction/support"},{"type":"doc","id":"introduction/ui"},{"type":"doc","id":"introduction/gvp"},{"type":"doc","id":"introduction/milestone"}],"collapsible":true},{"type":"category","label":"\u793e\u533a","collapsed":true,"link":{"type":"doc","id":"community/community"},"items":[{"type":"doc","id":"community/community-get-helps"},{"type":"doc","id":"community/sourcecode"},{"type":"doc","id":"community/apache"},{"type":"doc","id":"community/changelog"},{"type":"doc","id":"community/donate"},{"type":"doc","id":"community/simple-demo"}],"collapsible":true},{"type":"category","label":"\u589e\u5f3a\u7279\u6027","collapsed":true,"link":{"type":"doc","id":"features/features"},"items":[{"type":"doc","id":"features/enhance"},{"type":"doc","id":"features/i18n"},{"type":"doc","id":"features/author"},{"type":"doc","id":"features/selfdocument"},{"type":"doc","id":"features/accessControl"},{"type":"doc","id":"features/apiSort"},{"type":"doc","id":"features/tagSort"},{"type":"doc","id":"features/requestCache"},{"type":"doc","id":"features/dynamicRequestParameter"},{"type":"doc","id":"features/exportDocument"},{"type":"doc","id":"features/filterRequestParameter"},{"type":"doc","id":"features/includeRequestParameter"},{"type":"doc","id":"features/search"},{"type":"doc","id":"features/clearCache"},{"type":"doc","id":"features/dynamicRequestDescription"},{"type":"doc","id":"features/dynamicResponseDescription"},{"type":"doc","id":"features/host"},{"type":"doc","id":"features/afterScript"},{"type":"doc","id":"features/oauth2"},{"type":"doc","id":"features/postman"},{"type":"doc","id":"features/globalParameter"},{"type":"doc","id":"features/swaggermodels"},{"type":"doc","id":"features/customHome"},{"type":"doc","id":"features/customFooter"},{"type":"doc","id":"features/jsr303"},{"type":"doc","id":"features/forbidDebug"},{"type":"doc","id":"features/forbidSearch"},{"type":"doc","id":"features/forbidOpenApi"},{"type":"doc","id":"features/gitVersion"}],"collapsible":true},{"type":"category","label":"\u7248\u672c\u5347\u7ea7","link":{"type":"generated-index","title":"\u5347\u7ea7","slug":"/upgrading","keywords":["upgrading"],"permalink":"/docs/upgrading"},"items":[{"type":"doc","id":"upgrading/upgrading-to-v2"},{"type":"doc","id":"upgrading/upgrading-to-v4"}],"collapsed":true,"collapsible":true}],"oas":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"oas/oas-intro"},{"type":"category","label":"OpenAPI\u89c4\u8303","collapsed":true,"link":{"type":"doc","id":"oas/openapi-spe"},"items":[{"type":"doc","id":"oas/openapi-spe"},{"type":"doc","id":"oas/openapi2"},{"type":"doc","id":"oas/openapi3"}],"collapsible":true},{"type":"category","label":"Java\u6ce8\u89e3","collapsed":true,"link":{"type":"doc","id":"oas/annotation-introduction"},"items":[{"type":"doc","id":"oas/openapi2-annotation"},{"type":"doc","id":"oas/openapi3-annotation"}],"collapsible":true}],"middleware-sources":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"middleware-sources/middle-index"},{"type":"doc","id":"middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},{"type":"doc","id":"middleware-sources/spring-webflux/spring-webflux-introduction"},{"type":"category","label":"Aggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6","collapsed":true,"link":{"type":"doc","id":"middleware-sources/aggregation-introduction"},"items":[{"type":"doc","id":"middleware-sources/aggregation-introduction"},{"type":"doc","id":"middleware-sources/aggregation-disk"},{"type":"doc","id":"middleware-sources/aggregation-cloud"},{"type":"doc","id":"middleware-sources/aggregation-eureka"},{"type":"doc","id":"middleware-sources/aggregation-nacos"}],"collapsible":true},{"type":"category","label":"Insight\u72ec\u7acb\u6e32\u67d3\u7ec4\u4ef6","collapsed":true,"link":{"type":"doc","id":"middleware-sources/desktop-introduction"},"items":[{"type":"doc","id":"middleware-sources/desktop-introduction"},{"type":"doc","id":"middleware-sources/desktop-install"},{"type":"doc","label":"\u6570\u636e\u6e90-\u670d\u52a1\u4e2d\u5fc3","id":"middleware-sources/desktop/service-introduction"},{"type":"category","label":"\u6570\u636e\u6e90-\u914d\u7f6e\u4e2d\u5fc3","collapsed":true,"link":{"type":"doc","id":"middleware-sources/desktop/config-introduction"},"items":[{"type":"doc","id":"middleware-sources/desktop/config-disk"},{"type":"doc","id":"middleware-sources/desktop/config-nacos"}],"collapsible":true}],"collapsible":true}],"changelog":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"category","label":"4.x\u7248\u672c","link":{"type":"doc","id":"changelog/changelog-index"},"items":[{"type":"doc","id":"changelog/x/4.0"},{"type":"doc","id":"changelog/x/4.1"},{"type":"doc","id":"changelog/x/4.2"},{"type":"doc","id":"changelog/x/4.3"}],"collapsed":true,"collapsible":true},{"type":"category","label":"2.x\u7248\u672c","collapsed":true,"items":[{"type":"doc","id":"changelog/x/2021-06-28-knife4j-2.0.9-issue"},{"type":"doc","id":"changelog/x/2020-11-22-knife4j-2.0.8-issue"},{"type":"doc","id":"changelog/x/2020-11-02-knife4j-2.0.7-issue"},{"type":"doc","id":"changelog/x/2020-10-26-knife4j-2.0.6-issue"},{"type":"doc","id":"changelog/x/2020-09-14-knife4j-2.0.5-issue"},{"type":"doc","id":"changelog/x/2020-06-28-knife4j-2.0.4-issue"},{"type":"doc","id":"changelog/x/2020-05-24-knife4j-2.0.3-issue"},{"type":"doc","id":"changelog/x/2020-03-08-knife4j-2.0.2-issue"},{"type":"doc","id":"changelog/x/2019-12-23-knife4j-2.0.1-issue"},{"type":"doc","id":"changelog/x/2019-12-16-knife4j-2.0.0-issue"}],"collapsible":true},{"type":"category","label":"1.x\u7248\u672c","items":[{"type":"doc","id":"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"},{"type":"doc","id":"changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},{"type":"doc","id":"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue"},{"type":"doc","id":"changelog/x/2019-05-20-knife4j-admin-1.0-issue"},{"type":"doc","id":"changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue"},{"type":"doc","id":"changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue"},{"type":"doc","id":"changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue"},{"type":"doc","id":"changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue"},{"type":"doc","id":"changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue"},{"type":"doc","id":"changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue"},{"type":"doc","id":"changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue"},{"type":"doc","id":"changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue"},{"type":"doc","id":"changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue"},{"type":"doc","id":"changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue"},{"type":"doc","id":"changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},{"type":"doc","id":"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue"},{"type":"doc","id":"changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},{"type":"doc","id":"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},{"type":"doc","id":"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},{"type":"doc","id":"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"},{"type":"doc","id":"changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"},{"type":"doc","id":"changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue"},{"type":"doc","id":"changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue"},{"type":"doc","id":"changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue"},{"type":"doc","id":"changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue"},{"type":"doc","id":"changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue"},{"type":"doc","id":"changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue"},{"type":"doc","id":"changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},{"type":"doc","id":"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue"},{"type":"doc","id":"changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},{"type":"doc","id":"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},{"type":"doc","id":"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"},{"type":"doc","id":"changelog/x/2017-04-19-swagger-bootstrap-ui-open"}],"collapsed":true,"collapsible":true}],"faq":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"category","label":"FAQ","link":{"type":"doc","id":"faq/faq-index"},"items":[{"type":"doc","id":"faq/format-exception"},{"type":"doc","id":"faq/faq-index"},{"type":"doc","id":"faq/knife4j-exception"},{"type":"doc","id":"faq/md-format-error"},{"type":"doc","id":"faq/sp-nmerror"},{"type":"doc","id":"faq/springboot-404"},{"type":"doc","id":"faq/springmvc-404"},{"type":"doc","id":"faq/springmvc-notshow"},{"type":"doc","id":"faq/swagger-des-not-found"},{"type":"doc","id":"faq/swaggerResourceInvalid"},{"type":"doc","id":"faq/upload-error"},{"type":"category","label":"v4","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"faq/v4/knife4j-base64-response"},{"type":"doc","id":"faq/v4/knife4j-no-openapi"},{"type":"doc","id":"faq/v4/knife4j-parameterobject-flat-param"}]}],"collapsed":true,"collapsible":true}],"action":[{"type":"html","value":"\\n
\\n
\\n \\n \\n
\\n \\n \\n
\\n","defaultStyle":true},{"type":"doc","id":"action/action-index"},{"type":"doc","id":"action/action-simple"},{"type":"category","label":"Spring \u5355\u4f53\u67b6\u6784","collapsed":true,"items":[{"type":"doc","id":"action/mavenbom"},{"type":"doc","id":"action/springmvc"},{"type":"doc","id":"action/springboot"}],"collapsible":true},{"type":"category","label":"Spring\u5fae\u670d\u52a1\u67b6\u6784","collapsed":true,"items":[{"type":"doc","id":"action/springcloud-gateway"},{"type":"doc","id":"action/springcloud-zuul"}],"collapsible":true},{"type":"category","label":"OAuth2.0","collapsed":true,"items":[{"type":"doc","id":"action/oauth2-implicit"},{"type":"doc","id":"action/oauth2-authorization_code"},{"type":"doc","id":"action/oauth2-client_credentials"},{"type":"doc","id":"action/oauth2-password"}],"collapsible":true},{"type":"category","label":"\u5fae\u670d\u52a1\u805a\u5408\u5b9e\u6218","collapsed":true,"items":[{"type":"doc","id":"action/aggregation-disk"},{"type":"doc","id":"action/aggregation-cloud"},{"type":"doc","id":"action/aggregation-eureka"},{"type":"doc","id":"action/aggregation-nacos"},{"type":"doc","id":"action/aggregation-docker"}],"collapsible":true},{"type":"category","label":"ASP.NET Core","collapsed":true,"items":[{"type":"doc","id":"action/dotnetcore-knife4j-how"},{"type":"doc","id":"action/dotnetcore-knife4j-guid"}],"collapsible":true},{"type":"category","label":"Springfox \u6e90\u7801\u7cfb\u5217","collapsed":true,"link":{"type":"doc","id":"action/springfox/springfox-index"},"items":[{"type":"doc","id":"action/springfox/springfox1"},{"type":"doc","id":"action/springfox/springfox2"},{"type":"doc","id":"action/springfox/springfox3"},{"type":"doc","id":"action/springfox/springfox4"},{"type":"doc","id":"action/springfox/springfox5"},{"type":"doc","id":"action/springfox/springfox6"},{"type":"doc","id":"action/springfox/springfox7"},{"type":"doc","id":"action/springfox/springfox8"},{"type":"doc","id":"action/springfox/springfox9"},{"type":"doc","id":"action/springfox/springfox10"},{"type":"doc","id":"action/springfox/springfox11"},{"type":"doc","id":"action/springfox/springfox12"},{"type":"doc","id":"action/springfox/springfox13"},{"type":"doc","id":"action/springfox/springfox14"},{"type":"doc","id":"action/springfox/springfox15"},{"type":"doc","id":"action/springfox/springfox16"},{"type":"doc","id":"action/springfox/springfox17"},{"type":"doc","id":"action/springfox/springfox18"},{"type":"doc","id":"action/springfox/springfox19"},{"type":"doc","id":"action/springfox/springfox20"},{"type":"doc","id":"action/springfox/springfox21"}],"collapsible":true},{"type":"category","label":"\u5176\u4ed6","collapsed":true,"items":[{"type":"doc","id":"action/others/doc-search"}],"collapsible":true}]}}]}},"docusaurus-plugin-content-blog":{"default":{"blogSidebarTitle":"Recent posts","blogPosts":[],"blogListPaginated":[],"blogTags":{},"blogTagsListPath":"/blog/tags","blogTagsPaginated":[]}},"docusaurus-plugin-content-pages":{"default":[{"type":"jsx","permalink":"/","source":"@site/src/pages/index.js"},{"type":"jsx","permalink":"/versions","source":"@site/src/pages/versions.js"}]},"docusaurus-plugin-debug":{},"docusaurus-plugin-sitemap":{},"docusaurus-theme-classic":{},"docusaurus-theme-search-algolia":{},"docusaurus-plugin-client-redirects":{},"docusaurus-plugin":{},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/24c38202.37ae225b.js b/knife4j-doc/gitee/assets/js/24c38202.37ae225b.js deleted file mode 100644 index 5555b72c6..000000000 --- a/knife4j-doc/gitee/assets/js/24c38202.37ae225b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5919],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),g=l(r),f=a,b=g["".concat(p,".").concat(f)]||g[f]||c[f]||o;return r?n.createElement(b,s(s({ref:t},u),{},{components:r})):n.createElement(b,s({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=g;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:a,s[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",l={unversionedId:"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",id:"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",description:"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-05-14-swagger-bootstrap-ui-1.2-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},next:{title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},u={},c=[],g={toc:c};function f(e){var t=e.components,r=(0,a.Z)(e,s);return(0,o.kt)("wrapper",(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v12-20170514-\u6dfb\u52a0putdelete\u65b9\u6cd5\u652f\u6301"},"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/24c38202.4453cc42.js b/knife4j-doc/gitee/assets/js/24c38202.4453cc42.js new file mode 100644 index 000000000..a6d332ba4 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/24c38202.4453cc42.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5919],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=l(r),f=a,b=c["".concat(p,".").concat(f)]||c[f]||g[f]||o;return r?n.createElement(b,s(s({ref:t},u),{},{components:r})):n.createElement(b,s({ref:t},u))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=f;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[c]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>b,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",l={unversionedId:"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",id:"changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",description:"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-05-14-swagger-bootstrap-ui-1.2-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"},next:{title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},u={},c=[],g={toc:c},f="wrapper";function b(e){var t=e.components,r=(0,a.Z)(e,s);return(0,o.kt)(f,(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v12-20170514-\u6dfb\u52a0putdelete\u65b9\u6cd5\u652f\u6301"},"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/24f069d0.bb1707a9.js b/knife4j-doc/gitee/assets/js/24f069d0.bb1707a9.js new file mode 100644 index 000000000..2aa32a931 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/24f069d0.bb1707a9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8101],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>f});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function o(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),p=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):o(o({},n),e)),r},u=function(e){var n=p(e.components);return t.createElement(s.Provider,{value:n},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},d=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),d=a,f=c["".concat(s,".").concat(d)]||c[d]||g[d]||i;return r?t.createElement(f,o(o({ref:n},u),{},{components:r})):t.createElement(f,o({ref:n},u))}));function f(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var t=r(87462),a=r(63366),i=(r(67294),r(3905)),o=["components"],l={},s="2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",p={unversionedId:"action/springcloud-gateway",id:"action/springcloud-gateway",title:"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",description:"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863",source:"@site/docs/action/springcloud-gateway.md",sourceDirName:"action",slug:"/action/springcloud-gateway",permalink:"/docs/action/springcloud-gateway",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604832815,formattedLastUpdatedAt:"2020\u5e7411\u67088\u65e5",frontMatter:{},sidebar:"action",previous:{title:"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j",permalink:"/docs/action/springboot"},next:{title:"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",permalink:"/docs/action/springcloud-zuul"}},u={},c=[{value:"2.1.1 eureka\u6ce8\u518c\u4e2d\u5fc3",id:"211-eureka\u6ce8\u518c\u4e2d\u5fc3",level:2},{value:"2.1.2 \u670d\u52a1\u63a5\u53e3(\u8ba2\u5355order & \u7528\u6237User)",id:"212-\u670d\u52a1\u63a5\u53e3\u8ba2\u5355order--\u7528\u6237user",level:2},{value:"2.1.3 \u6587\u6863\u805a\u5408",id:"213-\u6587\u6863\u805a\u5408",level:2},{value:"2.1.3.1 pom\u5f15\u5165\u76f8\u5173jar\u5305",id:"2131-pom\u5f15\u5165\u76f8\u5173jar\u5305",level:3},{value:"2.1.3.2 application\u6587\u4ef6\u914d\u7f6e",id:"2132-application\u6587\u4ef6\u914d\u7f6e",level:3},{value:"2.1.3.3 \u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801",id:"2133-\u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801",level:3},{value:"2.1.3.4 \u542f\u52a8\u914d\u7f6e",id:"2134-\u542f\u52a8\u914d\u7f6e",level:3},{value:"2.1.4 \u6587\u6863\u5c55\u793a",id:"214-\u6587\u6863\u5c55\u793a",level:2},{value:"2.1.5 \u6ce8\u610f\u70b9",id:"215-\u6ce8\u610f\u70b9",level:2}],g={toc:c},d="wrapper";function f(e){var n=e.components,l=(0,a.Z)(e,o);return(0,i.kt)(d,(0,t.Z)({},g,l,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"21-spring-cloud-gateway\u96c6\u6210knife4j"},"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j"),(0,i.kt)("p",null,"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863"),(0,i.kt)("p",null,"\u6e90\u7801\u5730\u5740\u8bf7\u53c2\u8003\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-cloud-gateway",target:"_blank",rel:"noopener"},"knife4j-spring-cloud-gateway")),(0,i.kt)("p",null,"\u6574\u4f53\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-text"},"|-knife4j-spring-cloud-gateway\n|-----service-doc //\u6587\u6863\u805a\u5408\u4e2d\u5fc3,\u662f\u6240\u6709\u5fae\u670d\u52a1\u6587\u6863\u7684\u51fa\u53e3\n|-----service-order //\u8ba2\u5355\u670d\u52a1,\u5305\u542b\u6240\u6709\u4e0e\u8ba2\u5355\u4e1a\u52a1\u6a21\u5757\u76f8\u5173\u7684\u63a5\u53e3\n|-----service-server //eureka \u6ce8\u518c\u4e2d\u5fc3\n|-----service-user //\u7528\u6237\u670d\u52a1,\u5305\u542b\u6240\u6709\u7684\u7528\u6237\u63a5\u53e3\n")),(0,i.kt)("h2",{id:"211-eureka\u6ce8\u518c\u4e2d\u5fc3"},"2.1.1 eureka\u6ce8\u518c\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u6ce8\u518c\u4e2d\u5fc3\u51e0\u4e4e\u6ca1\u6709\u4ee3\u7801,\u53ea\u662f\u5728pom.xml\u6587\u4ef6\u4e2d\u5f15\u5165\u4e86eureka\u670d\u52a1\u7684jar\u5305"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-server\n\n")),(0,i.kt)("p",null,"\u9879\u76ee\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 10000\neureka:\n instance:\n hostname: localhost\n client:\n register-with-eureka: false\n fetch-registry: false\n service-url:\n defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/\nspring:\n application:\n name: knife4j-gateway-server\n")),(0,i.kt)("p",null,"\u5b9a\u4e49\u6ce8\u518c\u4e2d\u5fc3\u8bbf\u95ee\u5730\u5740\uff0c\u7aef\u53e3\u53f7\u7b49\u5c5e\u6027"),(0,i.kt)("p",null,"\u6700\u540e\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableEurekaServer"),"\u6765\u542f\u7528\u6ce8\u518c\u4e2d\u5fc3"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaServer\n@SpringBootApplication\npublic class ServiceServerApplication {\n \n \n}\n")),(0,i.kt)("h2",{id:"212-\u670d\u52a1\u63a5\u53e3\u8ba2\u5355order--\u7528\u6237user"},"2.1.2 \u670d\u52a1\u63a5\u53e3(\u8ba2\u5355order & \u7528\u6237User)"),(0,i.kt)("p",null,"\u7531\u4e8e\u670d\u52a1\u63a5\u53e3\u8ba2\u5355\u548c\u7528\u6237\u4e24\u4e2a\u6a21\u5757\u5176\u5b9e\u5c5e\u6027\u662f\u5dee\u4e0d\u591a,\u53ea\u662f\u63a5\u53e3\u4e0d\u4e00\u6837,\u56e0\u6b64\u5c31\u968f\u4fbf\u6311\u4e00\u4e2a\u670d\u52a1\u7684\u914d\u7f6e\u6765\u8bf4\u5427"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"service-user"),":\u7528\u6237\u670d\u52a1\u7684\u63a5\u53e3"),(0,i.kt)("p",null,"\u6bcf\u4e2a\u5fae\u670d\u52a1\u53ea\u9700\u8981\u5f15\u5165\u548cswagger\u76f8\u5173\u7684\u540e\u7aefjar\u5305\u5373\u53ef,\u4e0d\u9700\u8981\u5f15\u5165swagger\u7684\u524d\u7aefUi\u5305,knife4j\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u5fae\u670d\u52a1\u9879\u7684starter,\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528"),(0,i.kt)("p",null,"\u5f53\u7136,\u4f5c\u4e3a\u5b50\u670d\u52a1,\u8fd8\u9700\u8981\u5f15\u5165eureka-client\u7684jar\u5305,\u6240\u4ee5\uff0cpom.xml\u6587\u4ef6\u76f8\u5173\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.boot\n spring-boot-starter-web\n\n\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-client\n\n\n org.springframework.boot\n spring-boot-starter-test\n test\n\n\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n\n")),(0,i.kt)("p",null,"\u9879\u76ee\u7684jar\u5305\u5f15\u5165\u5b8c\u6210\u540e,\u63a5\u4e0b\u6765\u662f\u914d\u7f6eswagger\u7684\u76f8\u5173\u914d\u7f6e\uff0c",(0,i.kt)("inlineCode",{parentName:"p"},"SwaggerConfiguration.java"),"\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'\n@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUi\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n\n @Bean(value = "userApi")\n @Order(value = 1)\n public Docket groupRestApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .apiInfo(groupApiInfo())\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))\n .paths(PathSelectors.any())\n\n .build();\n }\n\n private ApiInfo groupApiInfo(){\n return new ApiInfoBuilder()\n .title("swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01")\n .description("
swagger-bootstrap-ui-demo RESTful APIs
")\n .termsOfServiceUrl("http://www.group.com/")\n .contact("group@qq.com")\n .version("1.0")\n .build();\n }\n\n\n}\n')),(0,i.kt)("p",null,"\u914d\u7f6e\u626b\u63cf\u76ee\u5f55\u5305"),(0,i.kt)("p",null,"\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwagger2"),"\u548c",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUi"),"\u6765\u5f00\u542fswagger\u548c\u589e\u5f3a\u7279\u6027"),(0,i.kt)("p",null,"\u914d\u7f6e\u9879\u76ee\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6587\u4ef6,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"server:\n port: 10001\nspring:\n application:\n name: service-user\neureka:\n client:\n serviceUrl:\n defaultZone: http://localhost:10000/eureka/\n")),(0,i.kt)("p",null,"\u6307\u5b9a\u6ce8\u518c\u4e2d\u5fc3\u5730\u5740\u5373\u53ef"),(0,i.kt)("p",null,"\u6700\u540e,\u542f\u7528eureka\u5ba2\u6237\u7aef"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceUserApplication {\n}\n")),(0,i.kt)("p",null,"\u5f53\u7136,\u5728\u670d\u52a1\u7684\u6a21\u5757\u4e2d\u8fd8\u6709\u548c\u81ea\u5df1\u670d\u52a1\u76f8\u5173\u7684\u4e1a\u52a1\u63a5\u53e3(Controller\u4ee3\u7801),\u5728\u8fd9\u91cc\u5c31\u4e0d\u5217\u4e3e\u4e86"),(0,i.kt)("p",null,"\u8ba2\u5355\u6a21\u5757(service-order)\u7684\u4ee3\u7801\u914d\u7f6e\u548c\u7528\u6237\u662f\u7c7b\u4f3c\u7684"),(0,i.kt)("h2",{id:"213-\u6587\u6863\u805a\u5408"},"2.1.3 \u6587\u6863\u805a\u5408"),(0,i.kt)("p",null,"\u6709\u4e86eureka\u6ce8\u518c\u4e2d\u5fc3,\u670d\u52a1\u6a21\u5757\u7684\u63a5\u53e3\u4e5f\u5df2\u5b8c\u6210,\u6700\u540e\u4e00\u6b65\u662f\u628a\u6211\u4eec\u6240\u6709\u7684\u5fae\u670d\u52a1\u90fd\u805a\u5408\u5230\u4e00\u4e2a\u6587\u6863,\u7edf\u4e00\u8f93\u51fa\u5230\u524d\u7aef,\u4f9b\u5f00\u53d1\u8005\u8c03\u7528\u4e86"),(0,i.kt)("h3",{id:"2131-pom\u5f15\u5165\u76f8\u5173jar\u5305"},"2.1.3.1 pom\u5f15\u5165\u76f8\u5173jar\u5305"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"service-doc"),"\u4e5f\u662f\u4e00\u4e2aeureka\u5ba2\u6237\u7aef,\u9996\u5148\u5f15\u5165\u76f8\u5173\u7684jar\u5305,pom.xml\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-client\n\n\n org.springframework.cloud\n spring-cloud-starter-gateway\n\n\n com.github.xiaoymin\n knife4j-spring-boot-starter\n\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"spring-cloud-starter-netflix-eureka-client:eureka\u5ba2\u6237\u7aef"),(0,i.kt)("li",{parentName:"ul"},"spring-cloud-starter-gateway\uff1agateway\u7f51\u5173"),(0,i.kt)("li",{parentName:"ul"},"knife4j-spring-boot-starter\uff1aknife4j\u63d0\u4f9b\u7684\u524d\u7aefui\u548c\u540e\u7aef\u4ee3\u7801")),(0,i.kt)("p",null,"\u53e6\u5916,\u5176\u5b9e\u5728\u6587\u6863\u8fd9\u91cc,\u5982\u679c\u6ca1\u6709\u540e\u7aef\u4ee3\u7801\u7f16\u5199\u7684\u8bdd,\u4ec5\u4ec5\u5f15\u5165\u4e00\u4e2aswagger\u7684\u524d\u7aefui\u6a21\u5757\u4e5f\u662f\u53ef\u4ee5\u7684"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n\n")),(0,i.kt)("h3",{id:"2132-application\u6587\u4ef6\u914d\u7f6e"},"2.1.3.2 application\u6587\u4ef6\u914d\u7f6e"),(0,i.kt)("p",null,"\u914d\u7f6e\u6211\u4eec\u7684\u7f51\u5173\u5c5e\u6027,\u8def\u7531\u89c4\u5219\u7b49,",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 10003\nspring:\n application:\n name: service-doc\n cloud:\n gateway:\n discovery:\n locator:\n # enabled: true\n lowerCaseServiceId: true\n routes:\n - id: service-user\n uri: lb://service-user\n predicates:\n - Path=/user/**\n # - Header=Cookie,Set-Cookie\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n - id: service-order\n uri: lb://service-order\n predicates:\n - Path=/order/**\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n\n\neureka:\n client:\n serviceUrl:\n defaultZone: http://localhost:10000/eureka/\n\nlogging:\n level:\n org.springframework:cloud.gateway: debug\n")),(0,i.kt)("h3",{id:"2133-\u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801"},"2.1.3.3 \u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801"),(0,i.kt)("p",null,"\u5728\u6211\u4eec\u4f7f\u7528Spring Boot\u7b49\u5355\u4f53\u67b6\u6784\u96c6\u6210swagger\u9879\u76ee\u65f6,\u662f\u901a\u8fc7\u5bf9\u5305\u8def\u5f84\u8fdb\u884c\u4e1a\u52a1\u5206\u7ec4,\u7136\u540e\u5728\u524d\u7aef\u8fdb\u884c\u4e0d\u540c\u6a21\u5757\u7684\u5c55\u793a,\u800c\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u6211\u4eec\u7684\u4e00\u4e2a\u670d\u52a1\u5c31\u7c7b\u4f3c\u4e8e\u539f\u6765\u6211\u4eec\u5199\u7684\u4e00\u4e2a\u4e1a\u52a1\u7ec4"),(0,i.kt)("p",null,"springfox-swagger\u63d0\u4f9b\u7684\u5206\u7ec4\u63a5\u53e3\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-resource"),",\u8fd4\u56de\u7684\u662f\u5206\u7ec4\u63a5\u53e3\u540d\u79f0\u3001\u5730\u5740\u7b49\u4fe1\u606f"),(0,i.kt)("p",null,"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u6211\u4eec\u9700\u8981\u91cd\u5199\u8be5\u63a5\u53e3,\u4e3b\u8981\u662f\u901a\u8fc7\u7f51\u5173\u7684\u6ce8\u518c\u4e2d\u5fc3\u52a8\u6001\u53d1\u73b0\u6240\u6709\u7684\u5fae\u670d\u52a1\u6587\u6863,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Slf4j\n@Component\n@Primary\n@AllArgsConstructor\npublic class SwaggerResourceConfig implements SwaggerResourcesProvider {\n\n private final RouteLocator routeLocator;\n private final GatewayProperties gatewayProperties;\n\n\n @Override\n public List get() {\n List resources = new ArrayList<>();\n List routes = new ArrayList<>();\n routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));\n gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {\n route.getPredicates().stream()\n .filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))\n .forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),\n predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")\n .replace("**", "v2/api-docs"))));\n });\n\n return resources;\n }\n\n private SwaggerResource swaggerResource(String name, String location) {\n log.info("name:{},location:{}",name,location);\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(name);\n swaggerResource.setLocation(location);\n swaggerResource.setSwaggerVersion("2.0");\n return swaggerResource;\n }\n}\n')),(0,i.kt)("p",null,"\u63a5\u53e3\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@RestController\npublic class SwaggerHandler {\n\n @Autowired(required = false)\n private SecurityConfiguration securityConfiguration;\n\n @Autowired(required = false)\n private UiConfiguration uiConfiguration;\n\n private final SwaggerResourcesProvider swaggerResources;\n\n @Autowired\n public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {\n this.swaggerResources = swaggerResources;\n }\n\n\n @GetMapping("/swagger-resources/configuration/security")\n public Mono> securityConfiguration() {\n return Mono.just(new ResponseEntity<>(\n Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));\n }\n\n @GetMapping("/swagger-resources/configuration/ui")\n public Mono> uiConfiguration() {\n return Mono.just(new ResponseEntity<>(\n Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));\n }\n\n @GetMapping("/swagger-resources")\n public Mono swaggerResources() {\n return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));\n }\n}\n')),(0,i.kt)("h3",{id:"2134-\u542f\u52a8\u914d\u7f6e"},"2.1.3.4 \u542f\u52a8\u914d\u7f6e"),(0,i.kt)("p",null,"\u6700\u540e,\u9879\u76ee\u542f\u52a8\u7c7b\u6dfb\u52a0\u76f8\u5173\u6ce8\u89e3\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableDiscoveryClient\n@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceDocApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(ServiceDocApplication.class, args);\n }\n\n}\n")),(0,i.kt)("h2",{id:"214-\u6587\u6863\u5c55\u793a"},"2.1.4 \u6587\u6863\u5c55\u793a"),(0,i.kt)("p",null,"\u6700\u540e\u5206\u522b\u4f9d\u6b21\u542f\u52a8\u9879\u76ee\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"service-server"),(0,i.kt)("li",{parentName:"ul"},"service-user"),(0,i.kt)("li",{parentName:"ul"},"service-order"),(0,i.kt)("li",{parentName:"ul"},"service-doc")),(0,i.kt)("p",null,"\u6253\u5f00\u6587\u6863\u5730\u5740\uff1ahttp://localhost:10003/doc.html"),(0,i.kt)("p",null,"\u67e5\u770b\u6587\u6863\u6548\u679c\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:r(5750).Z,width:"1918",height:"1058"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:r(81353).Z,width:"1919",height:"1052"})),(0,i.kt)("h2",{id:"215-\u6ce8\u610f\u70b9"},"2.1.5 \u6ce8\u610f\u70b9"),(0,i.kt)("p",null,"\u5728\u96c6\u6210Spring Cloud Gateway\u7f51\u5173\u7684\u65f6\u5019,\u4f1a\u51fa\u73b0\u6ca1\u6709basePath\u7684\u60c5\u51b5(\u5373\u5b9a\u4e49\u7684\u4f8b\u5982/user\u3001/order\u7b49\u5fae\u670d\u52a1\u7684\u524d\u7f00),\u8fd9\u4e2a\u60c5\u51b5\u5728\u4f7f\u7528zuul\u7f51\u5173\u7684\u65f6\u5019\u4e0d\u4f1a\u51fa\u73b0\u6b64\u95ee\u9898,\u56e0\u6b64,\u5728Gateway\u7f51\u5173\u9700\u8981\u6dfb\u52a0\u4e00\u4e2aFilter\u5b9e\u4f53Bean,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Component\npublic class SwaggerHeaderFilter extends AbstractGatewayFilterFactory {\n private static final String HEADER_NAME = "X-Forwarded-Prefix";\n\n private static final String URI = "/v2/api-docs";\n\n @Override\n public GatewayFilter apply(Object config) {\n return (exchange, chain) -> {\n ServerHttpRequest request = exchange.getRequest();\n String path = request.getURI().getPath();\n if (!StringUtils.endsWithIgnoreCase(path,URI )) {\n return chain.filter(exchange);\n }\n String basePath = path.substring(0, path.lastIndexOf(URI));\n ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, basePath).build();\n ServerWebExchange newExchange = exchange.mutate().request(newRequest).build();\n return chain.filter(newExchange);\n };\n }\n}\n')),(0,i.kt)("p",null,"\u7136\u540e\u5728\u914d\u7f6e\u6587\u4ef6\u6307\u5b9a\u8fd9\u4e2afilter"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"spring:\n application:\n name: service-doc\n cloud:\n gateway:\n discovery:\n locator:\n # enabled: true\n lowerCaseServiceId: true\n routes:\n - id: service-user\n uri: lb://service-user\n predicates:\n - Path=/user/**\n # - Header=Cookie,Set-Cookie\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n - id: service-order\n uri: lb://service-order\n predicates:\n - Path=/order/**\n filters:\n - SwaggerHeaderFilter //\u6307\u5b9afilter\n - StripPrefix=1\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u7279\u522b\u6ce8\u610f\uff1a\u5982\u679c\u662f\u9ad8\u7248\u672c\u7684Spring Cloud Gateway\uff0c\u90a3\u4e48yml\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684",(0,i.kt)("inlineCode",{parentName:"strong"},"SwaggerHeaderFilter"),"\u914d\u7f6e\u5e94\u8be5\u53bb\u6389")))}f.isMDXComponent=!0},5750:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/k-g-1-1eb061486b28fb681253f255e243b87d.png"},81353:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/k-g-2-aaf0d32ef473e3b07d69a53e3a5365dd.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/24f069d0.de0b9bb9.js b/knife4j-doc/gitee/assets/js/24f069d0.de0b9bb9.js deleted file mode 100644 index 043f9e176..000000000 --- a/knife4j-doc/gitee/assets/js/24f069d0.de0b9bb9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8101],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>d});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function o(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),p=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):o(o({},n),e)),r},u=function(e){var n=p(e.components);return t.createElement(s.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},g=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),g=p(r),d=a,f=g["".concat(s,".").concat(d)]||g[d]||c[d]||i;return r?t.createElement(f,o(o({ref:n},u),{},{components:r})):t.createElement(f,o({ref:n},u))}));function d(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=g;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>s,default:()=>d,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var t=r(87462),a=r(63366),i=(r(67294),r(3905)),o=["components"],l={},s="2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",p={unversionedId:"action/springcloud-gateway",id:"action/springcloud-gateway",title:"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",description:"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863",source:"@site/docs/action/springcloud-gateway.md",sourceDirName:"action",slug:"/action/springcloud-gateway",permalink:"/docs/action/springcloud-gateway",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604832815,formattedLastUpdatedAt:"2020\u5e7411\u67088\u65e5",frontMatter:{},sidebar:"action",previous:{title:"1.3 Spring Boot \u6846\u67b6\u96c6\u6210Knife4j",permalink:"/docs/action/springboot"},next:{title:"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",permalink:"/docs/action/springcloud-zuul"}},u={},c=[{value:"2.1.1 eureka\u6ce8\u518c\u4e2d\u5fc3",id:"211-eureka\u6ce8\u518c\u4e2d\u5fc3",level:2},{value:"2.1.2 \u670d\u52a1\u63a5\u53e3(\u8ba2\u5355order & \u7528\u6237User)",id:"212-\u670d\u52a1\u63a5\u53e3\u8ba2\u5355order--\u7528\u6237user",level:2},{value:"2.1.3 \u6587\u6863\u805a\u5408",id:"213-\u6587\u6863\u805a\u5408",level:2},{value:"2.1.3.1 pom\u5f15\u5165\u76f8\u5173jar\u5305",id:"2131-pom\u5f15\u5165\u76f8\u5173jar\u5305",level:3},{value:"2.1.3.2 application\u6587\u4ef6\u914d\u7f6e",id:"2132-application\u6587\u4ef6\u914d\u7f6e",level:3},{value:"2.1.3.3 \u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801",id:"2133-\u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801",level:3},{value:"2.1.3.4 \u542f\u52a8\u914d\u7f6e",id:"2134-\u542f\u52a8\u914d\u7f6e",level:3},{value:"2.1.4 \u6587\u6863\u5c55\u793a",id:"214-\u6587\u6863\u5c55\u793a",level:2},{value:"2.1.5 \u6ce8\u610f\u70b9",id:"215-\u6ce8\u610f\u70b9",level:2}],g={toc:c};function d(e){var n=e.components,l=(0,a.Z)(e,o);return(0,i.kt)("wrapper",(0,t.Z)({},g,l,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"21-spring-cloud-gateway\u96c6\u6210knife4j"},"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j"),(0,i.kt)("p",null,"\u672c\u7bc7\u535a\u5ba2\u4e3b\u8981\u8bb2\u89e3\u901a\u8fc7knife4j\u9879\u76ee\u5982\u4f55\u96c6\u6210Spring Cloud Gateway\u7f51\u5173,\u901a\u8fc7\u7f51\u5173\u805a\u5408\u6240\u6709\u7684Swagger\u5fae\u670d\u52a1\u6587\u6863"),(0,i.kt)("p",null,"\u6e90\u7801\u5730\u5740\u8bf7\u53c2\u8003\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-cloud-gateway",target:"_blank",rel:"noopener"},"knife4j-spring-cloud-gateway")),(0,i.kt)("p",null,"\u6574\u4f53\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-text"},"|-knife4j-spring-cloud-gateway\n|-----service-doc //\u6587\u6863\u805a\u5408\u4e2d\u5fc3,\u662f\u6240\u6709\u5fae\u670d\u52a1\u6587\u6863\u7684\u51fa\u53e3\n|-----service-order //\u8ba2\u5355\u670d\u52a1,\u5305\u542b\u6240\u6709\u4e0e\u8ba2\u5355\u4e1a\u52a1\u6a21\u5757\u76f8\u5173\u7684\u63a5\u53e3\n|-----service-server //eureka \u6ce8\u518c\u4e2d\u5fc3\n|-----service-user //\u7528\u6237\u670d\u52a1,\u5305\u542b\u6240\u6709\u7684\u7528\u6237\u63a5\u53e3\n")),(0,i.kt)("h2",{id:"211-eureka\u6ce8\u518c\u4e2d\u5fc3"},"2.1.1 eureka\u6ce8\u518c\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u6ce8\u518c\u4e2d\u5fc3\u51e0\u4e4e\u6ca1\u6709\u4ee3\u7801,\u53ea\u662f\u5728pom.xml\u6587\u4ef6\u4e2d\u5f15\u5165\u4e86eureka\u670d\u52a1\u7684jar\u5305"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-server\n\n")),(0,i.kt)("p",null,"\u9879\u76ee\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 10000\neureka:\n instance:\n hostname: localhost\n client:\n register-with-eureka: false\n fetch-registry: false\n service-url:\n defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/\nspring:\n application:\n name: knife4j-gateway-server\n")),(0,i.kt)("p",null,"\u5b9a\u4e49\u6ce8\u518c\u4e2d\u5fc3\u8bbf\u95ee\u5730\u5740\uff0c\u7aef\u53e3\u53f7\u7b49\u5c5e\u6027"),(0,i.kt)("p",null,"\u6700\u540e\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableEurekaServer"),"\u6765\u542f\u7528\u6ce8\u518c\u4e2d\u5fc3"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaServer\n@SpringBootApplication\npublic class ServiceServerApplication {\n \n \n}\n")),(0,i.kt)("h2",{id:"212-\u670d\u52a1\u63a5\u53e3\u8ba2\u5355order--\u7528\u6237user"},"2.1.2 \u670d\u52a1\u63a5\u53e3(\u8ba2\u5355order & \u7528\u6237User)"),(0,i.kt)("p",null,"\u7531\u4e8e\u670d\u52a1\u63a5\u53e3\u8ba2\u5355\u548c\u7528\u6237\u4e24\u4e2a\u6a21\u5757\u5176\u5b9e\u5c5e\u6027\u662f\u5dee\u4e0d\u591a,\u53ea\u662f\u63a5\u53e3\u4e0d\u4e00\u6837,\u56e0\u6b64\u5c31\u968f\u4fbf\u6311\u4e00\u4e2a\u670d\u52a1\u7684\u914d\u7f6e\u6765\u8bf4\u5427"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"service-user"),":\u7528\u6237\u670d\u52a1\u7684\u63a5\u53e3"),(0,i.kt)("p",null,"\u6bcf\u4e2a\u5fae\u670d\u52a1\u53ea\u9700\u8981\u5f15\u5165\u548cswagger\u76f8\u5173\u7684\u540e\u7aefjar\u5305\u5373\u53ef,\u4e0d\u9700\u8981\u5f15\u5165swagger\u7684\u524d\u7aefUi\u5305,knife4j\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u5fae\u670d\u52a1\u9879\u7684starter,\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528"),(0,i.kt)("p",null,"\u5f53\u7136,\u4f5c\u4e3a\u5b50\u670d\u52a1,\u8fd8\u9700\u8981\u5f15\u5165eureka-client\u7684jar\u5305,\u6240\u4ee5\uff0cpom.xml\u6587\u4ef6\u76f8\u5173\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.boot\n spring-boot-starter-web\n\n\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-client\n\n\n org.springframework.boot\n spring-boot-starter-test\n test\n\n\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n\n")),(0,i.kt)("p",null,"\u9879\u76ee\u7684jar\u5305\u5f15\u5165\u5b8c\u6210\u540e,\u63a5\u4e0b\u6765\u662f\u914d\u7f6eswagger\u7684\u76f8\u5173\u914d\u7f6e\uff0c",(0,i.kt)("inlineCode",{parentName:"p"},"SwaggerConfiguration.java"),"\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'\n@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUi\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n\n @Bean(value = "userApi")\n @Order(value = 1)\n public Docket groupRestApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .apiInfo(groupApiInfo())\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))\n .paths(PathSelectors.any())\n\n .build();\n }\n\n private ApiInfo groupApiInfo(){\n return new ApiInfoBuilder()\n .title("swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01")\n .description("
swagger-bootstrap-ui-demo RESTful APIs
")\n .termsOfServiceUrl("http://www.group.com/")\n .contact("group@qq.com")\n .version("1.0")\n .build();\n }\n\n\n}\n')),(0,i.kt)("p",null,"\u914d\u7f6e\u626b\u63cf\u76ee\u5f55\u5305"),(0,i.kt)("p",null,"\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwagger2"),"\u548c",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUi"),"\u6765\u5f00\u542fswagger\u548c\u589e\u5f3a\u7279\u6027"),(0,i.kt)("p",null,"\u914d\u7f6e\u9879\u76ee\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6587\u4ef6,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"server:\n port: 10001\nspring:\n application:\n name: service-user\neureka:\n client:\n serviceUrl:\n defaultZone: http://localhost:10000/eureka/\n")),(0,i.kt)("p",null,"\u6307\u5b9a\u6ce8\u518c\u4e2d\u5fc3\u5730\u5740\u5373\u53ef"),(0,i.kt)("p",null,"\u6700\u540e,\u542f\u7528eureka\u5ba2\u6237\u7aef"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceUserApplication {\n}\n")),(0,i.kt)("p",null,"\u5f53\u7136,\u5728\u670d\u52a1\u7684\u6a21\u5757\u4e2d\u8fd8\u6709\u548c\u81ea\u5df1\u670d\u52a1\u76f8\u5173\u7684\u4e1a\u52a1\u63a5\u53e3(Controller\u4ee3\u7801),\u5728\u8fd9\u91cc\u5c31\u4e0d\u5217\u4e3e\u4e86"),(0,i.kt)("p",null,"\u8ba2\u5355\u6a21\u5757(service-order)\u7684\u4ee3\u7801\u914d\u7f6e\u548c\u7528\u6237\u662f\u7c7b\u4f3c\u7684"),(0,i.kt)("h2",{id:"213-\u6587\u6863\u805a\u5408"},"2.1.3 \u6587\u6863\u805a\u5408"),(0,i.kt)("p",null,"\u6709\u4e86eureka\u6ce8\u518c\u4e2d\u5fc3,\u670d\u52a1\u6a21\u5757\u7684\u63a5\u53e3\u4e5f\u5df2\u5b8c\u6210,\u6700\u540e\u4e00\u6b65\u662f\u628a\u6211\u4eec\u6240\u6709\u7684\u5fae\u670d\u52a1\u90fd\u805a\u5408\u5230\u4e00\u4e2a\u6587\u6863,\u7edf\u4e00\u8f93\u51fa\u5230\u524d\u7aef,\u4f9b\u5f00\u53d1\u8005\u8c03\u7528\u4e86"),(0,i.kt)("h3",{id:"2131-pom\u5f15\u5165\u76f8\u5173jar\u5305"},"2.1.3.1 pom\u5f15\u5165\u76f8\u5173jar\u5305"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"service-doc"),"\u4e5f\u662f\u4e00\u4e2aeureka\u5ba2\u6237\u7aef,\u9996\u5148\u5f15\u5165\u76f8\u5173\u7684jar\u5305,pom.xml\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n org.springframework.cloud\n spring-cloud-starter-netflix-eureka-client\n\n\n org.springframework.cloud\n spring-cloud-starter-gateway\n\n\n com.github.xiaoymin\n knife4j-spring-boot-starter\n\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"spring-cloud-starter-netflix-eureka-client:eureka\u5ba2\u6237\u7aef"),(0,i.kt)("li",{parentName:"ul"},"spring-cloud-starter-gateway\uff1agateway\u7f51\u5173"),(0,i.kt)("li",{parentName:"ul"},"knife4j-spring-boot-starter\uff1aknife4j\u63d0\u4f9b\u7684\u524d\u7aefui\u548c\u540e\u7aef\u4ee3\u7801")),(0,i.kt)("p",null,"\u53e6\u5916,\u5176\u5b9e\u5728\u6587\u6863\u8fd9\u91cc,\u5982\u679c\u6ca1\u6709\u540e\u7aef\u4ee3\u7801\u7f16\u5199\u7684\u8bdd,\u4ec5\u4ec5\u5f15\u5165\u4e00\u4e2aswagger\u7684\u524d\u7aefui\u6a21\u5757\u4e5f\u662f\u53ef\u4ee5\u7684"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n\n")),(0,i.kt)("h3",{id:"2132-application\u6587\u4ef6\u914d\u7f6e"},"2.1.3.2 application\u6587\u4ef6\u914d\u7f6e"),(0,i.kt)("p",null,"\u914d\u7f6e\u6211\u4eec\u7684\u7f51\u5173\u5c5e\u6027,\u8def\u7531\u89c4\u5219\u7b49,",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n port: 10003\nspring:\n application:\n name: service-doc\n cloud:\n gateway:\n discovery:\n locator:\n # enabled: true\n lowerCaseServiceId: true\n routes:\n - id: service-user\n uri: lb://service-user\n predicates:\n - Path=/user/**\n # - Header=Cookie,Set-Cookie\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n - id: service-order\n uri: lb://service-order\n predicates:\n - Path=/order/**\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n\n\neureka:\n client:\n serviceUrl:\n defaultZone: http://localhost:10000/eureka/\n\nlogging:\n level:\n org.springframework:cloud.gateway: debug\n")),(0,i.kt)("h3",{id:"2133-\u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801"},"2.1.3.3 \u6587\u6863\u805a\u5408\u4e1a\u52a1\u7f16\u7801"),(0,i.kt)("p",null,"\u5728\u6211\u4eec\u4f7f\u7528Spring Boot\u7b49\u5355\u4f53\u67b6\u6784\u96c6\u6210swagger\u9879\u76ee\u65f6,\u662f\u901a\u8fc7\u5bf9\u5305\u8def\u5f84\u8fdb\u884c\u4e1a\u52a1\u5206\u7ec4,\u7136\u540e\u5728\u524d\u7aef\u8fdb\u884c\u4e0d\u540c\u6a21\u5757\u7684\u5c55\u793a,\u800c\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u6211\u4eec\u7684\u4e00\u4e2a\u670d\u52a1\u5c31\u7c7b\u4f3c\u4e8e\u539f\u6765\u6211\u4eec\u5199\u7684\u4e00\u4e2a\u4e1a\u52a1\u7ec4"),(0,i.kt)("p",null,"springfox-swagger\u63d0\u4f9b\u7684\u5206\u7ec4\u63a5\u53e3\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-resource"),",\u8fd4\u56de\u7684\u662f\u5206\u7ec4\u63a5\u53e3\u540d\u79f0\u3001\u5730\u5740\u7b49\u4fe1\u606f"),(0,i.kt)("p",null,"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u6211\u4eec\u9700\u8981\u91cd\u5199\u8be5\u63a5\u53e3,\u4e3b\u8981\u662f\u901a\u8fc7\u7f51\u5173\u7684\u6ce8\u518c\u4e2d\u5fc3\u52a8\u6001\u53d1\u73b0\u6240\u6709\u7684\u5fae\u670d\u52a1\u6587\u6863,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Slf4j\n@Component\n@Primary\n@AllArgsConstructor\npublic class SwaggerResourceConfig implements SwaggerResourcesProvider {\n\n private final RouteLocator routeLocator;\n private final GatewayProperties gatewayProperties;\n\n\n @Override\n public List get() {\n List resources = new ArrayList<>();\n List routes = new ArrayList<>();\n routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));\n gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {\n route.getPredicates().stream()\n .filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))\n .forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),\n predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")\n .replace("**", "v2/api-docs"))));\n });\n\n return resources;\n }\n\n private SwaggerResource swaggerResource(String name, String location) {\n log.info("name:{},location:{}",name,location);\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(name);\n swaggerResource.setLocation(location);\n swaggerResource.setSwaggerVersion("2.0");\n return swaggerResource;\n }\n}\n')),(0,i.kt)("p",null,"\u63a5\u53e3\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@RestController\npublic class SwaggerHandler {\n\n @Autowired(required = false)\n private SecurityConfiguration securityConfiguration;\n\n @Autowired(required = false)\n private UiConfiguration uiConfiguration;\n\n private final SwaggerResourcesProvider swaggerResources;\n\n @Autowired\n public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {\n this.swaggerResources = swaggerResources;\n }\n\n\n @GetMapping("/swagger-resources/configuration/security")\n public Mono> securityConfiguration() {\n return Mono.just(new ResponseEntity<>(\n Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));\n }\n\n @GetMapping("/swagger-resources/configuration/ui")\n public Mono> uiConfiguration() {\n return Mono.just(new ResponseEntity<>(\n Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));\n }\n\n @GetMapping("/swagger-resources")\n public Mono swaggerResources() {\n return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));\n }\n}\n')),(0,i.kt)("h3",{id:"2134-\u542f\u52a8\u914d\u7f6e"},"2.1.3.4 \u542f\u52a8\u914d\u7f6e"),(0,i.kt)("p",null,"\u6700\u540e,\u9879\u76ee\u542f\u52a8\u7c7b\u6dfb\u52a0\u76f8\u5173\u6ce8\u89e3\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableDiscoveryClient\n@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceDocApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(ServiceDocApplication.class, args);\n }\n\n}\n")),(0,i.kt)("h2",{id:"214-\u6587\u6863\u5c55\u793a"},"2.1.4 \u6587\u6863\u5c55\u793a"),(0,i.kt)("p",null,"\u6700\u540e\u5206\u522b\u4f9d\u6b21\u542f\u52a8\u9879\u76ee\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"service-server"),(0,i.kt)("li",{parentName:"ul"},"service-user"),(0,i.kt)("li",{parentName:"ul"},"service-order"),(0,i.kt)("li",{parentName:"ul"},"service-doc")),(0,i.kt)("p",null,"\u6253\u5f00\u6587\u6863\u5730\u5740\uff1ahttp://localhost:10003/doc.html"),(0,i.kt)("p",null,"\u67e5\u770b\u6587\u6863\u6548\u679c\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:r(5750).Z,width:"1918",height:"1058"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:r(81353).Z,width:"1919",height:"1052"})),(0,i.kt)("h2",{id:"215-\u6ce8\u610f\u70b9"},"2.1.5 \u6ce8\u610f\u70b9"),(0,i.kt)("p",null,"\u5728\u96c6\u6210Spring Cloud Gateway\u7f51\u5173\u7684\u65f6\u5019,\u4f1a\u51fa\u73b0\u6ca1\u6709basePath\u7684\u60c5\u51b5(\u5373\u5b9a\u4e49\u7684\u4f8b\u5982/user\u3001/order\u7b49\u5fae\u670d\u52a1\u7684\u524d\u7f00),\u8fd9\u4e2a\u60c5\u51b5\u5728\u4f7f\u7528zuul\u7f51\u5173\u7684\u65f6\u5019\u4e0d\u4f1a\u51fa\u73b0\u6b64\u95ee\u9898,\u56e0\u6b64,\u5728Gateway\u7f51\u5173\u9700\u8981\u6dfb\u52a0\u4e00\u4e2aFilter\u5b9e\u4f53Bean,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Component\npublic class SwaggerHeaderFilter extends AbstractGatewayFilterFactory {\n private static final String HEADER_NAME = "X-Forwarded-Prefix";\n\n private static final String URI = "/v2/api-docs";\n\n @Override\n public GatewayFilter apply(Object config) {\n return (exchange, chain) -> {\n ServerHttpRequest request = exchange.getRequest();\n String path = request.getURI().getPath();\n if (!StringUtils.endsWithIgnoreCase(path,URI )) {\n return chain.filter(exchange);\n }\n String basePath = path.substring(0, path.lastIndexOf(URI));\n ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, basePath).build();\n ServerWebExchange newExchange = exchange.mutate().request(newRequest).build();\n return chain.filter(newExchange);\n };\n }\n}\n')),(0,i.kt)("p",null,"\u7136\u540e\u5728\u914d\u7f6e\u6587\u4ef6\u6307\u5b9a\u8fd9\u4e2afilter"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"spring:\n application:\n name: service-doc\n cloud:\n gateway:\n discovery:\n locator:\n # enabled: true\n lowerCaseServiceId: true\n routes:\n - id: service-user\n uri: lb://service-user\n predicates:\n - Path=/user/**\n # - Header=Cookie,Set-Cookie\n filters:\n - SwaggerHeaderFilter\n - StripPrefix=1\n - id: service-order\n uri: lb://service-order\n predicates:\n - Path=/order/**\n filters:\n - SwaggerHeaderFilter //\u6307\u5b9afilter\n - StripPrefix=1\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u7279\u522b\u6ce8\u610f\uff1a\u5982\u679c\u662f\u9ad8\u7248\u672c\u7684Spring Cloud Gateway\uff0c\u90a3\u4e48yml\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684",(0,i.kt)("inlineCode",{parentName:"strong"},"SwaggerHeaderFilter"),"\u914d\u7f6e\u5e94\u8be5\u53bb\u6389")))}d.isMDXComponent=!0},5750:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/k-g-1-1eb061486b28fb681253f255e243b87d.png"},81353:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/k-g-2-aaf0d32ef473e3b07d69a53e3a5365dd.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2653488a.0288fce0.js b/knife4j-doc/gitee/assets/js/2653488a.0288fce0.js new file mode 100644 index 000000000..13485cff0 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2653488a.0288fce0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6467],{3905:(e,n,r)=>{r.d(n,{Zo:()=>g,kt:()=>m});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function p(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=t.createContext({}),s=function(e){var n=t.useContext(l),r=n;return e&&(r="function"==typeof e?e(n):p(p({},n),e)),r},g=function(e){var n=s(e.components);return t.createElement(l.Provider,{value:n},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},d=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=s(r),d=a,m=u["".concat(l,".").concat(d)]||u[d]||c[d]||o;return r?t.createElement(m,p(p({ref:n},g),{},{components:r})):t.createElement(m,p({ref:n},g))}));function m(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=d;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i[u]="string"==typeof e?e:a,p[1]=i;for(var s=2;s{r.r(n),r.d(n,{assets:()=>g,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var t=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],i={},l="\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",s={unversionedId:"faq/swaggerResourceInvalid",id:"faq/swaggerResourceInvalid",title:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",description:"\u5728swagger-bootstrap-ui\u76841.9.X\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c",source:"@site/docs/faq/swaggerResourceInvalid.md",sourceDirName:"faq",slug:"/faq/swaggerResourceInvalid",permalink:"/docs/faq/swaggerResourceInvalid",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",permalink:"/docs/faq/swagger-des-not-found"},next:{title:"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df",permalink:"/docs/faq/upload-error"}},g={},u=[{value:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200",id:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200",level:2},{value:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9",id:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9",level:2},{value:"JSON\u683c\u5f0f\u975e\u6cd5",id:"json\u683c\u5f0f\u975e\u6cd5",level:2}],c={toc:u},d="wrapper";function m(e){var n=e.components,i=(0,a.Z)(e,p);return(0,o.kt)(d,(0,t.Z)({},c,i,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e"},"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e"),(0,o.kt)("p",null,"\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"1.9.X"),"\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'try{\n //some operation\n}\ncatch (err){\n that.error(err);\n layer.msg(i18n.message.sys.loadErr+",Err:"+err.message);\n if (window.console){\n console.error(err);\n }\n}\n')),(0,o.kt)("p",null,"\u9519\u8bef\u4fe1\u606f\u5373\u5f00\u53d1\u8005\u5e38\u89c1\u7684",(0,o.kt)("strong",{parentName:"p"},"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(81186).Z,width:"761",height:"513"})),(0,o.kt)("p",null,"\u4e00\u822c\u51fa\u73b0\u8fd9\u79cd\u9519\u8bef\u7684\u65f6\u5019\u6709\u51e0\u79cd\u60c5\u51b5"),(0,o.kt)("h2",{id:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200"},"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200"),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7chrome\u6d4f\u89c8\u5668\u7684network\u63a7\u5236\u53f0\u8fdb\u884c\u67e5\u770b,\u9996\u5148\u9700\u8981\u6392\u9664swagger\u4e24\u4e2a\u63a5\u53e3\u72b6\u6001\u7801\u975e200\u7684\u60c5\u51b5"),(0,o.kt)("p",null,"\u6709\u65f6\u5019\u5f00\u53d1\u8005\u672a\u6309\u6b63\u786e\u7684\u65b9\u5f0f\u96c6\u6210",(0,o.kt)("inlineCode",{parentName:"p"},"springfox-swagger"),"\u7ec4\u4ef6,\u5bfc\u81f4\u8bbf\u95ee\u7684\u65f6\u5019\u63a5\u53e3\u5730\u5740\u51fa\u73b0404,springfox-swagger\u63d0\u4f9b\u7684\u4e24\u4e2a\u63a5\u53e3\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"\u5206\u7ec4\u63a5\u53e3\uff1a"),"\u63a5\u53e3url\u4e00\u822c\u4e3a",(0,o.kt)("inlineCode",{parentName:"li"},"swagger-resources")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"api\u8d44\u6e90\u5b9e\u4f8b\u63a5\u53e3:")," \u8be5\u63a5\u53e3\u4e3a",(0,o.kt)("inlineCode",{parentName:"li"},"/v2/api-docs"),"\u6216\u8005\u589e\u5f3a\u63a5\u53e3",(0,o.kt)("inlineCode",{parentName:"li"},"/v2/api-docs-ext"))),(0,o.kt)("p",null,"\u53e6\u5916,",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u589e\u5f3a\u7684\u63a5\u53e3\u5730\u5740\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs-ext"),",\u5982\u679c\u51fa\u73b0\u8bbf\u95ee\u6b64\u63a5\u53e3\u7684\u65f6\u5019\u72b6\u6001\u7801\u4e3a404,\u8bf7\u786e\u4fdd\u5728Swagger\u7684\u914d\u7f6e\u6587\u4ef6\u7c7b\u4e0a\u52a0\u4e0a\u542f\u7528\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUI"),",\u8be5\u6ce8\u89e3\u662f\u548cspringfox\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableSwagger2"),"\u914d\u5408\u4e00\u8d77\u4f7f\u7528,\u5e76\u975e\u66ff\u4ee3."),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUI\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n //more ... \n}\n")),(0,o.kt)("h2",{id:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9"},"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9"),(0,o.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u96c6\u6210",(0,o.kt)("inlineCode",{parentName:"p"},"springfox-swagger"),"\u7ec4\u4ef6\u7684\u65f6\u5019,\u8be5\u7ec4\u4ef6\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u4e2a\u63a5\u53e3,\u800c\u8fd9\u4e24\u4e2a\u63a5\u53e3\u4e5f\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7ec4\u4ef6\u6240\u4f9d\u8d56\u7684\u63a5\u53e3\uff0c\u4e3b\u8981\u662f\u5206\u7ec4\u63a5\u53e3\u548c\u63a5\u53e3\u793a\u4f8b\u63a5\u53e3"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u5206\u7ec4\u63a5\u53e3\uff1a"),"\u63a5\u53e3url\u4e00\u822c\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-resources")),(0,o.kt)("p",null,"\u8be5\u63a5\u53e3\u8fd4\u56de\u7684\u6b63\u786e\u683c\u5f0f\u4e3a\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "name": "1.8.X\u7248\u672c\u63a5\u53e3",\n "url": "/v2/api-docs?group=1.8.X\u7248\u672c\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=1.8.X\u7248\u672c\u63a5\u53e3"\n },\n {\n "name": "1.9.X\u7248\u672c\u63a5\u53e3",\n "url": "/v2/api-docs?group=1.9.X\u7248\u672c\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=1.9.X\u7248\u672c\u63a5\u53e3"\n },\n {\n "name": "\u9ed8\u8ba4\u63a5\u53e3",\n "url": "/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3"\n }\n]\n')),(0,o.kt)("p",null,"\u5728\u4f4e\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6ca1\u6709url\u5c5e\u6027,\u4f46\u662f\u5728springfox-swagger\u76f8\u5bf9\u8f83\u9ad8\u7684\u7248\u672c\u4e2d,\u90fd\u4f1a\u5b58\u5728,\u4ee5\u4e0a\u683c\u5f0f\u662f\u4e00\u4e2a\u7eaf\u6570\u7ec4\u7684JSON\u5bf9\u8c61\uff0c\u5f88\u591a\u65f6\u5019\uff0c\u540e\u7aef\u7684\u5f00\u53d1\u5bf9\u54cd\u5e94\u7684\u63a5\u53e3\u90fd\u4f1a\u505a\u4e00\u5c42\u7edf\u4e00\u7684\u5c01\u88c5,\u4f8b\u5982\u5c01\u88c5\u4e86\u54cd\u5e94code\u3001\u9519\u8bef\u4fe1\u606f\u7b49,\u4f46\u662f\u9488\u5bf9springfox\u7ec4\u4ef6\u63d0\u4f9b\u7684\u63a5\u53e3\u9700\u8981\u6392\u9664\u5728\u5916,\u8fd9\u662f\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"api\u8d44\u6e90\u5b9e\u4f8b\u63a5\u53e3:")," \u8be5\u63a5\u53e3\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs"),"\u6216\u8005\u589e\u5f3a\u63a5\u53e3",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs-ext")),(0,o.kt)("p",null,"\u5b9e\u4f8b\u63a5\u53e3\u6b63\u786e\u683c\u5f0f\u4e3a\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "swagger": "2.0",\n "info": {\n //...\n },\n "host": "127.0.0.1:8999",\n "basePath": "/",\n "tags": [\n {\n "name": "1.8.2\u7248\u672c",\n "description": "Api 182 Controller"\n } \n ],\n "paths": {\n "/2/api/new187/postRequest": {\n //....\n },\n "securityDefinitions": {\n //,,.,\n },\n "definitions": {\n "AInfoVo": {\n //....\n }\n}\n')),(0,o.kt)("p",null,"\u5305\u542b\u4e86OpenAPI 2.0\u89c4\u8303\u4e2d\u5b9a\u4e49\u7684\u76f8\u5173\u5c5e\u6027\u5b57\u6bb5\uff0c\u662f\u4e00\u4e2a\u7eafJSON\u5bf9\u8c61,\u5f00\u53d1\u8005\u4e0d\u80fd\u5c01\u88c5\u4e4b\u5916\u7684\u5b57\u6bb5\u8fdb\u6765."),(0,o.kt)("h2",{id:"json\u683c\u5f0f\u975e\u6cd5"},"JSON\u683c\u5f0f\u975e\u6cd5"),(0,o.kt)("p",null,"\u5982\u679c\u4ee5\u4e0a\u4e24\u79cd\u60c5\u51b5\u90fd\u6392\u9664\u7684\u8bdd,\u6700\u540e\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\u4f1a\u9020\u6210\u6b64\u95ee\u9898\u7684\u51fa\u73b0\uff0c\u90a3\u5c31\u662f\u54cd\u5e94\u7684JSON\u5e76\u975e\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(5034).Z,width:"1409",height:"846"})),(0,o.kt)("p",null,"\u4e00\u822c\u51fa\u73b0\u6b64\u60c5\u51b5\u65f6,\u662f\u56e0\u4e3a\u540e\u7aef\u5728\u7ed9List\u96c6\u5408\u7684\u5c5e\u6027\u8d4b\u4e88\u4e86",(0,o.kt)("inlineCode",{parentName:"p"},"exmpale"),"\u5c5e\u6027,\u4f8b\u5982:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiModel(description = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u6a21\u578b",value = "CrmFieldGroupResponse")\npublic class CrmFieldGroupResponse {\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4ID")\n private int id;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u540d\u79f0")\n private String name;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u6570\u636e",example = "{\'id\':\'xxx\'}")\n private List fields;\n \n}\n')),(0,o.kt)("p",null,"\u8be5\u60c5\u51b5\u4f1a\u5bfc\u81f4\u751f\u6210\u51fa\u6765\u7684JSON\u5e76\u975e\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON\uff0c\u800c",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7ec4\u4ef6\u5728\u524d\u7aef\u662f\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"JSON.parse()"),"\u65b9\u6cd5\u5bf9\u540e\u7aef\u8fd4\u56de\u56de\u6765\u7684\u6570\u636e\u8fdb\u884cJSON\u8f6c\u6362,\u8fd9\u4f1a\u5bfc\u81f4\u8f6c\u6362\u5931\u8d25"),(0,o.kt)("p",null,"\u89e3\u51b3\u65b9\u6cd5\u662f\u628a\u96c6\u5408\u5c5e\u6027\u4e2d\u7684example\u5c5e\u6027\u53bb\u6389\uff0c\u4ea4\u4e2aspringfox-swagger\u6846\u67b6\u6765\u81ea\u52a8\u89e3\u6790"),(0,o.kt)("p",null,"\u6b63\u786e\u65b9\u5f0f\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiModel(description = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u6a21\u578b",value = "CrmFieldGroupResponse")\npublic class CrmFieldGroupResponse {\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4ID")\n private int id;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u540d\u79f0")\n private String name;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u6570\u636e")\n private List fields;\n \n}\n')))}m.isMDXComponent=!0},5034:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/swggerapi404-1-e2e3013f25eee9cbc90c3573e40fff88.jpg"},81186:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/swggerapi404-1d2ff251b46efa912d635978c91e035f.jpg"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2653488a.d2fca7d2.js b/knife4j-doc/gitee/assets/js/2653488a.d2fca7d2.js deleted file mode 100644 index 3b04a667a..000000000 --- a/knife4j-doc/gitee/assets/js/2653488a.d2fca7d2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6467],{3905:(e,n,r)=>{r.d(n,{Zo:()=>g,kt:()=>d});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function p(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=t.createContext({}),s=function(e){var n=t.useContext(l),r=n;return e&&(r="function"==typeof e?e(n):p(p({},n),e)),r},g=function(e){var n=s(e.components);return t.createElement(l.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},c=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),c=s(r),d=a,m=c["".concat(l,".").concat(d)]||c[d]||u[d]||o;return r?t.createElement(m,p(p({ref:n},g),{},{components:r})):t.createElement(m,p({ref:n},g))}));function d(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=c;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i.mdxType="string"==typeof e?e:a,p[1]=i;for(var s=2;s{r.r(n),r.d(n,{assets:()=>g,contentTitle:()=>l,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var t=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],i={},l="\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",s={unversionedId:"faq/swaggerResourceInvalid",id:"faq/swaggerResourceInvalid",title:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e",description:"\u5728swagger-bootstrap-ui\u76841.9.X\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c",source:"@site/docs/faq/swaggerResourceInvalid.md",sourceDirName:"faq",slug:"/faq/swaggerResourceInvalid",permalink:"/docs/faq/swaggerResourceInvalid",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",permalink:"/docs/faq/swagger-des-not-found"},next:{title:"\u6587\u4ef6\u4e0a\u4f20\u4e0d\u663e\u793a\u4e0a\u4f20\u9009\u62e9\u6587\u672c\u57df",permalink:"/docs/faq/upload-error"}},g={},u=[{value:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200",id:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200",level:2},{value:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9",id:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9",level:2},{value:"JSON\u683c\u5f0f\u975e\u6cd5",id:"json\u683c\u5f0f\u975e\u6cd5",level:2}],c={toc:u};function d(e){var n=e.components,i=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,t.Z)({},c,i,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e"},"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e"),(0,o.kt)("p",null,"\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"1.9.X"),"\u7cfb\u5217\u7248\u672c\u4e2d,\u6253\u5f00\u6587\u6863\u9875\u9762\u521d\u59cb\u5316\u4f1a\u78b0\u89c1\u95ee\u9898,\u9488\u5bf9\u6b64\u60c5\u51b5,\u4e3a\u4e86\u663e\u793a\u66f4\u53cb\u597d\u4e00\u4e0b,\u5728\u6838\u5fc3\u7684JS\u4ee3\u7801\u4e2d\u8fdb\u884c\u4e86\u5f02\u5e38\u6355\u83b7\u64cd\u4f5c"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'try{\n //some operation\n}\ncatch (err){\n that.error(err);\n layer.msg(i18n.message.sys.loadErr+",Err:"+err.message);\n if (window.console){\n console.error(err);\n }\n}\n')),(0,o.kt)("p",null,"\u9519\u8bef\u4fe1\u606f\u5373\u5f00\u53d1\u8005\u5e38\u89c1\u7684",(0,o.kt)("strong",{parentName:"p"},"\u8bf7\u786e\u4fddswagger\u8d44\u6e90\u63a5\u53e3\u6b63\u786e")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(81186).Z,width:"761",height:"513"})),(0,o.kt)("p",null,"\u4e00\u822c\u51fa\u73b0\u8fd9\u79cd\u9519\u8bef\u7684\u65f6\u5019\u6709\u51e0\u79cd\u60c5\u51b5"),(0,o.kt)("h2",{id:"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200"},"swagger\u63a5\u53e3\u8bf7\u6c42\u975e200"),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7chrome\u6d4f\u89c8\u5668\u7684network\u63a7\u5236\u53f0\u8fdb\u884c\u67e5\u770b,\u9996\u5148\u9700\u8981\u6392\u9664swagger\u4e24\u4e2a\u63a5\u53e3\u72b6\u6001\u7801\u975e200\u7684\u60c5\u51b5"),(0,o.kt)("p",null,"\u6709\u65f6\u5019\u5f00\u53d1\u8005\u672a\u6309\u6b63\u786e\u7684\u65b9\u5f0f\u96c6\u6210",(0,o.kt)("inlineCode",{parentName:"p"},"springfox-swagger"),"\u7ec4\u4ef6,\u5bfc\u81f4\u8bbf\u95ee\u7684\u65f6\u5019\u63a5\u53e3\u5730\u5740\u51fa\u73b0404,springfox-swagger\u63d0\u4f9b\u7684\u4e24\u4e2a\u63a5\u53e3\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"\u5206\u7ec4\u63a5\u53e3\uff1a"),"\u63a5\u53e3url\u4e00\u822c\u4e3a",(0,o.kt)("inlineCode",{parentName:"li"},"swagger-resources")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"api\u8d44\u6e90\u5b9e\u4f8b\u63a5\u53e3:")," \u8be5\u63a5\u53e3\u4e3a",(0,o.kt)("inlineCode",{parentName:"li"},"/v2/api-docs"),"\u6216\u8005\u589e\u5f3a\u63a5\u53e3",(0,o.kt)("inlineCode",{parentName:"li"},"/v2/api-docs-ext"))),(0,o.kt)("p",null,"\u53e6\u5916,",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u589e\u5f3a\u7684\u63a5\u53e3\u5730\u5740\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs-ext"),",\u5982\u679c\u51fa\u73b0\u8bbf\u95ee\u6b64\u63a5\u53e3\u7684\u65f6\u5019\u72b6\u6001\u7801\u4e3a404,\u8bf7\u786e\u4fdd\u5728Swagger\u7684\u914d\u7f6e\u6587\u4ef6\u7c7b\u4e0a\u52a0\u4e0a\u542f\u7528\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUI"),",\u8be5\u6ce8\u89e3\u662f\u548cspringfox\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"@EnableSwagger2"),"\u914d\u5408\u4e00\u8d77\u4f7f\u7528,\u5e76\u975e\u66ff\u4ee3."),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUI\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n //more ... \n}\n")),(0,o.kt)("h2",{id:"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9"},"swagger\u63a5\u53e3\u683c\u5f0f\u4e0d\u5bf9"),(0,o.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u96c6\u6210",(0,o.kt)("inlineCode",{parentName:"p"},"springfox-swagger"),"\u7ec4\u4ef6\u7684\u65f6\u5019,\u8be5\u7ec4\u4ef6\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u4e2a\u63a5\u53e3,\u800c\u8fd9\u4e24\u4e2a\u63a5\u53e3\u4e5f\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7ec4\u4ef6\u6240\u4f9d\u8d56\u7684\u63a5\u53e3\uff0c\u4e3b\u8981\u662f\u5206\u7ec4\u63a5\u53e3\u548c\u63a5\u53e3\u793a\u4f8b\u63a5\u53e3"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u5206\u7ec4\u63a5\u53e3\uff1a"),"\u63a5\u53e3url\u4e00\u822c\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-resources")),(0,o.kt)("p",null,"\u8be5\u63a5\u53e3\u8fd4\u56de\u7684\u6b63\u786e\u683c\u5f0f\u4e3a\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "name": "1.8.X\u7248\u672c\u63a5\u53e3",\n "url": "/v2/api-docs?group=1.8.X\u7248\u672c\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=1.8.X\u7248\u672c\u63a5\u53e3"\n },\n {\n "name": "1.9.X\u7248\u672c\u63a5\u53e3",\n "url": "/v2/api-docs?group=1.9.X\u7248\u672c\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=1.9.X\u7248\u672c\u63a5\u53e3"\n },\n {\n "name": "\u9ed8\u8ba4\u63a5\u53e3",\n "url": "/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3",\n "swaggerVersion": "2.0",\n "location": "/v2/api-docs?group=\u9ed8\u8ba4\u63a5\u53e3"\n }\n]\n')),(0,o.kt)("p",null,"\u5728\u4f4e\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6ca1\u6709url\u5c5e\u6027,\u4f46\u662f\u5728springfox-swagger\u76f8\u5bf9\u8f83\u9ad8\u7684\u7248\u672c\u4e2d,\u90fd\u4f1a\u5b58\u5728,\u4ee5\u4e0a\u683c\u5f0f\u662f\u4e00\u4e2a\u7eaf\u6570\u7ec4\u7684JSON\u5bf9\u8c61\uff0c\u5f88\u591a\u65f6\u5019\uff0c\u540e\u7aef\u7684\u5f00\u53d1\u5bf9\u54cd\u5e94\u7684\u63a5\u53e3\u90fd\u4f1a\u505a\u4e00\u5c42\u7edf\u4e00\u7684\u5c01\u88c5,\u4f8b\u5982\u5c01\u88c5\u4e86\u54cd\u5e94code\u3001\u9519\u8bef\u4fe1\u606f\u7b49,\u4f46\u662f\u9488\u5bf9springfox\u7ec4\u4ef6\u63d0\u4f9b\u7684\u63a5\u53e3\u9700\u8981\u6392\u9664\u5728\u5916,\u8fd9\u662f\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"api\u8d44\u6e90\u5b9e\u4f8b\u63a5\u53e3:")," \u8be5\u63a5\u53e3\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs"),"\u6216\u8005\u589e\u5f3a\u63a5\u53e3",(0,o.kt)("inlineCode",{parentName:"p"},"/v2/api-docs-ext")),(0,o.kt)("p",null,"\u5b9e\u4f8b\u63a5\u53e3\u6b63\u786e\u683c\u5f0f\u4e3a\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "swagger": "2.0",\n "info": {\n //...\n },\n "host": "127.0.0.1:8999",\n "basePath": "/",\n "tags": [\n {\n "name": "1.8.2\u7248\u672c",\n "description": "Api 182 Controller"\n } \n ],\n "paths": {\n "/2/api/new187/postRequest": {\n //....\n },\n "securityDefinitions": {\n //,,.,\n },\n "definitions": {\n "AInfoVo": {\n //....\n }\n}\n')),(0,o.kt)("p",null,"\u5305\u542b\u4e86OpenAPI 2.0\u89c4\u8303\u4e2d\u5b9a\u4e49\u7684\u76f8\u5173\u5c5e\u6027\u5b57\u6bb5\uff0c\u662f\u4e00\u4e2a\u7eafJSON\u5bf9\u8c61,\u5f00\u53d1\u8005\u4e0d\u80fd\u5c01\u88c5\u4e4b\u5916\u7684\u5b57\u6bb5\u8fdb\u6765."),(0,o.kt)("h2",{id:"json\u683c\u5f0f\u975e\u6cd5"},"JSON\u683c\u5f0f\u975e\u6cd5"),(0,o.kt)("p",null,"\u5982\u679c\u4ee5\u4e0a\u4e24\u79cd\u60c5\u51b5\u90fd\u6392\u9664\u7684\u8bdd,\u6700\u540e\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\u4f1a\u9020\u6210\u6b64\u95ee\u9898\u7684\u51fa\u73b0\uff0c\u90a3\u5c31\u662f\u54cd\u5e94\u7684JSON\u5e76\u975e\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(5034).Z,width:"1409",height:"846"})),(0,o.kt)("p",null,"\u4e00\u822c\u51fa\u73b0\u6b64\u60c5\u51b5\u65f6,\u662f\u56e0\u4e3a\u540e\u7aef\u5728\u7ed9List\u96c6\u5408\u7684\u5c5e\u6027\u8d4b\u4e88\u4e86",(0,o.kt)("inlineCode",{parentName:"p"},"exmpale"),"\u5c5e\u6027,\u4f8b\u5982:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiModel(description = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u6a21\u578b",value = "CrmFieldGroupResponse")\npublic class CrmFieldGroupResponse {\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4ID")\n private int id;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u540d\u79f0")\n private String name;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u6570\u636e",example = "{\'id\':\'xxx\'}")\n private List fields;\n \n}\n')),(0,o.kt)("p",null,"\u8be5\u60c5\u51b5\u4f1a\u5bfc\u81f4\u751f\u6210\u51fa\u6765\u7684JSON\u5e76\u975e\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON\uff0c\u800c",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7ec4\u4ef6\u5728\u524d\u7aef\u662f\u901a\u8fc7",(0,o.kt)("inlineCode",{parentName:"p"},"JSON.parse()"),"\u65b9\u6cd5\u5bf9\u540e\u7aef\u8fd4\u56de\u56de\u6765\u7684\u6570\u636e\u8fdb\u884cJSON\u8f6c\u6362,\u8fd9\u4f1a\u5bfc\u81f4\u8f6c\u6362\u5931\u8d25"),(0,o.kt)("p",null,"\u89e3\u51b3\u65b9\u6cd5\u662f\u628a\u96c6\u5408\u5c5e\u6027\u4e2d\u7684example\u5c5e\u6027\u53bb\u6389\uff0c\u4ea4\u4e2aspringfox-swagger\u6846\u67b6\u6765\u81ea\u52a8\u89e3\u6790"),(0,o.kt)("p",null,"\u6b63\u786e\u65b9\u5f0f\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiModel(description = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u6a21\u578b",value = "CrmFieldGroupResponse")\npublic class CrmFieldGroupResponse {\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4ID")\n private int id;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u5206\u7ec4\u540d\u79f0")\n private String name;\n\n @ApiModelProperty(value = "\u5ba2\u6237\u5b57\u6bb5\u6570\u636e")\n private List fields;\n \n}\n')))}d.isMDXComponent=!0},5034:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/swggerapi404-1-e2e3013f25eee9cbc90c3573e40fff88.jpg"},81186:(e,n,r)=>{r.d(n,{Z:()=>t});const t=r.p+"assets/images/swggerapi404-1d2ff251b46efa912d635978c91e035f.jpg"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/27d45791.b1505878.js b/knife4j-doc/gitee/assets/js/27d45791.b1505878.js new file mode 100644 index 000000000..1ca1e8750 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/27d45791.b1505878.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4966],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=s(n),g=o,d=u["".concat(l,".").concat(g)]||u[g]||f[g]||a;return n?r.createElement(d,i(i({ref:t},c),{},{components:n})):r.createElement(d,i({ref:t},c))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=g;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[u]="string"==typeof e?e:o,i[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>p,metadata:()=>s,toc:()=>u});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),i=["components"],p={id:"plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"},l=void 0,s={unversionedId:"v4/plan",id:"v4/plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212",description:"\u5173\u8054issues//gitee.com/xiaoym/knife4j/issues/I5LIQZ",source:"@site/docs/v4/index.mdx",sourceDirName:"v4",slug:"/v4/",permalink:"/docs/v4/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{id:"plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"}},c={},u=[],f={toc:u},g="wrapper";function d(e){var t=e.components,p=(0,o.Z)(e,i);return(0,a.kt)(g,(0,r.Z)({},f,p,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5173\u8054issues:",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I5LIQZ",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j/issues/I5LIQZ")),(0,a.kt)("p",null,'\u5173\u6ce8\u516c\u4f17\u53f7"Knife4j"\uff0c\u70b9\u51fb\u83dc\u5355\u201cV4.0\u201d\u83b7\u53d6\u52a0\u7fa4\u4e8c\u7ef4\u7801\n',(0,a.kt)("img",{alt:"\u8f93\u5165\u56fe\u7247\u8bf4\u660e",src:n(91333).Z,title:"\u5c4f\u5e55\u622a\u56fe.png",width:"1816",height:"624"})," "),(0,a.kt)("p",null,"\u51e0\u4e2a\u5f85\u5904\u7406\u4e8b\u9879\uff1a\n\u4e00\u56fe\u80dc\u5343\u8a00\n",(0,a.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660054227551744942/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:"\u8f93\u5165\u56fe\u7247\u8bf4\u660e",title:"\u5c4f\u5e55\u622a\u56fe.png"})),(0,a.kt)("p",null,"\u4e00\u3001\u524d\u7aef\u90e8\u5206"),(0,a.kt)("p",null,"1\u3001\u76ee\u524dknife4j-ui\u7684\u7248\u672c\u867d\u7136\u63d0\u4f9b\u4e86swagger2\u3001oas3\u7684\u517c\u5bb9\uff0c\u4f46\u662f\u5bf9\u4e8eoas3\u517c\u5bb9\u6027\u53ef\u80fd\u8fd8\u4e0d\u592a\u597d\uff0c\u9700\u8981\u5bf9\u7167oas3\u89c4\u8303\u634b\u4e00\u904d"),(0,a.kt)("p",null,"2\u3001oas3\u89c4\u8303\u5bf9oauth2\u7684\u652f\u6301\uff0c\u76ee\u524d\u8fd8\u6ca1\u6709\u505a"),(0,a.kt)("p",null,"\u4e8c\u3001\u540e\u7aef\u90e8\u5206"),(0,a.kt)("p",null,"1\u3001\u867d\u7136\u63d0\u4f9b\u4e86starter\uff0c\u4f46\u662f\u4f7f\u7528\u8d77\u6765\u8fd8\u662f\u9700\u8981\u521b\u5efa\u4e00\u4e9bConfig\u914d\u7f6e\u6587\u4ef6\uff0c\u6ca1\u6709\u771f\u6b63\u7684\u7b80\u5316\u4f7f\u7528\u4eba\u5458\u7684\u5de5\u4f5c\u91cf\uff0c\u9700\u8981\u52a0\u5f3astarter\u7684\u8303\u56f4\uff0c\u63d0\u4f9b\u57fa\u4e8e\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\u4ee5\u5feb\u901f\u4f7f\u7528\uff0c\u9700\u8981\u517c\u5bb9springfox\u3001springdoc-openapi\u4e24\u4e2a\u7248\u672c"),(0,a.kt)("p",null,"2\u3001\u63d0\u4f9b\u5bf9springdoc-openapi\u6846\u67b6\u7684\u517c\u5bb9\u9002\u914d\uff0cknife4j\u63d0\u4f9b\u7684\u90e8\u5206\u589e\u5f3a\u529f\u80fd\u9700\u8981\u5728springdoc-openapi\u627e\u5230\u7a81\u7834\u53e3\uff0c\u7c7b\u4f3c\u4e8espringfox\u7684Plugin\u6269\u5c55\u673a\u5236\u4e00\u6837"),(0,a.kt)("p",null,"3\u3001\u4e3b\u6d41API\u7f51\u5173\u7684\u805a\u5408\uff0c\u6bd4\u5982zuul\u3001gateway\u7b49\u7ec4\u4ef6\uff0c\u76ee\u524d\u805a\u5408\u8d77\u6765\u5bf9\u5f00\u53d1\u8005\u800c\u8a00\u6bd4\u8f83\u5403\u529b\u6216\u8005\u4e0d\u540c\u7f51\u5173\u7248\u672c\u4e4b\u95f4\uff0c\u603b\u662f\u5b58\u5728\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u63d0\u4f9b\u7edf\u4e00\u7684\u7f51\u5173\u805a\u5408starter\u89e3\u51b3\u65b9\u6848"),(0,a.kt)("p",null,"\u4e09\u3001\u751f\u6001\u53d1\u5c55"),(0,a.kt)("p",null,"1\u3001\u63d0\u4f9b\u72ec\u7acb\u7684\u4e2d\u95f4\u4ef6\uff0c\u867d\u7136knife4j\u63d0\u4f9b\u4e86knife4j-aggregation-desktop\u7ec4\u4ef6\uff0c\u4f46\u4f7f\u7528\u8d77\u6765\u8fd8\u662f\u4e0d\u592a\u65b9\u4fbf\uff0c\u9700\u8981\u8003\u8651\u548c\u76ee\u524d\u4e3b\u6d41\u7684\u4e00\u4e9b\u914d\u7f6e\u4e2d\u5fc3\u7ed3\u5408\u4f7f\u7528\uff0cnacos\u3001apoll\u7b49\u7b49"),(0,a.kt)("p",null,"2\u3001\u63d0\u4f9bDocker\u5b98\u65b9\u955c\u50cf\uff0c\u4e00\u952e\u90e8\u7f72\u72ec\u7acb\u4e2d\u95f4\u4ef6\uff0c\u914d\u5408k8s\uff0c\u7b80\u5316\u72ec\u7acb\u4e2d\u95f4\u4ef6\u7684\u4f7f\u7528\u6210\u672c&\u5b66\u4e60\u6210\u672c"),(0,a.kt)("p",null,"3\u3001\u5404\u79cd\u4e91\u539f\u751f\u573a\u666f\u4e0b\u7684\u9002\u914d\u96c6\u6210\uff0c\u7279\u522b\u662fk8s\u73af\u5883\u4e0b\uff0c\u76ee\u524dk8s\u53d1\u5c55\u5df2\u7ecf\u6210\u4e3a\u4e3b\u6d41\uff0cknife4j\u5728k8s\u73af\u5883\u4e0b\u7684\u72ec\u7acb\u4e2d\u95f4\u4ef6\u80fd\u5426\u51fa\u4e00\u4efd\u529b"),(0,a.kt)("p",null,"\u56db\u3001\u6587\u6863"),(0,a.kt)("p",null,"1\u3001\u5b98\u65b9\u6587\u6863\u7f3a\u4e4f\u7248\u672c\u673a\u5236\uff0c\u4ece\u76ee\u524d\u7684\u7248\u672c\u53d1\u7248\uff0c\u9700\u8981\u5c06\u4e0d\u540c\u7684\u6587\u6863-\u7248\u672c\u8fdb\u884c\u5bf9\u5e94\u8d77\u6765"),(0,a.kt)("p",null,"2\u3001\u5404\u4e2aSpring Boot\u3001Spring Cloud\u7b49\u73af\u5883\u96c6\u6210knife4j\u7684\u5b9e\u6218\u9002\u914d"),(0,a.kt)("p",null,"3\u3001FAQ\u5b8c\u5584"),(0,a.kt)("p",null,"4\u3001Swagger2\u3001OAS3\u7b49\u89c4\u8303\u7684\u8bf4\u660e\u3001\u5305\u62ec\u5bf9springfox\u3001springdoc-openapi\u7b49\u6846\u67b6\u7684\u8bf4\u660e\u6587\u6863"))}d.isMDXComponent=!0},91333:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/qrcode2-aaf1c042b32687b5ab24e5487179986b.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/27d45791.ba0e812b.js b/knife4j-doc/gitee/assets/js/27d45791.ba0e812b.js deleted file mode 100644 index 9a94a778f..000000000 --- a/knife4j-doc/gitee/assets/js/27d45791.ba0e812b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4966],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),f=s(n),g=o,d=f["".concat(l,".").concat(g)]||f[g]||u[g]||a;return n?r.createElement(d,i(i({ref:t},c),{},{components:n})):r.createElement(d,i({ref:t},c))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>p,metadata:()=>s,toc:()=>u});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),i=["components"],p={id:"plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"},l=void 0,s={unversionedId:"v4/plan",id:"v4/plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212",description:"\u5173\u8054issues//gitee.com/xiaoym/knife4j/issues/I5LIQZ",source:"@site/docs/v4/index.mdx",sourceDirName:"v4",slug:"/v4/",permalink:"/docs/v4/",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{id:"plan",title:"Knife4j 4.0\u8fed\u4ee3\u8ba1\u5212"}},c={},u=[],f={toc:u};function g(e){var t=e.components,p=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},f,p,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u5173\u8054issues:",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I5LIQZ",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j/issues/I5LIQZ")),(0,a.kt)("p",null,'\u5173\u6ce8\u516c\u4f17\u53f7"Knife4j"\uff0c\u70b9\u51fb\u83dc\u5355\u201cV4.0\u201d\u83b7\u53d6\u52a0\u7fa4\u4e8c\u7ef4\u7801\n',(0,a.kt)("img",{alt:"\u8f93\u5165\u56fe\u7247\u8bf4\u660e",src:n(91333).Z,title:"\u5c4f\u5e55\u622a\u56fe.png",width:"1816",height:"624"})," "),(0,a.kt)("p",null,"\u51e0\u4e2a\u5f85\u5904\u7406\u4e8b\u9879\uff1a\n\u4e00\u56fe\u80dc\u5343\u8a00\n",(0,a.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660054227551744942/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:"\u8f93\u5165\u56fe\u7247\u8bf4\u660e",title:"\u5c4f\u5e55\u622a\u56fe.png"})),(0,a.kt)("p",null,"\u4e00\u3001\u524d\u7aef\u90e8\u5206"),(0,a.kt)("p",null,"1\u3001\u76ee\u524dknife4j-ui\u7684\u7248\u672c\u867d\u7136\u63d0\u4f9b\u4e86swagger2\u3001oas3\u7684\u517c\u5bb9\uff0c\u4f46\u662f\u5bf9\u4e8eoas3\u517c\u5bb9\u6027\u53ef\u80fd\u8fd8\u4e0d\u592a\u597d\uff0c\u9700\u8981\u5bf9\u7167oas3\u89c4\u8303\u634b\u4e00\u904d"),(0,a.kt)("p",null,"2\u3001oas3\u89c4\u8303\u5bf9oauth2\u7684\u652f\u6301\uff0c\u76ee\u524d\u8fd8\u6ca1\u6709\u505a"),(0,a.kt)("p",null,"\u4e8c\u3001\u540e\u7aef\u90e8\u5206"),(0,a.kt)("p",null,"1\u3001\u867d\u7136\u63d0\u4f9b\u4e86starter\uff0c\u4f46\u662f\u4f7f\u7528\u8d77\u6765\u8fd8\u662f\u9700\u8981\u521b\u5efa\u4e00\u4e9bConfig\u914d\u7f6e\u6587\u4ef6\uff0c\u6ca1\u6709\u771f\u6b63\u7684\u7b80\u5316\u4f7f\u7528\u4eba\u5458\u7684\u5de5\u4f5c\u91cf\uff0c\u9700\u8981\u52a0\u5f3astarter\u7684\u8303\u56f4\uff0c\u63d0\u4f9b\u57fa\u4e8e\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\u4ee5\u5feb\u901f\u4f7f\u7528\uff0c\u9700\u8981\u517c\u5bb9springfox\u3001springdoc-openapi\u4e24\u4e2a\u7248\u672c"),(0,a.kt)("p",null,"2\u3001\u63d0\u4f9b\u5bf9springdoc-openapi\u6846\u67b6\u7684\u517c\u5bb9\u9002\u914d\uff0cknife4j\u63d0\u4f9b\u7684\u90e8\u5206\u589e\u5f3a\u529f\u80fd\u9700\u8981\u5728springdoc-openapi\u627e\u5230\u7a81\u7834\u53e3\uff0c\u7c7b\u4f3c\u4e8espringfox\u7684Plugin\u6269\u5c55\u673a\u5236\u4e00\u6837"),(0,a.kt)("p",null,"3\u3001\u4e3b\u6d41API\u7f51\u5173\u7684\u805a\u5408\uff0c\u6bd4\u5982zuul\u3001gateway\u7b49\u7ec4\u4ef6\uff0c\u76ee\u524d\u805a\u5408\u8d77\u6765\u5bf9\u5f00\u53d1\u8005\u800c\u8a00\u6bd4\u8f83\u5403\u529b\u6216\u8005\u4e0d\u540c\u7f51\u5173\u7248\u672c\u4e4b\u95f4\uff0c\u603b\u662f\u5b58\u5728\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u63d0\u4f9b\u7edf\u4e00\u7684\u7f51\u5173\u805a\u5408starter\u89e3\u51b3\u65b9\u6848"),(0,a.kt)("p",null,"\u4e09\u3001\u751f\u6001\u53d1\u5c55"),(0,a.kt)("p",null,"1\u3001\u63d0\u4f9b\u72ec\u7acb\u7684\u4e2d\u95f4\u4ef6\uff0c\u867d\u7136knife4j\u63d0\u4f9b\u4e86knife4j-aggregation-desktop\u7ec4\u4ef6\uff0c\u4f46\u4f7f\u7528\u8d77\u6765\u8fd8\u662f\u4e0d\u592a\u65b9\u4fbf\uff0c\u9700\u8981\u8003\u8651\u548c\u76ee\u524d\u4e3b\u6d41\u7684\u4e00\u4e9b\u914d\u7f6e\u4e2d\u5fc3\u7ed3\u5408\u4f7f\u7528\uff0cnacos\u3001apoll\u7b49\u7b49"),(0,a.kt)("p",null,"2\u3001\u63d0\u4f9bDocker\u5b98\u65b9\u955c\u50cf\uff0c\u4e00\u952e\u90e8\u7f72\u72ec\u7acb\u4e2d\u95f4\u4ef6\uff0c\u914d\u5408k8s\uff0c\u7b80\u5316\u72ec\u7acb\u4e2d\u95f4\u4ef6\u7684\u4f7f\u7528\u6210\u672c&\u5b66\u4e60\u6210\u672c"),(0,a.kt)("p",null,"3\u3001\u5404\u79cd\u4e91\u539f\u751f\u573a\u666f\u4e0b\u7684\u9002\u914d\u96c6\u6210\uff0c\u7279\u522b\u662fk8s\u73af\u5883\u4e0b\uff0c\u76ee\u524dk8s\u53d1\u5c55\u5df2\u7ecf\u6210\u4e3a\u4e3b\u6d41\uff0cknife4j\u5728k8s\u73af\u5883\u4e0b\u7684\u72ec\u7acb\u4e2d\u95f4\u4ef6\u80fd\u5426\u51fa\u4e00\u4efd\u529b"),(0,a.kt)("p",null,"\u56db\u3001\u6587\u6863"),(0,a.kt)("p",null,"1\u3001\u5b98\u65b9\u6587\u6863\u7f3a\u4e4f\u7248\u672c\u673a\u5236\uff0c\u4ece\u76ee\u524d\u7684\u7248\u672c\u53d1\u7248\uff0c\u9700\u8981\u5c06\u4e0d\u540c\u7684\u6587\u6863-\u7248\u672c\u8fdb\u884c\u5bf9\u5e94\u8d77\u6765"),(0,a.kt)("p",null,"2\u3001\u5404\u4e2aSpring Boot\u3001Spring Cloud\u7b49\u73af\u5883\u96c6\u6210knife4j\u7684\u5b9e\u6218\u9002\u914d"),(0,a.kt)("p",null,"3\u3001FAQ\u5b8c\u5584"),(0,a.kt)("p",null,"4\u3001Swagger2\u3001OAS3\u7b49\u89c4\u8303\u7684\u8bf4\u660e\u3001\u5305\u62ec\u5bf9springfox\u3001springdoc-openapi\u7b49\u6846\u67b6\u7684\u8bf4\u660e\u6587\u6863"))}g.isMDXComponent=!0},91333:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/qrcode2-aaf1c042b32687b5ab24e5487179986b.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/27e15290.d05a5fb4.js b/knife4j-doc/gitee/assets/js/27e15290.d05a5fb4.js new file mode 100644 index 000000000..13c84a361 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/27e15290.d05a5fb4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2598],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=u(n),d=a,m=s["".concat(p,".").concat(d)]||s[d]||g[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[s]="string"==typeof e?e:a,i[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>p,default:()=>m,frontMatter:()=>o,metadata:()=>u,toc:()=>s});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),i=["components"],o={},p="v4.3.0\u7248\u672c-2023/08/06",u={unversionedId:"changelog/x/4.3",id:"changelog/x/4.3",title:"v4.3.0\u7248\u672c-2023/08/06",description:"\u5927\u5bb6\u597d\uff0cKnife4j v4.3.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a",source:"@site/docs/changelog/4.x/4.3.md",sourceDirName:"changelog/4.x",slug:"/changelog/x/4.3",permalink:"/docs/changelog/x/4.3",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1691361998,formattedLastUpdatedAt:"2023\u5e748\u67086\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"v4.2.0\u7248\u672c-2023/07/31",permalink:"/docs/changelog/x/4.2"},next:{title:"[v2.0.9-2021/06/28 Knife4j 2.0.9\u53d1\u5e03,\u89e3\u51b3issue 150+]",permalink:"/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue"}},c={},s=[{value:"\u66f4\u65b0\u65e5\u5fd7",id:"\u66f4\u65b0\u65e5\u5fd7",level:2},{value:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6",id:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6",level:3},{value:"\u5176\u4ed6\u90e8\u5206",id:"\u5176\u4ed6\u90e8\u5206",level:3},{value:"\u611f\u8c22",id:"\u611f\u8c22",level:2}],g={toc:s},d="wrapper";function m(e){var t=e.components,n=(0,a.Z)(e,i);return(0,l.kt)(d,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"v430\u7248\u672c-20230806"},"v4.3.0\u7248\u672c-2023/08/06"),(0,l.kt)("p",null,"\u5927\u5bb6\u597d\uff0cKnife4j v4.3.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a"),(0,l.kt)("h2",{id:"\u66f4\u65b0\u65e5\u5fd7"},"\u66f4\u65b0\u65e5\u5fd7"),(0,l.kt)("p",null,"4.3.0\u7248\u672c\u4e3b\u8981\u89e3\u51b3\u5728Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\u4e0b\u805a\u5408Swagger2\u6216\u8005OpenAPI3\u63d0\u4f9b\u6700\u7b80\u5355\u7684\u914d\u7f6e\uff0c\u7b80\u5316\u5f00\u53d1\u8005\u5de5\u4f5c\u3002"),(0,l.kt)("p",null,"\u6700\u7b80\u5355\u7684\u914d\u7f6e\u5982\u4e0b(4\u4e2a\u914d\u7f6e\u5c5e\u6027\u5b8c\u6210\u6240\u6709\u5b50\u670d\u52a1\u7684\u7f51\u5173\u805a\u5408)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n strategy: discover\n discover:\n # \u805a\u5408\u6240\u6709\u5b50\u670d\u52a1(swagger2\u89c4\u8303)\uff0c\u5b50\u670d\u52a1\u662f3\u89c4\u8303\u5219\u66ff\u6362\u4e3aopenapi3\n version: swagger2\n enabled: true\n")),(0,l.kt)("h3",{id:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6"},"\u4f18\u5316",(0,l.kt)("inlineCode",{parentName:"h3"},"knife4j-gateway"),"\u7ec4\u4ef6"),(0,l.kt)("p",null,"1\u3001\u5728gateway\u7f51\u5173\u805a\u5408\u670d\u52a1\u4e2d\uff0c\u6392\u9664\u5176\u4ed6\u670d\u52a1\u652f\u6301",(0,l.kt)("strong",{parentName:"p"},"\u6b63\u5219\u8868\u8fbe\u5f0f")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n strategy: discover\n discover:\n version: swagger2\n enabled: true\n excluded-services:\n # \u6392\u9664order\u5f00\u5934\u7684\u914d\u7f6e\n - order.*\n")),(0,l.kt)("p",null,"2\u3001\u805a\u5408\u5b50\u670d\u52a1\u65f6\uff0c\u4e24\u4e2a\u5b50\u670d\u52a1\u662f\u6839\u8def\u7531\u8f6c\u53d1\u65f6\u53ea\u805a\u5408\u5355\u4e2a\u670d\u52a1\u7684bug(\u4e3b\u8981\u662f",(0,l.kt)("inlineCode",{parentName:"p"},"order"),"\u6392\u5e8f\u5c5e\u6027\u5bfc\u81f4)"),(0,l.kt)("p",null,"3\u3001\u542f\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"DisocverClient"),"\u4f5c\u4e3a\u7f51\u5173\u9ed8\u8ba4\u8f6c\u53d1\u8def\u7531\u573a\u666f\u4e0b\u805a\u5408\u5931\u8d25\u7684\u95ee\u9898"),(0,l.kt)("p",null,"4\u3001\u9488\u5bf9Swagger2\u89c4\u8303\u805a\u5408\u5931\u8d25\u7684\u95ee\u9898"),(0,l.kt)("p",null,"5\u3001\u5728\u624b\u52a8\u805a\u5408\u6a21\u5f0f(manual)\u4e0b\u540c\u65f6\u652f\u6301",(0,l.kt)("inlineCode",{parentName:"p"},"swagger2"),"\u548c",(0,l.kt)("inlineCode",{parentName:"p"},"openapi3"),"\u89c4\u8303\u7684\u805a\u5408"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n strategy: manual\n routes:\n # swagger2\n - name: \u8ba2\u5355openapi2\n service-name: user-service\n url: /order-service-openapi2/v2/api-docs?group=default\n context-path: /\n # openapi3\n - name: \u8ba2\u5355openapi3\n service-name: order-service\n url: /order/v3/api-docs/default\n context-path: /order\n")),(0,l.kt)("p",null,"6\u3001\u5728\u5b50\u670d\u52a1\u5168\u90e8\u662fswagger2\u89c4\u8303\u60c5\u51b5\u4e0bcontextPath\u8def\u5f84\u9519\u8bef\u7684\u95ee\u9898"),(0,l.kt)("p",null,"7\u3001",(0,l.kt)("strong",{parentName:"p"},"\u4f18\u5316",(0,l.kt)("inlineCode",{parentName:"strong"},"knife4j-gateway"),"\u7684\u90e8\u5206\u4ee3\u7801\u7ed3\u6784\u53ca\u805a\u5408\u573a\u666f"),"\uff0c\u76ee\u524d\u805a\u5408\u5b50\u670d\u52a1\u8def\u7531\u5728\u670d\u52a1\u53d1\u73b0(",(0,l.kt)("inlineCode",{parentName:"p"},"discover"),")\u6a21\u5f0f\u4e0b\u4e3b\u89814\u79cd\u6a21\u5f0f\uff0c\u4e3b\u8981\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u57fa\u4e8eSpring Cloud Gateway\u914d\u7f6e\u7684routes\u89c4\u5219\u89e3\u6790\u5b50\u670d\u52a1\u8def\u7531\uff0c\u6570\u636e\u6765\u6e90\uff1a",(0,l.kt)("inlineCode",{parentName:"li"},"spring.cloud.gateway.routes")),(0,l.kt)("li",{parentName:"ul"},"\u5728discover\u670d\u52a1\u53d1\u73b0\u573a\u666f\u4e0b\uff0c\u9488\u5bf9\u81ea\u5b9a\u4e49\u6dfb\u52a0\u7684routes\uff0c\u9ed8\u8ba4\u518d\u6b21\u8ffd\u52a0\uff0c\u6570\u636e\u6765\u6e90\uff1a",(0,l.kt)("inlineCode",{parentName:"li"},"knife4j.gateway.routes")),(0,l.kt)("li",{parentName:"ul"},"\u670d\u52a1\u53d1\u73b0discover\u6a21\u5f0f\u4e0b\uff0c\u5f00\u53d1\u8005\u5728\u7f51\u5173\u6210\u7684\u8def\u7531\u8f6c\u53d1\u6a21\u5f0f\u9ed8\u8ba4\u901a\u8fc7",(0,l.kt)("inlineCode",{parentName:"li"},"DiscoveryClient"),"\u7684\u9ed8\u8ba4\u65b9\u5f0f\u8f6c\u53d1\u8def\u7531\uff0c\u89c4\u5219\u662f",(0,l.kt)("inlineCode",{parentName:"li"},"pattern:/service-id/** ")),(0,l.kt)("li",{parentName:"ul"},"\u63a5\u6536\u7f16\u7801\u65b9\u5f0f\u52a8\u6001\u6ce8\u5165Spring Cloud Gateway\u7f51\u5173\u7684\u8def\u7531\uff0c\u8fdb\u884c\u805a\u5408\u8f6c\u53d1")),(0,l.kt)("h3",{id:"\u5176\u4ed6\u90e8\u5206"},"\u5176\u4ed6\u90e8\u5206"),(0,l.kt)("p",null,"1\u3001\u4fee\u590d",(0,l.kt)("inlineCode",{parentName:"p"},"@ApiSupport"),"\u6ce8\u89e3\u4e0d\u751f\u6548\u7684\u95ee\u9898",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/89",target:"_blank",rel:"noopener"},"Gitee#PR89")),(0,l.kt)("p",null,"2\u3001\u6570\u636e\u5b58\u5728\u679a\u4e3e\u503c\u65f6\uff0cSwaggerModel\u65e0\u6cd5\u6b63\u5e38\u5c55\u5f00",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/90",target:"_blank",rel:"noopener"},"Gitee#PR90")),(0,l.kt)("p",null,"3\u3001\u89e3\u51b3\u7ec4\u4ef6\u51b2\u7a81\u7684\u95ee\u9898",(0,l.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/620",target:"_blank",rel:"noopener"},"GitHub#630")),(0,l.kt)("p",null,"4\u3001\u589e\u52a0title\u5c5e\u6027\u7684\u652f\u6301",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I7KUYP",target:"_blank",rel:"noopener"},"Gitee#I7KUYP")),(0,l.kt)("h2",{id:"\u611f\u8c22"},"\u611f\u8c22"),(0,l.kt)("p",null,"\u975e\u5e38\u611f\u8c22\u4ee5\u4e0b\u5f00\u53d1\u8005\u7684PR\u8d21\u732e(\u6392\u540d\u4e0d\u5206\u5148\u540e)\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://gitee.com/lhzsdnu",target:"_blank",rel:"noopener"},"lhzsdnu")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://gitee.com/igeekfan",target:"_blank",rel:"noopener"},"igeekfan"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2a5db992.cb507b34.js b/knife4j-doc/gitee/assets/js/2a5db992.cb507b34.js new file mode 100644 index 000000000..e73276859 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2a5db992.cb507b34.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8655],{3905:(e,n,t)=>{t.d(n,{Zo:()=>m,kt:()=>g});var i=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=i.createContext({}),l=function(e){var n=i.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},m=function(e){var n=l(e.components);return i.createElement(s.Provider,{value:n},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},d=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),u=l(t),d=r,g=u["".concat(s,".").concat(d)]||u[d]||c[d]||a;return t?i.createElement(g,o(o({ref:n},m),{},{components:t})):i.createElement(g,o({ref:n},m))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,o=new Array(a);o[0]=d;var p={};for(var s in n)hasOwnProperty.call(n,s)&&(p[s]=n[s]);p.originalType=e,p[u]="string"==typeof e?e:r,o[1]=p;for(var l=2;l{t.r(n),t.d(n,{assets:()=>m,contentTitle:()=>s,default:()=>g,frontMatter:()=>p,metadata:()=>l,toc:()=>u});var i=t(87462),r=t(63366),a=(t(67294),t(3905)),o=["components"],p={id:"customer-add-api",title:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",description:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",keywords:["springfox\u81ea\u5b9a\u4e49\u63a5\u53e3","springdoc\u81ea\u5b9a\u4e49\u63a5\u53e3","knife4j\u81ea\u5b9a\u4e49\u63a5\u53e3"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e747\u670813\u65e5"},s=void 0,l={unversionedId:"blog/customer-add-api",id:"blog/customer-add-api",title:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",description:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",source:"@site/docs/blog/customer-api.mdx",sourceDirName:"blog",slug:"/blog/customer-add-api",permalink:"/docs/blog/customer-add-api",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1689339282,formattedLastUpdatedAt:"2023\u5e747\u670814\u65e5",sidebarPosition:4,frontMatter:{id:"customer-add-api",title:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",description:"\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",keywords:["springfox\u81ea\u5b9a\u4e49\u63a5\u53e3","springdoc\u81ea\u5b9a\u4e49\u63a5\u53e3","knife4j\u81ea\u5b9a\u4e49\u63a5\u53e3"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e747\u670813\u65e5"}},m={},u=[{value:"\ud83c\udf31 \u672c\u8d28",id:"-\u672c\u8d28",level:2},{value:"\ud83d\udcdc springfox",id:"-springfox",level:2},{value:"\ud83d\udcda springdoc",id:"-springdoc",level:2},{value:"\ud83d\udcd6 \u603b\u7ed3",id:"-\u603b\u7ed3",level:2}],c={toc:u},d="wrapper";function g(e){var n=e.components,p=(0,r.Z)(e,o);return(0,a.kt)(d,(0,i.Z)({},c,p,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u5728 Spring Boot \u5e94\u7528\u4e2d,\u5982\u4f55\u4f7f\u7528 springfox \u548c springdoc \u6846\u67b6\u81ea\u5b9a\u4e49\u6dfb\u52a0\u5916\u90e8 API \u63a5\u53e3,\u5e76\u5728 Knife4j \u7684 UI \u754c\u9762\u4e2d\u5c55\u793a\u3002"),(0,a.kt)("p",null,"\u5173\u8054Issues\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u2705 ",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/issues/I640E8",target:"_blank",rel:"noopener"},"\u6dfb\u52a0SpringSecurity\u767b\u5f55\u63a5\u53e3\u5230knife4j\u4e2d")),(0,a.kt)("li",{parentName:"ul"})),(0,a.kt)("p",null,"\ud83c\udfd6\ufe0f \u672c\u6587\u4ed3\u5e93\uff1a",(0,a.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j-demo/tree/master/knife4j-customer-api",target:"_blank",rel:"noopener"},"knife4j-customer-api")),(0,a.kt)("p",null,"\ud83d\udcf9 \u89c6\u9891\u5730\u5740\uff1a",(0,a.kt)("a",{parentName:"p",href:"https://www.bilibili.com/video/BV19h4y1j7y9/?vd_source=ef34098d916a578698508a43063099ac",target:"_blank",rel:"noopener"},"https://www.bilibili.com/video/BV19h4y1j7y9/?vd_source=ef34098d916a578698508a43063099ac")),(0,a.kt)("iframe",{src:"//player.bilibili.com/player.html?aid=615960537&bvid=BV19h4y1j7y9&cid=1196531434&page=1&high_quality=1&danmaku=0",allowfullscreen:"allowfullscreen",width:"100%",height:"500",scrolling:"no",frameborder:"0",sandbox:"allow-top-navigation allow-same-origin allow-forms allow-scripts"}),(0,a.kt)("h2",{id:"-\u672c\u8d28"},"\ud83c\udf31 \u672c\u8d28"),(0,a.kt)("p",null,"\u6211\u4eec\u8981\u5b9e\u73b0\u5c06\u81ea\u5b9a\u4e49\u7684API\u63a5\u53e3\u6dfb\u52a0\u5230Ui\u754c\u9762\u4e2d\u663e\u793a\uff0c\u5176\u5b9e\u6700\u7b80\u5355\u7684\u5c31\u662f\u5728\u6211\u4eec\u63a5\u53e3\u6e32\u67d3\u7684Swagger\u6216\u8005OpenAPI\u5bf9\u8c61\u4e2d\uff0c\u6dfb\u52a0\u76f8\u5e94\u7684\u65b0\u5bf9\u8c61(PS:\u7528\u4e8e\u5728OpenAPI\u89c4\u8303\u4e2d\u63cf\u8ff0\u63a5\u53e3\u5b9a\u4e49\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"Operation"),"\u5bf9\u8c61)\u5c5e\u6027\u5c31\u597d\u4e86"),(0,a.kt)("p",null,"\u8fd9\u9700\u8981\u501f\u52a9\u4e8e\u5e95\u5c42\u89e3\u6790\u6846\u67b6\u5bf9\u5916\u662f\u5426\u63d0\u4f9b\u4e86\u5f00\u653e\u63a5\u53e3\uff0c\u5141\u8bb8\u6211\u4eec\u8fd9\u4e48\u505a\uff0c\u8fd8\u597d\u76ee\u524d\u4e0d\u7ba1\u662fspringfox\u6216\u8005springdoc\uff0c\u5176\u5b9e\u90fd\u652f\u6301\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u3002"),(0,a.kt)("p",null,"\u4e3b\u8981\u7684\u533a\u522b\u662f\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u2705 ",(0,a.kt)("strong",{parentName:"li"},"springfox"),"\u63d0\u4f9b\u7684\u662f",(0,a.kt)("a",{parentName:"li",href:"/docs/action/springfox/springfox3",target:null,rel:null},"spring-plugin"),"\u4f53\u7cfb\uff0c\u5728\u89e3\u6790\u65f6\u6dfb\u52a0",(0,a.kt)("inlineCode",{parentName:"li"},"Operation"),"\u5bf9\u8c61\uff0c\u8fd9\u662f\u8fdb\u884c\u4e2d\u7684\u5904\u7406\u884c\u4e3a"),(0,a.kt)("li",{parentName:"ul"},"\u2705 ",(0,a.kt)("strong",{parentName:"li"},"springdoc"),"\u63d0\u4f9b\u7684\u5168\u5c40Customer\u63a5\u53e3\uff0cspringdoc\u5df2\u7ecf\u5b8c\u6210\u4e86\u6240\u6709\u63a5\u53e3\u7684\u5bf9\u8c61\u89e3\u6790\uff0c\u4f46\u5f00\u53d1\u8005\u5b9e\u73b0Customer\u63a5\u53e3\u53ef\u4ee5\u81ea\u5b9a\u4e49\u66f4\u6539\uff0c\u8fd9\u662f\u540e\u7f6e\u884c\u4e3a")),(0,a.kt)("h2",{id:"-springfox"},"\ud83d\udcdc springfox"),(0,a.kt)("p",null,"\u5728springfox\u7684\u6846\u67b6\u4e2d\uff0c\u63d0\u4f9b\u4e86\u57fa\u4e8espring-plugin\u4f53\u7cfb\u7684\u89e3\u6790\u63a5\u53e3\uff0c\u5f00\u53d1\u8005\u5982\u679c\u9605\u8bfb\u8fc7springfox\u7684\u6e90\u7801\u540e\uff0c\u5e94\u8be5\u5f88\u8f7b\u677e\u5c31\u80fd\u5b9e\u73b0"),(0,a.kt)("p",null,"\u4e3b\u8981\u7684\u52a8\u4f5c\u5305\u62ec\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfa0 \u81ea\u5b9a\u4e49plugin\u63a5\u53e3\uff0c\u5b9e\u73b0",(0,a.kt)("inlineCode",{parentName:"li"},"ApiListingScannerPlugin.java"),"\u7c7b\uff0c\u5e76\u4e14\u901a\u8fc7",(0,a.kt)("inlineCode",{parentName:"li"},"@Component"),"\u6216\u8005Java Config\u5f97",(0,a.kt)("inlineCode",{parentName:"li"},"@Bean"),"\u6ce8\u89e3\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d"),(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfa2 \u521b\u5efa",(0,a.kt)("inlineCode",{parentName:"li"},"Operation"),"\u5bf9\u8c61\uff0c\u8be5\u5bf9\u8c61\u662f\u4e00\u4e2a\u63a5\u53e3\u7684\u63cf\u8ff0\uff0c\u5305\u62ec\uff1a\u8bf4\u660e\u3001\u53c2\u6570\u3001\u54cd\u5e94\u3001\u8bf7\u6c42\u7c7b\u578b\u7b49\u7b49\uff0c\u5e76\u4e14\u8fd4\u56de",(0,a.kt)("inlineCode",{parentName:"li"},"ApiListingScannerPlugin.java"),"\u63a5\u53e3\u7ea6\u675f\u7684\u65b9\u6cd5\u7c7b\u578b"),(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfce\ufe0f springfox\u8fd9\u79cd\u65b9\u5f0f\u53ea\u80fd\u63d0\u4f9b\u7b80\u5355\u7684form\u8868\u5355\u7c7b\u578b\u7684\u63a5\u53e3\uff0c\u5982\u679c\u662f\u7c7b\u4f3c",(0,a.kt)("inlineCode",{parentName:"li"},"@RequestBody"),"\u7c7b\u578b\u7684JSON\u3001XML\u8bf7\u6c42\uff0c\u90a3\u4e48",(0,a.kt)("strong",{parentName:"li"},"\u5efa\u8bae\u653e\u5f03~"))),(0,a.kt)("p",null,"\u793a\u4f8b:\u6dfb\u52a0\u4e00\u4e2a\u7b80\u5355\u7684login\u767b\u5f55\u63a5\u53e3\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="com.xiaominfo.springfox.customer.CustomerApiPlugin.java"',title:'"com.xiaominfo.springfox.customer.CustomerApiPlugin.java"'},'@Slf4j\n@Component\npublic class CustomerApiPlugin implements ApiListingScannerPlugin {\n \n @Override\n public List apply(DocumentationContext context) {\n // consumers\u3001produces\n Set mediaSet = new HashSet<>();\n mediaSet.add(MediaType.APPLICATION_JSON_VALUE);\n // \u8bbe\u5b9a\u53c2\u6570\n List parameters = new ArrayList<>();\n parameters.add(new ParameterBuilder().name("username").required(true).modelRef(new ModelRef("String")).defaultValue("test").description("\u7528\u6237\u540d").build());\n parameters.add(new ParameterBuilder().name("password").required(true).modelRef(new ModelRef("String")).defaultValue("123").description("\u5bc6\u7801").build());\n // \u63a5\u53e3\u7684Tag\n Set tags = new HashSet<>();\n tags.add("\u9996\u9875");\n // \u6784\u5efaOperation\u5bf9\u8c61\n Operation usernamePasswordOperation = new OperationBuilder(new CachingOperationNameGenerator())\n .method(HttpMethod.POST)\n .tags(tags)\n .summary("\u7528\u6237\u540d\u5bc6\u7801\u767b\u5f55")\n .notes("\u7528\u6237\u767b\u9646\u83b7\u53d6token")\n .parameters(parameters)\n .consumes(mediaSet)\n .produces(mediaSet)\n .build();\n \n // \u9700\u8981\u6ce8\u610f\u7684\u662fgroupName\u9700\u8981\u548c\u5f00\u53d1\u8005\u521b\u5efa\u7684Docket\u5bf9\u8c61\u8d4b\u503c\u7684groupName\u4fdd\u6301\u4e00\u81f4\n ApiDescription loginApiDescription = new ApiDescription("hello", "/login", "\u767b\u5f55\u63a5\u53e3\u63cf\u8ff0", Collections.singletonList(usernamePasswordOperation), false);\n return Collections.singletonList(loginApiDescription);\n }\n \n @Override\n public boolean supports(DocumentationType documentationType) {\n return documentationType == DocumentationType.SWAGGER_2;\n }\n}\n')),(0,a.kt)("h2",{id:"-springdoc"},"\ud83d\udcda springdoc"),(0,a.kt)("p",null,"\u5728springdoc\u4e2d\uff0c\u5176\u5b9e\u548cspringdoc\u7684\u601d\u60f3\u662f\u5b8c\u5168\u4e00\u81f4\u7684,springdoc\u4e5f\u5f00\u653e\u4e86\u4e24\u79cd\u7ea7\u522b\u7684customizer\u63a5\u53e3\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfdc\ufe0f ",(0,a.kt)("inlineCode",{parentName:"li"},"GlobalOperationCustomizer"),"\uff1a\u9488\u5bf9Operation\u7ea7\u522b\u7684\u5168\u5c40\u81ea\u5b9a\u4e49\u6269\u5c55\u94a9\u5b50\u51fd\u6570\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5bf9\u63a5\u53e3\u4e2d\u6bcf\u4e00\u4e2aOperation\u8fdb\u884c\u6269\u5c55\u81ea\u5b9a\u4e49\u5b9e\u73b0\uff0c\u6216\u8c03\u6574\uff0c\u6216\u4fee\u6539\uff0c\u6216\u589e\u52a0\u6269\u5c55\u90fd\u884c\uff0cKnife4j\u7684\u90e8\u5206\u589e\u5f3a\u7279\u6027\u5c31\u662f\u57fa\u4e8e\u6b64\u51fd\u6570\u5b9e\u73b0\uff0c\u53ef\u4ee5\u53c2\u8003\u4ee3\u7801",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/blob/dev/knife4j/knife4j-openapi3-jakarta-spring-boot-starter/src/main/java/com/github/xiaoymin/knife4j/spring/extension/Knife4jJakartaOperationCustomizer.java",target:"_blank",rel:"noopener"},"Knife4jJakartaOperationCustomizer.java")),(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfdd\ufe0f ",(0,a.kt)("inlineCode",{parentName:"li"},"GlobalOpenApiCustomizer"),"\uff1a\u662f\u9488\u5bf9\u6574\u4e2aOpenAPI\u7ea7\u522b\u7684,\u5f00\u53d1\u8005\u5728\u5206\u7ec4\u6216\u8005\u5206\u5305\u540e\uff0c\u5f97\u5230\u7684\u5355\u4e2aOpenAPI\u5b9e\u4f8b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u64cd\u7eb5\u5168\u5c40\u7684OpenAPI\u5b9e\u4f8b\uff0c\u8be5OpenAPI\u5bf9\u8c61\u5df2\u7ecf\u662fspringdoc\u89e3\u6790\u8fc7\u7684\u5b9e\u4f8b\u5bf9\u8c61\uff0c\u4f8b\u5982\u8be5issues\u4e2d\u7684\u9700\u6c42\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u81ea\u5b9a\u4e49\u521b\u5efa\u65b0Operation\u5bf9\u8c61\uff0c\u7136\u540e\u901a\u8fc7OpenAPI\u5b9e\u4f8b\u5bf9\u8c61\u8fdb\u884cadd\u6dfb\u52a0\u5373\u53ef\u5b8c\u6210\u6b64\u9700\u6c42\uff0c\u90e8\u5206\u6269\u5c55\u53ef\u4ee5\u53c2\u8003\u4ee3\u7801\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/blob/dev/knife4j/knife4j-openapi3-jakarta-spring-boot-starter/src/main/java/com/github/xiaoymin/knife4j/spring/extension/Knife4jOpenApiCustomizer.java",target:"_blank",rel:"noopener"},"Knife4jOpenApiCustomizer.java")),(0,a.kt)("li",{parentName:"ul"},"\ud83c\udfa0 \u6269\u5c55\u5b9e\u73b0\u7c7b\u63a5\u53e3\u540e\uff0c\u6ce8\u5165Spring\u7684\u5bb9\u5668\u4e2d\u5373\u53ef")),(0,a.kt)("p",null,"\u8003\u8651\u5230\u6211\u4eec\u662f\u65b0\u589e\u81ea\u5b9a\u4e49\u7684API\u63a5\u53e3\uff0c\u56e0\u6b64\uff0c\u53ef\u4ee5\u5b9e\u73b0",(0,a.kt)("inlineCode",{parentName:"p"},"GlobalOpenApiCustomizer"),"\u7c7b\u8fdb\u884c\u6269\u5c55"),(0,a.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="com.xiaominfo.springdoc.customer.CustomerOperation.java"',title:'"com.xiaominfo.springdoc.customer.CustomerOperation.java"'},'@Slf4j\n@Component\npublic class CustomerOperation implements GlobalOpenApiCustomizer {\n \n @Override\n public void customise(OpenAPI openApi) {\n log.info("customer.");\n // \u56e0\u4e3a\u8981\u65b0\u589e\u81ea\u5b9a\u4e49\u7684\u63a5\u53e3\uff0c\u76f4\u63a5\u8fd9\u91ccadd\n PathItem pathItem = new PathItem();\n // \u57fa\u7840\u4fe1\u606f \u6784\u5efaOperation\n Operation operation = new Operation();\n operation.operationId("login");\n operation.summary("\u767b\u5f55\u63a5\u53e3");\n operation.description("\u6839\u636e\u7528\u6237\u540d\u548c\u5bc6\u7801\u767b\u5f55\u83b7\u53d6token");\n operation.tags(Collections.singletonList("\u767b\u5f55"));\n // \u6784\u5efa\u53c2\u6570\n List parameters = new ArrayList<>();\n parameters.add(new Parameter().name("name").example("zhangFei").description("\u7528\u6237\u540d").required(true).schema(new StringSchema()).in("query"));\n parameters.add(new Parameter().name("password").example("123456").description("\u5bc6\u7801").required(true).schema(new StringSchema()).in("query"));\n operation.parameters(parameters);\n // \u6784\u5efa\u54cd\u5e94body\n ApiResponses apiResponses = new ApiResponses();\n ApiResponse apiResponse = new ApiResponse();\n apiResponse.description("ok").content(new Content().addMediaType("*/*", new MediaType().schema(new StringSchema())));\n apiResponses.addApiResponse("200",apiResponse);\n operation.responses(apiResponses);\n // \u8be5\u81ea\u5b9a\u4e49\u63a5\u53e3\u4e3apost\n pathItem.post(operation);\n openApi.path("/login", pathItem);\n }\n}\n')),(0,a.kt)("p",null,"\u6b64\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u754c\u9762\u4e2d\u67e5\u770b\uff0c\u5df2\u7ecf\u5b58\u5728\u4e86\u6211\u4eec\u81ea\u5b9a\u4e49\u65b0\u589e\u7684\u63a5\u53e3\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"\u56fe1.\u81ea\u5b9a\u4e49API\u63a5\u53e3\u5728Knife4j\u7684Ui\u754c\u9762\u4e2d\u663e\u793a",src:t(4753).Z,width:"3024",height:"1504"})),(0,a.kt)("h2",{id:"-\u603b\u7ed3"},"\ud83d\udcd6 \u603b\u7ed3"),(0,a.kt)("p",null,"\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u4e86\u57fa\u4e8espringfox\u6216\u8005springdoc\u6846\u67b6\uff0c\u6dfb\u52a0\u81ea\u5b9a\u4e49API\u63a5\u53e3\u7684\u793a\u4f8b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u5176\u4e2d\u7684\u601d\u60f3\u81ea\u884c\u6269\u5c55\uff0c\u8fbe\u5230\u81ea\u5df1\u7684\u4e1a\u52a1\u9700\u6c42\u3002"))}g.isMDXComponent=!0},4753:(e,n,t)=>{t.d(n,{Z:()=>i});const i=t.p+"assets/images/customer-api-preview-4d0f6fa683bc8ddf82201bf34378a819.jpg"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2acf0ab0.1aa6e35f.js b/knife4j-doc/gitee/assets/js/2acf0ab0.1aa6e35f.js new file mode 100644 index 000000000..e0f004143 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2acf0ab0.1aa6e35f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[722],{3905:(e,n,i)=>{i.d(n,{Zo:()=>p,kt:()=>d});var t=i(67294);function l(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function r(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function a(e){for(var n=1;n=0||(l[i]=e[i]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(l[i]=e[i])}return l}var u=t.createContext({}),s=function(e){var n=t.useContext(u),i=n;return e&&(i="function"==typeof e?e(n):a(a({},n),e)),i},p=function(e){var n=s(e.components);return t.createElement(u.Provider,{value:n},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},c=t.forwardRef((function(e,n){var i=e.components,l=e.mdxType,r=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),g=s(i),c=l,d=g["".concat(u,".").concat(c)]||g[c]||m[c]||r;return i?t.createElement(d,a(a({ref:n},p),{},{components:i})):t.createElement(d,a({ref:n},p))}));function d(e,n){var i=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=i.length,a=new Array(r);a[0]=c;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o[g]="string"==typeof e?e:l,a[1]=o;for(var s=2;s{i.r(n),i.d(n,{assets:()=>p,contentTitle:()=>u,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var t=i(87462),l=i(63366),r=(i(67294),i(3905)),a=["components"],o={},u="springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",s={unversionedId:"action/springfox/springfox3",id:"action/springfox/springfox3",title:"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",description:"\u65f6\u95f4\uff1a2019-5-22 1250",source:"@site/docs/action/springfox/springfox3.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox3",permalink:"/docs/action/springfox/springfox3",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",permalink:"/docs/action/springfox/springfox2"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316",permalink:"/docs/action/springfox/springfox4"}},p={},g=[{value:"\u524d\u8a00",id:"\u524d\u8a00",level:2},{value:"Spring Plugin",id:"spring-plugin",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2},{value:"\u6e90\u7801\u5206\u6790",id:"\u6e90\u7801\u5206\u6790",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}],m={toc:g},c="wrapper";function d(e){var n=e.components,o=(0,l.Z)(e,a);return(0,r.kt)(c,(0,t.Z)({},m,o,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e09-\u521d\u63a2spring-plugin\u63d2\u4ef6\u7cfb\u7edf"},"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf"),(0,r.kt)("p",null,"\u65f6\u95f4\uff1a2019-5-22 12:46:50"),(0,r.kt)("p",null,"\u5730\u70b9\uff1a\u5355\u4f4d\u3001\u5bb6\u4e2d"),(0,r.kt)("h2",{id:"\u524d\u8a00"},"\u524d\u8a00"),(0,r.kt)("p",null,"\u540c",(0,r.kt)("inlineCode",{parentName:"p"},"MapStuct"),"\u7ec4\u4ef6\u4e00\u6837,\u56e0\u4e3aspringfox\u4e2d\u8fd0\u7528\u5230\u4e86Spring Plugin\u63d2\u4ef6\u7cfb\u7edf,\u6211\u4eec\u5bf9\u7814\u7a76springfox\u6e90\u7801\u4e4b\u524d,\u5148\u6765\u5b66\u4e60\u4e00\u4e0bSpring Plugin\u63d2\u4ef6\u7684\u673a\u5236"),(0,r.kt)("p",null,"\u56e0\u4e3a\u5728\u5de5\u4f5c\u4e2d\u5f88\u5c11\u4f7f\u7528\u5230",(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),",\u6240\u4ee5\u5b66\u4e60\u8bb0\u5f55\u4e0b"),(0,r.kt)("h2",{id:"spring-plugin"},"Spring Plugin"),(0,r.kt)("p",null,"Github:",(0,r.kt)("a",{parentName:"p",href:"https://github.com/spring-projects/spring-plugin",target:"_blank",rel:"noopener"},"https://github.com/spring-projects/spring-plugin")),(0,r.kt)("p",null,"\u53ef\u4ee5\u8bf4\u4f5c\u4e3aSpring\u9879\u76ee\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),",\u786e\u5b9e\u76f8\u5bf9\u5c0f\u4f17,\u5e76\u6ca1\u6709\u50cfSpring\u5176\u4ed6\u7684\u9879\u76ee\u90a3\u4e48\u6d41\u884c,\u751a\u81f3\u5728\u5176\u4ed6\u6d41\u884c\u7684\u6846\u67b6\u4e2d,\u90fd\u5f88\u5c11\u89c1\u5230\u4ed6\u7684\u8eab\u5f71."),(0,r.kt)("p",null,"\u622a\u6b62\u76ee\u524d(2019-5-22 13:54:08)\uff0cGithub \u7684Star\u4e3a222,fork\u657066"),(0,r.kt)("p",null,"Spring Plugin\u662f\u4e16\u754c\u4e0a\u6700\u5c0f\u89c4\u6a21\u7684\u63d2\u4ef6\u7cfb\u7edf"),(0,r.kt)("p",null,"\u5982\u4eca\u6784\u5efa\u53ef\u6269\u5c55\u7684\u4f53\u7cfb\u7ed3\u6784\u662f\u521b\u5efa\u53ef\u7ef4\u62a4\u5e94\u7528\u7a0b\u5e8f\u7684\u6838\u5fc3\u539f\u5219\u3002 \u8fd9\u5c31\u662f\u50cfOSGi\u8fd9\u6837\u7684\u5b8c\u5168\u6210\u719f\u7684\u63d2\u4ef6\u73af\u5883\u5982\u4eca\u5982\u6b64\u53d7\u6b22\u8fce\u7684\u539f\u56e0\u3002 \u4e0d\u5e78\u7684\u662f\uff0cOSGi\u7684\u5f15\u5165\u7ed9\u9879\u76ee\u5e26\u6765\u4e86\u5f88\u591a\u590d\u6742\u6027\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),"\u901a\u8fc7\u63d0\u4f9b\u6269\u5c55\u6838\u5fc3\u7cfb\u7edf\u529f\u80fd\u7684\u63d2\u4ef6\u5b9e\u73b0\u7684\u6838\u5fc3\u7075\u6d3b\u6027\uff0c\u4f46\u4e0d\u63d0\u4f9b\u52a8\u6001\u7c7b\u52a0\u8f7d\u6216\u8fd0\u884c\u65f6\u5b89\u88c5\u548c\u63d2\u4ef6\u90e8\u7f72\u7b49\u6838\u5fc3OSGi\u529f\u80fd\uff0c\u540c\u65f6\u4e3a\u63d2\u4ef6\u5f00\u53d1\u63d0\u4f9b\u4e86\u66f4\u5b9e\u7528\u7684\u65b9\u6cd5\u3002 \u867d\u7136Spring Plugin\u5e76\u4e0d\u50cfOSGi\u90a3\u6837\u5f3a\u5927\uff0c\u4f46\u5b83\u53ef\u4ee5\u6ee1\u8db3\u7a77\u4eba\u6784\u5efa\u6a21\u5757\u5316\u53ef\u6269\u5c55\u5e94\u7528\u7a0b\u5e8f\u7684\u8981\u6c42\u3002"),(0,r.kt)("p",null,"\u5047\u5982\u4f60\u5e0c\u671b\u6784\u5efa\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u5e94\u7528\u7cfb\u7edf,\u4f60\u53ef\u80fd\u9700\u8981\u4ece\u4ee5\u4e0b\u51e0\u70b9\u8fdb\u884c\u8003\u8651\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u65e0\u8bba\u51fa\u4e8e\u4f55\u79cd\u539f\u56e0\uff0c\u60a8\u90fd\u65e0\u6cd5\u5c06OSGi\u7528\u4f5c\u5b8c\u5168\u6210\u719f\u7684\u63d2\u4ef6\u67b6\u6784"),(0,r.kt)("li",{parentName:"ul"},"\u63d0\u4f9b\u4e13\u7528\u7684\u63d2\u4ef6\u63a5\u53e3\u6765\u6ee1\u8db3\u53ef\u6269\u5c55\u6027"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u7b80\u5355\u5730\u63d0\u4f9b\u6346\u7ed1\u5728JAR\u6587\u4ef6\u4e2d\u5e76\u5728\u7c7b\u8def\u5f84\u4e2d\u53ef\u7528\u7684\u63d2\u4ef6\u63a5\u53e3\u7684\u5b9e\u73b0\u6765\u6269\u5c55\u6838\u5fc3\u7cfb\u7edf"),(0,r.kt)("li",{parentName:"ul"},"\u4f7f\u7528Spring\u6765\u6784\u5efa\u5e94\u7528\u7cfb\u7edf")),(0,r.kt)("h2",{id:"\u793a\u4f8b"},"\u793a\u4f8b"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u5c0f\u793a\u4f8b,\u6765\u5bf9Spring Plugin\u7cfb\u7edf\u6709\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3"),(0,r.kt)("p",null,"Spring Plugin\u63d0\u4f9b\u4e00\u4e2a\u6807\u51c6\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),"\u63a5\u53e3\u4f9b\u5f00\u53d1\u4eba\u5458\u7ee7\u627f\u4f7f\u7528\u58f0\u660e\u81ea\u5df1\u7684\u63d2\u4ef6\u673a\u5236,\u7136\u540e\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d,Spring\u5bb9\u5668\u4f1a\u4e3a\u6211\u4eec\u81ea\u52a8\u5339\u914d\u5230\u63d2\u4ef6\u7684\u6240\u6709\u5b9e\u73b0\u5b50\u5bf9\u8c61,\u6700\u7ec8\u6211\u4eec\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u65f6,\u901a\u8fc7\u4f9d\u8d56\u6ce8\u5165\u6ce8\u89e3\uff0c\u6ce8\u5165",(0,r.kt)("inlineCode",{parentName:"p"},"PluginRegistry, S>"),"\u5bf9\u8c61\u62ff\u5230\u63d2\u4ef6\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),"\u63a5\u53e3\u58f0\u660e\u4e86\u4e00\u4e2a\u63a5\u53e3\u5b9e\u73b0,\u6807\u6ce8\u5b9e\u73b0\u8be5\u63d2\u4ef6\u662f\u5426\u652f\u6301\uff0c\u56e0\u4e3a\u6709\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u63a5\u53e3\u5b9e\u73b0\u7684\u60c5\u51b5"),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u65f6,\u53ef\u80fd\u8fd9\u6837\u8c03\u7528\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"List> plugins=plugin.getPlugins();\nS delimiter;\nfor(Plugin p:plugins){\n if(p.supports(delimiter)){\n p.doSomeThing();//\n }\n}\n")),(0,r.kt)("p",null,"\u4ece\u5e94\u7528\u7a0b\u5e8f\u7684\u6269\u5c55\u6027\u6765\u8bf4,\u5f00\u53d1\u7075\u6d3b\u7684\u63d2\u4ef6\u7cfb\u7edf\u662f\u6211\u4eec\u6bcf\u4e2a\u5f00\u53d1\u4eba\u5458\u90fd\u9700\u8003\u8651\u7684"),(0,r.kt)("p",null,"\u5047\u8bbe\u76ee\u524d\u6211\u4eec\u6709\u4e00\u4e2a\u79fb\u52a8\u7535\u8bdd\u5145\u503c\u7cfb\u7edf,\u5728\u4e1a\u52a1\u521d\u671f\u53d1\u5c55\u4e2d,\u4e1a\u52a1\u7684\u76ee\u6807\u662f\u4fdd\u8bc1\u7a33\u5b9a\u6027,\u62e5\u6709\u5145\u503c\u4e1a\u52a1"),(0,r.kt)("p",null,"\u5728maven\u914d\u7f6e\u4e2d\u5148\u6765\u5f15\u5165\u76f8\u5173\u7684jar\u5305"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-xml"},"\n 1.2.3\n 1.7.21\n\n\n\n \x3c!-- https://mvnrepository.com/artifact/junit/junit --\x3e\n \n junit\n junit\n 4.8.2\n test\n \n\n \x3c!-- https://mvnrepository.com/artifact/org.springframework/spring-core --\x3e\n \n org.springframework\n spring-core\n 4.0.9.RELEASE\n \n\n \x3c!-- https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core --\x3e\n \n org.springframework.plugin\n spring-plugin-core\n 1.2.0.RELEASE\n \n\n \n org.slf4j\n slf4j-api\n ${org.slf4j.version}\n \n \n org.slf4j\n jcl-over-slf4j\n ${org.slf4j.version}\n runtime\n \n \n ch.qos.logback\n logback-classic\n ${logback.version}\n \n \n javax.mail\n mail\n \n \n javax.jms\n jms\n \n \n com.sun.jdmk\n jmxtools\n \n \n com.sun.jmx\n jmxri\n \n \n runtime\n \n\n")),(0,r.kt)("p",null,"\u5148\u6765\u770b\u6211\u4eec\u7684\u5ba2\u6237\u5c5e\u6027\uff1a"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"MobileCustomer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:41\n */\npublic class MobileCustomer {\n\n /***\n * \u7535\u8bdd\u53f7\u7801\n */\n private String tel;\n //setter getter \n /***\n * \u662f\u5426\u8001\u7528\u6237\n */\n private boolean old=false;\n}\n')),(0,r.kt)("p",null,"\u58f0\u660e\u6211\u4eec\u7684\u5145\u503c\u63a5\u53e3\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n * \u6211\u4eec\u6709\u7535\u8bdd\u589e\u503c\u4e1a\u52a1,\u4e1a\u52a1\u4e2d\u6709\u5145\u503c\u65b9\u6cd5\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:42\n */\npublic interface MobileIncrementBusiness{\n\n /***\n * \u7535\u8bdd\u5145\u503c\n * @param mobileCustomer\n * @param money \u91d1\u989d\n */\n void increment(MobileCustomer mobileCustomer, int money);\n}\n')),(0,r.kt)("p",null,"\u5145\u503c\u63a5\u53e3\u76ee\u524d\u6709\u4e00\u4e2a\u63a5\u53e3,\u5145\u503c,\u6839\u636e\u5ba2\u6237\u548c\u5145\u503c\u91d1\u989d\u8fdb\u884c\u5145\u503c\u7684\u65b9\u6cd5"),(0,r.kt)("p",null,"\u63a5\u4e0b\u6765,\u6211\u4eec\u6765\u5b9e\u73b0\u5145\u503c\u7684\u4e1a\u52a1\u903b\u8f91,\u5047\u8bbe\u5f53\u524d\u6211\u4eec\u53eb\u4ed6V1\u7248\u672c"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n * \u7b2c\u4e00\u7248\u672c\u7684\u5145\u503c\u7cfb\u7edf\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:44\n */\npublic class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6\uff0c\u6211\u4eec\u5728\u7cfb\u7edf\u4e2d\u52a0\u5165\u5145\u503c\u63d2\u4ef6\u7684\u914d\u7f6e"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\npublic class MobileConfig {\n\n\n @Bean\n public MobileIncrementV1 mobileIncrementV1(){\n return new MobileIncrementV1();\n }\n}\n")),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u901a\u8fc7\u5bf9\u5916\u63d0\u4f9b\u4e00\u4e2a\u4e1a\u52a1Service,\u6765\u8c03\u7528\u6211\u4eec\u7684\u5145\u503c\u65b9\u6cd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 15:00\n */\n@Component\npublic class CustomerService {\n\n \n @Autowired\n MobileIncrementV1 mobileIncrementV1;\n\n public void increments(MobileCustomer mobileCustomer,int money){\n //\u5bf9\u4eba\u5458\u8fdb\u884c\u5145\u503c\n mobileIncrementV1.increment(mobileCustomer,money);\n }\n\n}\n')),(0,r.kt)("p",null,"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u65b9\u6cd5,\u5c31\u53ef\u4ee5\u8c03\u7528\u6211\u4eec\u7684\u5145\u503c\u63d2\u4ef6\u8fdb\u884c\u8bdd\u8d39\u7684\u5145\u503c"),(0,r.kt)("p",null,"\u6211\u4eec\u6765\u6a21\u62df"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileTest {\n\n public static void main(String[] args) {\n AnnotationConfigApplicationContext context=\n new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");\n\n CustomerService customerService=context.getBean(CustomerService.class);\n MobileCustomer mobileCustomer=new MobileCustomer("13567662664");\n mobileCustomer.setOld(true);\n customerService.increments(mobileCustomer,120);\n }\n}\n')),(0,r.kt)("p",null,"\u6211\u4eec\u5bf9\u7535\u8bdd",(0,r.kt)("inlineCode",{parentName:"p"},"13567662664"),"\u8fdb\u884c\u5145\u503c120\u5143"),(0,r.kt)("p",null,"\u63a7\u5236\u53f0\u8f93\u51fa\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:11:21,391 INFO (MobileIncrementV1.java:27)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:11:21,394 INFO (MobileIncrementV1.java:28)- \u5145\u503c\u5b8c\u6210.\n")),(0,r.kt)("p",null,"\u63d2\u4ef6\u7684\u4f7f\u7528\u5230\u8fd9\u91cc\u5c31\u5b8c\u6210\u4e86,\u6b64\u65f6\u6211\u4eec\u6216\u8bb8\u4f1a\u6709\u7591\u95ee\uff1f\u4e0d\u662f\u8bf4\u6ee1\u8db3\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u6269\u5c55\u6027\u5417?\u6b64\u5904\u5e76\u672a\u4f53\u73b0\u51fa\u6765\u554a\uff1f"),(0,r.kt)("p",null,"\u5047\u8bbe\u968f\u7740\u7535\u8bdd\u516c\u53f8\u7684\u4e1a\u52a1\u9010\u6b65\u6269\u5927,\u6b64\u65f6,\u7535\u8bdd\u516c\u53f8\u63a8\u51fa\u4e86\u8001\u7528\u6237\u5145\u8bdd\u8d39\u6298\u6263\u7684\u6d3b\u52a8\uff0c\u5177\u4f53\u7684\u89c4\u5219\u662f"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5f53\u524d\u7535\u8bdd\u53f7\u7801\u5fc5\u987b\u662f\u8001\u7528\u6237(\u901a\u8fc7old\u5b57\u6bb5\u6765\u533a\u5206)"),(0,r.kt)("li",{parentName:"ul"},"\u5145\u503c\u91d1\u989d\u5fc5\u987b>100"),(0,r.kt)("li",{parentName:"ul"},"\u6298\u6263\u91d1\u989d\u4e3a\u5145\u503c\u91d1\u989d*10%,\u8fd4\u51b2\u5230\u5ba2\u6237\u7684\u624b\u673a\u4e0a")),(0,r.kt)("p",null,"\u6b64\u65f6,\u9488\u5bf9\u8be5\u6d3b\u52a8,\u6211\u4eec\u4e3a\u4e86\u6ee1\u8db3\u4ee5\u4e0a\u4e1a\u52a1,\u4f20\u7edf\u7684\u505a\u6cd5\u662f\u7ee7\u7eed\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementV1"),"\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e1a\u52a1\u903b\u8f91"),(0,r.kt)("p",null,"\u4ee3\u7801\u4f1a\u662f\u8fd9\u6837\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n if (mobileCustomer.isOld()){\n logger.info("\u8001\u7528\u6237\u6298\u6263");\n if (money>100){\n BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));\n logger.info("\u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b2{}\u5143",big.intValue());\n }\n }\n }\n\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return true;\n }\n}\n')),(0,r.kt)("p",null,"\u6539\u7248\u540e\u7684\u4e1a\u52a1\u903b\u8f91,\u6211\u4eec\u5728V1\u4e2d\u6dfb\u52a0\u4e86\u4e1a\u52a1\u903b\u8f91,\u6ee1\u8db3\u8001\u5ba2\u6237\u662f\u8fdb\u884c\u8fd4\u51b2"),(0,r.kt)("p",null,"\u8fd0\u884c\u540e,\u63a7\u5236\u53f0\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:24:50,229 INFO (MobileIncrementV1.java:29)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:24:50,231 INFO (MobileIncrementV1.java:30)- \u5145\u503c\u5b8c\u6210.\n2019-05-22 15:24:50,232 INFO (MobileIncrementV1.java:32)- \u8001\u7528\u6237\u6298\u6263\n2019-05-22 15:24:50,236 INFO (MobileIncrementV1.java:35)- \u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b212\u5143\n")),(0,r.kt)("p",null,"\u7a0b\u5e8f\u6ca1\u6709\u4efb\u4f55\u95ee\u9898,\u540c\u65f6\u4e5f\u6ee1\u8db3\u4e86\u6d3b\u52a8\u8981\u6c42,\u4f46\u662f\u8fd9\u6837\u505a\u7684\u7f3a\u9677\u4e5f\u662f\u660e\u663e\u7684,\u4e3b\u8981\u5982\u4e0b"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5728V1\u5145\u503c\u7cfb\u7edf\u4e2d,\u4e1a\u52a1\u5df2\u7ecf\u7a33\u5b9a,\u6b64\u65f6,\u5982\u679c\u6211\u4eec\u7684\u8fd4\u51b2\u6d3b\u52a8\u4e1a\u52a1\u6bd4\u8f83\u590d\u6742\u7684\u60c5\u51b5\u4e0b,\u4f1a\u51fa\u73b0\u6d4b\u8bd5\u4e0d\u5230\u7684\u60c5\u51b5,\u65b0\u4e1a\u52a1\u903b\u8f91\u4ee3\u7801\u66f4\u65b0\u540e,\u5bf9\u975e\u8001\u7528\u6237\u7684\u5145\u503c\u7a33\u5b9a\u6027\u5b58\u5728\u5f71\u54cd"),(0,r.kt)("li",{parentName:"ul"},"\u5982\u679c\u6211\u4eec\u7684\u4e1a\u52a1\u89c4\u5219\u53d8\u5316\u8d8a\u6765\u8d8a\u591a,\u6b64\u65f6\u6211\u4eec\u7684V1\u4e2d\u7684business\u65b9\u6cd5\u4f1a\u8d8a\u6765\u8d8a\u81c3\u80bf,\u4e0d\u5229\u4e8e\u7ef4\u62a4"),(0,r.kt)("li",{parentName:"ul"},"\u5047\u5982\u6211\u4eec\u7684\u6d3b\u52a8\u662f\u6709\u65f6\u6548\u6027\u7684\u60c5\u51b5\u4e0b,\u5728\u67d0\u4e00\u6bb5\u65f6\u95f4,\u8fd9\u6bb5\u4e1a\u52a1\u903b\u8f91\u6709\u7a7a,\u800c\u65f6\u6548\u6027\u5931\u6548\u540e,\u8fd9\u6bb5\u4e1a\u52a1\u903b\u8f91\u662f\u5197\u4f59\u7684,\u4f46\u662f\u5b83\u4ecd\u7136\u5b58\u5728\u4e8e\u6211\u4eec\u7684\u4e3b\u4e1a\u52a1\u65b9\u6cd5\u4e2d.")),(0,r.kt)("p",null,"\u90a3\u4e48,\u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898,\u6211\u4eec\u5e94\u8be5\u5982\u4f55\u89e3\u51b3\u5462\uff1f"),(0,r.kt)("p",null,"Spring Plugin\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4e86\u6b64\u95ee\u9898,\u5982\u679c\u7528Plugin\u7684\u65b9\u5f0f,\u6211\u4eec\u5e94\u8be5\u5982\u4f55\u505a\u5462\uff1f"),(0,r.kt)("p",null,"\u9996\u5148,\u6539\u8fdb\u6211\u4eec\u7684\u589e\u503c\u4e1a\u52a1",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementBusiness"),",\u6539\u4e1a\u52a1\u63a5\u53e3\u7ee7\u627f",(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),",\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public interface MobileIncrementBusiness extends Plugin{\n\n /***\n * \u7535\u8bdd\u5145\u503c\n * @param mobileCustomer\n * @param money \u91d1\u989d\n */\n void increment(MobileCustomer mobileCustomer, int money);\n}\n")),(0,r.kt)("p",null,"\u6211\u4eec\u7ee7\u627f\u4e86Plugin\u7684\u63a5\u53e3,\u6240\u4ee5\u6211\u4eec\u7684\u5b50\u7c7b\u5145\u503cV1\u4e1a\u52a1\u4ee3\u7801\u4e5f\u9700\u8981\u5b9e\u73b0Plugin\u7684supports\u65b9\u6cd5,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n }\n\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return true;\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u628a\u8001\u7528\u6237\u8fd4\u51b2\u7684\u4ee3\u7801\u79fb\u9664\u4e86,\u6211\u4eec\u901a\u8fc7Plugin\u7684\u65b9\u5f0f\u6765\u5e2e\u52a9\u6211\u4eec"),(0,r.kt)("p",null,"\u6211\u4eec\u65b0\u5efa\u8001\u7528\u6237\u8fd4\u51b2\u7684\u4e1a\u52a1\u5b9e\u73b0",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementDiscount"),"\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementDiscount implements MobileIncrementBusiness {\n Logger logger= LoggerFactory.getLogger(MobileIncrementDiscount.class);\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n if (supports(mobileCustomer)){\n logger.info("\u8001\u7528\u6237\u6298\u6263");\n if (money>100){\n if (money>100){\n BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));\n logger.info("\u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b2{}\u5143",big.intValue());\n }\n }\n }\n }\n\n /***\n * \u6765\u7528\u6237\u624d\u6ee1\u8db3\n * @param delimiter\n * @return\n */\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return delimiter.isOld();\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u542f\u7528Plugin\u63d2\u4ef6\u7cfb\u7edf,\u5c06\u6211\u4eec\u7684\u8fd4\u51b2\u5b9e\u73b0\u4e1a\u52a1\u6ce8\u5165\u5230\u7cfb\u7edf\u4e2d"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnablePluginRegistries({MobileIncrementBusiness.class})\npublic class MobileConfig {\n\n\n @Bean\n public MobileIncrementV1 mobileIncrementV1(){\n return new MobileIncrementV1();\n }\n\n @Bean\n public MobileIncrementDiscount mobileIncrementDiscount(){\n return new MobileIncrementDiscount();\n }\n}\n")),(0,r.kt)("p",null,"\u6700\u540e\uff0c\u6211\u4eec\u4fee\u6539\u6211\u4eec\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u4e2d\u7684\u5145\u503c\u65b9\u6cd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Component\npublic class CustomerService {\n\n @Autowired\n private PluginRegistry mobileCustomerPluginRegistry;\n \n\n public void increments(MobileCustomer mobileCustomer,int money){\n //\u83b7\u53d6\u63d2\u4ef6\n List plugins=mobileCustomerPluginRegistry.getPlugins();\n for (MobileIncrementBusiness incrementBusiness:plugins){\n //\u5bf9\u4eba\u5458\u8fdb\u884c\u5145\u503c\n incrementBusiness.increment(mobileCustomer,money);\n }\n }\n\n}\n")),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u5728\u6765\u8fd0\u884c\u6211\u4eec\u7684Test\u6d4b\u8bd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");\n\nCustomerService customerService=context.getBean(CustomerService.class);\nMobileCustomer mobileCustomer=new MobileCustomer("13567662664");\nmobileCustomer.setOld(true);\ncustomerService.increments(mobileCustomer,120);\n')),(0,r.kt)("p",null,"\u63a7\u5236\u53f0\u8f93\u51fa\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:42:01,743 INFO (MobileIncrementV1.java:29)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:42:01,745 INFO (MobileIncrementV1.java:30)- \u5145\u503c\u5b8c\u6210.\n2019-05-22 15:42:01,746 INFO (MobileIncrementDiscount.java:28)- \u8001\u7528\u6237\u6298\u6263\n2019-05-22 15:42:01,752 INFO (MobileIncrementDiscount.java:32)- \u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b212\u5143\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u63a7\u5236\u53f0,\u6211\u4eec\u53d1\u73b0,\u548c\u5728v1\u4e1a\u52a1\u4e2d\u7ee7\u7eed\u65b0\u589e\u4ee3\u7801\u7684\u65b9\u5f0f,\u6548\u679c\u662f\u5b8c\u5168\u76f8\u540c\u7684,\u4f46\u662f\u5bf9\u4e8e\u6574\u4e2a\u7cfb\u7edf\u7684\u6269\u5c55\u6027\u6765\u8bf4,\u662fV1\u65b9\u5f0f\u65e0\u6cd5\u6bd4\u4f8b\u7684\uff0c\u4e3b\u8981\u4f53\u73b0\u5728\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u63d2\u4ef6\u7684\u65b9\u5f0f,\u4e0d\u9700\u8981\u66f4\u6539\u539f\u6765\u5df2\u7ecf\u7a33\u5b9a\u7684\u4e1a\u52a1\u4ee3\u7801,\u5bf9\u7cfb\u7edf\u7a33\u5b9a\u6027\u6765\u8bf4\u5c24\u4e3a\u91cd\u8981(\u7cfb\u7edf\u7a33\u5b9a\u662f\u57fa\u7840)"),(0,r.kt)("li",{parentName:"ul"},"\u4e0e\u4e1a\u52a1\u89e3\u8026,\u5982\u679c\u4e1a\u52a1\u53d1\u751f\u53d8\u5316(\u5728\u67d0\u4e2a\u5468\u671f\u5185)\uff0c\u6216\u8005\u6709\u65b0\u7528\u6237\u7684\u6d3b\u52a8,\u6211\u4eec\u53ea\u9700\u8981\u6784\u5efa\u6211\u4eec\u7684\u4e1a\u52a1\u4ee3\u7801,\u6838\u5fc3\u6846\u67b6\u5c42\u65e0\u9700\u66f4\u6539"),(0,r.kt)("li",{parentName:"ul"},"\u7a0b\u5e8f\u67b6\u6784\u66f4\u6e05\u6670,\u5206\u5c42\u8bbe\u8ba1\u66f4\u660e\u663e.")),(0,r.kt)("h2",{id:"\u6e90\u7801\u5206\u6790"},"\u6e90\u7801\u5206\u6790"),(0,r.kt)("p",null,"\u76f8\u4fe1\u901a\u8fc7\u4e0a\u9762\u7684\u793a\u4f8b,\u6211\u4eec\u5bf9Spring Plugin\u63d2\u4ef6\u6280\u672f\u7ec4\u4ef6\u6709\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3,\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u770bSpring Plugin\u7684\u6e90\u7801\u5b9e\u73b0"),(0,r.kt)("p",null,"\u65e2\u7136\u662f\u53f7\u79f0\u4e16\u754c\u4e0a\u89c4\u6a21\u6700\u5c0f\u7684\u63d2\u4ef6\u7cfb\u7edf,\u901a\u8fc7\u6211\u4eec\u7684\u4f7f\u7528\u6765\u770b,\u786e\u5b9e\u4e5f\u591f\u7b80\u5355,\u6240\u4ee5Spring Plugin\u7684\u4ee3\u7801\u91cf\u4e5f\u662f\u5f88\u7cbe\u608d."),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(71177).Z,width:"418",height:"943"})),(0,r.kt)("p",null,"\u901a\u8fc7GitHub\u4e0b\u8f7d\u4e0b\u6765\u7684\u6e90\u7801,\u603b\u5171\u4e5f\u5c31\u4e09\u4e2a\u5305"),(0,r.kt)("p",null,"\u8fd9\u5bf9\u4e8e\u6211\u4eec\u5b66\u4e60\u4ed6\u7684\u6e90\u7801\u3001\u8bbe\u8ba1\u6a21\u5f0f\u6765\u8bf4,\u53cd\u800c\u662f\u597d\u4e8b\u60c5."),(0,r.kt)("p",null,"\u5148\u6765\u770bPlugin\u6d89\u53ca\u5230\u7684\u5173\u952e\u7c7b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(89527).Z,width:"676",height:"1727"})),(0,r.kt)("p",null,"\u6211\u4eec\u6700\u7ec8\u4f7f\u7528\u63d2\u4ef6\u65f6,\u901a\u8fc7PluginRegistry\u6765\u83b7\u53d6\u5df2\u5b9e\u73b0\u7684\u63d2\u4ef6bean\u5b9e\u4f8b\uff0c\u8be5\u63d2\u4ef6\u63d0\u4f9b\u4e86\u51e0\u4e2a\u4e3b\u8981\u65b9\u6cd5\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Optional")," getPluginFor(S delimiter):\u6839\u636e\u7279\u5b9a\u6761\u4ef6\u83b7\u53d6\u63d2\u4ef6\u7684Optional\u5bf9\u8c61(\u7b2c\u4e00\u4e2a)"),(0,r.kt)("li",{parentName:"ul"},"T getRequiredPluginFor(S delimiter)\uff1a\u6839\u636e\u6761\u4ef6\u83b7\u53d6\u63d2\u4ef6\u5bf9\u8c61,\u5982\u679c\u6ca1\u6709,\u5219\u629b\u51fa\u5f02\u5e38"),(0,r.kt)("li",{parentName:"ul"},"getPlugins():\u83b7\u53d6\u6240\u6709\u63d2\u4ef6"),(0,r.kt)("li",{parentName:"ul"},"contains(T):\u662f\u5426\u5305\u542b\u63d2\u4ef6"),(0,r.kt)("li",{parentName:"ul"},"...")),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528Spring Plugin\u7ec4\u4ef6\u7684\u65f6\u5019,\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5728\u6211\u4eec\u7684Configuration\u914d\u7f6e\u7c7b\u4e0a\u901a\u8fc7\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"li"},"@EnablePluginRegistries"),"\u6ce8\u5165\u76f8\u5e94\u7684Plugin\u63a5\u53e3\u7684class"),(0,r.kt)("li",{parentName:"ul"},"\u5728Configuration\u914d\u7f6e\u7c7b\u4e2d\u6ce8\u5165Plugin\u7684\u5b9e\u73b0\u7c7b\u5b9e\u4f53Bean"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"@Autowired"),"\u6ce8\u89e3,\u5e76\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistry,S>"),"\u7684\u65b9\u5f0f\u62ff\u5230\u6211\u4eec\u7684plugin\u5b9e\u4f8b,\u7136\u540e\u518d\u4e1a\u52a1\u65b9\u6cd5\u4e2d\u8fdb\u884c\u4f7f\u7528.")),(0,r.kt)("p",null,"\u8fd9\u91cc\u6709\u4e24\u4e2a\u5173\u952e\u70b9\uff1a"),(0,r.kt)("p",null,"1\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u6ce8\u89e3\u5177\u4f53\u7684\u4f5c\u7528"),(0,r.kt)("p",null,"2\u3001PluginRegistry\u662f\u63a5\u53e3,\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@Antowired"),"\u6ce8\u5165,\u5177\u4f53\u7684\u5b9e\u73b0\u7c7b\u5728\u54ea\u513f?"),(0,r.kt)("p",null,"\u5e26\u7740\u8fd9\u4e24\u4e2a\u7591\u95ee\u70b9,\u6211\u4eec\u5148\u6765\u770b",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u7684\u4ee3\u7801\uff1a"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"EnablePluginRegistries.java")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"/**\n * \u4e3a\u5f00\u542f\u4f7f\u7528Plugin\u63d2\u4ef6\u7684\u7c7b\u578b\u5e94\u7528\u542f\u7528PluginRegistry\u7684\u5b9e\u4f8b\u6ce8\u5165\n * @see #value()\n * @author Oliver Gierke\n */\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Documented\n@Import(PluginRegistriesBeanDefinitionRegistrar.class)\npublic @interface EnablePluginRegistries {\n\n /**\n * \n * The {@link Plugin} types to register {@link PluginRegistry} instances for. The registries will be named after the\n * uncapitalized plugin type extended with {@code Registry}. So for a plugin interface {@code SamplePlugin} the\n * exposed bean name will be {@code samplePluginRegistry}. This can be used on the client side to make sure you get\n * the right {@link PluginRegistry} injected by using the {@link Qualifier} annotation and referring to that bean\n * name. If the auto-generated bean name collides with one already in your application you can use the\n * {@link Qualifier} annotation right at the plugin interface to define a custom name.\n * \n * @return\n */\n Class>[] value();\n}\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u6ce8\u91ca\u6211\u4eec\u5f97\u77e5\u8be5\u6ce8\u89e3\u7684\u4f5c\u7528"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6ce8\u518cPluginRegistry\u7684\u5b9e\u4f8bBean,\u5e76\u4ee5\u6b64\u547d\u540d"),(0,r.kt)("li",{parentName:"ul"},"\u5bfc\u5165",(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistriesBeanDefinitionRegistrar"),"\u7c7b\u8fdb\u884c\u5b9e\u4f8bBean\u6ce8\u5165")),(0,r.kt)("p",null,"PluginRegistry\u7684\u6ce8\u5165\u89c4\u5219\u662f,\u9996\u5b57\u6bcd\u53d8\u5c0f\u5199,\u4f8b\u5982",(0,r.kt)("inlineCode",{parentName:"p"},"SimplePluginRegistry"),"\u7684\u5b9e\u4f8bbean\uff0c\u5728Spring\u5bb9\u5668\u4e2d\u7684beanName\u4e3a",(0,r.kt)("inlineCode",{parentName:"p"},"simplePluginRegistry")),(0,r.kt)("p",null,"\u5982\u679c\u7cfb\u7edf\u7684\u547d\u540d\u548c\u81ea\u52a8\u751f\u6210\u7684\u540d\u79f0\u76f8\u51b2\u7a81,\u53ef\u4ee5\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@Qualifier"),"\u6ce8\u89e3\u6765\u5f3a\u5236\u547d\u540d\u5339\u914d\u4ee5\u89e3\u51b3\u6b64\u95ee\u9898"),(0,r.kt)("p",null,"\u6765\u770b",(0,r.kt)("inlineCode",{parentName:"p"},"PluginRegistriesBeanDefinitionRegistrar.java"),"\u4ee3\u7801\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'\n/**\n * {@link ImportBeanDefinitionRegistrar} to register {@link PluginRegistryFactoryBean} instances for type listed in\n * {@link EnablePluginRegistries}. Picks up {@link Qualifier} annotations used on the plugin interface and forwards them\n * to the bean definition for the factory.\n * \u4e3apluginRegistry\u63a5\u53e3\u6ce8\u5165\u52a8\u6001\u5b9e\u4f8bbean\u5bf9\u8c61\n *\n * @author Oliver Gierke\n */\npublic class PluginRegistriesBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {\n\n private static final Logger LOG = LoggerFactory.getLogger(PluginRegistriesBeanDefinitionRegistrar.class);\n\n /*\n * importingClassMetadata:\u6b64\u53c2\u6570\u4e3a\u901a\u8fc7@EnablePluginRegistries\u6ce8\u89e3\u6807\u6ce8\u7684\u7c7b\u578b\u6ce8\u89e3\u5143\u6570\u636e\u4fe1\u606f\u5bf9\u8c61\n * registry:\u6ce8\u5165bean\u5bf9\u8c61\n * \n */\n @Override\n public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {\n\n //\u83b7\u53d6\u5f53\u524denablePluginRegistries\u6ce8\u89e3\u7c7b\u4fe1\u606f\n Map annotationAttributes = importingClassMetadata\n .getAnnotationAttributes(EnablePluginRegistries.class.getName());\n //\u5224\u65ad\u662f\u5426\u4e3a\u7a7a\n if (annotationAttributes == null) {\n LOG.info("No EnablePluginRegistries annotation found on type {}!", importingClassMetadata.getClassName());\n return;\n }\n //\u83b7\u53d6\u4ec0\u4e48\u7684\u7c7b\u578b\u96c6\u5408\n //\u4f8b\u5982\u6211\u4eec\u5728\u793a\u4f8b\u4e2d\u4f7f\u7528\u7684@EnablePluginRegistries({MobileIncrementBusiness.class})\n //\u6b64\u5904\u4f1a\u62ff\u5230MobileIncrementBusiness.class\u8fd9\u4e2atype\uff0ctypes.length=1\n Class[] types = (Class[]) annotationAttributes.get("value");\n //\u5faa\u73af\u904d\u5386\n for (Class type : types) {\n //\u83b7\u53d6PluginRegistryFactoryBean\u7c7b\u7684\u5b9e\u4f53bean\u5b9a\u4e49builder\n BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(PluginRegistryFactoryBean.class);\n builder.addPropertyValue("type", type);\n\n RootBeanDefinition beanDefinition = (RootBeanDefinition) builder.getBeanDefinition();\n beanDefinition.setTargetType(getTargetType(type));\n\n Qualifier annotation = type.getAnnotation(Qualifier.class);\n\n // If the plugin interface has a Qualifier annotation, propagate that to the bean definition of the registry\n if (annotation != null) {\n AutowireCandidateQualifier qualifierMetadata = new AutowireCandidateQualifier(Qualifier.class);\n qualifierMetadata.setAttribute(AutowireCandidateQualifier.VALUE_KEY, annotation.value());\n beanDefinition.addQualifier(qualifierMetadata);\n }\n //\u83b7\u53d6bean\u7684\u9ed8\u8ba4\u540d\u79f0\n // Default\n String beanName = annotation == null //\n ? StringUtils.uncapitalize(type.getSimpleName() + "Registry") //\n : annotation.value();\n //\u52a8\u6001\u6ce8\u5165\n registry.registerBeanDefinition(beanName, builder.getBeanDefinition());\n }\n }\n\n /**\n * Returns the target type of the {@link PluginRegistry} for the given plugin type.\n *\n * @param pluginType must not be {@literal null}.\n * @return\n */\n private static ResolvableType getTargetType(Class pluginClass) {\n\n Assert.notNull(pluginClass, "Plugin type must not be null!");\n\n ResolvableType delimiterType = ResolvableType.forClass(Plugin.class, pluginClass).getGeneric(0);\n ResolvableType pluginType = ResolvableType.forClass(pluginClass);\n\n return ResolvableType.forClassWithGenerics(OrderAwarePluginRegistry.class, pluginType, delimiterType);\n }\n}\n\n')),(0,r.kt)("p",null,"\u901a\u8fc7\u4ee5\u4e0a\u4ee3\u7801\uff0c\u6211\u4eec\u77e5\u9053\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"@EnablePluginRegistries"),"\u4f1a\u4e3a\u6211\u4eec\u52a8\u6001\u6ce8\u5165PluginRetry\u7684\u5b9e\u4f53bean"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistryFactoryBean"),"\u4f1a\u4ea7\u751f\u4e00\u4e2a\u76ee\u6807bean\u7684\u4ee3\u7406,\u6b64\u76ee\u6807bean\u771f\u662fPluginRegistry\u63a5\u53e3\u7684\u5b9e\u4f8b,\u9996\u5148\u627e\u5230\u5bb9\u5668\u4e2d\u5b9e\u73b0\u4e86Plugin\u63d2\u4ef6\u63a5\u53e3\u7684\u5b9e\u4f53bean,\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a",(0,r.kt)("inlineCode",{parentName:"li"},"List>"),"\u7684\u96c6\u5408"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u62ff\u5230\u8be5Plugins\u7684\u7ed3\u5408\uff0c\u5728\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"OrderAwarePluginRegistry.create(List>)"),"\u7684\u65b9\u6cd5\u6765\u521b\u5efaPluginRetry\u63a5\u53e3\u7684\u9ed8\u8ba4\u5b9e\u4f8b"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u4e0a\u9762\u7684\u7c7b\u56fe\u5176\u5b9e\u6211\u4eec\u77e5\u9053,PluginRetry\u7684\u63a5\u53e3\u62e5\u6709\u4ed6\u7684\u9ed8\u8ba4\u5b50\u7c7b\u5b9e\u73b0,\u4e3aOrderAwarePluginRegistry")),(0,r.kt)("p",null,"\u56de\u8fc7\u5934\u6765\u770b\u6211\u4eec\u793a\u4f8b\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u7684Plugin\u8c03\u7528\u65b9\u5f0f"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Component\npublic class CustomerService {\n\n @Autowired\n private PluginRegistry mobileCustomerPluginRegistry;\n}\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u5236\u5b9a\u6cdb\u578bT\u548cdelimiter\u7684S,\u6700\u7ec8\u901a\u8fc7\u4f9d\u8d56\u6ce8\u5165\u5339\u914d\u5230PluginRegistry\u7684\u5b9e\u4f8bbean"),(0,r.kt)("p",null,"\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8c03\u8bd5\u6765\u67e5\u770b\u6211\u4eec\u6700\u7ec8\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"mobileCustomerPluginRegistry"),"\u662f\u5426\u548c\u6211\u4eec\u901a\u8fc7\u8bfb\u6e90\u7801\u7684\u65b9\u5f0f\u5f97\u5230\u7684\u4e00\u81f4:"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7Debug\u65ad\u70b9\u6765\u8ddf\u8e2a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(41579).Z,width:"1294",height:"546"})),(0,r.kt)("p",null,"\u4ece\u4e0a\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230,PluginRegistry\u7684\u6700\u7ec8\u5b9e\u4f8b\u662f",(0,r.kt)("inlineCode",{parentName:"p"},"OrderAwarePluginRegistry"),"\u5b9e\u4f53\u5bf9\u8c61"),(0,r.kt)("p",null,"\u6574\u4e2a\u8fc7\u7a0b\u4e5f\u5230\u6b64\u7ed3\u675f"),(0,r.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u8be5\u7bc7\u6587\u7ae0\u7684\u5206\u6790,\u4e86\u89e3\u5230\u4e86Spring Plugin\u7ec4\u4ef6\u7684\u5de5\u4f5c\u65b9\u5f0f,\u5927\u81f4\u8ddf\u8e2a\u5b66\u4e60\u4e86Plugin\u7684\u521d\u59cb\u5316\u8fc7\u7a0b"),(0,r.kt)("p",null,"\u4e0d\u77e5\u9053\u901a\u8fc7\u4e0a\u9762\u7684\u4ecb\u7ecd,\u4f60\u662f\u5426\u4f1a\u5728\u5de5\u4f5c\u4e2d\u66f4\u591a\u7684\u4f7f\u7528Spring Plugin\u7ec4\u4ef6\u7684,\u81f3\u5c11\u4ece\u76ee\u524d\u6765\u770b,\u4ed6\u7684\u4f7f\u7528\u8fd8\u662f\u5f88\u7b80\u5355\u7684,\u5bf9\u4e8e\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u6269\u5c55\u6027\u4e5f\u662f\u6781\u5f3a\u7684."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Springfox"),"\u7684\u6e90\u7801\u4e2d\u5927\u91cf\u7684\u4f7f\u7528\u4e86Spring Plugin\u7684\u8fd9\u79cd\u65b9\u5f0f,\u76f8\u4fe1\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0,\u80fd\u5bf9\u540e\u9762\u6211\u4eec\u7814\u7a76\u5b66\u4e60Springfox\u7684\u6e90\u7801\u6709\u4e00\u4e2a\u5f88\u5927\u7684\u63d0\u5347\u548c\u5e2e\u52a9."))}d.isMDXComponent=!0},41579:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/PluginRegistryInstance-e3ff8b5643a7868254f385deea94fdea.png"},89527:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/PluginRegistrySupport-75af40b5caef0ab19841529b1c0a6435.png"},71177:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/plugin-c102a5c44b1450f0798e054e7c5a911d.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2acf0ab0.277b1274.js b/knife4j-doc/gitee/assets/js/2acf0ab0.277b1274.js deleted file mode 100644 index e135b6081..000000000 --- a/knife4j-doc/gitee/assets/js/2acf0ab0.277b1274.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[722],{3905:(e,n,i)=>{i.d(n,{Zo:()=>p,kt:()=>c});var t=i(67294);function l(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function r(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function a(e){for(var n=1;n=0||(l[i]=e[i]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(l[i]=e[i])}return l}var u=t.createContext({}),s=function(e){var n=t.useContext(u),i=n;return e&&(i="function"==typeof e?e(n):a(a({},n),e)),i},p=function(e){var n=s(e.components);return t.createElement(u.Provider,{value:n},e.children)},g={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var i=e.components,l=e.mdxType,r=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),m=s(i),c=l,d=m["".concat(u,".").concat(c)]||m[c]||g[c]||r;return i?t.createElement(d,a(a({ref:n},p),{},{components:i})):t.createElement(d,a({ref:n},p))}));function c(e,n){var i=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=i.length,a=new Array(r);a[0]=m;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o.mdxType="string"==typeof e?e:l,a[1]=o;for(var s=2;s{i.r(n),i.d(n,{assets:()=>p,contentTitle:()=>u,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var t=i(87462),l=i(63366),r=(i(67294),i(3905)),a=["components"],o={},u="springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",s={unversionedId:"action/springfox/springfox3",id:"action/springfox/springfox3",title:"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf",description:"\u65f6\u95f4\uff1a2019-5-22 1250",source:"@site/docs/action/springfox/springfox3.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox3",permalink:"/docs/action/springfox/springfox3",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c) \u521d\u63a2mapstruct",permalink:"/docs/action/springfox/springfox2"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u56db) \u914d\u7f6e\u7c7b\u521d\u59cb\u5316",permalink:"/docs/action/springfox/springfox4"}},p={},g=[{value:"\u524d\u8a00",id:"\u524d\u8a00",level:2},{value:"Spring Plugin",id:"spring-plugin",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2},{value:"\u6e90\u7801\u5206\u6790",id:"\u6e90\u7801\u5206\u6790",level:2},{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2}],m={toc:g};function c(e){var n=e.components,o=(0,l.Z)(e,a);return(0,r.kt)("wrapper",(0,t.Z)({},m,o,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e09-\u521d\u63a2spring-plugin\u63d2\u4ef6\u7cfb\u7edf"},"springfox \u6e90\u7801\u5206\u6790(\u4e09) \u521d\u63a2Spring Plugin\u63d2\u4ef6\u7cfb\u7edf"),(0,r.kt)("p",null,"\u65f6\u95f4\uff1a2019-5-22 12:46:50"),(0,r.kt)("p",null,"\u5730\u70b9\uff1a\u5355\u4f4d\u3001\u5bb6\u4e2d"),(0,r.kt)("h2",{id:"\u524d\u8a00"},"\u524d\u8a00"),(0,r.kt)("p",null,"\u540c",(0,r.kt)("inlineCode",{parentName:"p"},"MapStuct"),"\u7ec4\u4ef6\u4e00\u6837,\u56e0\u4e3aspringfox\u4e2d\u8fd0\u7528\u5230\u4e86Spring Plugin\u63d2\u4ef6\u7cfb\u7edf,\u6211\u4eec\u5bf9\u7814\u7a76springfox\u6e90\u7801\u4e4b\u524d,\u5148\u6765\u5b66\u4e60\u4e00\u4e0bSpring Plugin\u63d2\u4ef6\u7684\u673a\u5236"),(0,r.kt)("p",null,"\u56e0\u4e3a\u5728\u5de5\u4f5c\u4e2d\u5f88\u5c11\u4f7f\u7528\u5230",(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),",\u6240\u4ee5\u5b66\u4e60\u8bb0\u5f55\u4e0b"),(0,r.kt)("h2",{id:"spring-plugin"},"Spring Plugin"),(0,r.kt)("p",null,"Github:",(0,r.kt)("a",{parentName:"p",href:"https://github.com/spring-projects/spring-plugin",target:"_blank",rel:"noopener"},"https://github.com/spring-projects/spring-plugin")),(0,r.kt)("p",null,"\u53ef\u4ee5\u8bf4\u4f5c\u4e3aSpring\u9879\u76ee\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),",\u786e\u5b9e\u76f8\u5bf9\u5c0f\u4f17,\u5e76\u6ca1\u6709\u50cfSpring\u5176\u4ed6\u7684\u9879\u76ee\u90a3\u4e48\u6d41\u884c,\u751a\u81f3\u5728\u5176\u4ed6\u6d41\u884c\u7684\u6846\u67b6\u4e2d,\u90fd\u5f88\u5c11\u89c1\u5230\u4ed6\u7684\u8eab\u5f71."),(0,r.kt)("p",null,"\u622a\u6b62\u76ee\u524d(2019-5-22 13:54:08)\uff0cGithub \u7684Star\u4e3a222,fork\u657066"),(0,r.kt)("p",null,"Spring Plugin\u662f\u4e16\u754c\u4e0a\u6700\u5c0f\u89c4\u6a21\u7684\u63d2\u4ef6\u7cfb\u7edf"),(0,r.kt)("p",null,"\u5982\u4eca\u6784\u5efa\u53ef\u6269\u5c55\u7684\u4f53\u7cfb\u7ed3\u6784\u662f\u521b\u5efa\u53ef\u7ef4\u62a4\u5e94\u7528\u7a0b\u5e8f\u7684\u6838\u5fc3\u539f\u5219\u3002 \u8fd9\u5c31\u662f\u50cfOSGi\u8fd9\u6837\u7684\u5b8c\u5168\u6210\u719f\u7684\u63d2\u4ef6\u73af\u5883\u5982\u4eca\u5982\u6b64\u53d7\u6b22\u8fce\u7684\u539f\u56e0\u3002 \u4e0d\u5e78\u7684\u662f\uff0cOSGi\u7684\u5f15\u5165\u7ed9\u9879\u76ee\u5e26\u6765\u4e86\u5f88\u591a\u590d\u6742\u6027\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Spring Plugin"),"\u901a\u8fc7\u63d0\u4f9b\u6269\u5c55\u6838\u5fc3\u7cfb\u7edf\u529f\u80fd\u7684\u63d2\u4ef6\u5b9e\u73b0\u7684\u6838\u5fc3\u7075\u6d3b\u6027\uff0c\u4f46\u4e0d\u63d0\u4f9b\u52a8\u6001\u7c7b\u52a0\u8f7d\u6216\u8fd0\u884c\u65f6\u5b89\u88c5\u548c\u63d2\u4ef6\u90e8\u7f72\u7b49\u6838\u5fc3OSGi\u529f\u80fd\uff0c\u540c\u65f6\u4e3a\u63d2\u4ef6\u5f00\u53d1\u63d0\u4f9b\u4e86\u66f4\u5b9e\u7528\u7684\u65b9\u6cd5\u3002 \u867d\u7136Spring Plugin\u5e76\u4e0d\u50cfOSGi\u90a3\u6837\u5f3a\u5927\uff0c\u4f46\u5b83\u53ef\u4ee5\u6ee1\u8db3\u7a77\u4eba\u6784\u5efa\u6a21\u5757\u5316\u53ef\u6269\u5c55\u5e94\u7528\u7a0b\u5e8f\u7684\u8981\u6c42\u3002"),(0,r.kt)("p",null,"\u5047\u5982\u4f60\u5e0c\u671b\u6784\u5efa\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u5e94\u7528\u7cfb\u7edf,\u4f60\u53ef\u80fd\u9700\u8981\u4ece\u4ee5\u4e0b\u51e0\u70b9\u8fdb\u884c\u8003\u8651\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u65e0\u8bba\u51fa\u4e8e\u4f55\u79cd\u539f\u56e0\uff0c\u60a8\u90fd\u65e0\u6cd5\u5c06OSGi\u7528\u4f5c\u5b8c\u5168\u6210\u719f\u7684\u63d2\u4ef6\u67b6\u6784"),(0,r.kt)("li",{parentName:"ul"},"\u63d0\u4f9b\u4e13\u7528\u7684\u63d2\u4ef6\u63a5\u53e3\u6765\u6ee1\u8db3\u53ef\u6269\u5c55\u6027"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u7b80\u5355\u5730\u63d0\u4f9b\u6346\u7ed1\u5728JAR\u6587\u4ef6\u4e2d\u5e76\u5728\u7c7b\u8def\u5f84\u4e2d\u53ef\u7528\u7684\u63d2\u4ef6\u63a5\u53e3\u7684\u5b9e\u73b0\u6765\u6269\u5c55\u6838\u5fc3\u7cfb\u7edf"),(0,r.kt)("li",{parentName:"ul"},"\u4f7f\u7528Spring\u6765\u6784\u5efa\u5e94\u7528\u7cfb\u7edf")),(0,r.kt)("h2",{id:"\u793a\u4f8b"},"\u793a\u4f8b"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u5c0f\u793a\u4f8b,\u6765\u5bf9Spring Plugin\u7cfb\u7edf\u6709\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3"),(0,r.kt)("p",null,"Spring Plugin\u63d0\u4f9b\u4e00\u4e2a\u6807\u51c6\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),"\u63a5\u53e3\u4f9b\u5f00\u53d1\u4eba\u5458\u7ee7\u627f\u4f7f\u7528\u58f0\u660e\u81ea\u5df1\u7684\u63d2\u4ef6\u673a\u5236,\u7136\u540e\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d,Spring\u5bb9\u5668\u4f1a\u4e3a\u6211\u4eec\u81ea\u52a8\u5339\u914d\u5230\u63d2\u4ef6\u7684\u6240\u6709\u5b9e\u73b0\u5b50\u5bf9\u8c61,\u6700\u7ec8\u6211\u4eec\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u65f6,\u901a\u8fc7\u4f9d\u8d56\u6ce8\u5165\u6ce8\u89e3\uff0c\u6ce8\u5165",(0,r.kt)("inlineCode",{parentName:"p"},"PluginRegistry, S>"),"\u5bf9\u8c61\u62ff\u5230\u63d2\u4ef6\u5b9e\u4f8b\u8fdb\u884c\u64cd\u4f5c\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),"\u63a5\u53e3\u58f0\u660e\u4e86\u4e00\u4e2a\u63a5\u53e3\u5b9e\u73b0,\u6807\u6ce8\u5b9e\u73b0\u8be5\u63d2\u4ef6\u662f\u5426\u652f\u6301\uff0c\u56e0\u4e3a\u6709\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u63a5\u53e3\u5b9e\u73b0\u7684\u60c5\u51b5"),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u65f6,\u53ef\u80fd\u8fd9\u6837\u8c03\u7528\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"List> plugins=plugin.getPlugins();\nS delimiter;\nfor(Plugin p:plugins){\n if(p.supports(delimiter)){\n p.doSomeThing();//\n }\n}\n")),(0,r.kt)("p",null,"\u4ece\u5e94\u7528\u7a0b\u5e8f\u7684\u6269\u5c55\u6027\u6765\u8bf4,\u5f00\u53d1\u7075\u6d3b\u7684\u63d2\u4ef6\u7cfb\u7edf\u662f\u6211\u4eec\u6bcf\u4e2a\u5f00\u53d1\u4eba\u5458\u90fd\u9700\u8003\u8651\u7684"),(0,r.kt)("p",null,"\u5047\u8bbe\u76ee\u524d\u6211\u4eec\u6709\u4e00\u4e2a\u79fb\u52a8\u7535\u8bdd\u5145\u503c\u7cfb\u7edf,\u5728\u4e1a\u52a1\u521d\u671f\u53d1\u5c55\u4e2d,\u4e1a\u52a1\u7684\u76ee\u6807\u662f\u4fdd\u8bc1\u7a33\u5b9a\u6027,\u62e5\u6709\u5145\u503c\u4e1a\u52a1"),(0,r.kt)("p",null,"\u5728maven\u914d\u7f6e\u4e2d\u5148\u6765\u5f15\u5165\u76f8\u5173\u7684jar\u5305"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-xml"},"\n 1.2.3\n 1.7.21\n\n\n\n \x3c!-- https://mvnrepository.com/artifact/junit/junit --\x3e\n \n junit\n junit\n 4.8.2\n test\n \n\n \x3c!-- https://mvnrepository.com/artifact/org.springframework/spring-core --\x3e\n \n org.springframework\n spring-core\n 4.0.9.RELEASE\n \n\n \x3c!-- https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core --\x3e\n \n org.springframework.plugin\n spring-plugin-core\n 1.2.0.RELEASE\n \n\n \n org.slf4j\n slf4j-api\n ${org.slf4j.version}\n \n \n org.slf4j\n jcl-over-slf4j\n ${org.slf4j.version}\n runtime\n \n \n ch.qos.logback\n logback-classic\n ${logback.version}\n \n \n javax.mail\n mail\n \n \n javax.jms\n jms\n \n \n com.sun.jdmk\n jmxtools\n \n \n com.sun.jmx\n jmxri\n \n \n runtime\n \n\n")),(0,r.kt)("p",null,"\u5148\u6765\u770b\u6211\u4eec\u7684\u5ba2\u6237\u5c5e\u6027\uff1a"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"MobileCustomer")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:41\n */\npublic class MobileCustomer {\n\n /***\n * \u7535\u8bdd\u53f7\u7801\n */\n private String tel;\n //setter getter \n /***\n * \u662f\u5426\u8001\u7528\u6237\n */\n private boolean old=false;\n}\n')),(0,r.kt)("p",null,"\u58f0\u660e\u6211\u4eec\u7684\u5145\u503c\u63a5\u53e3\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n * \u6211\u4eec\u6709\u7535\u8bdd\u589e\u503c\u4e1a\u52a1,\u4e1a\u52a1\u4e2d\u6709\u5145\u503c\u65b9\u6cd5\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:42\n */\npublic interface MobileIncrementBusiness{\n\n /***\n * \u7535\u8bdd\u5145\u503c\n * @param mobileCustomer\n * @param money \u91d1\u989d\n */\n void increment(MobileCustomer mobileCustomer, int money);\n}\n')),(0,r.kt)("p",null,"\u5145\u503c\u63a5\u53e3\u76ee\u524d\u6709\u4e00\u4e2a\u63a5\u53e3,\u5145\u503c,\u6839\u636e\u5ba2\u6237\u548c\u5145\u503c\u91d1\u989d\u8fdb\u884c\u5145\u503c\u7684\u65b9\u6cd5"),(0,r.kt)("p",null,"\u63a5\u4e0b\u6765,\u6211\u4eec\u6765\u5b9e\u73b0\u5145\u503c\u7684\u4e1a\u52a1\u903b\u8f91,\u5047\u8bbe\u5f53\u524d\u6211\u4eec\u53eb\u4ed6V1\u7248\u672c"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n * \u7b2c\u4e00\u7248\u672c\u7684\u5145\u503c\u7cfb\u7edf\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 14:44\n */\npublic class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6\uff0c\u6211\u4eec\u5728\u7cfb\u7edf\u4e2d\u52a0\u5165\u5145\u503c\u63d2\u4ef6\u7684\u914d\u7f6e"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\npublic class MobileConfig {\n\n\n @Bean\n public MobileIncrementV1 mobileIncrementV1(){\n return new MobileIncrementV1();\n }\n}\n")),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u901a\u8fc7\u5bf9\u5916\u63d0\u4f9b\u4e00\u4e2a\u4e1a\u52a1Service,\u6765\u8c03\u7528\u6211\u4eec\u7684\u5145\u503c\u65b9\u6cd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'/***\n *\n * @since:spring-plugin-demo 1.0\n * @author xiaoymin@foxmail.com \n * 2019/05/22 15:00\n */\n@Component\npublic class CustomerService {\n\n \n @Autowired\n MobileIncrementV1 mobileIncrementV1;\n\n public void increments(MobileCustomer mobileCustomer,int money){\n //\u5bf9\u4eba\u5458\u8fdb\u884c\u5145\u503c\n mobileIncrementV1.increment(mobileCustomer,money);\n }\n\n}\n')),(0,r.kt)("p",null,"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u65b9\u6cd5,\u5c31\u53ef\u4ee5\u8c03\u7528\u6211\u4eec\u7684\u5145\u503c\u63d2\u4ef6\u8fdb\u884c\u8bdd\u8d39\u7684\u5145\u503c"),(0,r.kt)("p",null,"\u6211\u4eec\u6765\u6a21\u62df"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileTest {\n\n public static void main(String[] args) {\n AnnotationConfigApplicationContext context=\n new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");\n\n CustomerService customerService=context.getBean(CustomerService.class);\n MobileCustomer mobileCustomer=new MobileCustomer("13567662664");\n mobileCustomer.setOld(true);\n customerService.increments(mobileCustomer,120);\n }\n}\n')),(0,r.kt)("p",null,"\u6211\u4eec\u5bf9\u7535\u8bdd",(0,r.kt)("inlineCode",{parentName:"p"},"13567662664"),"\u8fdb\u884c\u5145\u503c120\u5143"),(0,r.kt)("p",null,"\u63a7\u5236\u53f0\u8f93\u51fa\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:11:21,391 INFO (MobileIncrementV1.java:27)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:11:21,394 INFO (MobileIncrementV1.java:28)- \u5145\u503c\u5b8c\u6210.\n")),(0,r.kt)("p",null,"\u63d2\u4ef6\u7684\u4f7f\u7528\u5230\u8fd9\u91cc\u5c31\u5b8c\u6210\u4e86,\u6b64\u65f6\u6211\u4eec\u6216\u8bb8\u4f1a\u6709\u7591\u95ee\uff1f\u4e0d\u662f\u8bf4\u6ee1\u8db3\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u6269\u5c55\u6027\u5417?\u6b64\u5904\u5e76\u672a\u4f53\u73b0\u51fa\u6765\u554a\uff1f"),(0,r.kt)("p",null,"\u5047\u8bbe\u968f\u7740\u7535\u8bdd\u516c\u53f8\u7684\u4e1a\u52a1\u9010\u6b65\u6269\u5927,\u6b64\u65f6,\u7535\u8bdd\u516c\u53f8\u63a8\u51fa\u4e86\u8001\u7528\u6237\u5145\u8bdd\u8d39\u6298\u6263\u7684\u6d3b\u52a8\uff0c\u5177\u4f53\u7684\u89c4\u5219\u662f"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5f53\u524d\u7535\u8bdd\u53f7\u7801\u5fc5\u987b\u662f\u8001\u7528\u6237(\u901a\u8fc7old\u5b57\u6bb5\u6765\u533a\u5206)"),(0,r.kt)("li",{parentName:"ul"},"\u5145\u503c\u91d1\u989d\u5fc5\u987b>100"),(0,r.kt)("li",{parentName:"ul"},"\u6298\u6263\u91d1\u989d\u4e3a\u5145\u503c\u91d1\u989d*10%,\u8fd4\u51b2\u5230\u5ba2\u6237\u7684\u624b\u673a\u4e0a")),(0,r.kt)("p",null,"\u6b64\u65f6,\u9488\u5bf9\u8be5\u6d3b\u52a8,\u6211\u4eec\u4e3a\u4e86\u6ee1\u8db3\u4ee5\u4e0a\u4e1a\u52a1,\u4f20\u7edf\u7684\u505a\u6cd5\u662f\u7ee7\u7eed\u5728",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementV1"),"\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e1a\u52a1\u903b\u8f91"),(0,r.kt)("p",null,"\u4ee3\u7801\u4f1a\u662f\u8fd9\u6837\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n if (mobileCustomer.isOld()){\n logger.info("\u8001\u7528\u6237\u6298\u6263");\n if (money>100){\n BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));\n logger.info("\u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b2{}\u5143",big.intValue());\n }\n }\n }\n\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return true;\n }\n}\n')),(0,r.kt)("p",null,"\u6539\u7248\u540e\u7684\u4e1a\u52a1\u903b\u8f91,\u6211\u4eec\u5728V1\u4e2d\u6dfb\u52a0\u4e86\u4e1a\u52a1\u903b\u8f91,\u6ee1\u8db3\u8001\u5ba2\u6237\u662f\u8fdb\u884c\u8fd4\u51b2"),(0,r.kt)("p",null,"\u8fd0\u884c\u540e,\u63a7\u5236\u53f0\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:24:50,229 INFO (MobileIncrementV1.java:29)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:24:50,231 INFO (MobileIncrementV1.java:30)- \u5145\u503c\u5b8c\u6210.\n2019-05-22 15:24:50,232 INFO (MobileIncrementV1.java:32)- \u8001\u7528\u6237\u6298\u6263\n2019-05-22 15:24:50,236 INFO (MobileIncrementV1.java:35)- \u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b212\u5143\n")),(0,r.kt)("p",null,"\u7a0b\u5e8f\u6ca1\u6709\u4efb\u4f55\u95ee\u9898,\u540c\u65f6\u4e5f\u6ee1\u8db3\u4e86\u6d3b\u52a8\u8981\u6c42,\u4f46\u662f\u8fd9\u6837\u505a\u7684\u7f3a\u9677\u4e5f\u662f\u660e\u663e\u7684,\u4e3b\u8981\u5982\u4e0b"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5728V1\u5145\u503c\u7cfb\u7edf\u4e2d,\u4e1a\u52a1\u5df2\u7ecf\u7a33\u5b9a,\u6b64\u65f6,\u5982\u679c\u6211\u4eec\u7684\u8fd4\u51b2\u6d3b\u52a8\u4e1a\u52a1\u6bd4\u8f83\u590d\u6742\u7684\u60c5\u51b5\u4e0b,\u4f1a\u51fa\u73b0\u6d4b\u8bd5\u4e0d\u5230\u7684\u60c5\u51b5,\u65b0\u4e1a\u52a1\u903b\u8f91\u4ee3\u7801\u66f4\u65b0\u540e,\u5bf9\u975e\u8001\u7528\u6237\u7684\u5145\u503c\u7a33\u5b9a\u6027\u5b58\u5728\u5f71\u54cd"),(0,r.kt)("li",{parentName:"ul"},"\u5982\u679c\u6211\u4eec\u7684\u4e1a\u52a1\u89c4\u5219\u53d8\u5316\u8d8a\u6765\u8d8a\u591a,\u6b64\u65f6\u6211\u4eec\u7684V1\u4e2d\u7684business\u65b9\u6cd5\u4f1a\u8d8a\u6765\u8d8a\u81c3\u80bf,\u4e0d\u5229\u4e8e\u7ef4\u62a4"),(0,r.kt)("li",{parentName:"ul"},"\u5047\u5982\u6211\u4eec\u7684\u6d3b\u52a8\u662f\u6709\u65f6\u6548\u6027\u7684\u60c5\u51b5\u4e0b,\u5728\u67d0\u4e00\u6bb5\u65f6\u95f4,\u8fd9\u6bb5\u4e1a\u52a1\u903b\u8f91\u6709\u7a7a,\u800c\u65f6\u6548\u6027\u5931\u6548\u540e,\u8fd9\u6bb5\u4e1a\u52a1\u903b\u8f91\u662f\u5197\u4f59\u7684,\u4f46\u662f\u5b83\u4ecd\u7136\u5b58\u5728\u4e8e\u6211\u4eec\u7684\u4e3b\u4e1a\u52a1\u65b9\u6cd5\u4e2d.")),(0,r.kt)("p",null,"\u90a3\u4e48,\u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898,\u6211\u4eec\u5e94\u8be5\u5982\u4f55\u89e3\u51b3\u5462\uff1f"),(0,r.kt)("p",null,"Spring Plugin\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4e86\u6b64\u95ee\u9898,\u5982\u679c\u7528Plugin\u7684\u65b9\u5f0f,\u6211\u4eec\u5e94\u8be5\u5982\u4f55\u505a\u5462\uff1f"),(0,r.kt)("p",null,"\u9996\u5148,\u6539\u8fdb\u6211\u4eec\u7684\u589e\u503c\u4e1a\u52a1",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementBusiness"),",\u6539\u4e1a\u52a1\u63a5\u53e3\u7ee7\u627f",(0,r.kt)("inlineCode",{parentName:"p"},"Plugin"),",\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"public interface MobileIncrementBusiness extends Plugin{\n\n /***\n * \u7535\u8bdd\u5145\u503c\n * @param mobileCustomer\n * @param money \u91d1\u989d\n */\n void increment(MobileCustomer mobileCustomer, int money);\n}\n")),(0,r.kt)("p",null,"\u6211\u4eec\u7ee7\u627f\u4e86Plugin\u7684\u63a5\u53e3,\u6240\u4ee5\u6211\u4eec\u7684\u5b50\u7c7b\u5145\u503cV1\u4e1a\u52a1\u4ee3\u7801\u4e5f\u9700\u8981\u5b9e\u73b0Plugin\u7684supports\u65b9\u6cd5,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementV1 implements MobileIncrementBusiness {\n\n Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);\n\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n logger.info("\u7ed9{}\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:{}",mobileCustomer.getTel(),money);\n logger.info("\u5145\u503c\u5b8c\u6210.");\n }\n\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return true;\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u628a\u8001\u7528\u6237\u8fd4\u51b2\u7684\u4ee3\u7801\u79fb\u9664\u4e86,\u6211\u4eec\u901a\u8fc7Plugin\u7684\u65b9\u5f0f\u6765\u5e2e\u52a9\u6211\u4eec"),(0,r.kt)("p",null,"\u6211\u4eec\u65b0\u5efa\u8001\u7528\u6237\u8fd4\u51b2\u7684\u4e1a\u52a1\u5b9e\u73b0",(0,r.kt)("inlineCode",{parentName:"p"},"MobileIncrementDiscount"),"\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'public class MobileIncrementDiscount implements MobileIncrementBusiness {\n Logger logger= LoggerFactory.getLogger(MobileIncrementDiscount.class);\n @Override\n public void increment(MobileCustomer mobileCustomer, int money) {\n if (supports(mobileCustomer)){\n logger.info("\u8001\u7528\u6237\u6298\u6263");\n if (money>100){\n if (money>100){\n BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));\n logger.info("\u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b2{}\u5143",big.intValue());\n }\n }\n }\n }\n\n /***\n * \u6765\u7528\u6237\u624d\u6ee1\u8db3\n * @param delimiter\n * @return\n */\n @Override\n public boolean supports(MobileCustomer delimiter) {\n return delimiter.isOld();\n }\n}\n')),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u542f\u7528Plugin\u63d2\u4ef6\u7cfb\u7edf,\u5c06\u6211\u4eec\u7684\u8fd4\u51b2\u5b9e\u73b0\u4e1a\u52a1\u6ce8\u5165\u5230\u7cfb\u7edf\u4e2d"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Configuration\n@EnablePluginRegistries({MobileIncrementBusiness.class})\npublic class MobileConfig {\n\n\n @Bean\n public MobileIncrementV1 mobileIncrementV1(){\n return new MobileIncrementV1();\n }\n\n @Bean\n public MobileIncrementDiscount mobileIncrementDiscount(){\n return new MobileIncrementDiscount();\n }\n}\n")),(0,r.kt)("p",null,"\u6700\u540e\uff0c\u6211\u4eec\u4fee\u6539\u6211\u4eec\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u4e2d\u7684\u5145\u503c\u65b9\u6cd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Component\npublic class CustomerService {\n\n @Autowired\n private PluginRegistry mobileCustomerPluginRegistry;\n \n\n public void increments(MobileCustomer mobileCustomer,int money){\n //\u83b7\u53d6\u63d2\u4ef6\n List plugins=mobileCustomerPluginRegistry.getPlugins();\n for (MobileIncrementBusiness incrementBusiness:plugins){\n //\u5bf9\u4eba\u5458\u8fdb\u884c\u5145\u503c\n incrementBusiness.increment(mobileCustomer,money);\n }\n }\n\n}\n")),(0,r.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u5728\u6765\u8fd0\u884c\u6211\u4eec\u7684Test\u6d4b\u8bd5"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");\n\nCustomerService customerService=context.getBean(CustomerService.class);\nMobileCustomer mobileCustomer=new MobileCustomer("13567662664");\nmobileCustomer.setOld(true);\ncustomerService.increments(mobileCustomer,120);\n')),(0,r.kt)("p",null,"\u63a7\u5236\u53f0\u8f93\u51fa\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"2019-05-22 15:42:01,743 INFO (MobileIncrementV1.java:29)- \u7ed913567662664\u5145\u503c\u7535\u8bdd\u8d39,\u5145\u503c\u91d1\u989d:120\n2019-05-22 15:42:01,745 INFO (MobileIncrementV1.java:30)- \u5145\u503c\u5b8c\u6210.\n2019-05-22 15:42:01,746 INFO (MobileIncrementDiscount.java:28)- \u8001\u7528\u6237\u6298\u6263\n2019-05-22 15:42:01,752 INFO (MobileIncrementDiscount.java:32)- \u5f53\u524d\u5145\u503c\u91d1\u989d>100\u5143,\u8fd4\u51b212\u5143\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u63a7\u5236\u53f0,\u6211\u4eec\u53d1\u73b0,\u548c\u5728v1\u4e1a\u52a1\u4e2d\u7ee7\u7eed\u65b0\u589e\u4ee3\u7801\u7684\u65b9\u5f0f,\u6548\u679c\u662f\u5b8c\u5168\u76f8\u540c\u7684,\u4f46\u662f\u5bf9\u4e8e\u6574\u4e2a\u7cfb\u7edf\u7684\u6269\u5c55\u6027\u6765\u8bf4,\u662fV1\u65b9\u5f0f\u65e0\u6cd5\u6bd4\u4f8b\u7684\uff0c\u4e3b\u8981\u4f53\u73b0\u5728\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u63d2\u4ef6\u7684\u65b9\u5f0f,\u4e0d\u9700\u8981\u66f4\u6539\u539f\u6765\u5df2\u7ecf\u7a33\u5b9a\u7684\u4e1a\u52a1\u4ee3\u7801,\u5bf9\u7cfb\u7edf\u7a33\u5b9a\u6027\u6765\u8bf4\u5c24\u4e3a\u91cd\u8981(\u7cfb\u7edf\u7a33\u5b9a\u662f\u57fa\u7840)"),(0,r.kt)("li",{parentName:"ul"},"\u4e0e\u4e1a\u52a1\u89e3\u8026,\u5982\u679c\u4e1a\u52a1\u53d1\u751f\u53d8\u5316(\u5728\u67d0\u4e2a\u5468\u671f\u5185)\uff0c\u6216\u8005\u6709\u65b0\u7528\u6237\u7684\u6d3b\u52a8,\u6211\u4eec\u53ea\u9700\u8981\u6784\u5efa\u6211\u4eec\u7684\u4e1a\u52a1\u4ee3\u7801,\u6838\u5fc3\u6846\u67b6\u5c42\u65e0\u9700\u66f4\u6539"),(0,r.kt)("li",{parentName:"ul"},"\u7a0b\u5e8f\u67b6\u6784\u66f4\u6e05\u6670,\u5206\u5c42\u8bbe\u8ba1\u66f4\u660e\u663e.")),(0,r.kt)("h2",{id:"\u6e90\u7801\u5206\u6790"},"\u6e90\u7801\u5206\u6790"),(0,r.kt)("p",null,"\u76f8\u4fe1\u901a\u8fc7\u4e0a\u9762\u7684\u793a\u4f8b,\u6211\u4eec\u5bf9Spring Plugin\u63d2\u4ef6\u6280\u672f\u7ec4\u4ef6\u6709\u4e00\u4e2a\u521d\u6b65\u7684\u4e86\u89e3,\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u770bSpring Plugin\u7684\u6e90\u7801\u5b9e\u73b0"),(0,r.kt)("p",null,"\u65e2\u7136\u662f\u53f7\u79f0\u4e16\u754c\u4e0a\u89c4\u6a21\u6700\u5c0f\u7684\u63d2\u4ef6\u7cfb\u7edf,\u901a\u8fc7\u6211\u4eec\u7684\u4f7f\u7528\u6765\u770b,\u786e\u5b9e\u4e5f\u591f\u7b80\u5355,\u6240\u4ee5Spring Plugin\u7684\u4ee3\u7801\u91cf\u4e5f\u662f\u5f88\u7cbe\u608d."),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(71177).Z,width:"418",height:"943"})),(0,r.kt)("p",null,"\u901a\u8fc7GitHub\u4e0b\u8f7d\u4e0b\u6765\u7684\u6e90\u7801,\u603b\u5171\u4e5f\u5c31\u4e09\u4e2a\u5305"),(0,r.kt)("p",null,"\u8fd9\u5bf9\u4e8e\u6211\u4eec\u5b66\u4e60\u4ed6\u7684\u6e90\u7801\u3001\u8bbe\u8ba1\u6a21\u5f0f\u6765\u8bf4,\u53cd\u800c\u662f\u597d\u4e8b\u60c5."),(0,r.kt)("p",null,"\u5148\u6765\u770bPlugin\u6d89\u53ca\u5230\u7684\u5173\u952e\u7c7b\u56fe\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(89527).Z,width:"676",height:"1727"})),(0,r.kt)("p",null,"\u6211\u4eec\u6700\u7ec8\u4f7f\u7528\u63d2\u4ef6\u65f6,\u901a\u8fc7PluginRegistry\u6765\u83b7\u53d6\u5df2\u5b9e\u73b0\u7684\u63d2\u4ef6bean\u5b9e\u4f8b\uff0c\u8be5\u63d2\u4ef6\u63d0\u4f9b\u4e86\u51e0\u4e2a\u4e3b\u8981\u65b9\u6cd5\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"Optional")," getPluginFor(S delimiter):\u6839\u636e\u7279\u5b9a\u6761\u4ef6\u83b7\u53d6\u63d2\u4ef6\u7684Optional\u5bf9\u8c61(\u7b2c\u4e00\u4e2a)"),(0,r.kt)("li",{parentName:"ul"},"T getRequiredPluginFor(S delimiter)\uff1a\u6839\u636e\u6761\u4ef6\u83b7\u53d6\u63d2\u4ef6\u5bf9\u8c61,\u5982\u679c\u6ca1\u6709,\u5219\u629b\u51fa\u5f02\u5e38"),(0,r.kt)("li",{parentName:"ul"},"getPlugins():\u83b7\u53d6\u6240\u6709\u63d2\u4ef6"),(0,r.kt)("li",{parentName:"ul"},"contains(T):\u662f\u5426\u5305\u542b\u63d2\u4ef6"),(0,r.kt)("li",{parentName:"ul"},"...")),(0,r.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528Spring Plugin\u7ec4\u4ef6\u7684\u65f6\u5019,\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u5728\u6211\u4eec\u7684Configuration\u914d\u7f6e\u7c7b\u4e0a\u901a\u8fc7\u6ce8\u89e3",(0,r.kt)("inlineCode",{parentName:"li"},"@EnablePluginRegistries"),"\u6ce8\u5165\u76f8\u5e94\u7684Plugin\u63a5\u53e3\u7684class"),(0,r.kt)("li",{parentName:"ul"},"\u5728Configuration\u914d\u7f6e\u7c7b\u4e2d\u6ce8\u5165Plugin\u7684\u5b9e\u73b0\u7c7b\u5b9e\u4f53Bean"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"@Autowired"),"\u6ce8\u89e3,\u5e76\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistry,S>"),"\u7684\u65b9\u5f0f\u62ff\u5230\u6211\u4eec\u7684plugin\u5b9e\u4f8b,\u7136\u540e\u518d\u4e1a\u52a1\u65b9\u6cd5\u4e2d\u8fdb\u884c\u4f7f\u7528.")),(0,r.kt)("p",null,"\u8fd9\u91cc\u6709\u4e24\u4e2a\u5173\u952e\u70b9\uff1a"),(0,r.kt)("p",null,"1\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u6ce8\u89e3\u5177\u4f53\u7684\u4f5c\u7528"),(0,r.kt)("p",null,"2\u3001PluginRegistry\u662f\u63a5\u53e3,\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"p"},"@Antowired"),"\u6ce8\u5165,\u5177\u4f53\u7684\u5b9e\u73b0\u7c7b\u5728\u54ea\u513f?"),(0,r.kt)("p",null,"\u5e26\u7740\u8fd9\u4e24\u4e2a\u7591\u95ee\u70b9,\u6211\u4eec\u5148\u6765\u770b",(0,r.kt)("inlineCode",{parentName:"p"},"@EnablePluginRegistries"),"\u7684\u4ee3\u7801\uff1a"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"EnablePluginRegistries.java")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"/**\n * \u4e3a\u5f00\u542f\u4f7f\u7528Plugin\u63d2\u4ef6\u7684\u7c7b\u578b\u5e94\u7528\u542f\u7528PluginRegistry\u7684\u5b9e\u4f8b\u6ce8\u5165\n * @see #value()\n * @author Oliver Gierke\n */\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.RUNTIME)\n@Inherited\n@Documented\n@Import(PluginRegistriesBeanDefinitionRegistrar.class)\npublic @interface EnablePluginRegistries {\n\n /**\n * \n * The {@link Plugin} types to register {@link PluginRegistry} instances for. The registries will be named after the\n * uncapitalized plugin type extended with {@code Registry}. So for a plugin interface {@code SamplePlugin} the\n * exposed bean name will be {@code samplePluginRegistry}. This can be used on the client side to make sure you get\n * the right {@link PluginRegistry} injected by using the {@link Qualifier} annotation and referring to that bean\n * name. If the auto-generated bean name collides with one already in your application you can use the\n * {@link Qualifier} annotation right at the plugin interface to define a custom name.\n * \n * @return\n */\n Class>[] value();\n}\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u6ce8\u91ca\u6211\u4eec\u5f97\u77e5\u8be5\u6ce8\u89e3\u7684\u4f5c\u7528"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6ce8\u518cPluginRegistry\u7684\u5b9e\u4f8bBean,\u5e76\u4ee5\u6b64\u547d\u540d"),(0,r.kt)("li",{parentName:"ul"},"\u5bfc\u5165",(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistriesBeanDefinitionRegistrar"),"\u7c7b\u8fdb\u884c\u5b9e\u4f8bBean\u6ce8\u5165")),(0,r.kt)("p",null,"PluginRegistry\u7684\u6ce8\u5165\u89c4\u5219\u662f,\u9996\u5b57\u6bcd\u53d8\u5c0f\u5199,\u4f8b\u5982",(0,r.kt)("inlineCode",{parentName:"p"},"SimplePluginRegistry"),"\u7684\u5b9e\u4f8bbean\uff0c\u5728Spring\u5bb9\u5668\u4e2d\u7684beanName\u4e3a",(0,r.kt)("inlineCode",{parentName:"p"},"simplePluginRegistry")),(0,r.kt)("p",null,"\u5982\u679c\u7cfb\u7edf\u7684\u547d\u540d\u548c\u81ea\u52a8\u751f\u6210\u7684\u540d\u79f0\u76f8\u51b2\u7a81,\u53ef\u4ee5\u4f7f\u7528",(0,r.kt)("inlineCode",{parentName:"p"},"@Qualifier"),"\u6ce8\u89e3\u6765\u5f3a\u5236\u547d\u540d\u5339\u914d\u4ee5\u89e3\u51b3\u6b64\u95ee\u9898"),(0,r.kt)("p",null,"\u6765\u770b",(0,r.kt)("inlineCode",{parentName:"p"},"PluginRegistriesBeanDefinitionRegistrar.java"),"\u4ee3\u7801\uff1a"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},'\n/**\n * {@link ImportBeanDefinitionRegistrar} to register {@link PluginRegistryFactoryBean} instances for type listed in\n * {@link EnablePluginRegistries}. Picks up {@link Qualifier} annotations used on the plugin interface and forwards them\n * to the bean definition for the factory.\n * \u4e3apluginRegistry\u63a5\u53e3\u6ce8\u5165\u52a8\u6001\u5b9e\u4f8bbean\u5bf9\u8c61\n *\n * @author Oliver Gierke\n */\npublic class PluginRegistriesBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {\n\n private static final Logger LOG = LoggerFactory.getLogger(PluginRegistriesBeanDefinitionRegistrar.class);\n\n /*\n * importingClassMetadata:\u6b64\u53c2\u6570\u4e3a\u901a\u8fc7@EnablePluginRegistries\u6ce8\u89e3\u6807\u6ce8\u7684\u7c7b\u578b\u6ce8\u89e3\u5143\u6570\u636e\u4fe1\u606f\u5bf9\u8c61\n * registry:\u6ce8\u5165bean\u5bf9\u8c61\n * \n */\n @Override\n public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {\n\n //\u83b7\u53d6\u5f53\u524denablePluginRegistries\u6ce8\u89e3\u7c7b\u4fe1\u606f\n Map annotationAttributes = importingClassMetadata\n .getAnnotationAttributes(EnablePluginRegistries.class.getName());\n //\u5224\u65ad\u662f\u5426\u4e3a\u7a7a\n if (annotationAttributes == null) {\n LOG.info("No EnablePluginRegistries annotation found on type {}!", importingClassMetadata.getClassName());\n return;\n }\n //\u83b7\u53d6\u4ec0\u4e48\u7684\u7c7b\u578b\u96c6\u5408\n //\u4f8b\u5982\u6211\u4eec\u5728\u793a\u4f8b\u4e2d\u4f7f\u7528\u7684@EnablePluginRegistries({MobileIncrementBusiness.class})\n //\u6b64\u5904\u4f1a\u62ff\u5230MobileIncrementBusiness.class\u8fd9\u4e2atype\uff0ctypes.length=1\n Class[] types = (Class[]) annotationAttributes.get("value");\n //\u5faa\u73af\u904d\u5386\n for (Class type : types) {\n //\u83b7\u53d6PluginRegistryFactoryBean\u7c7b\u7684\u5b9e\u4f53bean\u5b9a\u4e49builder\n BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(PluginRegistryFactoryBean.class);\n builder.addPropertyValue("type", type);\n\n RootBeanDefinition beanDefinition = (RootBeanDefinition) builder.getBeanDefinition();\n beanDefinition.setTargetType(getTargetType(type));\n\n Qualifier annotation = type.getAnnotation(Qualifier.class);\n\n // If the plugin interface has a Qualifier annotation, propagate that to the bean definition of the registry\n if (annotation != null) {\n AutowireCandidateQualifier qualifierMetadata = new AutowireCandidateQualifier(Qualifier.class);\n qualifierMetadata.setAttribute(AutowireCandidateQualifier.VALUE_KEY, annotation.value());\n beanDefinition.addQualifier(qualifierMetadata);\n }\n //\u83b7\u53d6bean\u7684\u9ed8\u8ba4\u540d\u79f0\n // Default\n String beanName = annotation == null //\n ? StringUtils.uncapitalize(type.getSimpleName() + "Registry") //\n : annotation.value();\n //\u52a8\u6001\u6ce8\u5165\n registry.registerBeanDefinition(beanName, builder.getBeanDefinition());\n }\n }\n\n /**\n * Returns the target type of the {@link PluginRegistry} for the given plugin type.\n *\n * @param pluginType must not be {@literal null}.\n * @return\n */\n private static ResolvableType getTargetType(Class pluginClass) {\n\n Assert.notNull(pluginClass, "Plugin type must not be null!");\n\n ResolvableType delimiterType = ResolvableType.forClass(Plugin.class, pluginClass).getGeneric(0);\n ResolvableType pluginType = ResolvableType.forClass(pluginClass);\n\n return ResolvableType.forClassWithGenerics(OrderAwarePluginRegistry.class, pluginType, delimiterType);\n }\n}\n\n')),(0,r.kt)("p",null,"\u901a\u8fc7\u4ee5\u4e0a\u4ee3\u7801\uff0c\u6211\u4eec\u77e5\u9053\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"@EnablePluginRegistries"),"\u4f1a\u4e3a\u6211\u4eec\u52a8\u6001\u6ce8\u5165PluginRetry\u7684\u5b9e\u4f53bean"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"PluginRegistryFactoryBean"),"\u4f1a\u4ea7\u751f\u4e00\u4e2a\u76ee\u6807bean\u7684\u4ee3\u7406,\u6b64\u76ee\u6807bean\u771f\u662fPluginRegistry\u63a5\u53e3\u7684\u5b9e\u4f8b,\u9996\u5148\u627e\u5230\u5bb9\u5668\u4e2d\u5b9e\u73b0\u4e86Plugin\u63d2\u4ef6\u63a5\u53e3\u7684\u5b9e\u4f53bean,\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a",(0,r.kt)("inlineCode",{parentName:"li"},"List>"),"\u7684\u96c6\u5408"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u62ff\u5230\u8be5Plugins\u7684\u7ed3\u5408\uff0c\u5728\u901a\u8fc7",(0,r.kt)("inlineCode",{parentName:"li"},"OrderAwarePluginRegistry.create(List>)"),"\u7684\u65b9\u6cd5\u6765\u521b\u5efaPluginRetry\u63a5\u53e3\u7684\u9ed8\u8ba4\u5b9e\u4f8b"),(0,r.kt)("li",{parentName:"ul"},"\u901a\u8fc7\u4e0a\u9762\u7684\u7c7b\u56fe\u5176\u5b9e\u6211\u4eec\u77e5\u9053,PluginRetry\u7684\u63a5\u53e3\u62e5\u6709\u4ed6\u7684\u9ed8\u8ba4\u5b50\u7c7b\u5b9e\u73b0,\u4e3aOrderAwarePluginRegistry")),(0,r.kt)("p",null,"\u56de\u8fc7\u5934\u6765\u770b\u6211\u4eec\u793a\u4f8b\u4e2d\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"CustomerService"),"\u7684Plugin\u8c03\u7528\u65b9\u5f0f"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-java"},"@Component\npublic class CustomerService {\n\n @Autowired\n private PluginRegistry mobileCustomerPluginRegistry;\n}\n")),(0,r.kt)("p",null,"\u901a\u8fc7\u5236\u5b9a\u6cdb\u578bT\u548cdelimiter\u7684S,\u6700\u7ec8\u901a\u8fc7\u4f9d\u8d56\u6ce8\u5165\u5339\u914d\u5230PluginRegistry\u7684\u5b9e\u4f8bbean"),(0,r.kt)("p",null,"\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8c03\u8bd5\u6765\u67e5\u770b\u6211\u4eec\u6700\u7ec8\u7684",(0,r.kt)("inlineCode",{parentName:"p"},"mobileCustomerPluginRegistry"),"\u662f\u5426\u548c\u6211\u4eec\u901a\u8fc7\u8bfb\u6e90\u7801\u7684\u65b9\u5f0f\u5f97\u5230\u7684\u4e00\u81f4:"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7Debug\u65ad\u70b9\u6765\u8ddf\u8e2a"),(0,r.kt)("p",null,(0,r.kt)("img",{src:i(41579).Z,width:"1294",height:"546"})),(0,r.kt)("p",null,"\u4ece\u4e0a\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230,PluginRegistry\u7684\u6700\u7ec8\u5b9e\u4f8b\u662f",(0,r.kt)("inlineCode",{parentName:"p"},"OrderAwarePluginRegistry"),"\u5b9e\u4f53\u5bf9\u8c61"),(0,r.kt)("p",null,"\u6574\u4e2a\u8fc7\u7a0b\u4e5f\u5230\u6b64\u7ed3\u675f"),(0,r.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,r.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u8be5\u7bc7\u6587\u7ae0\u7684\u5206\u6790,\u4e86\u89e3\u5230\u4e86Spring Plugin\u7ec4\u4ef6\u7684\u5de5\u4f5c\u65b9\u5f0f,\u5927\u81f4\u8ddf\u8e2a\u5b66\u4e60\u4e86Plugin\u7684\u521d\u59cb\u5316\u8fc7\u7a0b"),(0,r.kt)("p",null,"\u4e0d\u77e5\u9053\u901a\u8fc7\u4e0a\u9762\u7684\u4ecb\u7ecd,\u4f60\u662f\u5426\u4f1a\u5728\u5de5\u4f5c\u4e2d\u66f4\u591a\u7684\u4f7f\u7528Spring Plugin\u7ec4\u4ef6\u7684,\u81f3\u5c11\u4ece\u76ee\u524d\u6765\u770b,\u4ed6\u7684\u4f7f\u7528\u8fd8\u662f\u5f88\u7b80\u5355\u7684,\u5bf9\u4e8e\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u6269\u5c55\u6027\u4e5f\u662f\u6781\u5f3a\u7684."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Springfox"),"\u7684\u6e90\u7801\u4e2d\u5927\u91cf\u7684\u4f7f\u7528\u4e86Spring Plugin\u7684\u8fd9\u79cd\u65b9\u5f0f,\u76f8\u4fe1\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0,\u80fd\u5bf9\u540e\u9762\u6211\u4eec\u7814\u7a76\u5b66\u4e60Springfox\u7684\u6e90\u7801\u6709\u4e00\u4e2a\u5f88\u5927\u7684\u63d0\u5347\u548c\u5e2e\u52a9."))}c.isMDXComponent=!0},41579:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/PluginRegistryInstance-e3ff8b5643a7868254f385deea94fdea.png"},89527:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/PluginRegistrySupport-75af40b5caef0ab19841529b1c0a6435.png"},71177:(e,n,i)=>{i.d(n,{Z:()=>t});const t=i.p+"assets/images/plugin-c102a5c44b1450f0798e054e7c5a911d.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2b6e9caa.2dce5a59.js b/knife4j-doc/gitee/assets/js/2b6e9caa.2dce5a59.js new file mode 100644 index 000000000..5cdb0cf0c --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2b6e9caa.2dce5a59.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2087],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},w=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),l=p(n),w=o,f=l["".concat(c,".").concat(w)]||l[w]||d[w]||a;return n?r.createElement(f,s(s({ref:t},u),{},{components:n})):r.createElement(f,s({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=w;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[l]="string"==typeof e?e:o,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>f,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),s=["components"],i={},c="3.4 \u5bc6\u7801\u6a21\u5f0f(password)",p={unversionedId:"action/oauth2-password",id:"action/oauth2-password",title:"3.4 \u5bc6\u7801\u6a21\u5f0f(password)",description:"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d",source:"@site/docs/action/oauth2-password.md",sourceDirName:"action",slug:"/action/oauth2-password",permalink:"/docs/action/oauth2-password",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)",permalink:"/docs/action/oauth2-client_credentials"},next:{title:"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-disk"}},u={},l=[],d={toc:l},w="wrapper";function f(e){var t=e.components,i=(0,o.Z)(e,s);return(0,a.kt)(w,(0,r.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"34-\u5bc6\u7801\u6a21\u5f0fpassword"},"3.4 \u5bc6\u7801\u6a21\u5f0f(password)"),(0,a.kt)("p",null,"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d"),(0,a.kt)("p",null,"\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u8bf7\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-oauth2-password",target:"_blank",rel:"noopener"},"knife4j-spring-oauth2-password")),(0,a.kt)("p",null,"\u90e8\u5206\u793a\u4f8b\u4ee3\u7801\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Override\npublic void configure(ClientDetailsServiceConfigurer clients) throws Exception {\n //\u5bc6\u7801\u6a21\u5f0f\uff08resource owner password credentials\uff09\n clients.inMemory()\n .withClient("app1").secret(noOpPasswordEncoder.encode("123"))\n .authorizedGrantTypes("password")\n .scopes("read","write","reads","writes");\n}\n')),(0,a.kt)("p",null,"\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u8bbe\u7f6eOAuth2\u7684\u6388\u6743\u7c7b\u578b\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u67e5\u770b\u8be6\u7ec6\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfig {\n\n @Bean\n public Docket productApi() {\n //schema\n List grantTypes=new ArrayList<>();\n //\u5bc6\u7801\u6a21\u5f0f\n String passwordTokenUrl="http://localhost:18010/oauth/token";\n ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl);\n grantTypes.add(resourceOwnerPasswordCredentialsGrant);\n OAuth oAuth=new OAuthBuilder().name("oauth2")\n .grantTypes(grantTypes).build();\n //context\n //scope\u65b9\u4f4d\n List scopes=new ArrayList<>();\n scopes.add(new AuthorizationScope("read","read resources"));\n scopes.add(new AuthorizationScope("write","write resources"));\n scopes.add(new AuthorizationScope("reads","read all resources"));\n scopes.add(new AuthorizationScope("writes","write all resources"));\n\n SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));\n SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));\n //schemas\n List securitySchemes=Lists.newArrayList(oAuth);\n //securyContext\n List securityContexts=Lists.newArrayList(securityContext);\n return new Docket(DocumentationType.SWAGGER_2)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))\n .paths(PathSelectors.any())\n .build()\n .securityContexts(securityContexts)\n .securitySchemes(securitySchemes)\n .apiInfo(apiInfo());\n\n\n }\n\n\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")\n .termsOfServiceUrl("https://doc.xiaominfo.com")\n .contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))\n .license("Open Source")\n .licenseUrl("\\"https://www.apache.org/licenses/LICENSE-2.0")\n .version("1.0.0")\n .build();\n\n }\n\n\n}\n'))),(0,a.kt)("p",null,"\u6700\u7ec8\u5448\u73b0\u754c\u9762\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(76891).Z,width:"1357",height:"630"})),(0,a.kt)("p",null,"\u8f93\u5165username,password,clientId\u4ee5\u53caclientSecret,\u7136\u540e\u70b9\u51fbAuthorize\u6309\u94ae\u8fdb\u884c\u6388\u6743\u5373\u53ef"),(0,a.kt)("p",null,"\u6388\u6743\u5b8c\u6210\u540e\uff0c\u6d4b\u8bd5\u6211\u4eec\u518d\u6211\u4eec\u7684\u63a5\u53e3\u4e2d\uff0c\u5c31\u4f1a\u770b\u5230\u6211\u4eec\u7684\u53c2\u6570",(0,a.kt)("inlineCode",{parentName:"p"},"Authorization"),"\u503c\u5df2\u7ecf\u66f4\u65b0\u4e86\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(57252).Z,width:"1036",height:"369"})))}f.isMDXComponent=!0},57252:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/grantcode2-0df055d83ad8e8b8ac4615331aae0dea.png"},76891:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/password-abb96b81595f1deccc6aef451ff6a721.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2b6e9caa.ed595bb7.js b/knife4j-doc/gitee/assets/js/2b6e9caa.ed595bb7.js deleted file mode 100644 index 024abadf2..000000000 --- a/knife4j-doc/gitee/assets/js/2b6e9caa.ed595bb7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2087],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>w});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=p(n),w=o,f=d["".concat(c,".").concat(w)]||d[w]||l[w]||a;return n?r.createElement(f,s(s({ref:t},u),{},{components:n})):r.createElement(f,s({ref:t},u))}));function w(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=d;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:o,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>w,frontMatter:()=>i,metadata:()=>p,toc:()=>l});var r=n(87462),o=n(63366),a=(n(67294),n(3905)),s=["components"],i={},c="3.4 \u5bc6\u7801\u6a21\u5f0f(password)",p={unversionedId:"action/oauth2-password",id:"action/oauth2-password",title:"3.4 \u5bc6\u7801\u6a21\u5f0f(password)",description:"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d",source:"@site/docs/action/oauth2-password.md",sourceDirName:"action",slug:"/action/oauth2-password",permalink:"/docs/action/oauth2-password",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"3.3 \u5ba2\u6237\u7aef\u6a21\u5f0f(client_credentials)",permalink:"/docs/action/oauth2-client_credentials"},next:{title:"4.1 Disk\u672c\u5730\u6a21\u5f0f\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-disk"}},u={},l=[],d={toc:l};function w(e){var t=e.components,i=(0,o.Z)(e,s);return(0,a.kt)("wrapper",(0,r.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"34-\u5bc6\u7801\u6a21\u5f0fpassword"},"3.4 \u5bc6\u7801\u6a21\u5f0f(password)"),(0,a.kt)("p",null,"\u4ee5Spring Security\u4e3a\u4f8b\uff0c\u4e3a\u4e86\u8fbe\u5230\u5feb\u901f\u6f14\u793a\u6548\u679c\uff0c\u6388\u6743\u670d\u52a1\u5668\u548c\u8d44\u6e90\u670d\u52a1\u5668\u90fd\u5728\u540c\u4e00\u4e2a\u5de5\u7a0b\u4e2d"),(0,a.kt)("p",null,"\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u8bf7\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-spring-oauth2-password",target:"_blank",rel:"noopener"},"knife4j-spring-oauth2-password")),(0,a.kt)("p",null,"\u90e8\u5206\u793a\u4f8b\u4ee3\u7801\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Override\npublic void configure(ClientDetailsServiceConfigurer clients) throws Exception {\n //\u5bc6\u7801\u6a21\u5f0f\uff08resource owner password credentials\uff09\n clients.inMemory()\n .withClient("app1").secret(noOpPasswordEncoder.encode("123"))\n .authorizedGrantTypes("password")\n .scopes("read","write","reads","writes");\n}\n')),(0,a.kt)("p",null,"\u521b\u5efaDocket\u5bf9\u8c61\u65f6\uff0c\u8bbe\u7f6eOAuth2\u7684\u6388\u6743\u7c7b\u578b\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("admonition",{title:"\u67e5\u770b\u8be6\u7ec6\u4ee3\u7801",type:"tip"},(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Configuration\n@EnableSwagger2WebMvc\npublic class SwaggerConfig {\n\n @Bean\n public Docket productApi() {\n //schema\n List grantTypes=new ArrayList<>();\n //\u5bc6\u7801\u6a21\u5f0f\n String passwordTokenUrl="http://localhost:18010/oauth/token";\n ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl);\n grantTypes.add(resourceOwnerPasswordCredentialsGrant);\n OAuth oAuth=new OAuthBuilder().name("oauth2")\n .grantTypes(grantTypes).build();\n //context\n //scope\u65b9\u4f4d\n List scopes=new ArrayList<>();\n scopes.add(new AuthorizationScope("read","read resources"));\n scopes.add(new AuthorizationScope("write","write resources"));\n scopes.add(new AuthorizationScope("reads","read all resources"));\n scopes.add(new AuthorizationScope("writes","write all resources"));\n\n SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));\n SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));\n //schemas\n List securitySchemes=Lists.newArrayList(oAuth);\n //securyContext\n List securityContexts=Lists.newArrayList(securityContext);\n return new Docket(DocumentationType.SWAGGER_2)\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))\n .paths(PathSelectors.any())\n .build()\n .securityContexts(securityContexts)\n .securitySchemes(securitySchemes)\n .apiInfo(apiInfo());\n\n\n }\n\n\n\n private ApiInfo apiInfo() {\n return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")\n .termsOfServiceUrl("https://doc.xiaominfo.com")\n .contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))\n .license("Open Source")\n .licenseUrl("\\"https://www.apache.org/licenses/LICENSE-2.0")\n .version("1.0.0")\n .build();\n\n }\n\n\n}\n'))),(0,a.kt)("p",null,"\u6700\u7ec8\u5448\u73b0\u754c\u9762\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(76891).Z,width:"1357",height:"630"})),(0,a.kt)("p",null,"\u8f93\u5165username,password,clientId\u4ee5\u53caclientSecret,\u7136\u540e\u70b9\u51fbAuthorize\u6309\u94ae\u8fdb\u884c\u6388\u6743\u5373\u53ef"),(0,a.kt)("p",null,"\u6388\u6743\u5b8c\u6210\u540e\uff0c\u6d4b\u8bd5\u6211\u4eec\u518d\u6211\u4eec\u7684\u63a5\u53e3\u4e2d\uff0c\u5c31\u4f1a\u770b\u5230\u6211\u4eec\u7684\u53c2\u6570",(0,a.kt)("inlineCode",{parentName:"p"},"Authorization"),"\u503c\u5df2\u7ecf\u66f4\u65b0\u4e86\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(57252).Z,width:"1036",height:"369"})))}w.isMDXComponent=!0},57252:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/grantcode2-0df055d83ad8e8b8ac4615331aae0dea.png"},76891:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/password-abb96b81595f1deccc6aef451ff6a721.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2c68be2b.fbc2d0ad.js b/knife4j-doc/gitee/assets/js/2c68be2b.fbc2d0ad.js new file mode 100644 index 000000000..26d50a434 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2c68be2b.fbc2d0ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1320],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=s(n),m=a,g=c["".concat(p,".").concat(m)]||c[m]||k[m]||i;return n?r.createElement(g,l(l({ref:t},u),{},{components:n})):r.createElement(g,l({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>g,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),l=["components"],o={},p="v4.2.0\u7248\u672c-2023/07/31",s={unversionedId:"changelog/x/4.2",id:"changelog/x/4.2",title:"v4.2.0\u7248\u672c-2023/07/31",description:"\u5927\u5bb6\u597d\uff0cKnife4j v4.2.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a",source:"@site/docs/changelog/4.x/4.2.md",sourceDirName:"changelog/4.x",slug:"/changelog/x/4.2",permalink:"/docs/changelog/x/4.2",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1690884948,formattedLastUpdatedAt:"2023\u5e748\u67081\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"v4.1.0\u7248\u672c-2023/03/23",permalink:"/docs/changelog/x/4.1"},next:{title:"v4.3.0\u7248\u672c-2023/08/06",permalink:"/docs/changelog/x/4.3"}},u={},c=[{value:"\u66f4\u65b0\u65e5\u5fd7",id:"\u66f4\u65b0\u65e5\u5fd7",level:2},{value:"\u4f9d\u8d56\u5347\u7ea7",id:"\u4f9d\u8d56\u5347\u7ea7",level:3},{value:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6",id:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6",level:3},{value:"Ui\u66f4\u65b0",id:"ui\u66f4\u65b0",level:3},{value:"\u589e\u5f3a\u90e8\u5206",id:"\u589e\u5f3a\u90e8\u5206",level:3},{value:"\u611f\u8c22",id:"\u611f\u8c22",level:2}],k={toc:c},m="wrapper";function g(e){var t=e.components,n=(0,a.Z)(e,l);return(0,i.kt)(m,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v420\u7248\u672c-20230731"},"v4.2.0\u7248\u672c-2023/07/31"),(0,i.kt)("p",null,"\u5927\u5bb6\u597d\uff0cKnife4j v4.2.0\u7248\u672c\u53d1\u7248\uff0c\u672c\u6b21\u7248\u672c\u53d1\u7248\u4e3b\u8981\u89e3\u51b3\u95ee\u9898\uff1a"),(0,i.kt)("h2",{id:"\u66f4\u65b0\u65e5\u5fd7"},"\u66f4\u65b0\u65e5\u5fd7"),(0,i.kt)("h3",{id:"\u4f9d\u8d56\u5347\u7ea7"},"\u4f9d\u8d56\u5347\u7ea7"),(0,i.kt)("p",null,"1\u3001\u5347\u7ea7boot3\u7248\u672c\u4e3a3.0.7\u3001springdoc\u7248\u672c\u2023"),(0,i.kt)("p",null,"2\u3001springdoc\u7248\u672c\u5347\u7ea7\uff0c\u4e3b\u8981\u5305\u62ec\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u9488\u5bf9Spring Boot2\u7248\u672c\u7684\uff0c\u5347\u7ea7springdoc\u7248\u672c\u52301.7.0"),(0,i.kt)("li",{parentName:"ul"},"\u9488\u5bf9Spring Boot3\u7248\u672c\u7684\uff0c\u5347\u7ea7springdoc\u7248\u672c\u52302.1.0")),(0,i.kt)("h3",{id:"\u4f18\u5316knife4j-gateway\u7ec4\u4ef6"},"\u4f18\u5316",(0,i.kt)("inlineCode",{parentName:"h3"},"knife4j-gateway"),"\u7ec4\u4ef6"),(0,i.kt)("p",null,"1\u3001\u9488\u5bf9\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f(",(0,i.kt)("inlineCode",{parentName:"p"},"discover"),")\uff0c\u53ef\u4ee5\u52a8\u6001\u8bfb\u53d6\u670d\u52a1\u8f6c\u53d1\u8def\u7531\u914d\u7f6e\u524d\u7f00prefix\uff0c\u5f00\u53d1\u8005\u53ef\u4e0d\u7528\u5728\u72ec\u7acb\u914d\u7f6e\uff0c\u611f\u8c22",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/chenshifeng001",target:"_blank",rel:"noopener"},"\u5f53\u5e78\u798f\u78b0\u9519\u4e86\u5934"),"PR"),(0,i.kt)("p",null,"2\u3001\u652f\u6301\u9664",(0,i.kt)("inlineCode",{parentName:"p"},"default"),"\u9ed8\u8ba4\u5206\u7ec4\u5916\u7684\u591a\u5206\u7ec4\u7c7b\u578b\uff0c\u611f\u8c22",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiejinwei",target:"_blank",rel:"noopener"},"\u8c22\u8fdb\u4f1f"),"PR"),(0,i.kt)("p",null,"3\u3001\u9488\u5bf9\u5728Dubbo\u573a\u666f\u4e0b\u4f1a\u51fa\u73b0\u805a\u5408\u5404\u4e2aService\u7684\u573a\u666f\uff0c\u8be5\u7248\u672c\u63d0\u4f9b\u81ea\u52a8\u6392\u9664\u670d\u52a1\u7684\u6269\u5c55SPI\u63a5\u53e3\uff0c\u5f00\u53d1\u8005\u53ef\u96c6\u6210\u81ea\u52a8\u6269\u5c55\u5b9e\u73b0\u89c4\u5219\u8fdb\u884c\u805a\u5408\u670d\u52a1\u7684\u6392\u9664\uff0c\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I6YLMB",target:"_blank",rel:"noopener"},"Gitee#I6YLMB")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},'@Slf4j\n@Component\npublic class MyExcludeService implements GatewayServiceExcludeService {\n @Override\n public Set exclude(Environment environment, Knife4jGatewayProperties properties, List services) {\n log.info("\u81ea\u5b9a\u4e49\u8fc7\u6ee4\u5668.");\n if (!CollectionUtils.isEmpty(services)){\n // \u6392\u9664\u6ce8\u518c\u4e2d\u5fc3\u5305\u542border\u5b57\u773c\u7684\u670d\u52a1\n return services.stream().filter(s -> s.contains("order")).collect(Collectors.toSet());\n }\n return new TreeSet<>();\n }\n}\n')),(0,i.kt)("p",null,"4\u3001\u89e3\u51b3\u5728Nginx\u7b49\u4e8c\u7ea7\u4ee3\u7406\u8f6c\u53d1\u60c5\u51b5\u4e0b\u7684\u8def\u5f84\u9519\u8bef\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I73AOG",target:"_blank",rel:"noopener"},"Gitee#gitee"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/609",target:"_blank",rel:"noopener"},"GitHub#609"),"\u3001","[Gitee#I6KYUJ][https://gitee.com/xiaoym/knife4j/issues/I6KYUJ]","\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/603",target:"_blank",rel:"noopener"},"GitHub#603"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/586",target:"_blank",rel:"noopener"},"GitHub#586")),(0,i.kt)("p",null,"5\u3001\u589e\u52a0\u5bf9\u5b50\u670d\u52a1\u7684\u6392\u5e8f\u89c4\u5219\u8bbe\u7f6e\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n tags-sorter: alpha # \u63a5\u53e3\u6392\u5e8f\u89c4\u5219\n operations-sorter: alpha\n")),(0,i.kt)("p",null,"\u4e0d\u7ba1\u662ftag\u8fd8\u662foperation\uff0c\u6392\u5e8f\u89c4\u5219\u4e3b\u8981\u63d0\u4f9b\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"alpha\uff1a\u5b98\u65b9swagger-ui\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\u5b9e\u73b0\u3002"),(0,i.kt)("li",{parentName:"ul"},"order\uff1a",(0,i.kt)("em",{parentName:"li"},"nife4j\u63d0\u4f9b\u7684\u589e\u5f3a\u6392\u5e8f\u89c4\u5219\uff0c\u5f00\u53d1\u8005\u53ef\u5728\u5b50\u670d\u52a1\u4e2d\u6269\u5c55x-order\uff0c\u6839\u636e\u6570\u503c\u6765\u81ea\u5b9a\u4e49\u6392\u5e8f"))),(0,i.kt)("p",null,"6\u3001knife4j-gateway\u7ec4\u4ef6\u589e\u52a0basic\u9a8c\u8bc1GitHub#555"),(0,i.kt)("h3",{id:"ui\u66f4\u65b0"},"Ui\u66f4\u65b0"),(0,i.kt)("p",null,"1\u3001Script\u811a\u672c\u751f\u6210\u7684TypeScript\u4ee3\u7801\u589e\u52a0\u6ce8\u91ca",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I6T78E",target:"_blank",rel:"noopener"},"Gitee#I6T78E"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/568",target:"_blank",rel:"noopener"},"GitHub#568")),(0,i.kt)("p",null,"2\u3001OAS2\u65b0\u589eallof\u7279\u6027\u7684\u652f\u6301",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/pull/589",target:"_blank",rel:"noopener"},"Github#PR589")),(0,i.kt)("p",null,"3\u3001\u9488\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"jakarta"),"\u73af\u5883\u4e2dBasic\u7684\u5c5e\u6027\u63d0\u793a\u5df2\u7ecfmatch\u4f18\u5316",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/578",target:"_blank",rel:"noopener"},"GitHub#578")),(0,i.kt)("h3",{id:"\u589e\u5f3a\u90e8\u5206"},"\u589e\u5f3a\u90e8\u5206"),(0,i.kt)("p",null,"1\u3001openapi3\u89c4\u8303\u4e2d\u589e\u52a0\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"@ApiSupport"),"\u589e\u5f3a\u6ce8\u89e3\u7684\u652f\u6301",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I79WIJ",target:"_blank",rel:"noopener"},"Gitee#I79WIJ")),(0,i.kt)("p",null,"2\u3001Post\u53d1\u9001\u8bf7\u6c42query\u7684\u65b9\u5f0f\u4fee\u6539",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I7DNRP",target:"_blank",rel:"noopener"},"Gitee#I7DNRP")),(0,i.kt)("p",null,"3\u3001\u4f18\u5316\u57fa\u7840jar\u5305\u7684\u5f15\u7528\u5173\u7cfb\uff0clombok\u3001slf4j\u7b49jar\u5305\u7ea7\u522b\u6539\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"provided"),(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/knife4j/issues/591",target:"_blank",rel:"noopener"},"GitHub#591")),(0,i.kt)("h2",{id:"\u611f\u8c22"},"\u611f\u8c22"),(0,i.kt)("p",null,"\u975e\u5e38\u611f\u8c22\u4ee5\u4e0b\u5f00\u53d1\u8005\u7684PR\u8d21\u732e(\u6392\u540d\u4e0d\u5206\u5148\u540e)\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://gitee.com/chenshifeng001",target:"_blank",rel:"noopener"},"\u5f53\u5e78\u798f\u78b0\u9519\u4e86\u5934")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://gitee.com/xiejinwei",target:"_blank",rel:"noopener"},"\u8c22\u8fdb\u4f1f")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://gitee.com/sky-0914",target:"_blank",rel:"noopener"},"\u6700\u6015\u7684\u3001\u5176\u5b9e\u662f\u5b64\u5355\u3002\u3002\u3002")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://gitee.com/fengshi20102010",target:"_blank",rel:"noopener"},"fengshi20102010")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/zskzskabcd",target:"_blank",rel:"noopener"},"zskzskabcd")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/galaxy-sea",target:"_blank",rel:"noopener"},"\u5c0f\u9b4f,\u5c0f\u9b4f,\u6211\u4eec\u8981\u53bb\u54ea\u91cc\u5440")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/Pastor0370",target:"_blank",rel:"noopener"},"Pastors")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/King-Run",target:"_blank",rel:"noopener"},"King-Run")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/liuyd-cc",target:"_blank",rel:"noopener"},"liuyd-cc"))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2db28293.6eaaf174.js b/knife4j-doc/gitee/assets/js/2db28293.6eaaf174.js deleted file mode 100644 index 45950cf4f..000000000 --- a/knife4j-doc/gitee/assets/js/2db28293.6eaaf174.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2543],{3905:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>f});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),s=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},l=function(e){var r=s(e.components);return n.createElement(c.Provider,{value:r},e.children)},u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},g=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),g=s(t),f=a,m=g["".concat(c,".").concat(f)]||g[f]||u[f]||o;return t?n.createElement(m,i(i({ref:r},l),{},{components:t})):n.createElement(m,i({ref:r},l))}));function f(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=g;var p={};for(var c in r)hasOwnProperty.call(r,c)&&(p[c]=r[c]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var s=2;s{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>f,frontMatter:()=>p,metadata:()=>s,toc:()=>u});var n=t(87462),a=t(63366),o=(t(67294),t(3905)),i=["components"],p={},c='java.lang.NumberFormatException: For input string: ""',s={unversionedId:"faq/format-exception",id:"faq/format-exception",title:'java.lang.NumberFormatException: For input string: ""',description:'\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38java.lang.NumberFormatException ""',source:"@site/docs/faq/format-exception.md",sourceDirName:"faq",slug:"/faq/format-exception",permalink:"/docs/faq/format-exception",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604638019,formattedLastUpdatedAt:"2020\u5e7411\u67086\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"FAQ",permalink:"/docs/faq/"},next:{title:"FAQ",permalink:"/docs/faq/"}},l={},u=[],g={toc:u};function f(e){var r=e.components,t=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,n.Z)({},g,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"javalangnumberformatexception-for-input-string-"},'java.lang.NumberFormatException: For input string: ""'),(0,o.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38",(0,o.kt)("strong",{parentName:"p"},'java.lang.NumberFormatException: For input string: ""')),(0,o.kt)("p",null,"\u5f02\u5e38\u4fe1\u606f\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-properties"},'java.lang.NumberFormatException: For input string: ""\n at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_111]\n at java.lang.Long.parseLong(Long.java:601) ~[na:1.8.0_111]\n at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_111]\n at \n //more....\n')),(0,o.kt)("p",null,"\u89e3\u51b3\u529e\u6cd5\u662f\u5728pom.xml\u4e2d\u6392\u9664Springfox-Swagger\u7684Swagger-Models\u7684jar\u5305,\u91cd\u65b0\u5f15\u5165\uff0c\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\x3c!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --\x3e\n\n io.springfox\n springfox-swagger2\n 2.9.2\n \n \n io.swagger\n swagger-models\n \n \n\n\n\x3c!-- https://mvnrepository.com/artifact/io.swagger/swagger-models --\x3e\n\n io.swagger\n swagger-models\n 1.5.21\n\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/2db28293.8f59c964.js b/knife4j-doc/gitee/assets/js/2db28293.8f59c964.js new file mode 100644 index 000000000..3453dba19 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/2db28293.8f59c964.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2543],{3905:(e,r,t)=>{t.d(r,{Zo:()=>l,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),s=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},l=function(e){var r=s(e.components);return n.createElement(c.Provider,{value:r},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=s(t),f=a,m=u["".concat(c,".").concat(f)]||u[f]||g[f]||o;return t?n.createElement(m,i(i({ref:r},l),{},{components:t})):n.createElement(m,i({ref:r},l))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=f;var p={};for(var c in r)hasOwnProperty.call(r,c)&&(p[c]=r[c]);p.originalType=e,p[u]="string"==typeof e?e:a,i[1]=p;for(var s=2;s{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>m,frontMatter:()=>p,metadata:()=>s,toc:()=>u});var n=t(87462),a=t(63366),o=(t(67294),t(3905)),i=["components"],p={},c='java.lang.NumberFormatException: For input string: ""',s={unversionedId:"faq/format-exception",id:"faq/format-exception",title:'java.lang.NumberFormatException: For input string: ""',description:'\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38java.lang.NumberFormatException ""',source:"@site/docs/faq/format-exception.md",sourceDirName:"faq",slug:"/faq/format-exception",permalink:"/docs/faq/format-exception",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604638019,formattedLastUpdatedAt:"2020\u5e7411\u67086\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"FAQ",permalink:"/docs/faq/"},next:{title:"FAQ",permalink:"/docs/faq/"}},l={},u=[],g={toc:u},f="wrapper";function m(e){var r=e.components,t=(0,a.Z)(e,i);return(0,o.kt)(f,(0,n.Z)({},g,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"javalangnumberformatexception-for-input-string-"},'java.lang.NumberFormatException: For input string: ""'),(0,o.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u5728\u5347\u7ea7Springfox-Swagger\u52302.9.2\u7248\u672c\u540e\u4f1a\u78b0\u89c1NumberFormatException\u5f02\u5e38",(0,o.kt)("strong",{parentName:"p"},'java.lang.NumberFormatException: For input string: ""')),(0,o.kt)("p",null,"\u5f02\u5e38\u4fe1\u606f\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-properties"},'java.lang.NumberFormatException: For input string: ""\n at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_111]\n at java.lang.Long.parseLong(Long.java:601) ~[na:1.8.0_111]\n at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_111]\n at \n //more....\n')),(0,o.kt)("p",null,"\u89e3\u51b3\u529e\u6cd5\u662f\u5728pom.xml\u4e2d\u6392\u9664Springfox-Swagger\u7684Swagger-Models\u7684jar\u5305,\u91cd\u65b0\u5f15\u5165\uff0c\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\x3c!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --\x3e\n\n io.springfox\n springfox-swagger2\n 2.9.2\n \n \n io.swagger\n swagger-models\n \n \n\n\n\x3c!-- https://mvnrepository.com/artifact/io.swagger/swagger-models --\x3e\n\n io.swagger\n swagger-models\n 1.5.21\n\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/30703be1.1d7c05d8.js b/knife4j-doc/gitee/assets/js/30703be1.1d7c05d8.js deleted file mode 100644 index 788ec38d0..000000000 --- a/knife4j-doc/gitee/assets/js/30703be1.1d7c05d8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2204],{3905:(e,n,t)=>{t.d(n,{Zo:()=>k,kt:()=>m});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var u=a.createContext({}),s=function(e){var n=a.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},k=function(e){var n=s(e.components);return a.createElement(u.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,u=e.parentName,k=o(e,["components","mdxType","originalType","parentName"]),c=s(t),m=r,d=c["".concat(u,".").concat(m)]||c[m]||p[m]||i;return t?a.createElement(d,l(l({ref:n},k),{},{components:t})):a.createElement(d,l({ref:n},k))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=c;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var s=2;s{t.r(n),t.d(n,{assets:()=>k,contentTitle:()=>u,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=t(87462),r=t(63366),i=(t(67294),t(3905)),l=["components"],o={},u="4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6",s={unversionedId:"middleware-sources/knife4jAggregation",id:"middleware-sources/knife4jAggregation",title:"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6",description:"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea2.0.8\u7248\u672c\u5f00\u59cb\uff0cKnife4j",source:"@site/docs/middleware-sources/knife4jAggregation.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/knife4jAggregation",permalink:"/docs/middleware-sources/knife4jAggregation",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},k={},p=[{value:"4.2.1 \u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e",id:"421-\u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e",level:2},{value:"4.2.2 Disk\u6a21\u5f0f",id:"422-disk\u6a21\u5f0f",level:2},{value:"4.2.3 Cloud\u6a21\u5f0f",id:"423-cloud\u6a21\u5f0f",level:2},{value:"4.2.4 Eureka\u6a21\u5f0f",id:"424-eureka\u6a21\u5f0f",level:2},{value:"4.2.4 Nacos\u6a21\u5f0f",id:"424-nacos\u6a21\u5f0f",level:2}],c={toc:p};function m(e){var n=e.components,t=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"42-knife4jaggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6"},"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6"),(0,i.kt)("p",null,"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea",(0,i.kt)("inlineCode",{parentName:"p"},"2.0.8"),"\u7248\u672c\u5f00\u59cb\uff0cKnife4j\n\u63d0\u4f9b\u4e86",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-aggregation-spring-boot-starter"),"\u7ec4\u4ef6\uff0c\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Boot\u7cfb\u7edf\u7684starter\uff0c\u4ed6\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u80fd\u529b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u6700\u8f7b\u91cf\u7ea7\u3001\u6700\u7b80\u5355\u3001\u6700\u65b9\u4fbf\u7684\u805a\u5408OpenApi\u89c4\u8303\u7684\u4e2d\u95f4\u4ef6"),(0,i.kt)("li",{parentName:"ul"},"\u8ba9\u6240\u6709\u7684\u57fa\u4e8eSpring Boot\u7684Web\u4f53\u7cfb\u62e5\u6709\u4e86\u8f7b\u677e\u805a\u5408OpenApi\u7684\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9b4\u79cd\u6a21\u5f0f\u4f9b\u5f00\u53d1\u8005\u9009\u62e9",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u672c\u5730\u9759\u6001JSON\u6587\u4ef6\u7684\u65b9\u5f0f\u805a\u5408OpenAPI"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u4e91\u7aefHTTP\u63a5\u53e3\u7684\u65b9\u5f0f\u805a\u5408"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u65b9\u5f0f\u805a\u5408"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u65b9\u5f0f\u805a\u5408"))),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u8be5starter\u53d1\u5e03\u4e86Docker\u955c\u50cf\uff0c\u8de8\u5e73\u53f0\u4e0e\u8bed\u8a00\u8ba9\u5f00\u53d1\u8005\u57fa\u4e8e\u6b64Docker\u955c\u50cf\u8f7b\u677e\u8fdb\u884c\u805a\u5408OpenAPI\u89c4\u8303 "),(0,i.kt)("li",{parentName:"ul"},"\u5b8c\u7f8e\u517c\u5bb9\u6240\u6709Spring Boot\u7248\u672c\uff0c\u6ca1\u6709\u517c\u5bb9\u6027\u95ee\u9898"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u5f7b\u5e95\u653e\u5f03\u57fa\u4e8eZuul\u3001Spring Cloud Gateway\u7b49\u590d\u6742\u7684\u805a\u5408\u65b9\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u517c\u5bb9OpenAPI2\u89c4\u8303\u4ee5\u53caOpenAPI3\u89c4\u8303")),(0,i.kt)("p",null,"\u57fa\u4e8eSpring Boot\u5f15\u5165\u65b9\u5f0f"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"}," \n com.github.xiaoymin\n knife4j-aggregation-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93\u641c\u7d22aggregation\u6700\u65b0\u7248\u672c\u53f7--\x3e\n 2.0.8\n\n")),(0,i.kt)("p",null,"\u63a5\u4e0b\u6765\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8be5\u7ec4\u4ef6\u7684\u8bf4\u660e\u4ee5\u53ca\u4e0d\u540c\u7684\u805a\u5408\u65b9\u5f0f\u4ecb\u7ecd\n[","[toc]","]"),(0,i.kt)("h2",{id:"421-\u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e"},"4.2.1 \u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e"),(0,i.kt)("p",null,"\u65e2\u7136\u57fa\u4e8eSpring Boot\u7684starter\u7ec4\u4ef6\u53d1\u5e03\uff0c\u90a3\u4e48\u5fc5\u7136\u63d0\u4f9b\u4e86\u5f88\u591a\u5c5e\u6027\uff0c\u5b8c\u6574\u7684\u5c5e\u6027\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n cloud:\n enable: true\n routes:\n - name: \u7528\u6237\u4f53\u7cfb\n uri: 192.168.0.152:8999\n location: /v2/api-docs?group=2.X\u7248\u672c\n swaggerVersion: 2.0\n servicePath: /abbb/ffe\n routeAuth:\n enable: true\n username: test\n password: 12313\n routeAuth:\n enable: true\n username: test\n password: 12313\n eureka:\n enable: false\n serviceUrl: http://localhost:10000/eureka/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n nacos:\n enable: false\n serviceUrl: http://localhost:10000/nacos/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n disk:\n enable: false\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,i.kt)("p",null,"\u5c5e\u6027\u5206\u4e3a5\u4e2a\u65b9\u9762\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fKnife4jAggregation\u7ec4\u4ef6"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fDisk\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fCloud\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fEureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fNacos\u6a21\u5f0f")),(0,i.kt)("admonition",{title:"\u6ce8\u610f",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"Disk\u3001Cloud\u3001Eureka\u3001Nacos\u8fd9\u56db\u79cd\u6a21\u5f0f\u53ea\u80fd\u4f7f\u75281\u79cd\uff0c\u4e0d\u80fd\u6df7\u5408\u4e00\u8d77\u4f7f\u7528(\u5373\u53ea\u80fd\u914d\u7f6e\u8fd94\u4e2d\u6a21\u5f0f\u4e2d\u7684\u4e00\u79cd\u5c5e\u6027\uff0c\u7136\u540e\u5c06\u5176",(0,i.kt)("inlineCode",{parentName:"p"},"enable"),"\u5c5e\u6027\u8bbe\u7f6e\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"true"),",\u5176\u4ed6\u4e09\u79cd\u7684enable\u5219\u5fc5\u987b\u8bbe\u7f6e\u4e3afalse)")),(0,i.kt)("p",null,"\u5f00\u542f\u805a\u5408\u7ec4\u4ef6"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.enableAggregation"),":\u8be5\u5c5e\u6027\u662f\u524d\u63d0\u6761\u4ef6\uff0c\u5982\u679c\u8981\u542f\u7528\u805a\u5408\uff0c\u90a3\u4e48\u8be5\u5c5e\u6027\u5fc5\u987b\u8bbe\u7f6e\u4e3atrue")),(0,i.kt)("h2",{id:"422-disk\u6a21\u5f0f"},"4.2.2 Disk\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-disk",target:null,rel:null},"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Disk\u6a21\u5f0f\u4ee3\u8868\u7684\u662f\u672c\u5730\u6a21\u5f0f\uff0c\u5f00\u53d1\u8005\u672c\u5730\u5b58\u5728\u4e00\u4e2a\u6216\u591a\u4e2aOpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\uff0c\u6b64\u65f6\u53ef\u4ee5\u901a\u8fc7Knife4j\u7684\u805a\u5408\u7ec4\u4ef6\u5c06\u8be5OpenAPI\u89c4\u8303\u89e3\u6790\u5e76\u6e32\u67d3")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n disk:\n enable: true\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Disk\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes.location"),":\u672c\u5730Disk\u6a21\u5f0f\u805a\u5408\u7684OpenAPI\u89c4\u8303JSON\u6587\u4ef6,\u53ef\u4ee5\u662fV2\u4e5f\u53ef\u4ee5\u662fV3\u7248\u672c")),(0,i.kt)("h2",{id:"423-cloud\u6a21\u5f0f"},"4.2.3 Cloud\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-cloud",target:null,rel:null},"\u57fa\u4e8eCloud\u6a21\u5f0f\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u53d6\u540dCloud\u6a21\u5f0f\u4ee3\u8868\u7684\u662f\u5f00\u53d1\u8005\u7684OpenAPI\u89c4\u8303\u662f\u4ee5HTTP\u63a5\u53e3\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u914d\u7f6e\u901a\u8fc7\u8c03\u7528HTTP\u63a5\u53e3\u6765\u83b7\u53d6OpenAPI\u89c4\u8303"),(0,i.kt)("pre",{parentName:"blockquote"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n cloud:\n enable: true\n routes:\n - name: \u7528\u6237\u4f53\u7cfb\n uri: 192.168.0.152:8999\n location: /v2/api-docs?group=2.X\u7248\u672c\n swaggerVersion: 2.0\n servicePath: /abbb/ffe\n routeAuth:\n enable: true\n username: test3\n password: 66666\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",{parentName:"blockquote"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Cloud\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684HTTP\u63a5\u53e3\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.password"),":Basic\u5bc6\u7801"))),(0,i.kt)("h2",{id:"424-eureka\u6a21\u5f0f"},"4.2.4 Eureka\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n eureka:\n enable: false\n serviceUrl: http://localhost:10000/eureka/\n serviceAuth:\n enable: false\n username: test\n password: 12313\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Eureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceUrl"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679cEureka\u7684\u6ce8\u518c\u548c\u83b7\u53d6\u670d\u52a1\u9700\u8981\u8fdb\u884cBasic\u8ba4\u8bc1\uff0c\u5f00\u53d1\u8005\u9700\u8981\u914d\u7f6e\u8be5\u5c5e\u6027"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.enable"),":\u662f\u5426\u542f\u7528Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.usernae"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.password"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.serviceName"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.password"),":Basic\u5bc6\u7801")),(0,i.kt)("h2",{id:"424-nacos\u6a21\u5f0f"},"4.2.4 Nacos\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-nacos",target:null,rel:null},"\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceNacos\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n nacos:\n enable: true\n serviceUrl: http://192.168.0.112:8804/nacos/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n groupName: test\n namespaceId: test\n clusters: test\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528nacos\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.serviceUrl"),":nacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.serviceName"),":nacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.groupName"),":Nacos\u5206\u7ec4\u540d\u79f0,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.namespaceId"),":\u547d\u540d\u7a7a\u95f4id,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.clusters"),":\u96c6\u7fa4\u540d\u79f0,\u591a\u4e2a\u96c6\u7fa4\u7528\u9017\u53f7\u5206\u9694,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.password"),":Basic\u5bc6\u7801")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/30703be1.ffd6e114.js b/knife4j-doc/gitee/assets/js/30703be1.ffd6e114.js new file mode 100644 index 000000000..1329ee288 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/30703be1.ffd6e114.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2204],{3905:(e,n,t)=>{t.d(n,{Zo:()=>k,kt:()=>d});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var u=a.createContext({}),s=function(e){var n=a.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},k=function(e){var n=s(e.components);return a.createElement(u.Provider,{value:n},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},m=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,u=e.parentName,k=o(e,["components","mdxType","originalType","parentName"]),p=s(t),m=r,d=p["".concat(u,".").concat(m)]||p[m]||c[m]||i;return t?a.createElement(d,l(l({ref:n},k),{},{components:t})):a.createElement(d,l({ref:n},k))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=m;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o[p]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{t.r(n),t.d(n,{assets:()=>k,contentTitle:()=>u,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var a=t(87462),r=t(63366),i=(t(67294),t(3905)),l=["components"],o={},u="4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6",s={unversionedId:"middleware-sources/knife4jAggregation",id:"middleware-sources/knife4jAggregation",title:"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6",description:"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea2.0.8\u7248\u672c\u5f00\u59cb\uff0cKnife4j",source:"@site/docs/middleware-sources/knife4jAggregation.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/knife4jAggregation",permalink:"/docs/middleware-sources/knife4jAggregation",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},k={},p=[{value:"4.2.1 \u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e",id:"421-\u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e",level:2},{value:"4.2.2 Disk\u6a21\u5f0f",id:"422-disk\u6a21\u5f0f",level:2},{value:"4.2.3 Cloud\u6a21\u5f0f",id:"423-cloud\u6a21\u5f0f",level:2},{value:"4.2.4 Eureka\u6a21\u5f0f",id:"424-eureka\u6a21\u5f0f",level:2},{value:"4.2.4 Nacos\u6a21\u5f0f",id:"424-nacos\u6a21\u5f0f",level:2}],c={toc:p},m="wrapper";function d(e){var n=e.components,t=(0,r.Z)(e,l);return(0,i.kt)(m,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"42-knife4jaggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6"},"4.2 Knife4jAggregation\u5fae\u670d\u52a1\u805a\u5408\u4e2d\u95f4\u4ef6"),(0,i.kt)("p",null,"Knife4j\u4e00\u76f4\u81f4\u529b\u4e8e\u5c06\u76ee\u524d\u7684Ui\u63d0\u4f9b\u7ed9\u66f4\u591a\u7684\u5e73\u53f0\u6216\u8005\u522b\u7684\u8bed\u8a00\u4f7f\u7528\u800c\u52aa\u529b\uff0c\u7ecf\u8fc7\u8fd9\u4e48\u957f\u65f6\u95f4\u7684\u53d1\u5c55\uff0cKnife4j\u63d0\u4f9b\u7684\u8f7b\u91cf\u7ea7\u805a\u5408\u4e2d\u95f4\u4ef6\u7ec8\u4e8e\u8bde\u751f\u4e86\uff0c\u81ea",(0,i.kt)("inlineCode",{parentName:"p"},"2.0.8"),"\u7248\u672c\u5f00\u59cb\uff0cKnife4j\n\u63d0\u4f9b\u4e86",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-aggregation-spring-boot-starter"),"\u7ec4\u4ef6\uff0c\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u57fa\u4e8eSpring Boot\u7cfb\u7edf\u7684starter\uff0c\u4ed6\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u80fd\u529b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u6700\u8f7b\u91cf\u7ea7\u3001\u6700\u7b80\u5355\u3001\u6700\u65b9\u4fbf\u7684\u805a\u5408OpenApi\u89c4\u8303\u7684\u4e2d\u95f4\u4ef6"),(0,i.kt)("li",{parentName:"ul"},"\u8ba9\u6240\u6709\u7684\u57fa\u4e8eSpring Boot\u7684Web\u4f53\u7cfb\u62e5\u6709\u4e86\u8f7b\u677e\u805a\u5408OpenApi\u7684\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9b4\u79cd\u6a21\u5f0f\u4f9b\u5f00\u53d1\u8005\u9009\u62e9",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u672c\u5730\u9759\u6001JSON\u6587\u4ef6\u7684\u65b9\u5f0f\u805a\u5408OpenAPI"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u4e91\u7aefHTTP\u63a5\u53e3\u7684\u65b9\u5f0f\u805a\u5408"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u65b9\u5f0f\u805a\u5408"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u65b9\u5f0f\u805a\u5408"))),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u8be5starter\u53d1\u5e03\u4e86Docker\u955c\u50cf\uff0c\u8de8\u5e73\u53f0\u4e0e\u8bed\u8a00\u8ba9\u5f00\u53d1\u8005\u57fa\u4e8e\u6b64Docker\u955c\u50cf\u8f7b\u677e\u8fdb\u884c\u805a\u5408OpenAPI\u89c4\u8303 "),(0,i.kt)("li",{parentName:"ul"},"\u5b8c\u7f8e\u517c\u5bb9\u6240\u6709Spring Boot\u7248\u672c\uff0c\u6ca1\u6709\u517c\u5bb9\u6027\u95ee\u9898"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u5f7b\u5e95\u653e\u5f03\u57fa\u4e8eZuul\u3001Spring Cloud Gateway\u7b49\u590d\u6742\u7684\u805a\u5408\u65b9\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u517c\u5bb9OpenAPI2\u89c4\u8303\u4ee5\u53caOpenAPI3\u89c4\u8303")),(0,i.kt)("p",null,"\u57fa\u4e8eSpring Boot\u5f15\u5165\u65b9\u5f0f"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"}," \n com.github.xiaoymin\n knife4j-aggregation-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93\u641c\u7d22aggregation\u6700\u65b0\u7248\u672c\u53f7--\x3e\n 2.0.8\n\n")),(0,i.kt)("p",null,"\u63a5\u4e0b\u6765\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8be5\u7ec4\u4ef6\u7684\u8bf4\u660e\u4ee5\u53ca\u4e0d\u540c\u7684\u805a\u5408\u65b9\u5f0f\u4ecb\u7ecd\n[","[toc]","]"),(0,i.kt)("h2",{id:"421-\u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e"},"4.2.1 \u7ec4\u4ef6\u5c5e\u6027\u8bf4\u660e"),(0,i.kt)("p",null,"\u65e2\u7136\u57fa\u4e8eSpring Boot\u7684starter\u7ec4\u4ef6\u53d1\u5e03\uff0c\u90a3\u4e48\u5fc5\u7136\u63d0\u4f9b\u4e86\u5f88\u591a\u5c5e\u6027\uff0c\u5b8c\u6574\u7684\u5c5e\u6027\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n cloud:\n enable: true\n routes:\n - name: \u7528\u6237\u4f53\u7cfb\n uri: 192.168.0.152:8999\n location: /v2/api-docs?group=2.X\u7248\u672c\n swaggerVersion: 2.0\n servicePath: /abbb/ffe\n routeAuth:\n enable: true\n username: test\n password: 12313\n routeAuth:\n enable: true\n username: test\n password: 12313\n eureka:\n enable: false\n serviceUrl: http://localhost:10000/eureka/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n nacos:\n enable: false\n serviceUrl: http://localhost:10000/nacos/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n disk:\n enable: false\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,i.kt)("p",null,"\u5c5e\u6027\u5206\u4e3a5\u4e2a\u65b9\u9762\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fKnife4jAggregation\u7ec4\u4ef6"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fDisk\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fCloud\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fEureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},"\u5f00\u542fNacos\u6a21\u5f0f")),(0,i.kt)("admonition",{title:"\u6ce8\u610f",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"Disk\u3001Cloud\u3001Eureka\u3001Nacos\u8fd9\u56db\u79cd\u6a21\u5f0f\u53ea\u80fd\u4f7f\u75281\u79cd\uff0c\u4e0d\u80fd\u6df7\u5408\u4e00\u8d77\u4f7f\u7528(\u5373\u53ea\u80fd\u914d\u7f6e\u8fd94\u4e2d\u6a21\u5f0f\u4e2d\u7684\u4e00\u79cd\u5c5e\u6027\uff0c\u7136\u540e\u5c06\u5176",(0,i.kt)("inlineCode",{parentName:"p"},"enable"),"\u5c5e\u6027\u8bbe\u7f6e\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"true"),",\u5176\u4ed6\u4e09\u79cd\u7684enable\u5219\u5fc5\u987b\u8bbe\u7f6e\u4e3afalse)")),(0,i.kt)("p",null,"\u5f00\u542f\u805a\u5408\u7ec4\u4ef6"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.enableAggregation"),":\u8be5\u5c5e\u6027\u662f\u524d\u63d0\u6761\u4ef6\uff0c\u5982\u679c\u8981\u542f\u7528\u805a\u5408\uff0c\u90a3\u4e48\u8be5\u5c5e\u6027\u5fc5\u987b\u8bbe\u7f6e\u4e3atrue")),(0,i.kt)("h2",{id:"422-disk\u6a21\u5f0f"},"4.2.2 Disk\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-disk",target:null,rel:null},"\u57fa\u4e8eDisk\u6a21\u5f0f\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Disk\u6a21\u5f0f\u4ee3\u8868\u7684\u662f\u672c\u5730\u6a21\u5f0f\uff0c\u5f00\u53d1\u8005\u672c\u5730\u5b58\u5728\u4e00\u4e2a\u6216\u591a\u4e2aOpenAPI\u89c4\u8303\u7684JSON\u6587\u4ef6\uff0c\u6b64\u65f6\u53ef\u4ee5\u901a\u8fc7Knife4j\u7684\u805a\u5408\u7ec4\u4ef6\u5c06\u8be5OpenAPI\u89c4\u8303\u89e3\u6790\u5e76\u6e32\u67d3")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n disk:\n enable: true\n routes:\n - name: \u7528\u6237\n location: classpath:openapi/user.json\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Disk\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.disk.routes.location"),":\u672c\u5730Disk\u6a21\u5f0f\u805a\u5408\u7684OpenAPI\u89c4\u8303JSON\u6587\u4ef6,\u53ef\u4ee5\u662fV2\u4e5f\u53ef\u4ee5\u662fV3\u7248\u672c")),(0,i.kt)("h2",{id:"423-cloud\u6a21\u5f0f"},"4.2.3 Cloud\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-cloud",target:null,rel:null},"\u57fa\u4e8eCloud\u6a21\u5f0f\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u53d6\u540dCloud\u6a21\u5f0f\u4ee3\u8868\u7684\u662f\u5f00\u53d1\u8005\u7684OpenAPI\u89c4\u8303\u662f\u4ee5HTTP\u63a5\u53e3\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u914d\u7f6e\u901a\u8fc7\u8c03\u7528HTTP\u63a5\u53e3\u6765\u83b7\u53d6OpenAPI\u89c4\u8303"),(0,i.kt)("pre",{parentName:"blockquote"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n cloud:\n enable: true\n routes:\n - name: \u7528\u6237\u4f53\u7cfb\n uri: 192.168.0.152:8999\n location: /v2/api-docs?group=2.X\u7248\u672c\n swaggerVersion: 2.0\n servicePath: /abbb/ffe\n routeAuth:\n enable: true\n username: test3\n password: 66666\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",{parentName:"blockquote"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Cloud\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684HTTP\u63a5\u53e3\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.cloud.routes.routeAuth.password"),":Basic\u5bc6\u7801"))),(0,i.kt)("h2",{id:"424-eureka\u6a21\u5f0f"},"4.2.4 Eureka\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n eureka:\n enable: false\n serviceUrl: http://localhost:10000/eureka/\n serviceAuth:\n enable: false\n username: test\n password: 12313\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Eureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceUrl"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679cEureka\u7684\u6ce8\u518c\u548c\u83b7\u53d6\u670d\u52a1\u9700\u8981\u8fdb\u884cBasic\u8ba4\u8bc1\uff0c\u5f00\u53d1\u8005\u9700\u8981\u914d\u7f6e\u8be5\u5c5e\u6027"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.enable"),":\u662f\u5426\u542f\u7528Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.usernae"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.serviceAuth.password"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.serviceName"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.routeAuth.password"),":Basic\u5bc6\u7801")),(0,i.kt)("h2",{id:"424-nacos\u6a21\u5f0f"},"4.2.4 Nacos\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-nacos",target:null,rel:null},"\u57fa\u4e8eNacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceNacos\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enableAggregation: true\n nacos:\n enable: true\n serviceUrl: http://192.168.0.112:8804/nacos/\n routeAuth:\n enable: true\n username: test\n password: 12313\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n serviceName: service-order\n groupName: test\n namespaceId: test\n clusters: test\n location: /v2/api-docs?group=default\n swaggerVersion: 2.0\n servicePath: /order\n routeAuth:\n enable: true\n username: test\n password: 12313\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528nacos\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.serviceUrl"),":nacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routeAuth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.serviceName"),":nacos\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.groupName"),":Nacos\u5206\u7ec4\u540d\u79f0,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.namespaceId"),":\u547d\u540d\u7a7a\u95f4id,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.clusters"),":\u96c6\u7fa4\u540d\u79f0,\u591a\u4e2a\u96c6\u7fa4\u7528\u9017\u53f7\u5206\u9694,\u975e\u5fc5\u987b,\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.swaggerVersion"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.servicePath"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.nacos.routes.routeAuth.password"),":Basic\u5bc6\u7801")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/30f3b322.642e7cd1.js b/knife4j-doc/gitee/assets/js/30f3b322.642e7cd1.js deleted file mode 100644 index 2a65999f7..000000000 --- a/knife4j-doc/gitee/assets/js/30f3b322.642e7cd1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8335],{3905:(e,n,t)=>{t.d(n,{Zo:()=>m,kt:()=>d});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=a.createContext({}),u=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},m=function(e){var n=u(e.components);return a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=u(t),d=r,k=c["".concat(p,".").concat(d)]||c[d]||s[d]||l;return t?a.createElement(k,i(i({ref:n},m),{},{components:t})):a.createElement(k,i({ref:n},m))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=c;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var u=2;u{t.r(n),t.d(n,{assets:()=>m,contentTitle:()=>p,default:()=>d,frontMatter:()=>o,metadata:()=>u,toc:()=>s});var a=t(87462),r=t(63366),l=(t(67294),t(3905)),i=["components"],o={},p="\u90e8\u7f72\u624b\u518c",u={unversionedId:"solution/knife4j-admin-deploy",id:"solution/knife4j-admin-deploy",title:"\u90e8\u7f72\u624b\u518c",description:"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72",source:"@site/docs/solution/knife4j-admin-deploy.md",sourceDirName:"solution",slug:"/solution/knife4j-admin-deploy",permalink:"/docs/solution/knife4j-admin-deploy",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},m={},s=[{value:"\u5b89\u88c5Nginx",id:"\u5b89\u88c5nginx",level:2},{value:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248",id:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248",level:2},{value:"\u5b89\u88c5\u90e8\u7f72",id:"\u5b89\u88c5\u90e8\u7f72",level:2},{value:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",id:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",level:3},{value:"\u542f\u52a8\u7a0b\u5e8f",id:"\u542f\u52a8\u7a0b\u5e8f",level:3},{value:"\u914d\u7f6eNginx",id:"\u914d\u7f6enginx",level:3},{value:"\u542f\u52a8Nginx",id:"\u542f\u52a8nginx",level:3}],c={toc:s};function d(e){var n=e.components,t=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u90e8\u7f72\u624b\u518c"},"\u90e8\u7f72\u624b\u518c"),(0,l.kt)("p",null,"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72"),(0,l.kt)("p",null,"java\u73af\u5883"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'[root@iZbt ~]# java -version\njava version "1.8.0_144"\nJava(TM) SE Runtime Environment (build 1.8.0_144-b01)\nJava HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)\n')),(0,l.kt)("p",null,"Linux:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@iZbt ~]# lsb_release -a\nLSB Version: :core-4.1-amd64:core-4.1-noarch\nDistributor ID: CentOS\nDescription: CentOS Linux release 7.4.1708 (Core) \nRelease: 7.4.1708\nCodename: Core\n")),(0,l.kt)("h2",{id:"\u5b89\u88c5nginx"},"\u5b89\u88c5Nginx"),(0,l.kt)("p",null,"\u670d\u52a1\u7aef\u5fc5\u987b\u5b89\u88c5Nginx\uff0c\u5177\u4f53\u7684\u5b89\u88c5\u6559\u7a0b\u53ef\u4ee5\u81ea\u884c\u641c\u7d22,\u8fd9\u91cc\u4e0d\u518d\u8bf4\u660e."),(0,l.kt)("h2",{id:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248"},"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248"),(0,l.kt)("p",null,"\u524d\u5f80",(0,l.kt)("a",{parentName:"p",href:"knife4j-admin-download",target:null,rel:null},"\u53d1\u884c\u7248\u5730\u5740"),"\u8fdb\u884c\u4e0b\u8f7d"),(0,l.kt)("p",null,"\u53d1\u884c\u7248\u4e00\u822c\u662f\u4ee5zip\u538b\u7f29\u5305\u5f62\u5f0f\u8fdb\u884c\u53d1\u5e03,\u538b\u7f29\u5305\u4e2d\u5305\u542bjar\u53ef\u8fd0\u884c\u6587\u4ef6\u4ee5\u53ca\u4e00\u4e2afront\u7684\u524d\u7aef\u6587\u4ef6"),(0,l.kt)("h2",{id:"\u5b89\u88c5\u90e8\u7f72"},"\u5b89\u88c5\u90e8\u7f72"),(0,l.kt)("p",null,"\u5047\u8bbe\u90e8\u7f72\u8def\u5f84\u5728\u670d\u52a1\u5668\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"/mnt/application/kadmin"),"\u76ee\u5f55\u4e0b"),(0,l.kt)("p",null,"\u6587\u4ef6\u7684\u6574\u4f53\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"|-kadmin\n|----data //\u6570\u636e\u76ee\u5f55,\u53ef\u4ee5\u4e3a\u7a7a,\u5728\u90e8\u7f72\u65f6\u8be5\u76ee\u5f55\u5fc5\u987b\u5148\u624b\u5de5\u521b\u5efa\n|----front //\u7531zip\u5305\u89e3\u538b\u5f97\u5230\n|----logs //\u7a0b\u5e8f\u7684\u65e5\u5fd7\u76ee\u5f55,\u5728\u90e8\u7f72\u65f6\u8be5\u76ee\u5f55\u5fc5\u987b\u5148\u624b\u5de5\u521b\u5efa\n|----startup.sh //\u542f\u52a8\u811a\u672c,\u5fc5\u987b\u4f7f\u7528chmod+x startup.sh \u547d\u4ee4\u8d4b\u4e88\u53ef\u6267\u884c\u6743\u9650\n|----knife4j-admin-1.0.jar //\u7531zip\u5305\u89e3\u538b\u5f97\u5230\n")),(0,l.kt)("h3",{id:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6"},"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,"\u5728knife4j-admin\u7a0b\u5e8f\u4e2d,\u5982\u679c\u4f60\u7684\u90e8\u7f72\u76ee\u5f55\u4e0d\u662f",(0,l.kt)("inlineCode",{parentName:"p"},"/mnt/application/kadmin"),"\uff0c\u90a3\u4e48\u9700\u8981\u4fee\u6539jar\u5305\u4e2d\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"application-prod.yml"),"\u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"application-prod.yml"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n# \u7aef\u53e3\u53f7\n port: 17808 \nknife4j:\n # \u76d1\u542c\u9879\u76ee\u76ee\u5f55 \n monitor: /mnt/application/kadmin/data \n")),(0,l.kt)("p",null,"\u5fc5\u987b\u4fee\u6539",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j.monitor"),"\u4e2d\u7684\u76d1\u6d4b\u76ee\u5f55,\u8be5\u76ee\u5f55\u662f\u53ef\u4ee5\u7531\u5f00\u53d1\u8005\u81ea\u884c\u66f4\u6539,\u66f4\u6539\u540e\u5728\u66ff\u6362jar\u5305\u4e2d\u7684\u6587\u4ef6\u5373\u53ef"),(0,l.kt)("p",null,"\u5f53\u7136,\u7a0b\u5e8f\u7684\u7aef\u53e3\u53f7\u5f00\u53d1\u8005\u4e5f\u53ef\u81ea\u884c\u66f4\u6539"),(0,l.kt)("h3",{id:"\u542f\u52a8\u7a0b\u5e8f"},"\u542f\u52a8\u7a0b\u5e8f"),(0,l.kt)("p",null,"knife4j-admin\u63d0\u4f9b\u7684\u662f\u4e00\u4e2aSpring Boot\u7684\u53ef\u6267\u884cjar\u5305,\u56e0\u6b64,",(0,l.kt)("inlineCode",{parentName:"p"},"startup.sh"),"\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"nohup java -Xms512m -Xmx512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:MaxNewSize=256m -jar /mnt/application/kadmin/knife4j-admin-1.0.jar >> /dev/null 2>&1 &\n")),(0,l.kt)("p",null,"\u901a\u8fc7Linux\u7ec8\u7aef\u6267\u884c\u547d\u4ee4\u8fdb\u884c\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# ./startup.sh\n")),(0,l.kt)("h3",{id:"\u914d\u7f6enginx"},"\u914d\u7f6eNginx"),(0,l.kt)("p",null,"\u5f53\u6211\u4eec\u7684\u540e\u53f0\u670d\u52a1\u542f\u52a8\u597d\u4e4b\u540e,\u6211\u4eec\u8fd8\u9700\u8981\u914d\u7f6e\u4e00\u4e2a\u5bf9\u5916\u7684Nginx\u7aef\u53e3"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"kadmin.conf"),"\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-nginx"},"server {\n listen 80;\n server_name kadmin.xiaominfo.com;\n # \u540e\u53f0\u670d\u52a1\n location / {\n proxy_pass http://127.0.0.1:17808;\n client_max_body_size 300m;\n }\n # \u524d\u7aef\u6587\u4ef6\n location ~*^.+\\.(icon|gif|jpg|jpeg|png|html|css|js|txt|xml|swf|wav)$ {\n root /mnt/application/kadmin/front;\n }\n\n}\n")),(0,l.kt)("p",null,"\u6b64Nginx\u7684\u914d\u7f6e\u662f\u76ee\u524dknife4j\u63d0\u4f9b\u7684\u6d4b\u8bd5\u5730\u5740,\u5f00\u53d1\u8005\u5982\u679c\u6ca1\u6709\u57df\u540d,\u53ef\u4ee5\u81ea\u884c\u4f7f\u7528\u7aef\u53e3\u53f7\u7b49\u8fdb\u884c\u914d\u7f6e\u5373\u53ef"),(0,l.kt)("h3",{id:"\u542f\u52a8nginx"},"\u542f\u52a8Nginx"),(0,l.kt)("p",null,"Nginx\u7684\u73af\u5883\u914d\u7f6e\u597d\u540e,\u542f\u52a8Nginx\u5373\u53ef"),(0,l.kt)("p",null,"\u670d\u52a1\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# service nginx start\n")),(0,l.kt)("p",null,"\u5982\u679cNginx\u672a\u5b89\u88c5\u6210\u7cfb\u7edf\u670d\u52a1,\u5219\u53ef\u4ee5\u547d\u4ee4\u884c\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# cd /usr/local/nginx\n[root@izbt nginx]# sbin/nginx\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/30f3b322.dfe42544.js b/knife4j-doc/gitee/assets/js/30f3b322.dfe42544.js new file mode 100644 index 000000000..1cee1fbb1 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/30f3b322.dfe42544.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8335],{3905:(e,n,t)=>{t.d(n,{Zo:()=>m,kt:()=>k});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=a.createContext({}),u=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},m=function(e){var n=u(e.components);return a.createElement(p.Provider,{value:n},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),s=u(t),d=r,k=s["".concat(p,".").concat(d)]||s[d]||c[d]||l;return t?a.createElement(k,i(i({ref:n},m),{},{components:t})):a.createElement(k,i({ref:n},m))}));function k(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=d;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o[s]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{t.r(n),t.d(n,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>o,metadata:()=>u,toc:()=>s});var a=t(87462),r=t(63366),l=(t(67294),t(3905)),i=["components"],o={},p="\u90e8\u7f72\u624b\u518c",u={unversionedId:"solution/knife4j-admin-deploy",id:"solution/knife4j-admin-deploy",title:"\u90e8\u7f72\u624b\u518c",description:"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72",source:"@site/docs/solution/knife4j-admin-deploy.md",sourceDirName:"solution",slug:"/solution/knife4j-admin-deploy",permalink:"/docs/solution/knife4j-admin-deploy",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},m={},s=[{value:"\u5b89\u88c5Nginx",id:"\u5b89\u88c5nginx",level:2},{value:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248",id:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248",level:2},{value:"\u5b89\u88c5\u90e8\u7f72",id:"\u5b89\u88c5\u90e8\u7f72",level:2},{value:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",id:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6",level:3},{value:"\u542f\u52a8\u7a0b\u5e8f",id:"\u542f\u52a8\u7a0b\u5e8f",level:3},{value:"\u914d\u7f6eNginx",id:"\u914d\u7f6enginx",level:3},{value:"\u542f\u52a8Nginx",id:"\u542f\u52a8nginx",level:3}],c={toc:s},d="wrapper";function k(e){var n=e.components,t=(0,r.Z)(e,i);return(0,l.kt)(d,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u90e8\u7f72\u624b\u518c"},"\u90e8\u7f72\u624b\u518c"),(0,l.kt)("p",null,"knife4j-admin\u91c7\u7528\u524d\u540e\u7aef\u5206\u79bb\u7684\u65b9\u5f0f\u8fdb\u884c\u90e8\u7f72"),(0,l.kt)("p",null,"java\u73af\u5883"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},'[root@iZbt ~]# java -version\njava version "1.8.0_144"\nJava(TM) SE Runtime Environment (build 1.8.0_144-b01)\nJava HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)\n')),(0,l.kt)("p",null,"Linux:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@iZbt ~]# lsb_release -a\nLSB Version: :core-4.1-amd64:core-4.1-noarch\nDistributor ID: CentOS\nDescription: CentOS Linux release 7.4.1708 (Core) \nRelease: 7.4.1708\nCodename: Core\n")),(0,l.kt)("h2",{id:"\u5b89\u88c5nginx"},"\u5b89\u88c5Nginx"),(0,l.kt)("p",null,"\u670d\u52a1\u7aef\u5fc5\u987b\u5b89\u88c5Nginx\uff0c\u5177\u4f53\u7684\u5b89\u88c5\u6559\u7a0b\u53ef\u4ee5\u81ea\u884c\u641c\u7d22,\u8fd9\u91cc\u4e0d\u518d\u8bf4\u660e."),(0,l.kt)("h2",{id:"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248"},"\u4e0b\u8f7d\u6700\u65b0\u53d1\u884c\u7248"),(0,l.kt)("p",null,"\u524d\u5f80",(0,l.kt)("a",{parentName:"p",href:"knife4j-admin-download",target:null,rel:null},"\u53d1\u884c\u7248\u5730\u5740"),"\u8fdb\u884c\u4e0b\u8f7d"),(0,l.kt)("p",null,"\u53d1\u884c\u7248\u4e00\u822c\u662f\u4ee5zip\u538b\u7f29\u5305\u5f62\u5f0f\u8fdb\u884c\u53d1\u5e03,\u538b\u7f29\u5305\u4e2d\u5305\u542bjar\u53ef\u8fd0\u884c\u6587\u4ef6\u4ee5\u53ca\u4e00\u4e2afront\u7684\u524d\u7aef\u6587\u4ef6"),(0,l.kt)("h2",{id:"\u5b89\u88c5\u90e8\u7f72"},"\u5b89\u88c5\u90e8\u7f72"),(0,l.kt)("p",null,"\u5047\u8bbe\u90e8\u7f72\u8def\u5f84\u5728\u670d\u52a1\u5668\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"/mnt/application/kadmin"),"\u76ee\u5f55\u4e0b"),(0,l.kt)("p",null,"\u6587\u4ef6\u7684\u6574\u4f53\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"|-kadmin\n|----data //\u6570\u636e\u76ee\u5f55,\u53ef\u4ee5\u4e3a\u7a7a,\u5728\u90e8\u7f72\u65f6\u8be5\u76ee\u5f55\u5fc5\u987b\u5148\u624b\u5de5\u521b\u5efa\n|----front //\u7531zip\u5305\u89e3\u538b\u5f97\u5230\n|----logs //\u7a0b\u5e8f\u7684\u65e5\u5fd7\u76ee\u5f55,\u5728\u90e8\u7f72\u65f6\u8be5\u76ee\u5f55\u5fc5\u987b\u5148\u624b\u5de5\u521b\u5efa\n|----startup.sh //\u542f\u52a8\u811a\u672c,\u5fc5\u987b\u4f7f\u7528chmod+x startup.sh \u547d\u4ee4\u8d4b\u4e88\u53ef\u6267\u884c\u6743\u9650\n|----knife4j-admin-1.0.jar //\u7531zip\u5305\u89e3\u538b\u5f97\u5230\n")),(0,l.kt)("h3",{id:"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6"},"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,"\u5728knife4j-admin\u7a0b\u5e8f\u4e2d,\u5982\u679c\u4f60\u7684\u90e8\u7f72\u76ee\u5f55\u4e0d\u662f",(0,l.kt)("inlineCode",{parentName:"p"},"/mnt/application/kadmin"),"\uff0c\u90a3\u4e48\u9700\u8981\u4fee\u6539jar\u5305\u4e2d\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"application-prod.yml"),"\u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"application-prod.yml"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"server:\n# \u7aef\u53e3\u53f7\n port: 17808 \nknife4j:\n # \u76d1\u542c\u9879\u76ee\u76ee\u5f55 \n monitor: /mnt/application/kadmin/data \n")),(0,l.kt)("p",null,"\u5fc5\u987b\u4fee\u6539",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j.monitor"),"\u4e2d\u7684\u76d1\u6d4b\u76ee\u5f55,\u8be5\u76ee\u5f55\u662f\u53ef\u4ee5\u7531\u5f00\u53d1\u8005\u81ea\u884c\u66f4\u6539,\u66f4\u6539\u540e\u5728\u66ff\u6362jar\u5305\u4e2d\u7684\u6587\u4ef6\u5373\u53ef"),(0,l.kt)("p",null,"\u5f53\u7136,\u7a0b\u5e8f\u7684\u7aef\u53e3\u53f7\u5f00\u53d1\u8005\u4e5f\u53ef\u81ea\u884c\u66f4\u6539"),(0,l.kt)("h3",{id:"\u542f\u52a8\u7a0b\u5e8f"},"\u542f\u52a8\u7a0b\u5e8f"),(0,l.kt)("p",null,"knife4j-admin\u63d0\u4f9b\u7684\u662f\u4e00\u4e2aSpring Boot\u7684\u53ef\u6267\u884cjar\u5305,\u56e0\u6b64,",(0,l.kt)("inlineCode",{parentName:"p"},"startup.sh"),"\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"nohup java -Xms512m -Xmx512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:MaxNewSize=256m -jar /mnt/application/kadmin/knife4j-admin-1.0.jar >> /dev/null 2>&1 &\n")),(0,l.kt)("p",null,"\u901a\u8fc7Linux\u7ec8\u7aef\u6267\u884c\u547d\u4ee4\u8fdb\u884c\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# ./startup.sh\n")),(0,l.kt)("h3",{id:"\u914d\u7f6enginx"},"\u914d\u7f6eNginx"),(0,l.kt)("p",null,"\u5f53\u6211\u4eec\u7684\u540e\u53f0\u670d\u52a1\u542f\u52a8\u597d\u4e4b\u540e,\u6211\u4eec\u8fd8\u9700\u8981\u914d\u7f6e\u4e00\u4e2a\u5bf9\u5916\u7684Nginx\u7aef\u53e3"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"kadmin.conf"),"\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-nginx"},"server {\n listen 80;\n server_name kadmin.xiaominfo.com;\n # \u540e\u53f0\u670d\u52a1\n location / {\n proxy_pass http://127.0.0.1:17808;\n client_max_body_size 300m;\n }\n # \u524d\u7aef\u6587\u4ef6\n location ~*^.+\\.(icon|gif|jpg|jpeg|png|html|css|js|txt|xml|swf|wav)$ {\n root /mnt/application/kadmin/front;\n }\n\n}\n")),(0,l.kt)("p",null,"\u6b64Nginx\u7684\u914d\u7f6e\u662f\u76ee\u524dknife4j\u63d0\u4f9b\u7684\u6d4b\u8bd5\u5730\u5740,\u5f00\u53d1\u8005\u5982\u679c\u6ca1\u6709\u57df\u540d,\u53ef\u4ee5\u81ea\u884c\u4f7f\u7528\u7aef\u53e3\u53f7\u7b49\u8fdb\u884c\u914d\u7f6e\u5373\u53ef"),(0,l.kt)("h3",{id:"\u542f\u52a8nginx"},"\u542f\u52a8Nginx"),(0,l.kt)("p",null,"Nginx\u7684\u73af\u5883\u914d\u7f6e\u597d\u540e,\u542f\u52a8Nginx\u5373\u53ef"),(0,l.kt)("p",null,"\u670d\u52a1\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# service nginx start\n")),(0,l.kt)("p",null,"\u5982\u679cNginx\u672a\u5b89\u88c5\u6210\u7cfb\u7edf\u670d\u52a1,\u5219\u53ef\u4ee5\u547d\u4ee4\u884c\u542f\u52a8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell"},"[root@izbt kadmin]# cd /usr/local/nginx\n[root@izbt nginx]# sbin/nginx\n")))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3158a9a3.af95418a.js b/knife4j-doc/gitee/assets/js/3158a9a3.af95418a.js new file mode 100644 index 000000000..87ae68612 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3158a9a3.af95418a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9587],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),u=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return a.createElement(p.Provider,{value:t},e.children)},k="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),k=u(n),g=r,c=k["".concat(p,".").concat(g)]||k[g]||d[g]||l;return n?a.createElement(c,i(i({ref:t},s),{},{components:n})):a.createElement(c,i({ref:t},s))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=g;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[k]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>c,frontMatter:()=>o,metadata:()=>u,toc:()=>k});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),i=["components"],o={id:"knife4j-gateway-introduce",title:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",description:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",keywords:["knife4j","Spring Cloud Gateway\u7f51\u5173\u805a\u5408\u6587\u6863","swagger\u805a\u5408","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e748\u670813\u65e5"},p=void 0,u={unversionedId:"blog/gateway/knife4j-gateway-introduce",id:"blog/gateway/knife4j-gateway-introduce",title:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",description:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",source:"@site/docs/blog/gateway/knife4j-gateway-introduce.mdx",sourceDirName:"blog/gateway",slug:"/blog/gateway/knife4j-gateway-introduce",permalink:"/docs/blog/gateway/knife4j-gateway-introduce",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1691914117,formattedLastUpdatedAt:"2023\u5e748\u670813\u65e5",sidebarPosition:4,frontMatter:{id:"knife4j-gateway-introduce",title:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",description:"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86",keywords:["knife4j","Spring Cloud Gateway\u7f51\u5173\u805a\u5408\u6587\u6863","swagger\u805a\u5408","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e748\u670813\u65e5"}},s={},k=[{value:"\ud83c\udf3e 1.\u524d\u8a00",id:"-1\u524d\u8a00",level:2},{value:"\ud83d\udd25 2.\u89e3\u51b3\u65b9\u6848",id:"-2\u89e3\u51b3\u65b9\u6848",level:2},{value:"\ud83c\udf1a 3.\u6df1\u5165\u4e86\u89e3",id:"-3\u6df1\u5165\u4e86\u89e3",level:2},{value:"\u2705 3.1 \u4f7f\u7528\u7b80\u5355(\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408)\uff0c\u5b66\u4e60\u6210\u672c\u4f4e",id:"-31-\u4f7f\u7528\u7b80\u5355\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408\u5b66\u4e60\u6210\u672c\u4f4e",level:3},{value:"\u2705 3.2 \u89e3\u8026Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\uff0c\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\uff0c\u804c\u8d23\u5355\u4e00",id:"-32-\u89e3\u8026spring-cloud-gateway\u7f51\u5173\u7ec4\u4ef6\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\u804c\u8d23\u5355\u4e00",level:3},{value:"\u2705 3.3 \u63d0\u4f9b\u624b\u52a8\u914d\u7f6e\u3001\u5fae\u670d\u52a1\u81ea\u52a8\u53d1\u73b0\u4e24\u79cd\u7075\u6d3b\u914d\u7f6e\u65b9\u5f0f\u805a\u5408\u5b50\u670d\u52a1\u6587\u6863",id:"-33-\u63d0\u4f9b\u624b\u52a8\u914d\u7f6e\u5fae\u670d\u52a1\u81ea\u52a8\u53d1\u73b0\u4e24\u79cd\u7075\u6d3b\u914d\u7f6e\u65b9\u5f0f\u805a\u5408\u5b50\u670d\u52a1\u6587\u6863",level:3},{value:"\u2705 3.4 \u53ef\u4ee5\u540c\u65f6\u805a\u5408Swagger2\u3001OpenAPI3\u4e24\u79cd\u4e0d\u540c\u7684\u89c4\u8303",id:"-34-\u53ef\u4ee5\u540c\u65f6\u805a\u5408swagger2openapi3\u4e24\u79cd\u4e0d\u540c\u7684\u89c4\u8303",level:3},{value:"\u2705 3.5 \u7075\u6d3b\u914d\u7f6e\u805a\u5408\u89c4\u5219\uff0c\u81ea\u5b9a\u4e49\u6392\u9664\u89c4\u5219\u652f\u6301",id:"-35-\u7075\u6d3b\u914d\u7f6e\u805a\u5408\u89c4\u5219\u81ea\u5b9a\u4e49\u6392\u9664\u89c4\u5219\u652f\u6301",level:3},{value:"\ud83d\udc10 4.\u805a\u7126\u4e24\u5927\u4f7f\u7528\u573a\u666f(\u624b\u52a8/\u670d\u52a1\u53d1\u73b0\u81ea\u52a8)\u805a\u5408",id:"-4\u805a\u7126\u4e24\u5927\u4f7f\u7528\u573a\u666f\u624b\u52a8\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408",level:2},{value:"4.1 \u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)",id:"41-\u624b\u52a8\u914d\u7f6e\u805a\u5408manual",level:3},{value:"4.2 \u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408(discover)",id:"42-\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408discover",level:3},{value:"\ud83d\udc2e 5.\u670d\u52a1\u53d1\u73b0\u7684\u8def\u7531\u805a\u5408\u7b56\u7565-\u6570\u636e\u6765\u6e90",id:"-5\u670d\u52a1\u53d1\u73b0\u7684\u8def\u7531\u805a\u5408\u7b56\u7565-\u6570\u636e\u6765\u6e90",level:2},{value:"5.1 \u624b\u52a8\u914d\u7f6e-\u81ea\u5b9a\u4e49Routes",id:"51-\u624b\u52a8\u914d\u7f6e-\u81ea\u5b9a\u4e49routes",level:3},{value:"5.2 DiscoverClient\u81ea\u52a8\u53d1\u73b0",id:"52-discoverclient\u81ea\u52a8\u53d1\u73b0",level:3},{value:"5.3 Spring Gateway\u7f51\u5173Routes\u914d\u7f6e",id:"53-spring-gateway\u7f51\u5173routes\u914d\u7f6e",level:3},{value:"5.4 \u52a8\u6001\u8def\u7531\u6ce8\u518c\u914d\u7f6e",id:"54-\u52a8\u6001\u8def\u7531\u6ce8\u518c\u914d\u7f6e",level:3},{value:"6.\ud83d\udc7b \u603b\u7ed3",id:"6-\u603b\u7ed3",level:2}],d={toc:k},g="wrapper";function c(e){var t=e.components,o=(0,r.Z)(e,i);return(0,l.kt)(g,(0,a.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u5927\u5bb6\u597d\uff0c\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u662f\u4ecb\u7ecd\u5206\u4eabKnife4j-gateway\u7f51\u5173\u805a\u5408\u6587\u6863\u7ec4\u4ef6,\u81ea4.0\u7248\u672c\u53d1\u5e03\u8be5\u7ec4\u4ef6\u540e\uff0c\u5f97\u5230\u4e86\u5927\u5bb6\u7684\u79ef\u6781\u54cd\u5e94\uff0c\u6211\u4eec\u4e5f\u662f\u79ef\u6781\u54cd\u5e94\u7528\u6237\u7684\u9700\u6c42\uff0c\u6301\u7eed\u8fed\u4ee3\u4f18\u5316"),(0,l.kt)("p",null,"\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u975e\u5e38\u8f7b\u91cf\u7ea7\u7684\u7f51\u5173\u805a\u5408\u7ec4\u4ef6\uff0c\u9002\u7528\u4e8e\u5f00\u53d1\u8005\u4f7f\u7528Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\u8fdb\u884cSwagger2\u3001OpenAPI3\u89c4\u8303\u7684\u6587\u6863\u805a\u5408"),(0,l.kt)("h2",{id:"-1\u524d\u8a00"},"\ud83c\udf3e 1.\u524d\u8a00"),(0,l.kt)("p",null,"\u5728\u8003\u8651\u5199\u8fd9\u4e2a\u7ec4\u4ef6\u4e4b\u524d\uff0c\u5f00\u53d1\u8005\u5728Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\u4e0b\u8fdb\u884c\u805a\u5408",(0,l.kt)("inlineCode",{parentName:"p"},"Swagger2"),"/",(0,l.kt)("inlineCode",{parentName:"p"},"OpenAPI3"),"\u53ef\u80fd\u5b58\u5728\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898"),(0,l.kt)("p",null,"\u6211\u8ba4\u4e3a\u4e3b\u8981\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u9002\u914d\u4e0d\u540c\u7684Spring Cloud Gateway\u7248\u672c\uff0c\u6ca1\u6709\u5f62\u6210\u7edf\u4e00\u7a33\u5b9a\u7684\u6280\u672f\u89e3\u51b3\u65b9\u6848"),(0,l.kt)("li",{parentName:"ul"},"Gateway\u7ec4\u4ef6\u4e0bWebflux\u5f02\u6b65\u7f16\u7801\u7684\u98ce\u683c\uff0c\u5b66\u4e60\u6210\u672c\u5f02\u5e38\u9661\u5ced\uff0c\u521d\u5b66\u8005\u4e00\u65f6\u4e4b\u95f4\u96be\u4ee5\u638c\u63e1\u5fae\u670d\u52a1\u4f53\u7cfb"),(0,l.kt)("li",{parentName:"ul"},"\u805a\u5408\u6587\u6863\u4ee3\u7801\u5f3a\u8026\u5408\u4e1a\u52a1\u4ee3\u7801\uff0c\u65e0\u6cd5\u7075\u6d3b\u914d\u7f6e"),(0,l.kt)("li",{parentName:"ul"},"\u6587\u6863Ui\u65e0\u6cd5\u968f\u5fc3\u6240\u6b32\u7684\u914d\u7f6e"),(0,l.kt)("li",{parentName:"ul"},"\u5404\u79cd404\u6216\u8def\u5f84\u9519\u8bef\u7b49\u95ee\u9898"),(0,l.kt)("li",{parentName:"ul"},"\u7b49\u7b49.....")),(0,l.kt)("h2",{id:"-2\u89e3\u51b3\u65b9\u6848"},"\ud83d\udd25 2.\u89e3\u51b3\u65b9\u6848"),(0,l.kt)("p",null,"\u6211\u4eec\u4ece\u5f00\u53d1\u8005\u7684\u5b9e\u9645\u9700\u6c42\u51fa\u53d1\uff0c\u7ed3\u5408Knife4j\u591a\u5e74\u5f00\u6e90\u4ee5\u6765\u79ef\u7d2f\u7684\u5b9d\u8d35\u7ecf\u9a8c\uff0c\u51b3\u5b9a\u4e86\u6211\u4eec\u9700\u8981\u5f00\u53d1\u4e00\u4e2aGateway\u7f51\u5173\u4e0b\u7684\u805a\u5408\u7ec4\u4ef6"),(0,l.kt)("p",null,"\u5c06\u5f00\u53d1\u8005\u7684\u9700\u6c42\u3001\u95ee\u9898\u805a\u5408\u5728\u4e00\u8d77\uff0c\u4f17\u4eba\u62fe\u85aa\u706b\u7130\u9ad8\uff0c\u5f62\u6210\u4e00\u4e2a\u7edf\u4e00\u7684\u6280\u672f\u89e3\u51b3\u65b9\u6848"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction",target:null,rel:null},"knife4j-gateway"),"\u7ec4\u4ef6\u5c31\u662f\u5728\u8fd9\u6837\u7684\u573a\u666f\u4e0b\u8bde\u751f\u7684"),(0,l.kt)("p",null,"\u8be5\u7ec4\u4ef6\u4e3b\u8981\u7684\u7279\u70b9\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u4f7f\u7528\u7b80\u5355(\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408)\uff0c\u5b66\u4e60\u6210\u672c\u4f4e")),(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u89e3\u8026Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\uff0c\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\uff0c\u804c\u8d23\u5355\u4e00")),(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u63d0\u4f9b\u624b\u52a8\u914d\u7f6e\u3001\u5fae\u670d\u52a1\u81ea\u52a8\u53d1\u73b0\u4e24\u79cd\u7075\u6d3b\u914d\u7f6e\u65b9\u5f0f\u805a\u5408\u5b50\u670d\u52a1\u6587\u6863")),(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u53ef\u4ee5\u540c\u65f6\u805a\u5408Swagger2\u3001OpenAPI3\u4e24\u79cd\u4e0d\u540c\u7684\u89c4\u8303")),(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u7075\u6d3b\u914d\u7f6e\u805a\u5408\u89c4\u5219\uff0c\u81ea\u5b9a\u4e49\u6392\u9664\u89c4\u5219\u652f\u6301")),(0,l.kt)("li",{parentName:"ul"},"\u2705 ",(0,l.kt)("strong",{parentName:"li"},"\u5fae\u670d\u52a1\u573a\u666f\u4e0b\u652f\u6301\u670d\u52a1\u7684\u4e0a\u7ebf\u3001\u4e0b\u7ebf\u573a\u666f\uff0c\u6587\u6863\u72b6\u6001\u4e0e\u5b50\u670d\u52a1\u4fdd\u6301\u4e00\u81f4\uff0c\u65e0\u9700\u91cd\u542f\u670d\u52a1"))),(0,l.kt)("h2",{id:"-3\u6df1\u5165\u4e86\u89e3"},"\ud83c\udf1a 3.\u6df1\u5165\u4e86\u89e3"),(0,l.kt)("p",null,"\u6211\u4eec\u7ed3\u5408knife4j-gateway\u7ec4\u4ef6\u7684\u7279\u70b9\u6765\u6df1\u5165\u5206\u6790\uff0c\u5e26\u7740\u7591\u60d1\u6765\u4e00\u6b65\u6b65\u63ed\u5f00\u5979\u7684\u795e\u79d8\u9762\u7eb1~\uff01"),(0,l.kt)("h3",{id:"-31-\u4f7f\u7528\u7b80\u5355\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408\u5b66\u4e60\u6210\u672c\u4f4e"},"\u2705 ",(0,l.kt)("strong",{parentName:"h3"},"3.1 \u4f7f\u7528\u7b80\u5355(\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408)\uff0c\u5b66\u4e60\u6210\u672c\u4f4e")),(0,l.kt)("p",null,"\u9996\u5148\uff0c\u6211\u4eec\u65e2\u7136\u90fd\u5df2\u7ecf\u5c01\u88c5\u6210\u7ec4\u4ef6\u4e86\uff0c\u90a3\u4e48\u5b66\u4e60\u548c\u4f7f\u7528\u6210\u672c\u662f\u6211\u4eec\u9996\u5148\u5c31\u9700\u8981\u8003\u8651\u7684\u4e8b\u60c5\uff0c\u9700\u8981\u628a\u590d\u6742\uff0c\u96be\u5904\u7406\u7684\u4e1a\u52a1\u903b\u8f91\u3001\u6280\u672f\u7ec6\u8282\uff0c\u5168\u90e8\u5c01\u88c5\u5728\u7ec4\u4ef6\u91cc\uff0c\u800c\u5bf9\u4e8e\u4e0a\u5c42\u7528\u6237\uff0c\u6211\u4eec\u63d0\u4f9b\u7b80\u5316\u540e\u7684\u914d\u7f6e\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5f00\u7bb1\u5373\u7528\u5373\u53ef"),(0,l.kt)("p",null,"\u8fd9\u662f\u7ec4\u4ef6\u7684\u4ef7\u503c\uff0c\u5269\u4e0b\u5b66\u4e60\u65f6\u95f4\u6210\u672c\u3002"),(0,l.kt)("p",null,"\u5f53\u7136\u6211\u8bf4\u4f7f\u7528\u7b80\u5355(\u6700\u4f4e4\u884c\u914d\u7f6e\u641e\u5b9a\u805a\u5408)\uff0c\u8fd9\u53ea\u662f\u6709\u70b9\u5ba3\u4f20\u5439\u725b\u7684\u53e3\u543b\uff0c\u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u6211\u53c8\u8981\u5b66\u4e60\u4e86\u89e3\u4f60\u8fd9\u4e2a",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u7684\u56db\u884c\u914d\u7f6e\uff0c\u90a3\u4e5f\u662f\u5b66\u4e60\u6210\u672c\u554a"),(0,l.kt)("p",null,"\u8fd9\u4e2a\u6211\u65e0\u4ece\u53cd\u9a73~~~\ud83d\ude02"),(0,l.kt)("p",null,"\u5982\u679c\u5f00\u53d1\u8005\u7684\u9879\u76ee\u3001\u4ea7\u54c1\u91c7\u7528Spring Cloud\u5fae\u670d\u52a1\u4f53\u7cfb\uff0c\u7f51\u5173\u7ec4\u4ef6\u4f7f\u7528Spring Cloud Gateway\uff0c\u90a3\u4e48\u5bf9\u4e8eSwagger\u3001OpenAPI3\u7684\u6587\u6863\u805a\u5408\uff0c\u91c7\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u7684\u8bdd\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u7ec4\u4ef6\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"discover"),"\u81ea\u52a8\u53d1\u73b0\u6a21\u5f0f\uff0c\u5b9e\u73b0\u81ea\u52a8\u805a\u5408"),(0,l.kt)("p",null,"\u5728\u9879\u76ee\u4e2d\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u5982\u4e0b\u914d\u7f6e\uff0c\u5c31\u641e\u5b9a\u4e86\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n # \u2460 \u7b2c\u4e00\u4e2a\u914d\u7f6e\uff0c\u5f00\u542fgateway\u805a\u5408\u7ec4\u4ef6\n enabled: true\n # \u2461 \u7b2c\u4e8c\u884c\u914d\u7f6e\uff0c\u8bbe\u7f6e\u805a\u5408\u6a21\u5f0f\u91c7\u7528discover\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\n strategy: discover\n discover:\n # \u2462 \u7b2c\u4e09\u884c\u914d\u7f6e\uff0c\u5f00\u542fdiscover\u6a21\u5f0f\n enabled: true\n # \u2463 \u7b2c\u56db\u884c\u914d\u7f6e\uff0c\u805a\u5408\u5b50\u670d\u52a1\u5168\u90e8\u4e3aSwagger2\u89c4\u8303\u7684\u6587\u6863\n version: swagger2\n\n")),(0,l.kt)("p",null,"\u6211\u4eec\u6ca1\u6709\u4f7f\u7528\u5e7f\u544a\u6cd5\u7981\u6b62\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"\u6700\u7b80\u5355"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"\u975e\u5e38\u7b80\u5355"),"\u7b49\u5ba3\u4f20\u53e3\u543b\u8fdb\u884c\u5ba3\u4f20"),(0,l.kt)("p",null,"\u6478\u7740\u826f\u5fc3\u53bb\u770b\u8fd9\u4e2a\u914d\u7f6e\uff0c\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"disocver"),"\u6a21\u5f0f\u8fdb\u884c\u805a\u5408\uff0c\u56db\u884c\u914d\u7f6e\u8fbe\u5230\u5f00\u53d1\u8005\u7684\u76ee\u7684\uff0c",(0,l.kt)("strong",{parentName:"p"},"\u786e\u5b9e"),"\u5f88\u65b9\u4fbf\u554a\uff0c\u5b66\u4e60\u6210\u672c\u4f4e~~~!"),(0,l.kt)("h3",{id:"-32-\u89e3\u8026spring-cloud-gateway\u7f51\u5173\u7ec4\u4ef6\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\u804c\u8d23\u5355\u4e00"},"\u2705 3.2 \u89e3\u8026Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\uff0c\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\uff0c\u804c\u8d23\u5355\u4e00"),(0,l.kt)("p",null,"\u4e3a\u4ec0\u4e48\u6211\u8bf4\u89e3\u8026\u5462\uff1f\u56e0\u4e3a\u6587\u6863\u529f\u80fd\u5176\u5b9e\u662f\u4e00\u4e2a\u5f00\u53d1\u9636\u6bb5\u7684\u9700\u6c42\uff0c\u662f\u5f00\u53d1\u56e2\u961f\u5728\u914d\u5408\u5b8c\u6210\u9879\u76ee\u3001\u4ea7\u54c1\u8fc7\u7a0b\u4e2d\uff0c\u56e2\u961f\u4e4b\u524d\u63d0\u5347\u6548\u7387\u7684\u4e00\u4e2a\u6f5c\u5728\u7684\u9700\u6c42\u573a\u666f"),(0,l.kt)("p",null,"\u5f53\u6211\u4eec\u7684\u9879\u76ee\u3001\u4ea7\u54c1\u5f00\u53d1\u5b8c\u6210\uff0c\u4e0a\u7ebf\u5230\u751f\u4ea7\u73af\u5883\u7684\u65f6\u5019\uff0c\u6216\u8005\u5728\u4e0d\u540c\u7684\u9879\u76ee\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5f00\u53d1\u8005\u7684\u9700\u6c42\u53c8\u6d8c\u73b0\u51fa\u6765\u4e86\uff0c\u4f8b\u5982\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u89c4\u8303\u662f\u975e\u5e38\u91cd\u8981\u7684\u5185\u90e8\u4fe1\u606f\uff0c\u751f\u4ea7\u73af\u5883\u5e94\u8be5\u5c4f\u853d",(0,l.kt)("blockquote",{parentName:"li"},(0,l.kt)("p",{parentName:"blockquote"},"\u8bf7\u53c2\u8003\u6587\u7ae0",(0,l.kt)("a",{parentName:"p",href:"/docs/blog/production-forbidden-ui",target:null,rel:null},"\u751f\u4ea7\u73af\u5883\u5982\u4f55\u5c4f\u853dKnife4j\u3001Swagger\u7b49Ui\u8d44\u6e90\u548c\u63a5\u53e3")))),(0,l.kt)("li",{parentName:"ul"},"\u805a\u5408\u4ee3\u7801\u5728\u4e0d\u540c\u7684\u9879\u76ee\u4e2d\u6765\u56deCopy"),(0,l.kt)("li",{parentName:"ul"},"\u5347\u7ea7Gateway\u7ec4\u4ef6\u5bfc\u81f4\u805a\u5408\u4ee3\u7801\u5931\u6548\uff0c\u8c03\u8bd5\u4e0d\u540c\u7684Gateway\u7248\u672c\uff0c\u5728\u7ebf\u641c\u7d22\u89e3\u51b3\u65b9\u6848"),(0,l.kt)("li",{parentName:"ul"},"....")),(0,l.kt)("p",null,"\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u9700\u6c42\u573a\u666f\uff0c\u4e00\u7ebf\u5f00\u53d1\u8005\u53ef\u4ee5\u81ea\u884c\u8111\u8865\uff0c\u4e0a\u9762\u8bf4\u5217\u7684\u9700\u6c42\uff0c\u4f60\u662f\u5426\u5728\u5f00\u53d1\u573a\u666f\u4e2d\u4e5f\u78b0\u5230\u4e86\u5462\uff1f"),(0,l.kt)("p",null,"\u65e2\u7136\u6587\u6863\u805a\u5408\u529f\u80fd\u548c\u9879\u76ee\u3001\u4ea7\u54c1\u672c\u8eab\u5e76\u6ca1\u6709\u592a\u5927\u7684\u5173\u7cfb\uff0c\u662f\u5f00\u53d1\u8005\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u63d0\u9ad8\u6548\u7387\u7684\u4ea7\u7269\uff0c\u90a3\u4e48\u5bf9\u4e8e\u7edf\u4e00\u7684\u4e8b\u60c5\uff0c\u6211\u4eec\u5e94\u8be5\u907f\u514d\u91cd\u590d\u64cd\u4f5c\uff0c\u7528\u72ec\u7acb\u7684\u4e2d\u95f4\u4ef6\u6765\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction",target:null,rel:null},"knife4j-gateway"),"\u7ec4\u4ef6",(0,l.kt)("strong",{parentName:"p"},"\u805a\u7126Swagger2/OpenAPI3\u89c4\u8303\u7684\u6587\u6863\u805a\u5408"),",\u4e00\u65e6\u56e2\u961f\u4e4b\u95f4\u786e\u5b9a\u4f7f\u7528Swagger2/OpenAPI3\u89c4\u8303\uff0c\u5e76\u4e14\u6709\u805a\u5408\u7684\u9700\u6c42\u573a\u666f\uff0c\u90a3\u4e48\u5f15\u5165\u4e00\u4e2ajar\u7ec4\u4ef6\u5c31\u80fd\u89e3\u51b3\u7684\u4e8b\u60c5\uff0c\u4f55\u4e50\u800c\u4e0d\u4e3a\u5462\uff1f"),(0,l.kt)("h3",{id:"-33-\u63d0\u4f9b\u624b\u52a8\u914d\u7f6e\u5fae\u670d\u52a1\u81ea\u52a8\u53d1\u73b0\u4e24\u79cd\u7075\u6d3b\u914d\u7f6e\u65b9\u5f0f\u805a\u5408\u5b50\u670d\u52a1\u6587\u6863"},"\u2705 ",(0,l.kt)("strong",{parentName:"h3"},"3.3 \u63d0\u4f9b\u624b\u52a8\u914d\u7f6e\u3001\u5fae\u670d\u52a1\u81ea\u52a8\u53d1\u73b0\u4e24\u79cd\u7075\u6d3b\u914d\u7f6e\u65b9\u5f0f\u805a\u5408\u5b50\u670d\u52a1\u6587\u6863")),(0,l.kt)("p",null,"\u4e0a\u9762\u6211\u4eec\u4ece\u5b66\u4e60\u6210\u672c\u3001\u89e3\u8026\u4e24\u4e2a\u65b9\u9762\u9610\u8ff0\u4e86\u8be5\u7ec4\u4ef6\u7684\u4ef7\u503c\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\uff0c\u5f53\u6211\u4eec\u6df1\u5165\u53bb\u63a2\u7d22\u7f51\u5173\u7ec4\u4ef6\u7684\u4e0b\u7684\u805a\u5408\u573a\u666f\u65f6\uff0c\u7ad9\u5728\u4e2d\u95f4\u4ef6\u7ec4\u4ef6\u7684\u7acb\u573a\u4e0b\uff0c\u6211\u4eec\u5c31\u9700\u8981\u8003\u8651\u4e0d\u540c\u7684\u56e2\u961f\u3001\u4e0d\u540c\u7684\u4eba\u5458\u7684\u9700\u6c42\u8fdb\u884c\u517c\u5bb9\u5408\u5e76"),(0,l.kt)("p",null,"\u76ee\u524d\u4e3a\u4e4b\uff0c\u7ed3\u5408\u5f00\u53d1\u4efb\u4f55\u53ca\u81ea\u8eab\u7684\u5b9e\u9645\u5de5\u4f5c\u7ecf\u9a8c\uff0c\u603b\u7ed3\u51fa\u4e86\u4e24\u79cd\u6587\u6863\u805a\u5408\u7684\u573a\u666f\uff0c\u4f9b\u5f00\u53d1\u8005\u8fdb\u884c\u4f7f\u7528"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)"),": \u5f00\u53d1\u8005\u624b\u52a8\u914d\u7f6e\uff0c\u7075\u6d3b\u914d\u7f6e\u5c55\u793a\u6587\u6863",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"\u4f18\u70b9\uff1a\u4f7f\u7528\u7b80\u5355\u3001\u7075\u6d3b\uff0c\u5b66\u4e60\u6210\u672c\u4f4e.\u8bd5\u9519\u6210\u672c\u4f4e"),(0,l.kt)("li",{parentName:"ul"},"\u7f3a\u70b9\uff1a\u670d\u52a1\u4f17\u591a\u65f6\u8f83\u7e41\u7410\uff0c\u65e0\u6cd5\u611f\u77e5\u5b50\u670d\u52a1\u7684\u4e0a\u4e0b\u7ebf\u72b6\u6001"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408(discover)"),"\uff1a\u57fa\u4e8e\u6ce8\u518c\u4e2d\u5fc3\uff0c\u4e3b\u52a8\u805a\u5408\u670d\u52a1",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"\u4f18\u70b9\uff1a\u4f7f\u7528\u53ca\u914d\u7f6e\u7b80\u5355\u3001\u5b66\u4e60\u6210\u672c\u4f4e."),(0,l.kt)("li",{parentName:"ul"},"\u7f3a\u70b9\uff1a\u6682\u65f6\u6ca1\u60f3\u5230\uff0c\u6b22\u8fce\u4f60\u6765\u4f53\u9a8c\u53cd\u9988")))),(0,l.kt)("h3",{id:"-34-\u53ef\u4ee5\u540c\u65f6\u805a\u5408swagger2openapi3\u4e24\u79cd\u4e0d\u540c\u7684\u89c4\u8303"},"\u2705 ",(0,l.kt)("strong",{parentName:"h3"},"3.4 \u53ef\u4ee5\u540c\u65f6\u805a\u5408Swagger2\u3001OpenAPI3\u4e24\u79cd\u4e0d\u540c\u7684\u89c4\u8303")),(0,l.kt)("p",null,"\u6211\u4eec\u7684\u9879\u76ee/\u4ea7\u54c1\u5728\u957f\u671f\u8fed\u4ee3\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6216\u8005\u4e0d\u540c\u7684\u56e2\u961f\u914d\u5408\u5f00\u53d1\u4e2d,\u6709\u65f6\u5019\u5b50\u670d\u52a1\u7684\u6807\u51c6\u53ef\u80fd\u4e0d\u5c3d\u7edf\u4e00\u3002\u800c\u6211\u4eec\u9700\u8981\u4e00\u8d77\u805a\u5408\u600e\u4e48\u529e\u5462?"),(0,l.kt)("p",null,"\u597d\u5728\u5728Knife4j\u7684\u524d\u7aefUi\u7ec4\u4ef6\u5df2\u7ecf\u5b8c\u5168\u9002\u914d\u4e86Swagger2\u548cOpenAPI3\u89c4\u8303\uff0c\u5728\u7f51\u5173\u5c42\u9762\uff0c\u6211\u4eec\u53ea\u9700\u8981\u6839\u636e\u8be5\u7ec4\u4ef6\u63d0\u4f9b\u7684\u624b\u52a8\u914d\u7f6e\u7b56\u7565\u914d\u7f6e\u4e0a\u5c31\u89e3\u51b3\u4e86\u8be5\u95ee\u9898\uff0c\u53ef\u53c2\u8003\u4e0b\u9762\u7684\u6587\u7ae0\u4ecb\u7ecd\u3002"),(0,l.kt)("h3",{id:"-35-\u7075\u6d3b\u914d\u7f6e\u805a\u5408\u89c4\u5219\u81ea\u5b9a\u4e49\u6392\u9664\u89c4\u5219\u652f\u6301"},"\u2705 ",(0,l.kt)("strong",{parentName:"h3"},"3.5 \u7075\u6d3b\u914d\u7f6e\u805a\u5408\u89c4\u5219\uff0c\u81ea\u5b9a\u4e49\u6392\u9664\u89c4\u5219\u652f\u6301")),(0,l.kt)("p",null,"\u7075\u6d3b\u914d\u7f6e\u662fknife4j-gateway\u7ec4\u4ef6\u4e3a\u7f51\u5173\u805a\u5408\u670d\u52a1\u63d0\u4f9b\u7684\u5e26\u5200\u4f8d\u536b\uff0c\u4fdd\u969c\u5f00\u53d1\u8005\u4eec\u5728\u624b\u52a8/\u670d\u52a1\u53d1\u73b0\u4e24\u5927\u573a\u666f\u4e0b\u914d\u5408\u4f7f\u7528\u4ee5\u8fbe\u5230\u6700\u7ec8\u76ee\u7684"),(0,l.kt)("p",null,"\u4ed6\u4e3b\u8981\u63d0\u4f9b\u7684\u670d\u52a1\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u8bbe\u5b9a\u7f51\u5173\u5c42\u9762\u805a\u5408\u7684\u6392\u9664\u89c4\u5219\uff0c\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u8005\u5f00\u53d1\u8005\u6839\u636eSPI\u63a5\u53e3\u81ea\u5b9a\u4e49\u5b9e\u73b0",(0,l.kt)("blockquote",{parentName:"li"},(0,l.kt)("p",{parentName:"blockquote"},"\u4f8b\u5982\u6709Dubbo\u670d\u52a1\u7684\u63a5\u53e3\uff0c\u9700\u8981\u5728\u7f51\u5173\u5c42\u9762\u8fdb\u884c\u6392\u9664\uff0c\u7981\u6b62\u805a\u5408"))),(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u7684\u670d\u52a1\u540d\u79f0\u522b\u540d\u3001\u5c55\u793a\u987a\u5e8f\u3001\u63a5\u53e3\u987a\u5e8f\u7b49\u914d\u7f6e\u81ea\u5b9a\u4e49"),(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u7684\u81ea\u5b9a\u4e49ContextPath\u81ea\u7531\u7075\u6d3b\u914d\u7f6e\uff0c\u6ee1\u8db3\u4e1a\u52a1\u9700\u8981")),(0,l.kt)("p",null,"1\u3001\u5728\u7f51\u5173\u5c42\u9762\uff0c\u6392\u9664\u4e0d\u9700\u8981\u7684\u5b50\u670d\u52a1\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u57fa\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f(\u81ea",(0,l.kt)("a",{parentName:"p",href:"/docs/changelog/x/4.3",target:null,rel:null},"4.3.0\u7248\u672c"),"\u8fdb\u884c\u652f\u6301)\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"\nknife4j:\n gateway:\n enabled: true\n strategy: discover\n discover:\n version: swagger2\n enabled: true\n # \u6392\u9664\u4e0d\u9700\u8981\u805a\u5408\u7684\u5b50\u670d\u52a1\uff0c\u57fa\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f(\u652f\u6301\u591a\u4e2a)\n excluded-services:\n # \u6392\u9664order\u5f00\u5934\u7684\u670d\u52a1\n - order.*\n # \u6392\u9664\u670d\u52a1\u4e2d\u5305\u542bdubbo\u5b57\u6837\u7684\u670d\u52a1\n - .*?dubbo.*\n")),(0,l.kt)("p",null,"2\u3001\u914d\u7f6e\u5b50\u670d\u52a1\u7684\u522b\u540d\uff0c\u6392\u5e8f\uff0c\u81ea\u5b9a\u4e49\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n strategy: discover\n discover:\n version: swagger2\n enabled: true\n excluded-services:\n - order.*\n # \u81ea\u5b9a\u4e49\u914d\u7f6e\u5b50\u670d\u52a1\u7684\u522b\u540d\uff0c\u6392\u5e8f\u89c4\u5219\n service-config:\n order-service:\n - group-name: \u8ba2\u5355\u670d\u52a1\n order: 1\n user-service:\n - group-name: \u7528\u6237\u670d\u52a1\n order: 2\n")),(0,l.kt)("p",null,"3\u3001\u7f51\u5173\u6210\u7edf\u4e00\u5f00\u542f\u914d\u7f6e\u5b50\u670d\u52a1\u7684tag\u3001operation\u6392\u5e8f\u89c4\u5219"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n strategy: discover\n discover:\n version: swagger2\n enabled: true\n # \u6392\u5e8f\u89c4\u5219\n tags-sorter: order\n operations-sorter: order\n")),(0,l.kt)("h2",{id:"-4\u805a\u7126\u4e24\u5927\u4f7f\u7528\u573a\u666f\u624b\u52a8\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408"},"\ud83d\udc10 4.\u805a\u7126\u4e24\u5927\u4f7f\u7528\u573a\u666f(\u624b\u52a8/\u670d\u52a1\u53d1\u73b0\u81ea\u52a8)\u805a\u5408"),(0,l.kt)("h3",{id:"41-\u624b\u52a8\u914d\u7f6e\u805a\u5408manual"},(0,l.kt)("strong",{parentName:"h3"},"4.1 \u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)")),(0,l.kt)("p",null,"\u624b\u52a8\u914d\u7f6e\u805a\u5408\uff0c\u987e\u540d\u601d\u4e49,\u5f00\u53d1\u8005\u9700\u8981\u81ea\u884c\u5199\u5b50\u670d\u52a1\u7684\u89c4\u5219\u6216\u8005\u8def\u5f84,\u8fd9\u548c\u5fae\u670d\u52a1\u573a\u666f\u4e0b\u81ea\u52a8\u590d\u73b0\u805a\u5408\u662f\u5f62\u6210\u4e92\u8865\u673a\u5236\uff0c\u53cc\u5251\u5408\u74a7\u5a01\u529b\u4e4b\u4e0b\uff0c\u5b8c\u6210\u6700\u7ec8\u6210\u679c\u8f93\u51fa"),(0,l.kt)("p",null,"\u8be5\u573a\u666f\u89e3\u51b3\u4e0d\u540c\u7684\u95ee\u9898\uff0c\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u540c\u65f6\u5b58\u5728Swagger2/OpenAPI3\u89c4\u8303\u7684\u670d\u52a1"),(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u5b58\u5728\u4e0d\u540c\u7684package\u5305\u5206\u7ec4\u7684\u7684\u89c4\u8303\u5b9e\u4f8b\uff0c\u7528\u8fc7springfox\u6216\u8005springdoc\u7684\u5f00\u53d1\u8005\u5e94\u8be5\u6e05\u695a\u53ef\u4ee5\u6839\u636epackage\u5305\u8def\u5f84\u3001path\u8def\u7531\u521b\u5efa\u63a5\u53e3\u5206\u7ec4")),(0,l.kt)("p",null,"\u5982\u4e0b\u56fe\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"\u56fe1.Spring Gateway\u7f51\u5173\u805a\u5408\u6587\u6863\u6d41\u7a0b\u793a\u610f\u56fe-\u624b\u52a8\u914d\u7f6e",src:n(61949).Z,width:"1161",height:"521"})),(0,l.kt)("p",null,"\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u610f\u56fe\uff0c\u6211\u4eec\u6709\u4e09\u4e2a\u670d\u52a1\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"gateway-service:\u7f51\u5173\u670d\u52a1\uff0c\u8d1f\u8d23\u7f51\u5173\u8def\u7531\u9274\u6743\u3001\u8def\u7531\u8f6c\u53d1"),(0,l.kt)("li",{parentName:"ul"},"order-service:\u5b50\u670d\u52a1\u4e4b\u4e00\uff0c\u57fa\u4e8eOpenAPI3\u89c4\u8303\u66b4\u9732\u89c4\u8303\u5730\u5740:",(0,l.kt)("inlineCode",{parentName:"li"},"/v3/api-docs")),(0,l.kt)("li",{parentName:"ul"},"user-service: \u5b50\u670d\u52a1\u4e4b\u4e00\uff0c\u57fa\u4e8eSwagger2\u89c4\u8303\u66b4\u9732\u89c4\u8303\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"li"},"/v2/api-docs"))),(0,l.kt)("p",null,"\u6211\u4eec\u4ece\u670d\u52a1\u67b6\u6784\u6d41\u7a0b\u56fe\u4e2d\u4e86\u89e3\u5230\u4e86\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\uff0c\u90a3\u4e48\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"gateway-service"),"\u7ec4\u4ef6\u4e2d\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u63d0\u4f9b\u7684\u624b\u52a8\u914d\u7f6e\u805a\u5408\uff0c\u5c06\u6587\u6863\u8fdb\u884c\u805a\u5408\u5c55\u793a"),(0,l.kt)("p",null,"\u7b80\u5355\u7684\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n # \u9009\u62e9\u624b\u52a8\n strategy: manual\n routes:\n - name: \u7528\u6237\u670d\u52a1\n service-name: user-service\n url: /user/v2/api-docs\n - name: \u8ba2\u5355\u670d\u52a1\n service-name: order-service\n url: /order/v3/api-docs\n")),(0,l.kt)("h3",{id:"42-\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408discover"},(0,l.kt)("strong",{parentName:"h3"},"4.2 \u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408(discover)")),(0,l.kt)("p",null,"\u624b\u52a8\u805a\u5408\u7684\u552f\u4e00\u95ee\u9898\u5c31\u662f\uff0c\u4e00\u65e6\u6211\u4eec\u7684\u4ea7\u54c1/\u9879\u76ee\uff0c\u5b50\u670d\u52a1\u6570\u91cf\u4f17\u591a\uff0c\u7eaf\u9760\u624b\u52a8\u53bb\u914d\uff0c\u90a3\u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\u4e5f\u662f\u6781\u5176\u75db\u82e6\u7684\uff0c\u5c31\u597d\u50cf\u662f\u4fae\u8fb1\u5f00\u53d1\u8005\u4e00\u6837\u3002\u3002"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6211\u90fd\u80fd\u5199\u4ee3\u7801\u4e86\uff0c\u4f60\u8fd8\u8ba9\u6211\u5199\u8fd9\u4e48\u591a\u7e41\u6742\u7684\u914d\u7f6e\uff0c\u90a3\u662f\u5bf9\u7a0b\u5e8f\u5458\u7684\u4e0d\u5c0a\u91cd\u3002")),(0,l.kt)("p",null,"\u57fa\u4e8e\u670d\u52a1\u53d1\u73b0\u81ea\u52a8\u805a\u5408\u7684\u9700\u6c42\u573a\u666f\uff0c\u5c31\u7531\u6b64\u8bde\u751f."),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u5728\u4e0a\u9762\u6211\u4eec\u4ecb\u7ecdknife4j-gateway\u7279\u70b9\u65f6\uff0c\u6211\u4eec\u63d0\u5230\u8be5\u7ec4\u4ef6\u89e3\u8026\uff0c\u805a\u7126\u6587\u6863\u805a\u5408\u529f\u80fd\uff0c\u804c\u8d23\u5355\u4e00\uff0c\u8fd9\u91cc\u5f97\u4ee5\u4f53\u73b0")),(0,l.kt)("p",null,"\u5bf9\u4e8e\u670d\u52a1\u53d1\u73b0\u573a\u666f\u4e0b\u7684\u81ea\u52a8\u805a\u5408\uff0c\u914d\u7f6e\u5c31\u66f4\u7b80\u5355\u4e86\uff0c\u4f46\u5bf9\u6211\u4eec\u4e5f\u6709\u4e00\u4e9b\u5c0f\u5c0f\u7684\u7ea6\u675f"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u26a0\ufe0f \u6211\u4eec\u7684\u5b50\u670d\u52a1\u89c4\u8303\u5b9e\u73b0\u9700\u8981\u7edf\u4e00\uff0c\u8981\u4e48\u5168\u90e8\u7528Swagger2\u89c4\u8303\uff0c\u6216\u8005OpenAPI3\u89c4\u8303")),(0,l.kt)("p",null,"\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n # \u2460 \u7b2c\u4e00\u4e2a\u914d\u7f6e\uff0c\u5f00\u542fgateway\u805a\u5408\u7ec4\u4ef6\n enabled: true\n # \u2461 \u7b2c\u4e8c\u884c\u914d\u7f6e\uff0c\u8bbe\u7f6e\u805a\u5408\u6a21\u5f0f\u91c7\u7528discover\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\n strategy: discover\n discover:\n # \u2462 \u7b2c\u4e09\u884c\u914d\u7f6e\uff0c\u5f00\u542fdiscover\u6a21\u5f0f\n enabled: true\n # \u2463 \u7b2c\u56db\u884c\u914d\u7f6e\uff0c\u805a\u5408\u5b50\u670d\u52a1\u5168\u90e8\u4e3aSwagger2\u89c4\u8303\u7684\u6587\u6863\n version: swagger2\n\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u7279\u70b9\u548c\u6211\u4eec\u524d\u9762\u63d0\u5230\u7684\u4f7f\u7528\u7b80\u7b54\u8fd9\u4e00\u6761\u53c8\u5bf9\u4e0a\u4e86\uff0c\u771f\u7684\u53ea\u6709\u4e09\u56db\u884c\u914d\u7f6e\u3002"),(0,l.kt)("p",null,"\u4f46\u662f\u5728\u5fae\u670d\u52a1\u805a\u5408\u573a\u666f\u4e0b\uff0c\u6211\u4eec\u867d\u7136\u5c01\u88c5\u5185\u90e8\u5b9e\u73b0\uff0c\u4e5f\u6709\u5fc5\u8981\u548c\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b\uff0c\u5177\u4f53\u7684\u5904\u7406\u89c4\u5219\u539f\u7406"),(0,l.kt)("p",null,"\u5148\u6765\u770b\u4e00\u5f20\u7b80\u5355\u7684\u67b6\u6784\u56fe-\u670d\u52a1\u53d1\u73b0\u7684\u573a\u666f\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"\u56fe2.Spring Gateway\u7f51\u5173\u805a\u5408\u6587\u6863\u6d41\u7a0b\u793a\u610f\u56fe-\u670d\u52a1\u53d1\u73b0",src:n(10303).Z,width:"1161",height:"522"})),(0,l.kt)("p",null,"\u5728\u670d\u52a1\u53d1\u73b0\u7684\u573a\u666f\u4e2d\uff0c\u6211\u4eec\u4f9d\u8d56\u6ce8\u518c\u4e2d\u5fc3\u7ec4\u4ef6\uff0c\u8fd9\u91cc\u4ee5Nacos\u4e3a\u4f8b\uff0c\u4f46\u6211\u4eec\u5c06\u7f51\u5173\u670d\u52a1",(0,l.kt)("inlineCode",{parentName:"p"},"gateway-service"),"\u4e5f\u6ce8\u518c\u5230Nacos\u4e2d\u65f6"),(0,l.kt)("p",null,"\u672c\u8eab\u57fa\u4e8eSpring Cloud\u5fae\u670d\u52a1\u4f53\u7cfb\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoverClient.java"),"\u63a5\u53e3\uff0c\u5728Nacos\u7ec4\u4ef6\u5b9e\u4f8b\u4e0b\uff0c\u4f1a\u4e3a\u6211\u4eec\u89e3\u51b3\u5404\u4e2a\u5b50\u670d\u52a1\u6ce8\u518c\u4e0a\u6765\u7684\u670d\u52a1\u53d1\u73b0\u95ee\u9898\uff0c\u5305\u62ec\u5b50\u670d\u52a1\u5b9e\u4f8b\u5bf9\u8c61\uff0c\u662f\u5426\u4e0a\u7ebf\u3001\u5fc3\u8df3\u68c0\u6d4b\u7b49\u7b49"),(0,l.kt)("p",null,"\u800c\u6211\u4eec\u4f9d\u8d56Spring\u4f53\u7cfb\u63d0\u4f9b\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"ApplicationEvent"),"\u4e8b\u4ef6\u76d1\u542c\u4f53\u7cfb\uff0c\u5c31\u53ef\u4ee5\u4ece\u7edf\u4e00\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoverClient"),"\u4f53\u7cfb\u4e0b\uff0c\u5b9e\u73b0\u6211\u4eec\u7684\u81ea\u52a8\u805a\u5408\u573a\u666f\uff0c\u8fd9\u6837\u7684\u597d\u5904\u662f\u4e0d\u7528\u5173\u5fc3\u5404\u4e2a\u6ce8\u518c\u4e2d\u5fc3\u7684\u5dee\u5f02\uff0c\u5728Spring Cloud\u7684\u5fae\u670d\u52a1\u4f53\u7cfb\u4e0b\uff0c\u6ce8\u518c\u4e2d\u5fc3\u9700\u8981\u9075\u5faa",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoverClient"),"\u63a5\u53e3\u8fdb\u884c\u6807\u51c6\u5b9e\u73b0\u3002"),(0,l.kt)("p",null,"\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7684\u670d\u52a1\u53d1\u73b0\u573a\u666f\u4e0b\uff0c\u6211\u4eec\u901a\u8fc7",(0,l.kt)("inlineCode",{parentName:"p"},"@EventListener"),"\u5b9e\u73b0\u5bf9\u5fae\u670d\u52a1\u573a\u666f\u4e0b\u7684\u4e8b\u4ef6\u76d1\u542c\uff0c\u4ee5\u586b\u5145\u7f51\u5173\u6210\u6587\u6863\u7684\u6570\u636e\u5b9e\u73b0"),(0,l.kt)("p",null,"\u76d1\u542c\u4e8b\u4ef6\u56de\u8c03\u5904\u7406\u6e90\u7801\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'@Slf4j\n@AllArgsConstructor\npublic class ServiceChangeListener {\n \n final DiscoveryClient discoveryClient;\n final ServiceDiscoverHandler serviceDiscoverHandler;\n final Knife4jGatewayProperties knife4jGatewayProperties;\n \n @EventListener(classes = {ApplicationReadyEvent.class, HeartbeatEvent.class, RefreshRoutesEvent.class})\n public void discover() {\n log.debug("discover service.");\n List services = discoveryClient.getServices();\n if (Objects.equals(knife4jGatewayProperties.getStrategy(), GatewayStrategy.DISCOVER)) {\n this.serviceDiscoverHandler.discover(services);\n }\n }\n}\n')),(0,l.kt)("p",null,"\u901a\u8fc7\u6ce8\u518c\u4e2d\u5fc3\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoverClient"),"\u4f53\u7cfb\u4e0b\u7684\u5b9e\u73b0\uff0c\u5305\u62ec",(0,l.kt)("inlineCode",{parentName:"p"},"\u8c03\u5ea6(Scheduler)"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"\u5fc3\u8df3\u68c0\u6d4b(HeartBeat)"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"\u4e8b\u4ef6\u56de\u8c03(ApplicationEvent)"),"\u7b49\u673a\u5236\uff0c\u5b9e\u73b0\u5fae\u670d\u52a1\u7f51\u5173\u5c42\u9762\u6587\u6863\u7684\u81ea\u52a8\u805a\u5408\u3002"),(0,l.kt)("h2",{id:"-5\u670d\u52a1\u53d1\u73b0\u7684\u8def\u7531\u805a\u5408\u7b56\u7565-\u6570\u636e\u6765\u6e90"},"\ud83d\udc2e 5.\u670d\u52a1\u53d1\u73b0\u7684\u8def\u7531\u805a\u5408\u7b56\u7565-\u6570\u636e\u6765\u6e90"),(0,l.kt)("p",null,"\u5728\u4e0a\u9762\u7ae0\u8282\u4e2d\uff0c\u6211\u4eec\u4ece\u4f7f\u7528\u7279\u70b9\u3001\u4e24\u5927\u573a\u666f(\u624b\u52a8/\u670d\u52a1\u53d1\u73b0)\u7b49\u5168\u9762\u4ecb\u7ecd\u4e86knife4j-gateway\u7ec4\u4ef6\uff0c\u5728\u6587\u672b\uff0c\u8fd8\u662f\u6709\u5fc5\u8981\u548c\u5927\u5bb6\u8bb2\u8bb2\u8be5\u7ec4\u4ef6\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"discover"),"\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\uff0c\u5b50\u670d\u52a1\u7684\u662f\u6570\u636e\u6765\u6e90\u5904\u7406\u89c4\u5219"),(0,l.kt)("p",null,"\u4e3b\u8981\u662f4\u4e2a\u65b9\u9762\uff0c\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u57fa\u4e8eSpring Cloud Gateway\u914d\u7f6e\u7684routes\u89c4\u5219\u89e3\u6790\u5b50\u670d\u52a1\u8def\u7531\uff0c\u6570\u636e\u6765\u6e90\uff1a",(0,l.kt)("inlineCode",{parentName:"li"},"spring.cloud.gateway.routes")),(0,l.kt)("li",{parentName:"ul"},"\u5728discover\u670d\u52a1\u53d1\u73b0\u573a\u666f\u4e0b\uff0c\u9488\u5bf9\u81ea\u5b9a\u4e49\u6dfb\u52a0\u7684routes\uff0c\u9ed8\u8ba4\u518d\u6b21\u8ffd\u52a0\uff0c\u6570\u636e\u6765\u6e90\uff1a",(0,l.kt)("inlineCode",{parentName:"li"},"knife4j.gateway.routes")),(0,l.kt)("li",{parentName:"ul"},"\u670d\u52a1\u53d1\u73b0discover\u6a21\u5f0f\u4e0b\uff0c\u5f00\u53d1\u8005\u5728\u7f51\u5173\u6210\u7684\u8def\u7531\u8f6c\u53d1\u6a21\u5f0f\u9ed8\u8ba4\u901a\u8fc7DiscoveryClient\u7684\u9ed8\u8ba4\u65b9\u5f0f\u8f6c\u53d1\u8def\u7531\uff0c\u89c4\u5219\u662f",(0,l.kt)("inlineCode",{parentName:"li"},"pattern:/service-id/**")),(0,l.kt)("li",{parentName:"ul"},"\u63a5\u6536\u7f16\u7801\u65b9\u5f0f\u52a8\u6001\u6ce8\u5165Spring Cloud Gateway\u7f51\u5173\u7684\u8def\u7531\uff0c\u8fdb\u884c\u805a\u5408\u8f6c\u53d1")),(0,l.kt)("h3",{id:"51-\u624b\u52a8\u914d\u7f6e-\u81ea\u5b9a\u4e49routes"},"5.1 \u624b\u52a8\u914d\u7f6e-\u81ea\u5b9a\u4e49Routes"),(0,l.kt)("p",null,"\u81ea\u5b9a\u4e49Routes\u4e3b\u8981\u662f\u5f00\u53d1\u8005\u6839\u636e",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4j-gateway"),"\u7ec4\u4ef6\u63d0\u4f9b\u7684\u5f00\u53d1\u914d\u7f6e\uff0c\u5728\u8fdb\u884c\u624b\u52a8\u805a\u5408\u65f6\uff0c\u586b\u5199\u7684\u914d\u7f6e\uff0c\u8fd9\u90e8\u5206\u7684\u914d\u7f6e\u662f\u7f51\u5173\u805a\u5408\u7684\u6570\u636e\u6765\u6e90\u4e4b\u4e00"),(0,l.kt)("p",null,"\u800c\u914d\u7f6e\u5185\u5bb9",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u4e0d\u4f1a\u505a\u4efb\u4f55\u5904\u7406,\u5f00\u53d1\u8005\u914d\u7f6e\u4ec0\u4e48\u5c31\u5c55\u793a\u4ec0\u4e48"),(0,l.kt)("p",null,"\u793a\u4f8b\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"knife4j:\n gateway:\n enabled: true\n # \u9009\u62e9\u624b\u52a8\n strategy: manual\n routes:\n - name: \u7528\u6237\u670d\u52a1\n service-name: user-service\n url: /user/v2/api-docs\n")),(0,l.kt)("h3",{id:"52-discoverclient\u81ea\u52a8\u53d1\u73b0"},"5.2 DiscoverClient\u81ea\u52a8\u53d1\u73b0"),(0,l.kt)("p",null,"\u5982\u679c\u5f00\u53d1\u8005\u5728Spring Cloud Gateway\u7f51\u5173\u7ec4\u4ef6\u4e0b\u6ca1\u6709\u914d\u7f6e\u5b50\u670d\u52a1\u7684\u8f6c\u53d1\u8def\u7531\u89c4\u5219\uff0c\u5b8c\u5168\u4f9d\u9760\u9ed8\u8ba4\u7684\u8f6c\u53d1\u89c4\u5219(",(0,l.kt)("inlineCode",{parentName:"p"},"pattern:/service-id/**"),")\uff0c\u5176\u5b9e\u5c31\u662f\u6839\u636e\u5b50\u670d\u52a1\u540d\u79f0\u8fdb\u884c\u8f6c\u53d1"),(0,l.kt)("p",null,"\u5728\u8fd9\u79cd\u89c4\u5219\u4e0b\uff0cknife4j-gateway\u7ec4\u4ef6\u4f1a\u8bfb\u53d6",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoverClient"),"\u7ec4\u4ef6\u4e0b\u6ce8\u5165\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"DiscoveryClientRouteDefinitionLocator"),"\u8def\u7531\u5217\u8868\u8fdb\u884c\u89e3\u6790"),(0,l.kt)("p",null,"\u5728Spring Cloud Gateway\u7f51\u5173\u7684\u914d\u7f6e\uff0c\u5f00\u542f\u8be5\u89c4\u5219\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yaml"},"spring:\n # \u8def\u7531\u7f51\u5173\u914d\u7f6e\n gateway:\n # \u542f\u7528\u4e86\u81ea\u52a8\u6839\u636e\u670d\u52a1\u540d\u5efa\u7acb\u8def\u7531\n discovery:\n locator:\n enabled: true\n lower-case-service-id: true\n")),(0,l.kt)("p",null,"\u800c",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u4e2d\uff0c\u5c31\u662f\u76f4\u63a5\u83b7\u53d6\u8be5\u6a21\u5f0f\u4e0b\u7684\u5b50\u670d\u52a1\u5217\u8868\u8f6c\u53d1\u89c4\u5219\uff0c\u6ce8\u5165\u5230",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u7ec4\u4ef6\u4e0b\u7684\u6570\u636e\u6e90\uff0c\u4f5c\u4e3aui\u5c42\u9762\u7684\u8f6c\u53d1\u4f9d\u636e"),(0,l.kt)("p",null,"\u90e8\u5206\u6e90\u7801\u89e3\u6790\u5982\u4e0b:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'public class DiscoverClientRouteServiceConvert extends AbstactServiceRouterConvert {\n \n final DiscoveryClientRouteDefinitionLocator discoveryClientRouteDefinitionLocator;\n final Knife4jGatewayProperties knife4jGatewayProperties;\n @Override\n public void process(ServiceRouterHolder holder) {\n log.debug("Spring Cloud Gateway DiscoverClient process.");\n // \u53d6\u9ed8\u8ba4\u5b50\u670d\u52a1\u7684\u8def\u5f84\u89c4\u5219\n discoveryClientRouteDefinitionLocator.getRouteDefinitions()\n .filter(routeDefinition -> ServiceUtils.startLoadBalance(routeDefinition.getUri()))\n .filter(routeDefinition -> ServiceUtils.includeService(routeDefinition.getUri(), holder.getService(), holder.getExcludeService()))\n .subscribe(routeDefinition -> parseRouteDefinition(holder, this.knife4jGatewayProperties.getDiscover(), routeDefinition.getPredicates(), routeDefinition.getUri().getHost(),\n routeDefinition.getUri().getHost()));\n }\n //others...\n}\n\n')),(0,l.kt)("h3",{id:"53-spring-gateway\u7f51\u5173routes\u914d\u7f6e"},"5.3 Spring Gateway\u7f51\u5173Routes\u914d\u7f6e"),(0,l.kt)("p",null,"\u8be5\u914d\u7f6e\u5c5e\u6027\u548c\u81ea\u5b9a\u4e49\u914d\u7f6eknife4j-gateway\u7ec4\u4ef6\u7684routes\u4e00\u6837\uff0c\u5f00\u53d1\u8005\u4e00\u822c\u4f1a\u81ea\u5b9a\u4e49\u914d\u7f6e\u5b50\u670d\u52a1\u7684\u8def\u7531\u8f6c\u53d1\u7b56\u7565\uff0c\u901a\u8fc7",(0,l.kt)("inlineCode",{parentName:"p"},"spring.cloud.gateway.routes"),"\u8fdb\u884c\u914d\u7f6e"),(0,l.kt)("p",null,"\u800c",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u4f1a\u83b7\u53d6\u8be5\u90e8\u5206\u7684\u6570\u636e\u6e90\uff0c\u901a\u8fc7\u8bfb\u53d6\u5b50\u670d\u52a1\u914d\u7f6e\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"Predicate"),"\u6765\u83b7\u53d6\u5b50\u670d\u52a1\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"Path"),"\u524d\u7f00ContextPath\u89c4\u5219\u8fdb\u884c\u805a\u5408"),(0,l.kt)("h3",{id:"54-\u52a8\u6001\u8def\u7531\u6ce8\u518c\u914d\u7f6e"},"5.4 \u52a8\u6001\u8def\u7531\u6ce8\u518c\u914d\u7f6e"),(0,l.kt)("p",null,"\u52a8\u6001\u8def\u7531\u6ce8\u518c\u53ef\u80fd\u5728\u67d0\u4e9b\u7279\u6b8a\u7684\u573a\u666f\u4e0b\u4e5f\u6709\u9700\u6c42\uff0c\u56e0\u6b64",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-gateway"),"\u4e5f\u4f1a\u628a\u52a8\u6001\u6ce8\u5165\u8fdb\u6765\u7684\u8def\u7531\u8fdb\u884c\u805a\u5408\uff0c\u4f5c\u4e3a\u6587\u6863\u6570\u636e\u6e90\u8fdb\u884c\u5c55\u793a"),(0,l.kt)("p",null,"\u52a8\u6001\u6570\u636e\u6e90\u6765\u6e90\u4e8e",(0,l.kt)("inlineCode",{parentName:"p"},"RouteDefinitionRepository"),"\u5bf9\u8c61"),(0,l.kt)("h2",{id:"6-\u603b\u7ed3"},"6.\ud83d\udc7b \u603b\u7ed3"),(0,l.kt)("p",null,"\u597d\u4e86\uff0c\u672c\u6587\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e5f\u57fa\u672c\u6db5\u76d6\u4e86knife4j-gateway\u7f51\u5173\u805a\u5408\u7ec4\u4ef6\u7684\u65b9\u65b9\u9762\u9762\uff0c\u5e0c\u671b\u8be5\u7ec4\u4ef6\u80fd\u7ed9\u4f60\u5e26\u6765\u5e2e\u52a9~~!"),(0,l.kt)("p",null,'\u60a8\u6709\u66f4\u591a\u7684\u60f3\u6cd5\u6216\u8005\u5efa\u8bae\uff0c\u53ef\u4ee5\u5173\u6ce8\u516c\u4f17\u53f7"Knife4j"\uff0c\u53c2\u4e0eKnife4j\u7684\u4ea4\u6d41\u7fa4\u8fdb\u884c\u6c9f\u901a\u53cd\u9988\uff0c\u8c22\u8c22'),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"\u56fe5.Knife4j\u5fae\u4fe1\u516c\u4f17\u53f7",src:n(91333).Z,width:"1816",height:"624"})))}c.isMDXComponent=!0},61949:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/knife4j-gateway-service-5ecb52aeaac526d378aca862c8542fc7.png"},10303:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/knife4j-gateway-service3-f9ef80b91b014a8490d9a910f2f34eaa.png"},91333:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/qrcode2-aaf1c042b32687b5ab24e5487179986b.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/323e0dd4.936f056a.js b/knife4j-doc/gitee/assets/js/323e0dd4.936f056a.js deleted file mode 100644 index 3dbde382a..000000000 --- a/knife4j-doc/gitee/assets/js/323e0dd4.936f056a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9670],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(n),f=a,m=u["".concat(o,".").concat(f)]||u[f]||p[f]||l;return n?r.createElement(m,i(i({ref:t},d),{},{components:n})):r.createElement(m,i({ref:t},d))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=u;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>f,frontMatter:()=>c,metadata:()=>s,toc:()=>p});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),i=["components"],c={},o="3.2 \u529f\u80fd\u4ecb\u7ecd",s={unversionedId:"middleware-sources/cloud-function",id:"middleware-sources/cloud-function",title:"3.2 \u529f\u80fd\u4ecb\u7ecd",description:"Knife4jCloud V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a",source:"@site/docs/middleware-sources/cloud-function.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/cloud-function",permalink:"/docs/middleware-sources/cloud-function",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},d={},p=[{value:"3.2.1 \u767b\u5f55",id:"321-\u767b\u5f55",level:2},{value:"3.2.2 \u5de5\u4f5c\u53f0",id:"322-\u5de5\u4f5c\u53f0",level:2},{value:"3.2.3 \u9879\u76ee\u7ba1\u7406",id:"323-\u9879\u76ee\u7ba1\u7406",level:2},{value:"3.2.4 \u670d\u52a1\u7ba1\u7406",id:"324-\u670d\u52a1\u7ba1\u7406",level:2},{value:"3.2.5 \u9884\u89c8\u6587\u6863",id:"325-\u9884\u89c8\u6587\u6863",level:2},{value:"3.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"326-\u4e2a\u4eba\u4e2d\u5fc3",level:2}],u={toc:p};function f(e){var t=e.components,c=(0,a.Z)(e,i);return(0,l.kt)("wrapper",(0,r.Z)({},u,c,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"32-\u529f\u80fd\u4ecb\u7ecd"},"3.2 \u529f\u80fd\u4ecb\u7ecd"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,l.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,l.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,l.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,l.kt)("h2",{id:"321-\u767b\u5f55"},"3.2.1 \u767b\u5f55"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,l.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,l.kt)("h2",{id:"322-\u5de5\u4f5c\u53f0"},"3.2.2 \u5de5\u4f5c\u53f0"),(0,l.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,l.kt)("h2",{id:"323-\u9879\u76ee\u7ba1\u7406"},"3.2.3 \u9879\u76ee\u7ba1\u7406"),(0,l.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,l.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,l.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,l.kt)("h2",{id:"324-\u670d\u52a1\u7ba1\u7406"},"3.2.4 \u670d\u52a1\u7ba1\u7406"),(0,l.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,l.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,l.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,l.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,l.kt)("h2",{id:"325-\u9884\u89c8\u6587\u6863"},"3.2.5 \u9884\u89c8\u6587\u6863"),(0,l.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,l.kt)("h2",{id:"326-\u4e2a\u4eba\u4e2d\u5fc3"},"3.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,l.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,l.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})))}f.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/323e0dd4.ebc0fc7e.js b/knife4j-doc/gitee/assets/js/323e0dd4.ebc0fc7e.js new file mode 100644 index 000000000..50e028a7c --- /dev/null +++ b/knife4j-doc/gitee/assets/js/323e0dd4.ebc0fc7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9670],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),s=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),p=s(n),f=a,m=p["".concat(o,".").concat(f)]||p[f]||u[f]||l;return n?r.createElement(m,i(i({ref:t},d),{},{components:n})):r.createElement(m,i({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=f;var c={};for(var o in t)hasOwnProperty.call(t,o)&&(c[o]=t[o]);c.originalType=e,c[p]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>m,frontMatter:()=>c,metadata:()=>s,toc:()=>p});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),i=["components"],c={},o="3.2 \u529f\u80fd\u4ecb\u7ecd",s={unversionedId:"middleware-sources/cloud-function",id:"middleware-sources/cloud-function",title:"3.2 \u529f\u80fd\u4ecb\u7ecd",description:"Knife4jCloud V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a",source:"@site/docs/middleware-sources/cloud-function.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/cloud-function",permalink:"/docs/middleware-sources/cloud-function",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},d={},p=[{value:"3.2.1 \u767b\u5f55",id:"321-\u767b\u5f55",level:2},{value:"3.2.2 \u5de5\u4f5c\u53f0",id:"322-\u5de5\u4f5c\u53f0",level:2},{value:"3.2.3 \u9879\u76ee\u7ba1\u7406",id:"323-\u9879\u76ee\u7ba1\u7406",level:2},{value:"3.2.4 \u670d\u52a1\u7ba1\u7406",id:"324-\u670d\u52a1\u7ba1\u7406",level:2},{value:"3.2.5 \u9884\u89c8\u6587\u6863",id:"325-\u9884\u89c8\u6587\u6863",level:2},{value:"3.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"326-\u4e2a\u4eba\u4e2d\u5fc3",level:2}],u={toc:p},f="wrapper";function m(e){var t=e.components,c=(0,a.Z)(e,i);return(0,l.kt)(f,(0,r.Z)({},u,c,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"32-\u529f\u80fd\u4ecb\u7ecd"},"3.2 \u529f\u80fd\u4ecb\u7ecd"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,l.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,l.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,l.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,l.kt)("h2",{id:"321-\u767b\u5f55"},"3.2.1 \u767b\u5f55"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,l.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,l.kt)("h2",{id:"322-\u5de5\u4f5c\u53f0"},"3.2.2 \u5de5\u4f5c\u53f0"),(0,l.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,l.kt)("h2",{id:"323-\u9879\u76ee\u7ba1\u7406"},"3.2.3 \u9879\u76ee\u7ba1\u7406"),(0,l.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,l.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,l.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,l.kt)("h2",{id:"324-\u670d\u52a1\u7ba1\u7406"},"3.2.4 \u670d\u52a1\u7ba1\u7406"),(0,l.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,l.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,l.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,l.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,l.kt)("h2",{id:"325-\u9884\u89c8\u6587\u6863"},"3.2.5 \u9884\u89c8\u6587\u6863"),(0,l.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,l.kt)("h2",{id:"326-\u4e2a\u4eba\u4e2d\u5fc3"},"3.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,l.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,l.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})))}m.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/333e11b9.644a08bf.js b/knife4j-doc/gitee/assets/js/333e11b9.644a08bf.js new file mode 100644 index 000000000..aab89d4e0 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/333e11b9.644a08bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9297],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),u=l(n),g=a,d=u["".concat(p,".").concat(g)]||u[g]||f[g]||o;return n?r.createElement(d,c(c({ref:t},s),{},{components:n})):r.createElement(d,c({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=g;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[u]="string"==typeof e?e:a,c[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),c=["components"],i={},p="4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",l={unversionedId:"action/aggregation-nacos",id:"action/aggregation-nacos",title:"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",description:"Nacos\u7684\u914d\u7f6e\u548cEureka\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fknife4j.nacos\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837",source:"@site/docs/action/aggregation-nacos.md",sourceDirName:"action",slug:"/action/aggregation-nacos",permalink:"/docs/action/aggregation-nacos",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-eureka"},next:{title:"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI",permalink:"/docs/action/aggregation-docker"}},s={},u=[],f={toc:u},g="wrapper";function d(e){var t=e.components,n=(0,a.Z)(e,c);return(0,o.kt)(g,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"44-nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408openapi\u6587\u6863"},"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863"),(0,o.kt)("p",null,"Nacos\u7684\u914d\u7f6e\u548c",(0,o.kt)("a",{parentName:"p",href:"aggregation-eureka",target:null,rel:null},"Eureka"),"\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j.nacos"),"\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837"),(0,o.kt)("p",null,"\u5173\u4e8eNacos\u7684\u66f4\u591a\u914d\u7f6e\u9700\u8981\u5f00\u53d1\u8005\u53c2\u8003",(0,o.kt)("a",{parentName:"p",href:"/docs/middleware/knife4jAggregation",target:null,rel:null},"\u6587\u6863")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/333e11b9.e95c5cc4.js b/knife4j-doc/gitee/assets/js/333e11b9.e95c5cc4.js deleted file mode 100644 index 2705d085b..000000000 --- a/knife4j-doc/gitee/assets/js/333e11b9.e95c5cc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9297],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),f=l(n),g=a,d=f["".concat(p,".").concat(g)]||f[g]||u[g]||o;return n?r.createElement(d,c(c({ref:t},s),{},{components:n})):r.createElement(d,c({ref:t},s))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=f;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:a,c[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>g,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),c=["components"],i={},p="4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",l={unversionedId:"action/aggregation-nacos",id:"action/aggregation-nacos",title:"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",description:"Nacos\u7684\u914d\u7f6e\u548cEureka\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662fknife4j.nacos\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837",source:"@site/docs/action/aggregation-nacos.md",sourceDirName:"action",slug:"/action/aggregation-nacos",permalink:"/docs/action/aggregation-nacos",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"4.3 Eureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863",permalink:"/docs/action/aggregation-eureka"},next:{title:"4.5 \u57fa\u4e8eKnife4j\u7684Docker\u955c\u50cf\u5feb\u901f\u805a\u5408OpenAPI",permalink:"/docs/action/aggregation-docker"}},s={},u=[],f={toc:u};function g(e){var t=e.components,n=(0,a.Z)(e,c);return(0,o.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"44-nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408openapi\u6587\u6863"},"4.4 Nacos\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI\u6587\u6863"),(0,o.kt)("p",null,"Nacos\u7684\u914d\u7f6e\u548c",(0,o.kt)("a",{parentName:"p",href:"aggregation-eureka",target:null,rel:null},"Eureka"),"\u51e0\u4e4e\u4e00\u6a21\u4e00\u6837\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u533a\u522b\u662f\u5728yml\u8fdb\u884c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j.nacos"),"\u5f00\u5934\uff0c\u5176\u4ed6\u57fa\u672c\u90fd\u662f\u4e00\u6837"),(0,o.kt)("p",null,"\u5173\u4e8eNacos\u7684\u66f4\u591a\u914d\u7f6e\u9700\u8981\u5f00\u53d1\u8005\u53c2\u8003",(0,o.kt)("a",{parentName:"p",href:"/docs/middleware/knife4jAggregation",target:null,rel:null},"\u6587\u6863")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/34a1a38f.b8a57689.js b/knife4j-doc/gitee/assets/js/34a1a38f.b8a57689.js deleted file mode 100644 index 6ea2c1158..000000000 --- a/knife4j-doc/gitee/assets/js/34a1a38f.b8a57689.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9072],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var p=a.createContext({}),g=function(e){var t=a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},l=function(e){var t=g(e.components);return a.createElement(p.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=g(r),d=n,m=u["".concat(p,".").concat(d)]||u[d]||c[d]||o;return r?a.createElement(m,s(s({ref:t},l),{},{components:r})):a.createElement(m,s({ref:t},l))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=u;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:n,s[1]=i;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>g,toc:()=>c});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",g={unversionedId:"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",id:"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",description:"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",permalink:"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},next:{title:"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"}},l={},c=[],u={toc:c};function d(e){var t=e.components,i=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v179-20180806-authorize\u6388\u6743\u652f\u6301"},"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.9 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u9488\u5bf9Integer\u3001double\u3001float\u7b49\u7c7b\u578b\u53c2\u6570,\u6709format\u53c2\u6570\u5219\u663e\u793aformat\u5c5e\u6027,\u4ee5\u533a\u5206\u51c6\u786e\u7c7b\u578b,\u5982\uff1aint64|int32\u7b49"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(6178).Z,width:"1920",height:"1057"})),(0,o.kt)("p",null,"2\u3001fixed \u6eda\u52a8\u6761\u51fa\u73b0\u5e95\u90e8\u90e8\u5206\u5185\u5bb9\u4e0d\u663e\u793abug"),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u83dc\u5355\u63a5\u53e3\u6839\u636e\u4e0d\u540c\u63a5\u53e3\u7c7b\u578b,\u989c\u8272\u8c03\u6574"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(83891).Z,width:"1912",height:"1067"})),(0,o.kt)("p",null,"4\u3001\u4f18\u5316\u6587\u6863\u54cd\u5e94\u6570\u636ejsonview\u5b57\u4f53,\u4f18\u5316\u95f4\u8ddd,\u66f4\u663e\u7d27\u4fc3,\u4f18\u5316\u83dc\u5355,\u63a5\u53e3\u53ca\u63a5\u53e3\u7c7b\u578b\u52a0\u7c97"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(79178).Z,width:"1919",height:"1062"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(40170).Z,width:"1918",height:"1060"})),(0,o.kt)("p",null,"5\u3001add \u9876\u90e8\u52a0\u641c\u7d22\u529f\u80fd\u3001\u53ef\u6839\u636eapi\u5730\u5740\u3001api\u4ecb\u7ecd\u3001api\u7c7b\u578b\u3001\u5206\u7ec4\u540d\u79f0\u5b9e\u73b0\u6a21\u7cca\u641c\u7d22,\u9ed8\u8ba4\u641c\u7d22\u5f53\u524d\u5df2\u52a0\u8f7d\u7684\u5206\u7ec4api,\u5982\u679c\u5176\u4ed6\u5206\u7ec4\u672a\u52a0\u8f7d\u5219\u641c\u7d22\u4e0d\u5230."),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(44677).Z,width:"1920",height:"1057"})),(0,o.kt)("p",null,"6\u3001add \u9488\u5bf9Security-JWT\u7b49\u6743\u9650\u9a8c\u8bc1,\u663e\u793aAuthorize\u83dc\u5355\u6388\u6743"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(66681).Z,width:"1919",height:"1059"})),(0,o.kt)("p",null,"7\u3001add \u5de6\u4fa7\u83dc\u5355\u680f\u53ef\u81ea\u7531\u62d6\u52a8\u957f\u5ea6\u5927\u5c0f"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(94929).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.7.9\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}d.isMDXComponent=!0},66681:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/auth-42e7e8c22446198d6aeb36d9ca159fd5.png"},94929:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/drag-b0f33b8a3f62f7cd5473d1fb1b5a8df1.png"},83891:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/method-6d7026d736c5bcb4b6fc25c53671d7bf.png"},79178:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/r1-6aa0106e3867fe4fdf4bcffce8b8e3f7.png"},40170:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/r2-d65493c11bccc32d4b375875173de944.png"},44677:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/search-b776945de727b1d2ecde2a315b41198e.png"},6178:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/type-384efd73b15ce6911598e74e4c641471.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/34a1a38f.eb7198fb.js b/knife4j-doc/gitee/assets/js/34a1a38f.eb7198fb.js new file mode 100644 index 000000000..2beb41bc5 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/34a1a38f.eb7198fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9072],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var p=a.createContext({}),g=function(e){var t=a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},l=function(e){var t=g(e.components);return a.createElement(p.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,p=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),c=g(r),d=n,m=c["".concat(p,".").concat(d)]||c[d]||u[d]||o;return r?a.createElement(m,s(s({ref:t},l),{},{components:r})):a.createElement(m,s({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[c]="string"==typeof e?e:n,s[1]=i;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>m,frontMatter:()=>i,metadata:()=>g,toc:()=>c});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",g={unversionedId:"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",id:"changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",description:"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",permalink:"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue"},next:{title:"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue"}},l={},c=[],u={toc:c},d="wrapper";function m(e){var t=e.components,i=(0,n.Z)(e,s);return(0,o.kt)(d,(0,a.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v179-20180806-authorize\u6388\u6743\u652f\u6301"},"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.9 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.9 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u9488\u5bf9Integer\u3001double\u3001float\u7b49\u7c7b\u578b\u53c2\u6570,\u6709format\u53c2\u6570\u5219\u663e\u793aformat\u5c5e\u6027,\u4ee5\u533a\u5206\u51c6\u786e\u7c7b\u578b,\u5982\uff1aint64|int32\u7b49"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(6178).Z,width:"1920",height:"1057"})),(0,o.kt)("p",null,"2\u3001fixed \u6eda\u52a8\u6761\u51fa\u73b0\u5e95\u90e8\u90e8\u5206\u5185\u5bb9\u4e0d\u663e\u793abug"),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u83dc\u5355\u63a5\u53e3\u6839\u636e\u4e0d\u540c\u63a5\u53e3\u7c7b\u578b,\u989c\u8272\u8c03\u6574"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(83891).Z,width:"1912",height:"1067"})),(0,o.kt)("p",null,"4\u3001\u4f18\u5316\u6587\u6863\u54cd\u5e94\u6570\u636ejsonview\u5b57\u4f53,\u4f18\u5316\u95f4\u8ddd,\u66f4\u663e\u7d27\u4fc3,\u4f18\u5316\u83dc\u5355,\u63a5\u53e3\u53ca\u63a5\u53e3\u7c7b\u578b\u52a0\u7c97"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(79178).Z,width:"1919",height:"1062"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(40170).Z,width:"1918",height:"1060"})),(0,o.kt)("p",null,"5\u3001add \u9876\u90e8\u52a0\u641c\u7d22\u529f\u80fd\u3001\u53ef\u6839\u636eapi\u5730\u5740\u3001api\u4ecb\u7ecd\u3001api\u7c7b\u578b\u3001\u5206\u7ec4\u540d\u79f0\u5b9e\u73b0\u6a21\u7cca\u641c\u7d22,\u9ed8\u8ba4\u641c\u7d22\u5f53\u524d\u5df2\u52a0\u8f7d\u7684\u5206\u7ec4api,\u5982\u679c\u5176\u4ed6\u5206\u7ec4\u672a\u52a0\u8f7d\u5219\u641c\u7d22\u4e0d\u5230."),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(44677).Z,width:"1920",height:"1057"})),(0,o.kt)("p",null,"6\u3001add \u9488\u5bf9Security-JWT\u7b49\u6743\u9650\u9a8c\u8bc1,\u663e\u793aAuthorize\u83dc\u5355\u6388\u6743"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(66681).Z,width:"1919",height:"1059"})),(0,o.kt)("p",null,"7\u3001add \u5de6\u4fa7\u83dc\u5355\u680f\u53ef\u81ea\u7531\u62d6\u52a8\u957f\u5ea6\u5927\u5c0f"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(94929).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.7.9\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}m.isMDXComponent=!0},66681:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/auth-42e7e8c22446198d6aeb36d9ca159fd5.png"},94929:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/drag-b0f33b8a3f62f7cd5473d1fb1b5a8df1.png"},83891:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/method-6d7026d736c5bcb4b6fc25c53671d7bf.png"},79178:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/r1-6aa0106e3867fe4fdf4bcffce8b8e3f7.png"},40170:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/r2-d65493c11bccc32d4b375875173de944.png"},44677:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/search-b776945de727b1d2ecde2a315b41198e.png"},6178:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/type-384efd73b15ce6911598e74e4c641471.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3525a635.876ee849.js b/knife4j-doc/gitee/assets/js/3525a635.876ee849.js deleted file mode 100644 index 7ca1326c1..000000000 --- a/knife4j-doc/gitee/assets/js/3525a635.876ee849.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[134],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),c=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(u,".").concat(d)]||m[d]||p[d]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.d(t,{Z:()=>i});var r=n(67294),a=n(86010);const o="tabItem_Ymn6";function i(e){var t=e.children,n=e.hidden,i=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o,i),hidden:n},t)}},65488:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(87462),a=n(67294),o=n(86010),i=n(72389),l=n(67392),u=n(7094),c=n(12466);const s="tabList__CuJ",p="tabItem_LNqP";function m(e){var t,n,i=e.lazy,m=e.block,d=e.defaultValue,f=e.values,v=e.groupId,b=e.className,y=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&"value"in e.props)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),h=null!=f?f:y.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),g=(0,l.l)(h,(function(e,t){return e.value===t.value}));if(g.length>0)throw new Error('Docusaurus error: Duplicate values "'+g.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var k=null===d?d:null!=(t=null!=d?d:null==(n=y.find((function(e){return e.props.default})))?void 0:n.props.value)?t:y[0].props.value;if(null!==k&&!h.some((function(e){return e.value===k})))throw new Error('Docusaurus error: The has a defaultValue "'+k+'" but none of its children has the corresponding value. Available values are: '+h.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var w=(0,u.U)(),j=w.tabGroupChoices,O=w.setTabGroupChoices,x=(0,a.useState)(k),T=x[0],E=x[1],N=[],P=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=v){var C=j[v];null!=C&&C!==T&&h.some((function(e){return e.value===C}))&&E(C)}var Z=function(e){var t=e.currentTarget,n=N.indexOf(t),r=h[n].value;r!==T&&(P(t),E(r),null!=v&&O(v,String(r)))},D=function(e){var t,n=null;switch(e.key){case"ArrowRight":var r,a=N.indexOf(e.currentTarget)+1;n=null!=(r=N[a])?r:N[0];break;case"ArrowLeft":var o,i=N.indexOf(e.currentTarget)-1;n=null!=(o=N[i])?o:N[N.length-1]}null==(t=n)||t.focus()};return a.createElement("div",{className:(0,o.Z)("tabs-container",s)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":m},b)},h.map((function(e){var t=e.value,n=e.label,i=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:T===t?0:-1,"aria-selected":T===t,key:t,ref:function(e){return N.push(e)},onKeyDown:D,onFocus:Z,onClick:Z},i,{className:(0,o.Z)("tabs__item",p,null==i?void 0:i.className,{"tabs__item--active":T===t})}),null!=n?n:t)}))),i?(0,a.cloneElement)(y.filter((function(e){return e.props.value===T}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},y.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==T})}))))}function d(e){var t=(0,i.Z)();return a.createElement(m,(0,r.Z)({key:String(t)},e))}},52403:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>s,default:()=>v,frontMatter:()=>c,metadata:()=>p,toc:()=>d});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=n(65488),l=n(85162),u=["components"],c={id:"donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f"},s=void 0,p={unversionedId:"community/donate",id:"community/donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/community/donate.mdx",sourceDirName:"community",slug:"/community/donate",permalink:"/docs/community/donate",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"docs",previous:{title:"\u7248\u672c\u8bf4\u660e",permalink:"/docs/community/changelog"},next:{title:"\u793a\u4f8b\u4ee3\u7801",permalink:"/docs/community/simple-demo"}},m={},d=[],f={toc:d};function v(e){var t=e.components,n=(0,a.Z)(e,u);return(0,o.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Knife4j\u81ea2017\u5e74\u5f00\u6e90\u81f3\u4eca\u5df2\u7ecf5\u5e74\u6709\u4f59,\u5f00\u6e90\u8def\u4e0a,\u79bb\u4e0d\u5f00\u5f00\u53d1\u8005\u7684\u652f\u6301\u548c\u5e2e\u52a9\uff01\uff01\uff01"),(0,o.kt)("p",null,"\u5982\u679c\u60a8\u6709\u4ea7\u54c1\u9700\u8981\u5728Knife4j\u7684\u5b98\u7f51\u4e0a\u8fdb\u884c\u63a8\u5e7f\uff0c\u53ef\u4ee5\u7533\u8bf7\u6210\u4e3aKnife4j\u7684\u8d5e\u52a9\u5546\uff0cKnife4j\u5c06\u5bf9\u60a8\u7684\u4ea7\u54c1\u5728Banner\u4f4d\u8fdb\u884c\u5c55\u793a,Knife4j\u5b98\u7f51\u901a\u8fc7CPM(\u66dd\u5149\u5ea6)\u7684\u65b9\u5f0f\u6536\u53d6\u8d39\u7528,\u8be6\u60c5\u53ef\u4ee5\u52a0\u5fae\u4fe1\u7ec6\u804a\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"xiao934447")),(0,o.kt)("p",null,"\u6216\u8005\u53ef\u4ee5\u901a\u8fc7\u53d1\u9001\u90ae\u4ef6\u7684\u65b9\u5f0f\u4e0e\u6211\u4eec\u53d6\u5f97\u8054\u7cfb,\u90ae\u7bb1\u5730\u5740\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"xiaoymin@foxmail.com")),(0,o.kt)("p",null,"\u5f53\u7136\u5982\u679c\u60a8\u89c9\u5f97",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e0d\u9519,\u4e5f\u53ef\u4ee5\u901a\u8fc7\u626b\u7801\u7684\u65b9\u5f0f\u8bf7Knife4j\u7684\u4f5c\u8005\u559d\u4e00\u676f\u5496\u5561\uff01\uff01\uff01"),(0,o.kt)(i.Z,{groupId:"quick_start1",mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"zhifubao",label:"\u652f\u4ed8\u5b9d",default:!0,mdxType:"TabItem"},(0,o.kt)("img",{src:"https://xiaoym.gitee.io/images/website/pay_ali.jpg",width:"400"})),(0,o.kt)(l.Z,{value:"weixin",label:"\u5fae\u4fe1\u652f\u4ed8",mdxType:"TabItem"},(0,o.kt)("img",{src:"https://xiaoym.gitee.io/images/website/pay_wechat.jpg",width:"400"}))),(0,o.kt)("p",null,"\u5f53\u7136\u4e5f\u6b22\u8fceStar\u3001PR\u3001ISSUE\u7b49\u4efb\u4f55\u65b9\u5f0f\u7684\u652f\u6301,\u975e\u5e38\u611f\u8c22~~\uff01"),(0,o.kt)("p",null,"\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3525a635.e9f7a286.js b/knife4j-doc/gitee/assets/js/3525a635.e9f7a286.js new file mode 100644 index 000000000..8e6ebb5d3 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3525a635.e9f7a286.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[134],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),c=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=c(n),d=a,f=p["".concat(u,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.d(t,{Z:()=>i});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function i(e){var t=e.children,n=e.hidden,i=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,i),hidden:n},t)}},65488:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(87462),a=n(67294),o=n(86010),i=n(72389),l=n(67392),u=n(7094),c=n(12466);const s={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function p(e){var t,n,i=e.lazy,p=e.block,m=e.defaultValue,d=e.values,f=e.groupId,b=e.className,v=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&"value"in e.props)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=d?d:v.map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes}})),h=(0,l.l)(y,(function(e,t){return e.value===t.value}));if(h.length>0)throw new Error('Docusaurus error: Duplicate values "'+h.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var g=null===m?m:null!=(t=null!=m?m:null==(n=v.find((function(e){return e.props.default})))?void 0:n.props.value)?t:v[0].props.value;if(null!==g&&!y.some((function(e){return e.value===g})))throw new Error('Docusaurus error: The has a defaultValue "'+g+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var k=(0,u.U)(),w=k.tabGroupChoices,j=k.setTabGroupChoices,O=(0,a.useState)(g),x=O[0],T=O[1],E=[],N=(0,c.o5)().blockElementScrollPositionUntilNextRender;if(null!=f){var I=w[f];null!=I&&I!==x&&y.some((function(e){return e.value===I}))&&T(I)}var P=function(e){var t=e.currentTarget,n=E.indexOf(t),r=y[n].value;r!==x&&(N(t),T(r),null!=f&&j(f,String(r)))},C=function(e){var t,n=null;switch(e.key){case"ArrowRight":var r,a=E.indexOf(e.currentTarget)+1;n=null!=(r=E[a])?r:E[0];break;case"ArrowLeft":var o,i=E.indexOf(e.currentTarget)-1;n=null!=(o=E[i])?o:E[E.length-1]}null==(t=n)||t.focus()};return a.createElement("div",{className:(0,o.Z)("tabs-container",s.tabList)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":p},b)},y.map((function(e){var t=e.value,n=e.label,i=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:x===t?0:-1,"aria-selected":x===t,key:t,ref:function(e){return E.push(e)},onKeyDown:C,onFocus:P,onClick:P},i,{className:(0,o.Z)("tabs__item",s.tabItem,null==i?void 0:i.className,{"tabs__item--active":x===t})}),null!=n?n:t)}))),i?(0,a.cloneElement)(v.filter((function(e){return e.props.value===x}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},v.map((function(e,t){return(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==x})}))))}function m(e){var t=(0,i.Z)();return a.createElement(p,(0,r.Z)({key:String(t)},e))}},52403:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>s,default:()=>v,frontMatter:()=>c,metadata:()=>p,toc:()=>d});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=n(65488),l=n(85162),u=["components"],c={id:"donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f"},s=void 0,p={unversionedId:"community/donate",id:"community/donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/community/donate.mdx",sourceDirName:"community",slug:"/community/donate",permalink:"/docs/community/donate",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"donate",title:"\u8d5e\u52a9\u6211\u4eec",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"docs",previous:{title:"\u7248\u672c\u8bf4\u660e",permalink:"/docs/community/changelog"},next:{title:"\u793a\u4f8b\u4ee3\u7801",permalink:"/docs/community/simple-demo"}},m={},d=[],f={toc:d},b="wrapper";function v(e){var t=e.components,n=(0,a.Z)(e,u);return(0,o.kt)(b,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Knife4j\u81ea2017\u5e74\u5f00\u6e90\u81f3\u4eca\u5df2\u7ecf5\u5e74\u6709\u4f59,\u5f00\u6e90\u8def\u4e0a,\u79bb\u4e0d\u5f00\u5f00\u53d1\u8005\u7684\u652f\u6301\u548c\u5e2e\u52a9\uff01\uff01\uff01"),(0,o.kt)("p",null,"\u5982\u679c\u60a8\u6709\u4ea7\u54c1\u9700\u8981\u5728Knife4j\u7684\u5b98\u7f51\u4e0a\u8fdb\u884c\u63a8\u5e7f\uff0c\u53ef\u4ee5\u7533\u8bf7\u6210\u4e3aKnife4j\u7684\u8d5e\u52a9\u5546\uff0cKnife4j\u5c06\u5bf9\u60a8\u7684\u4ea7\u54c1\u5728Banner\u4f4d\u8fdb\u884c\u5c55\u793a,Knife4j\u5b98\u7f51\u901a\u8fc7CPM(\u66dd\u5149\u5ea6)\u7684\u65b9\u5f0f\u6536\u53d6\u8d39\u7528,\u8be6\u60c5\u53ef\u4ee5\u52a0\u5fae\u4fe1\u7ec6\u804a\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"xiao934447")),(0,o.kt)("p",null,"\u6216\u8005\u53ef\u4ee5\u901a\u8fc7\u53d1\u9001\u90ae\u4ef6\u7684\u65b9\u5f0f\u4e0e\u6211\u4eec\u53d6\u5f97\u8054\u7cfb,\u90ae\u7bb1\u5730\u5740\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"xiaoymin@foxmail.com")),(0,o.kt)("p",null,"\u5f53\u7136\u5982\u679c\u60a8\u89c9\u5f97",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e0d\u9519,\u4e5f\u53ef\u4ee5\u901a\u8fc7\u626b\u7801\u7684\u65b9\u5f0f\u8bf7Knife4j\u7684\u4f5c\u8005\u559d\u4e00\u676f\u5496\u5561\uff01\uff01\uff01"),(0,o.kt)(i.Z,{groupId:"quick_start1",mdxType:"Tabs"},(0,o.kt)(l.Z,{value:"zhifubao",label:"\u652f\u4ed8\u5b9d",default:!0,mdxType:"TabItem"},(0,o.kt)("img",{src:"https://xiaoym.gitee.io/images/website/pay_ali.jpg",width:"400"})),(0,o.kt)(l.Z,{value:"weixin",label:"\u5fae\u4fe1\u652f\u4ed8",mdxType:"TabItem"},(0,o.kt)("img",{src:"https://xiaoym.gitee.io/images/website/pay_wechat.jpg",width:"400"}))),(0,o.kt)("p",null,"\u5f53\u7136\u4e5f\u6b22\u8fceStar\u3001PR\u3001ISSUE\u7b49\u4efb\u4f55\u65b9\u5f0f\u7684\u652f\u6301,\u975e\u5e38\u611f\u8c22~~\uff01"),(0,o.kt)("p",null,"\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3558edca.02e49c2f.js b/knife4j-doc/gitee/assets/js/3558edca.02e49c2f.js new file mode 100644 index 000000000..dffddf136 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3558edca.02e49c2f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5975],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},g=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",k={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),m=s(n),u=r,c=m["".concat(l,".").concat(u)]||m[u]||k[u]||i;return n?a.createElement(c,p(p({ref:t},g),{},{components:n})):a.createElement(c,p({ref:t},g))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,p=new Array(i);p[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[m]="string"==typeof e?e:r,p[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>m});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),p=["components"],o={},l="[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",s={unversionedId:"changelog/x/2020-03-08-knife4j-2.0.2-issue",id:"changelog/x/2020-03-08-knife4j-2.0.2-issue",title:"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2020-03-08-knife4j-2.0.2-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2020-03-08-knife4j-2.0.2-issue",permalink:"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]",permalink:"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"},next:{title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"}},g={},m=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j",id:"knife4j",level:3},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2}],k={toc:m},u="wrapper";function c(e){var t=e.components,o=(0,r.Z)(e,p);return(0,i.kt)(u,(0,a.Z)({},k,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v202-20200308-knife4j-202\u53d1\u5e03swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177"},"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/",target:null,rel:null},"https://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),":",(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j"},"knife4j"),(0,i.kt)("p",null,"1\u3001\u65b0\u589e",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-dependencies"),"\u6a21\u5757,\u7ba1\u7406knife4j\u7684\u76f8\u5173Maven\u5f15\u7528,\u53ef\u4ee5\u4ee5Maven\u7684BOM\u65b9\u5f0f\u5f15\u5165",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j")),(0,i.kt)("p",null,"2\u3001",(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"\u5b98\u7f51"),"\u6587\u6863\u540c\u6b65\u66f4\u65b0."),(0,i.kt)("p",null,"3\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-annotations"),"\u5bfc\u81f4\u7684\u7248\u672c\u51b2\u7a81",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17G31",target:"_blank",rel:"noopener"},"gitee #I17G31"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/191",target:"_blank",rel:"noopener"},"GitHub #191")),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u4fee\u590d\u5207\u6362tab\u4e4b\u540e \u518d\u6b21\u53d1\u9001\u8bf7\u6c42\u4e0d\u5e26\u53c2\u6570\u4e14\u4e0d\u663e\u793a\u54cd\u5e94\u6570\u636e\u7684\u95ee\u9898\uff0c\u8c03\u8bd5\u5f02\u5e38\u7b49\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/13",target:"_blank",rel:"noopener"},"PR 13 @gitee"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17FFX",target:"_blank",rel:"noopener"},"gitee #I17FFX"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/196",target:"_blank",rel:"noopener"},"GitHub #196"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/187",target:"_blank",rel:"noopener"},"GitHub #187")),(0,i.kt)("p",null,"2\u3001\u4f18\u5316\u8c03\u8bd5\u6846\u5168\u90e8\u9009\u4e2d\u7684\u95ee\u9898,\u5728\u53d6\u6d88\u5168\u9009\u65f6,\u53ea\u6709\u5728\u8f93\u5165\u53c2\u6570\u6539\u53d8\u65f6\u624d\u4f1a\u9009\u4e2d\u8be5\u53c2\u6570,\u53d6\u6d88\u539f\u6765\u9ed8\u8ba4\u9009\u4e2d\u5168\u90e8\u53c2\u6570",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19V6D",target:"_blank",rel:"noopener"},"gitee #I19V6D")),(0,i.kt)("p",null,"3\u3001\u9488\u5bf9Form\u8868\u5355\u7c7b\u578b\u7684\u8bf7\u6c42\u6784\u9020curl\u547d\u4ee4\u884c\u65f6\u5728\u672a\u8f93\u5165\u503c\u7684\u60c5\u51b5\u4e0b\u4e3anull\u7684\u60c5\u51b5,\u4fee\u6539\u4e3a\u7a7a\u5b57\u7b26\u4e32",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18IBZ",target:"_blank",rel:"noopener"},"gitee #I18IBZ")),(0,i.kt)("p",null,"4\u3001\u4f18\u5316\u5168\u5c40\u53c2\u6570\u8bbe\u7f6e\u529f\u80fd,\u9488\u5bf9\u53c2\u6570\u6570\u636e\u592a\u957f\u4e0d\u6362\u884c\u95ee\u9898\uff0c\u4ee5\u53ca\u53c2\u6570\u9700\u8981\u4fee\u6539\u65f6\u9700\u8981\u91cd\u65b0\u5220\u9664\u7684\u4ea4\u4e92\u4f53\u9a8c\uff0c\u5f00\u53d1\u8005\u5728\u65b0\u589e\u53c2\u6570\u540e\u53ef\u4ee5\u65b9\u4fbf\u7684\u66f4\u6539\u53c2\u6570\u6570\u636e\u503c\u4ee5\u53ca\u53c2\u6570\u7684\u7c7b\u578b",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17OV1",target:"_blank",rel:"noopener"},"gitee #I17OV1"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19GJK",target:"_blank",rel:"noopener"},"gitee #I19GJK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1A9V1",target:"_blank",rel:"noopener"},"gitee #I1A9V1"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18HMJ",target:"_blank",rel:"noopener"},"gitee #I18HMJ"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/176",target:"_blank",rel:"noopener"},"GitHub #176")),(0,i.kt)("p",null,"5\u3001\u8bf7\u6c42\u53c2\u6570\u5728\u672a\u7ed9\u5b9aexample\u9ed8\u8ba4\u503c\u7684\u60c5\u51b5\u4e0b,\u6587\u672c\u8f93\u5165\u6846\u7684placeHolder\u5c5e\u6027\u663e\u793a\u8be5\u5b57\u6bb5\u7684\u6587\u5b57\u8bf4\u660e",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17RKI",target:"_blank",rel:"noopener"},"gitee #I17RKI")),(0,i.kt)("p",null,"6\u3001\u4fee\u590d\u589e\u5f3a\u5c5e\u6027\u5ffd\u7565\u53c2\u6570\u4e0d\u751f\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/16",target:"_blank",rel:"noopener"},"gitee #PR-16"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I136KU",target:"_blank",rel:"noopener"},"gitee #I136KU"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I187VN",target:"_blank",rel:"noopener"},"gitee #I187VN"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16A71",target:"_blank",rel:"noopener"},"gitee #I16A71")),(0,i.kt)("p",null,"7\u3001\u8c03\u8bd5\u53c2\u6570\u6846\u589e\u52a0\u5bf9\u540e\u7aef\u679a\u4e3e\u7684\u652f\u6301,\u6539\u8f93\u5165\u6846\u4e3a\u4e0b\u62c9\u9009\u62e9\u6846",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18MHO",target:"_blank",rel:"noopener"},"gitee #I18MHO")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(46481).Z,width:"1034",height:"446"})),(0,i.kt)("p",null,"8\u3001service-worker.js\u62a5404\u95ee\u9898\uff0c\u6784\u5efa\u6253\u5305\u65f6\u6dfb\u52a0\u6b64\u6587\u4ef6",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17D0Y",target:"_blank",rel:"noopener"},"gitee #I17D0Y"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/185",target:"_blank",rel:"noopener"},"GitHub #185")),(0,i.kt)("p",null,"9\u3001get\u8bf7\u6c42\u53c2\u6570\u51fa\u73b0\u7279\u6b8a\u5b57\u7b26\u672a\u7f16\u7801\u5904\u7406\u5bfc\u81f4\u51fa\u73b0400\u9519\u8bef",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19C8Y",target:"_blank",rel:"noopener"},"gitee #I19C8Y")),(0,i.kt)("p",null,"10\u3001\u540e\u7aef\u65b0\u589e\u63a5\u53e3\u6216\u8005\u63a5\u53e3\u7f16\u8f91\u540e,\u5728ui\u754c\u9762\u663e\u793a\u66f4\u65b0\u6807\u5fd7,\u5728\u83dc\u5355\u4e0a\u4f1a\u51fa\u73b0\u4e00\u4e2a\u84dd\u8272\u7684\u5fbd\u6807",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1AQFW",target:"_blank",rel:"noopener"},"gitee #I1AQFW"),"\uff0c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(57757).Z,width:"883",height:"339"})),(0,i.kt)("p",null,"11\u3001\u540e\u7aef\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},'@ApiOperationSupport(author = "xiaoymin@foxmail.com")'),"\u652f\u6301\u6bcf\u4e2a\u63a5\u53e3\u63d0\u4f9b\u5f00\u53d1\u8005\u7684\u5448\u73b0,\u6700\u7ec8\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(89698).Z,width:"972",height:"249"})),(0,i.kt)("p",null,"12\u3001\u8c03\u8bd5\u53d1\u9001\u6309\u94ae\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"loading"),"\u6548\u679c,\u9488\u5bf9\u63a5\u53e3\u54cd\u5e94\u8f83\u957f\u7684\u60c5\u51b5\u4e0b\u63d0\u5347\u4ea4\u4e92\u6548\u679c"),(0,i.kt)("p",null,"13\u3001\u9488\u5bf9Authorize\u83dc\u5355\u680f\u7684\u53c2\u6570,\u4fdd\u5b58\u53c2\u6570\u662f\u5168\u5c40\u4fdd\u5b58,\u5176\u5b83\u903b\u8f91\u5206\u7ec4\u7684\u63a5\u53e3\u518d\u8c03\u8bd5\u65f6,\u4e0d\u9700\u8981\u518d\u4fdd\u5b58\u4e00\u6b21\u65b0\u503c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16Z10",target:"_blank",rel:"noopener"},"gitee #I16Z10")),(0,i.kt)("p",null,"14\u3001\u4fee\u590d\u90e8\u5206\u60c5\u51b5\u54cd\u5e94\u5b57\u6bb5\u5728ace-editor\u7f16\u8f91\u5668\u53f3\u8fb9\u680f\u4e0d\u663e\u793a\u5b57\u6bb5\u8bf4\u660e\u7684\u60c5\u51b5",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17F5Y",target:"_blank",rel:"noopener"},"gitee #I17F5Y")),(0,i.kt)("p",null,"15\u3001\u641c\u7d22\u6846\u5b8c\u5584\u5bf9\u63a5\u53e3\u8bf7\u6c42Api\u5730\u5740\u680f\u7684\u6a21\u7cca\u641c\u7d22\u5339\u914d",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19EN0",target:"_blank",rel:"noopener"},"gitee #I19EN0"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1B0Q9",target:"_blank",rel:"noopener"},"gitee #I1B0Q9")),(0,i.kt)("p",null,"16\u3001\u8c03\u8bd5\u54cd\u5e94\u6570\u636e\u884c\u592a\u957f,\u65e0\u6cd5\u6362\u884c\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17F1J",target:"_blank",rel:"noopener"},"gitee #I17F1J")),(0,i.kt)("p",null,"17\u3001\u5728\u5f53\u524d\u63a5\u53e3\u65e0\u53c2\u6570\u7684\u60c5\u51b5\u4e0b,\u754c\u9762\u6dfb\u52a0\u5168\u5c40\u53c2\u6570\u65e0\u6548\u679c\u7684bug"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.2\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"\u4f7f\u7528Spring Boot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.2\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.2\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(80961).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(40754).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(28024).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79161).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(7414).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(58955).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,i.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(35684).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}c.isMDXComponent=!0},80961:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},7414:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},58955:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},35684:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},28024:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},79161:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},40754:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"},57757:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-1-ade356cb357579608bb164265be372a2.png"},46481:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-2-244e2ff8e059ee0860500c5bb160e556.png"},89698:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-3-f8b5adc335d90a18ad8c926574e59ae9.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3558edca.1d885684.js b/knife4j-doc/gitee/assets/js/3558edca.1d885684.js deleted file mode 100644 index d6ec4edaa..000000000 --- a/knife4j-doc/gitee/assets/js/3558edca.1d885684.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5975],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>u});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},g=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),k=s(n),u=r,c=k["".concat(l,".").concat(u)]||k[u]||m[u]||i;return n?a.createElement(c,p(p({ref:t},g),{},{components:n})):a.createElement(c,p({ref:t},g))}));function u(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,p=new Array(i);p[0]=k;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:r,p[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>m});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),p=["components"],o={},l="[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",s={unversionedId:"changelog/x/2020-03-08-knife4j-2.0.2-issue",id:"changelog/x/2020-03-08-knife4j-2.0.2-issue",title:"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2020-03-08-knife4j-2.0.2-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2020-03-08-knife4j-2.0.2-issue",permalink:"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]",permalink:"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"},next:{title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"}},g={},m=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j",id:"knife4j",level:3},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2}],k={toc:m};function u(e){var t=e.components,o=(0,r.Z)(e,p);return(0,i.kt)("wrapper",(0,a.Z)({},k,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v202-20200308-knife4j-202\u53d1\u5e03swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177"},"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/",target:null,rel:null},"https://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),":",(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j"},"knife4j"),(0,i.kt)("p",null,"1\u3001\u65b0\u589e",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-dependencies"),"\u6a21\u5757,\u7ba1\u7406knife4j\u7684\u76f8\u5173Maven\u5f15\u7528,\u53ef\u4ee5\u4ee5Maven\u7684BOM\u65b9\u5f0f\u5f15\u5165",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j")),(0,i.kt)("p",null,"2\u3001",(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"\u5b98\u7f51"),"\u6587\u6863\u540c\u6b65\u66f4\u65b0."),(0,i.kt)("p",null,"3\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-annotations"),"\u5bfc\u81f4\u7684\u7248\u672c\u51b2\u7a81",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17G31",target:"_blank",rel:"noopener"},"gitee #I17G31"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/191",target:"_blank",rel:"noopener"},"GitHub #191")),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u4fee\u590d\u5207\u6362tab\u4e4b\u540e \u518d\u6b21\u53d1\u9001\u8bf7\u6c42\u4e0d\u5e26\u53c2\u6570\u4e14\u4e0d\u663e\u793a\u54cd\u5e94\u6570\u636e\u7684\u95ee\u9898\uff0c\u8c03\u8bd5\u5f02\u5e38\u7b49\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/13",target:"_blank",rel:"noopener"},"PR 13 @gitee"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17FFX",target:"_blank",rel:"noopener"},"gitee #I17FFX"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/196",target:"_blank",rel:"noopener"},"GitHub #196"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/187",target:"_blank",rel:"noopener"},"GitHub #187")),(0,i.kt)("p",null,"2\u3001\u4f18\u5316\u8c03\u8bd5\u6846\u5168\u90e8\u9009\u4e2d\u7684\u95ee\u9898,\u5728\u53d6\u6d88\u5168\u9009\u65f6,\u53ea\u6709\u5728\u8f93\u5165\u53c2\u6570\u6539\u53d8\u65f6\u624d\u4f1a\u9009\u4e2d\u8be5\u53c2\u6570,\u53d6\u6d88\u539f\u6765\u9ed8\u8ba4\u9009\u4e2d\u5168\u90e8\u53c2\u6570",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19V6D",target:"_blank",rel:"noopener"},"gitee #I19V6D")),(0,i.kt)("p",null,"3\u3001\u9488\u5bf9Form\u8868\u5355\u7c7b\u578b\u7684\u8bf7\u6c42\u6784\u9020curl\u547d\u4ee4\u884c\u65f6\u5728\u672a\u8f93\u5165\u503c\u7684\u60c5\u51b5\u4e0b\u4e3anull\u7684\u60c5\u51b5,\u4fee\u6539\u4e3a\u7a7a\u5b57\u7b26\u4e32",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18IBZ",target:"_blank",rel:"noopener"},"gitee #I18IBZ")),(0,i.kt)("p",null,"4\u3001\u4f18\u5316\u5168\u5c40\u53c2\u6570\u8bbe\u7f6e\u529f\u80fd,\u9488\u5bf9\u53c2\u6570\u6570\u636e\u592a\u957f\u4e0d\u6362\u884c\u95ee\u9898\uff0c\u4ee5\u53ca\u53c2\u6570\u9700\u8981\u4fee\u6539\u65f6\u9700\u8981\u91cd\u65b0\u5220\u9664\u7684\u4ea4\u4e92\u4f53\u9a8c\uff0c\u5f00\u53d1\u8005\u5728\u65b0\u589e\u53c2\u6570\u540e\u53ef\u4ee5\u65b9\u4fbf\u7684\u66f4\u6539\u53c2\u6570\u6570\u636e\u503c\u4ee5\u53ca\u53c2\u6570\u7684\u7c7b\u578b",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17OV1",target:"_blank",rel:"noopener"},"gitee #I17OV1"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19GJK",target:"_blank",rel:"noopener"},"gitee #I19GJK"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1A9V1",target:"_blank",rel:"noopener"},"gitee #I1A9V1"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18HMJ",target:"_blank",rel:"noopener"},"gitee #I18HMJ"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/176",target:"_blank",rel:"noopener"},"GitHub #176")),(0,i.kt)("p",null,"5\u3001\u8bf7\u6c42\u53c2\u6570\u5728\u672a\u7ed9\u5b9aexample\u9ed8\u8ba4\u503c\u7684\u60c5\u51b5\u4e0b,\u6587\u672c\u8f93\u5165\u6846\u7684placeHolder\u5c5e\u6027\u663e\u793a\u8be5\u5b57\u6bb5\u7684\u6587\u5b57\u8bf4\u660e",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17RKI",target:"_blank",rel:"noopener"},"gitee #I17RKI")),(0,i.kt)("p",null,"6\u3001\u4fee\u590d\u589e\u5f3a\u5c5e\u6027\u5ffd\u7565\u53c2\u6570\u4e0d\u751f\u6548\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/16",target:"_blank",rel:"noopener"},"gitee #PR-16"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I136KU",target:"_blank",rel:"noopener"},"gitee #I136KU"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I187VN",target:"_blank",rel:"noopener"},"gitee #I187VN"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16A71",target:"_blank",rel:"noopener"},"gitee #I16A71")),(0,i.kt)("p",null,"7\u3001\u8c03\u8bd5\u53c2\u6570\u6846\u589e\u52a0\u5bf9\u540e\u7aef\u679a\u4e3e\u7684\u652f\u6301,\u6539\u8f93\u5165\u6846\u4e3a\u4e0b\u62c9\u9009\u62e9\u6846",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I18MHO",target:"_blank",rel:"noopener"},"gitee #I18MHO")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(46481).Z,width:"1034",height:"446"})),(0,i.kt)("p",null,"8\u3001service-worker.js\u62a5404\u95ee\u9898\uff0c\u6784\u5efa\u6253\u5305\u65f6\u6dfb\u52a0\u6b64\u6587\u4ef6",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17D0Y",target:"_blank",rel:"noopener"},"gitee #I17D0Y"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/185",target:"_blank",rel:"noopener"},"GitHub #185")),(0,i.kt)("p",null,"9\u3001get\u8bf7\u6c42\u53c2\u6570\u51fa\u73b0\u7279\u6b8a\u5b57\u7b26\u672a\u7f16\u7801\u5904\u7406\u5bfc\u81f4\u51fa\u73b0400\u9519\u8bef",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19C8Y",target:"_blank",rel:"noopener"},"gitee #I19C8Y")),(0,i.kt)("p",null,"10\u3001\u540e\u7aef\u65b0\u589e\u63a5\u53e3\u6216\u8005\u63a5\u53e3\u7f16\u8f91\u540e,\u5728ui\u754c\u9762\u663e\u793a\u66f4\u65b0\u6807\u5fd7,\u5728\u83dc\u5355\u4e0a\u4f1a\u51fa\u73b0\u4e00\u4e2a\u84dd\u8272\u7684\u5fbd\u6807",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1AQFW",target:"_blank",rel:"noopener"},"gitee #I1AQFW"),"\uff0c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(57757).Z,width:"883",height:"339"})),(0,i.kt)("p",null,"11\u3001\u540e\u7aef\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},'@ApiOperationSupport(author = "xiaoymin@foxmail.com")'),"\u652f\u6301\u6bcf\u4e2a\u63a5\u53e3\u63d0\u4f9b\u5f00\u53d1\u8005\u7684\u5448\u73b0,\u6700\u7ec8\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(89698).Z,width:"972",height:"249"})),(0,i.kt)("p",null,"12\u3001\u8c03\u8bd5\u53d1\u9001\u6309\u94ae\u589e\u52a0",(0,i.kt)("inlineCode",{parentName:"p"},"loading"),"\u6548\u679c,\u9488\u5bf9\u63a5\u53e3\u54cd\u5e94\u8f83\u957f\u7684\u60c5\u51b5\u4e0b\u63d0\u5347\u4ea4\u4e92\u6548\u679c"),(0,i.kt)("p",null,"13\u3001\u9488\u5bf9Authorize\u83dc\u5355\u680f\u7684\u53c2\u6570,\u4fdd\u5b58\u53c2\u6570\u662f\u5168\u5c40\u4fdd\u5b58,\u5176\u5b83\u903b\u8f91\u5206\u7ec4\u7684\u63a5\u53e3\u518d\u8c03\u8bd5\u65f6,\u4e0d\u9700\u8981\u518d\u4fdd\u5b58\u4e00\u6b21\u65b0\u503c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16Z10",target:"_blank",rel:"noopener"},"gitee #I16Z10")),(0,i.kt)("p",null,"14\u3001\u4fee\u590d\u90e8\u5206\u60c5\u51b5\u54cd\u5e94\u5b57\u6bb5\u5728ace-editor\u7f16\u8f91\u5668\u53f3\u8fb9\u680f\u4e0d\u663e\u793a\u5b57\u6bb5\u8bf4\u660e\u7684\u60c5\u51b5",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17F5Y",target:"_blank",rel:"noopener"},"gitee #I17F5Y")),(0,i.kt)("p",null,"15\u3001\u641c\u7d22\u6846\u5b8c\u5584\u5bf9\u63a5\u53e3\u8bf7\u6c42Api\u5730\u5740\u680f\u7684\u6a21\u7cca\u641c\u7d22\u5339\u914d",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I19EN0",target:"_blank",rel:"noopener"},"gitee #I19EN0"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1B0Q9",target:"_blank",rel:"noopener"},"gitee #I1B0Q9")),(0,i.kt)("p",null,"16\u3001\u8c03\u8bd5\u54cd\u5e94\u6570\u636e\u884c\u592a\u957f,\u65e0\u6cd5\u6362\u884c\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I17F1J",target:"_blank",rel:"noopener"},"gitee #I17F1J")),(0,i.kt)("p",null,"17\u3001\u5728\u5f53\u524d\u63a5\u53e3\u65e0\u53c2\u6570\u7684\u60c5\u51b5\u4e0b,\u754c\u9762\u6dfb\u52a0\u5168\u5c40\u53c2\u6570\u65e0\u6548\u679c\u7684bug"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.2\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"\u4f7f\u7528Spring Boot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.2\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.2\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(80961).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(40754).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(28024).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79161).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(7414).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(58955).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,i.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(35684).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}u.isMDXComponent=!0},80961:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},7414:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},58955:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},35684:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},28024:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},79161:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},40754:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"},57757:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-1-ade356cb357579608bb164265be372a2.png"},46481:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-2-244e2ff8e059ee0860500c5bb160e556.png"},89698:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-3-f8b5adc335d90a18ad8c926574e59ae9.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/36656449.2ce8c3a7.js b/knife4j-doc/gitee/assets/js/36656449.2ce8c3a7.js new file mode 100644 index 000000000..09d45507c --- /dev/null +++ b/knife4j-doc/gitee/assets/js/36656449.2ce8c3a7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4772],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=p(r),d=o,m=s["".concat(c,".").concat(d)]||s[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[s]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>p,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],l={},c="3.29 \u7248\u672c\u63a7\u5236",p={unversionedId:"features/gitVersion",id:"features/gitVersion",title:"3.29 \u7248\u672c\u63a7\u5236",description:"knife4j \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a",source:"@site/docs/features/gitVersion.md",sourceDirName:"features",slug:"/features/gitVersion",permalink:"/docs/features/gitVersion",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a",permalink:"/docs/features/forbidOpenApi"},next:{title:"\u7248\u672c\u5347\u7ea7",permalink:"/docs/upgrading"}},u={},s=[],f={toc:s},d="wrapper";function m(e){var t=e.components,l=(0,o.Z)(e,i);return(0,a.kt)(d,(0,n.Z)({},f,l,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"329-\u7248\u672c\u63a7\u5236"},"3.29 \u7248\u672c\u63a7\u5236"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u540e\u7aef\u65b0\u589e\u63a5\u53e3\u662f\u8bc6\u522b\u51fa\u53d8\u5316"),(0,a.kt)("li",{parentName:"ul"},"\u540e\u7aef\u63a5\u53e3\u4fe1\u606f\u53d8\u66f4\u662f\u4f1a\u8bc6\u522b\u51fa\u63a5\u53e3\u53d8\u66f4")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u5224\u65ad\u65b0\u63a5\u53e3\u7684\u4f9d\u636e:\u63a5\u53e3\u5730\u5740+\u63a5\u53e3\u8bf7\u6c42\u7c7b\u578b(POST|GET|PUT...)"),(0,a.kt)("p",null,"\u800c\u4efb\u4f55\u5143\u7d20\u7684\u53d8\u66f4,\u5305\u62ec\u53c2\u6570\u7c7b\u578b\u3001\u63a5\u53e3\u8bf4\u660e\u3001\u54cd\u5e94\u53c2\u6570\u7b49\u7b49\u5143\u7d20\u7684\u53d8\u66f4,",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u90fd\u80fd\u8bc6\u522b\u51fa\u63a5\u53e3\u7684\u53d8\u5316,\u5e76\u901a\u8fc7icon\u56fe\u8868(new)\u7684\u65b9\u5f0f\u5728\u63a5\u53e3\u6587\u6863\u4e2d\u5c55\u793a\u51fa\u6765"),(0,a.kt)("p",null,"\u5bf9\u63a5\u63a5\u53e3\u7684\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5237\u65b0\u5f53\u524d\u6587\u6863\u9875\u5c31\u80fd\u770b\u5230\u540e\u7aef\u63a5\u53e3\u662f\u5426\u65b0\u589e\u6216\u4fee\u6539."),(0,a.kt)("p",null,"\u6548\u679c\u56fe:"),(0,a.kt)("p",null,(0,a.kt)("img",{src:r(54509).Z,width:"954",height:"515"})))}m.isMDXComponent=!0},54509:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/version-control-2a28a5534c158ed90a599a08c0dc3001.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/36656449.76ac0c03.js b/knife4j-doc/gitee/assets/js/36656449.76ac0c03.js deleted file mode 100644 index 0541708a3..000000000 --- a/knife4j-doc/gitee/assets/js/36656449.76ac0c03.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4772],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),f=p(r),d=o,m=f["".concat(c,".").concat(d)]||f[d]||s[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>d,frontMatter:()=>l,metadata:()=>p,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],l={},c="3.29 \u7248\u672c\u63a7\u5236",p={unversionedId:"features/gitVersion",id:"features/gitVersion",title:"3.29 \u7248\u672c\u63a7\u5236",description:"knife4j \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a",source:"@site/docs/features/gitVersion.md",sourceDirName:"features",slug:"/features/gitVersion",permalink:"/docs/features/gitVersion",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.28 \u7981\u7528OpenApi\u7ed3\u6784\u663e\u793a",permalink:"/docs/features/forbidOpenApi"},next:{title:"\u7248\u672c\u5347\u7ea7",permalink:"/docs/upgrading"}},u={},s=[],f={toc:s};function d(e){var t=e.components,l=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},f,l,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"329-\u7248\u672c\u63a7\u5236"},"3.29 \u7248\u672c\u63a7\u5236"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u4f7f\u7528\u6d4f\u89c8\u5668\u7684localStorage\u5bf9\u8c61,\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7ec6\u5fae\u7684\u7248\u672c\u63a7\u5236\u529f\u80fd,\u4e3b\u8981\u4f53\u73b0\u5728\u5982\u4e0b\u4e24\u4e2a\u65b9\u9762\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"\u540e\u7aef\u65b0\u589e\u63a5\u53e3\u662f\u8bc6\u522b\u51fa\u53d8\u5316"),(0,a.kt)("li",{parentName:"ul"},"\u540e\u7aef\u63a5\u53e3\u4fe1\u606f\u53d8\u66f4\u662f\u4f1a\u8bc6\u522b\u51fa\u63a5\u53e3\u53d8\u66f4")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u5224\u65ad\u65b0\u63a5\u53e3\u7684\u4f9d\u636e:\u63a5\u53e3\u5730\u5740+\u63a5\u53e3\u8bf7\u6c42\u7c7b\u578b(POST|GET|PUT...)"),(0,a.kt)("p",null,"\u800c\u4efb\u4f55\u5143\u7d20\u7684\u53d8\u66f4,\u5305\u62ec\u53c2\u6570\u7c7b\u578b\u3001\u63a5\u53e3\u8bf4\u660e\u3001\u54cd\u5e94\u53c2\u6570\u7b49\u7b49\u5143\u7d20\u7684\u53d8\u66f4,",(0,a.kt)("inlineCode",{parentName:"p"},"knife4j")," \u90fd\u80fd\u8bc6\u522b\u51fa\u63a5\u53e3\u7684\u53d8\u5316,\u5e76\u901a\u8fc7icon\u56fe\u8868(new)\u7684\u65b9\u5f0f\u5728\u63a5\u53e3\u6587\u6863\u4e2d\u5c55\u793a\u51fa\u6765"),(0,a.kt)("p",null,"\u5bf9\u63a5\u63a5\u53e3\u7684\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5237\u65b0\u5f53\u524d\u6587\u6863\u9875\u5c31\u80fd\u770b\u5230\u540e\u7aef\u63a5\u53e3\u662f\u5426\u65b0\u589e\u6216\u4fee\u6539."),(0,a.kt)("p",null,"\u6548\u679c\u56fe:"),(0,a.kt)("p",null,(0,a.kt)("img",{src:r(54509).Z,width:"954",height:"515"})))}d.isMDXComponent=!0},54509:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/version-control-2a28a5534c158ed90a599a08c0dc3001.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/373081a4.37896756.js b/knife4j-doc/gitee/assets/js/373081a4.37896756.js deleted file mode 100644 index 02c32225d..000000000 --- a/knife4j-doc/gitee/assets/js/373081a4.37896756.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8968],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},l=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,f=u["".concat(s,".").concat(d)]||u[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},l),{},{components:n})):r.createElement(f,i({ref:t},l))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=u;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>p,metadata:()=>c,toc:()=>m});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},s="3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",c={unversionedId:"features/dynamicResponseDescription",id:"features/dynamicResponseDescription",title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/dynamicResponseDescription.md",sourceDirName:"features",slug:"/features/dynamicResponseDescription",permalink:"/docs/features/dynamicResponseDescription",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicRequestDescription"},next:{title:"3.17 \u81ea\u5b9a\u4e49Host",permalink:"/docs/features/host"}},l={},m=[],u={toc:m};function d(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"316-\u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"},"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u52a8\u6001\u54cd\u5e94\u53c2\u6570\u5176\u5b9e\u548c",(0,o.kt)("a",{parentName:"p",href:"dynamicRequestDescription",target:null,rel:null},"\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6ce8\u91ca"),"\u7c7b\u4f3c"),(0,o.kt)("p",null,"\u540c\u6837\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicResponseParameters"),",\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOrder426")\n@ApiOperation(value = "jdk-HashMap-\u52a8\u6001\u521b\u5efa\u663e\u793a\u53c2\u6570-\u65e0@RequestBody")\n@DynamicResponseParameters(name = "CreateOrderHashMapModel",properties = {\n @DynamicParameter(name = "",value = "\u6ce8\u89e3id",example = "X000111",required = true,dataTypeClass = Integer.class),\n @DynamicParameter(name = "name3",value = "\u8ba2\u5355\u7f16\u53f7-gson"),\n @DynamicParameter(name = "name1",value = "\u8ba2\u5355\u7f16\u53f71-gson"),\n})\npublic Rest createOrder1235332(@RequestBody HashMap map){\n Rest r=new Rest<>();\n r.setData(map);\n return r;\n}\n')),(0,o.kt)("p",null,"\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicResponseParameters"),"\u4e2d\u6709\u4e00\u4e2aname\u5c5e\u6027,\u8be5\u503c\u5f00\u53d1\u8005\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7c7b\u540d,\u5982\u679c\u4f60\u8d4b\u4e88name\u5c5e\u6027\u503c,\u90a3\u4e48\u8bf7\u4fdd\u8bc1\u5168\u5c40\u552f\u4e00,\u6216\u8005\u5e72\u8106\u4e0d\u8d4b\u503c,\u4ea4\u7ed9",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5168\u5c40\u552f\u4e00\u7684name\u503c"),(0,o.kt)("p",null,"\u540c\u6837\u5bf9\u4e8e\u6570\u7ec4\u3001\u6cdb\u578b\u7b49\u590d\u6742\u7684\u7c7b\u578b\u6682\u4e0d\u63d0\u4f9b\u652f\u6301\u3002"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/373081a4.84605b83.js b/knife4j-doc/gitee/assets/js/373081a4.84605b83.js new file mode 100644 index 000000000..8c1bdb5b2 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/373081a4.84605b83.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8968],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},l=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(s,".").concat(d)]||m[d]||u[d]||o;return n?r.createElement(f,i(i({ref:t},l),{},{components:n})):r.createElement(f,i({ref:t},l))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[m]="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>f,frontMatter:()=>p,metadata:()=>c,toc:()=>m});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},s="3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",c={unversionedId:"features/dynamicResponseDescription",id:"features/dynamicResponseDescription",title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/dynamicResponseDescription.md",sourceDirName:"features",slug:"/features/dynamicResponseDescription",permalink:"/docs/features/dynamicResponseDescription",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicRequestDescription"},next:{title:"3.17 \u81ea\u5b9a\u4e49Host",permalink:"/docs/features/host"}},l={},m=[],u={toc:m},d="wrapper";function f(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"316-\u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"},"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u52a8\u6001\u54cd\u5e94\u53c2\u6570\u5176\u5b9e\u548c",(0,o.kt)("a",{parentName:"p",href:"dynamicRequestDescription",target:null,rel:null},"\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6ce8\u91ca"),"\u7c7b\u4f3c"),(0,o.kt)("p",null,"\u540c\u6837\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicResponseParameters"),",\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOrder426")\n@ApiOperation(value = "jdk-HashMap-\u52a8\u6001\u521b\u5efa\u663e\u793a\u53c2\u6570-\u65e0@RequestBody")\n@DynamicResponseParameters(name = "CreateOrderHashMapModel",properties = {\n @DynamicParameter(name = "",value = "\u6ce8\u89e3id",example = "X000111",required = true,dataTypeClass = Integer.class),\n @DynamicParameter(name = "name3",value = "\u8ba2\u5355\u7f16\u53f7-gson"),\n @DynamicParameter(name = "name1",value = "\u8ba2\u5355\u7f16\u53f71-gson"),\n})\npublic Rest createOrder1235332(@RequestBody HashMap map){\n Rest r=new Rest<>();\n r.setData(map);\n return r;\n}\n')),(0,o.kt)("p",null,"\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicResponseParameters"),"\u4e2d\u6709\u4e00\u4e2aname\u5c5e\u6027,\u8be5\u503c\u5f00\u53d1\u8005\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7c7b\u540d,\u5982\u679c\u4f60\u8d4b\u4e88name\u5c5e\u6027\u503c,\u90a3\u4e48\u8bf7\u4fdd\u8bc1\u5168\u5c40\u552f\u4e00,\u6216\u8005\u5e72\u8106\u4e0d\u8d4b\u503c,\u4ea4\u7ed9",(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5168\u5c40\u552f\u4e00\u7684name\u503c"),(0,o.kt)("p",null,"\u540c\u6837\u5bf9\u4e8e\u6570\u7ec4\u3001\u6cdb\u578b\u7b49\u590d\u6742\u7684\u7c7b\u578b\u6682\u4e0d\u63d0\u4f9b\u652f\u6301\u3002"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/37b9cbb9.1299e638.js b/knife4j-doc/gitee/assets/js/37b9cbb9.1299e638.js deleted file mode 100644 index 6a141cb5a..000000000 --- a/knife4j-doc/gitee/assets/js/37b9cbb9.1299e638.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7576],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),f=i(r),m=a,d=f["".concat(s,".").concat(m)]||f[m]||l[m]||o;return r?n.createElement(d,p(p({ref:t},u),{},{components:r})):n.createElement(d,p({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,p[1]=c;for(var i=2;i{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>m,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],c={},s="3.20 \u5bfc\u51faPostman",i={unversionedId:"features/postman",id:"features/postman",title:"3.20 \u5bfc\u51faPostman",description:"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684\u6587\u6863\u548c\u8c03\u8bd5\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86Open\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a",source:"@site/docs/features/postman.md",sourceDirName:"features",slug:"/features/postman",permalink:"/docs/features/postman",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.19 OAuth2",permalink:"/docs/features/oauth2"},next:{title:"3.21 \u5168\u5c40\u53c2\u6570",permalink:"/docs/features/globalParameter"}},u={},l=[],f={toc:l};function m(e){var t=e.components,c=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,n.Z)({},f,c,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"320-\u5bfc\u51fapostman"},"3.20 \u5bfc\u51faPostman"),(0,o.kt)("p",null,"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684",(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\u548c",(0,o.kt)("strong",{parentName:"p"},"\u8c03\u8bd5"),"\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86",(0,o.kt)("strong",{parentName:"p"},"Open"),"\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(19928).Z,width:"1366",height:"768"})),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u754c\u9762\u4e2d\u7684",(0,o.kt)("strong",{parentName:"p"},"\u590d\u5236"),"\u6309\u94ae\uff0c\u5c06\u8be5\u63a5\u53e3\u590d\u5236\u5bfc\u5165\u5230POSTMAN\u5de5\u5177\u4e2d\u8fdb\u884c\u8c03\u8bd5"))}m.isMDXComponent=!0},19928:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/openapi-4480f1310eaace241a9ca89c51fd2a8f.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/37b9cbb9.547d3b51.js b/knife4j-doc/gitee/assets/js/37b9cbb9.547d3b51.js new file mode 100644 index 000000000..f9135a23d --- /dev/null +++ b/knife4j-doc/gitee/assets/js/37b9cbb9.547d3b51.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7576],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>d});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=i(r),m=a,d=l["".concat(s,".").concat(m)]||l[m]||f[m]||o;return r?n.createElement(d,p(p({ref:t},u),{},{components:r})):n.createElement(d,p({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[l]="string"==typeof e?e:a,p[1]=c;for(var i=2;i{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>d,frontMatter:()=>c,metadata:()=>i,toc:()=>l});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],c={},s="3.20 \u5bfc\u51faPostman",i={unversionedId:"features/postman",id:"features/postman",title:"3.20 \u5bfc\u51faPostman",description:"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684\u6587\u6863\u548c\u8c03\u8bd5\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86Open\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a",source:"@site/docs/features/postman.md",sourceDirName:"features",slug:"/features/postman",permalink:"/docs/features/postman",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.19 OAuth2",permalink:"/docs/features/oauth2"},next:{title:"3.21 \u5168\u5c40\u53c2\u6570",permalink:"/docs/features/globalParameter"}},u={},l=[],f={toc:l},m="wrapper";function d(e){var t=e.components,c=(0,a.Z)(e,p);return(0,o.kt)(m,(0,n.Z)({},f,c,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"320-\u5bfc\u51fapostman"},"3.20 \u5bfc\u51faPostman"),(0,o.kt)("p",null,"Knife4j\u81ea2.0.6\u7248\u672c\u5f00\u59cb,\u5728\u6bcf\u4e2a\u63a5\u53e3\u7684\u8be6\u60c5\u754c\u9762\uff0c\u9664\u4e86\u4e00\u5f00\u59cb\u7684",(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\u548c",(0,o.kt)("strong",{parentName:"p"},"\u8c03\u8bd5"),"\u4e24\u4e2aTab\u9009\u9879\u5361\u529f\u80fd\uff0c\u589e\u52a0\u4e86",(0,o.kt)("strong",{parentName:"p"},"Open"),"\u9009\u9879\u5361\uff0c\u8be5\u9009\u9879\u5361\u4e3b\u8981\u662f\u5c06\u5f53\u524d\u63a5\u53e3\u7684OpenAPI\u89c4\u8303\u7ed3\u6784\u5c55\u793a,\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(19928).Z,width:"1366",height:"768"})),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u754c\u9762\u4e2d\u7684",(0,o.kt)("strong",{parentName:"p"},"\u590d\u5236"),"\u6309\u94ae\uff0c\u5c06\u8be5\u63a5\u53e3\u590d\u5236\u5bfc\u5165\u5230POSTMAN\u5de5\u5177\u4e2d\u8fdb\u884c\u8c03\u8bd5"))}d.isMDXComponent=!0},19928:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/openapi-4480f1310eaace241a9ca89c51fd2a8f.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/37bb947f.c604541a.js b/knife4j-doc/gitee/assets/js/37bb947f.c604541a.js new file mode 100644 index 000000000..516ce95d1 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/37bb947f.c604541a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9445],{3905:(t,e,n)=>{n.d(e,{Zo:()=>g,kt:()=>s});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function i(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var o=a.createContext({}),d=function(t){var e=a.useContext(o),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},g=function(t){var e=d(t.components);return a.createElement(o.Provider,{value:e},t.children)},u="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},k=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,l=t.originalType,o=t.parentName,g=p(t,["components","mdxType","originalType","parentName"]),u=d(n),k=r,s=u["".concat(o,".").concat(k)]||u[k]||m[k]||l;return n?a.createElement(s,i(i({ref:e},g),{},{components:n})):a.createElement(s,i({ref:e},g))}));function s(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=n.length,i=new Array(l);i[0]=k;var p={};for(var o in e)hasOwnProperty.call(e,o)&&(p[o]=e[o]);p.originalType=t,p[u]="string"==typeof t?t:r,i[1]=p;for(var d=2;d{n.r(e),n.d(e,{assets:()=>g,contentTitle:()=>o,default:()=>s,frontMatter:()=>p,metadata:()=>d,toc:()=>u});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),i=["components"],p={id:"start-knife4j-version",title:"Knife4j\u7248\u672c\u53c2\u8003",description:"Knife4j\u9002\u914dSpring Boot\u7248\u672c"},o=void 0,d={unversionedId:"quick-start/start-knife4j-version",id:"quick-start/start-knife4j-version",title:"Knife4j\u7248\u672c\u53c2\u8003",description:"Knife4j\u9002\u914dSpring Boot\u7248\u672c",source:"@site/docs/quick-start/start-knife4j-version.mdx",sourceDirName:"quick-start",slug:"/quick-start/start-knife4j-version",permalink:"/docs/quick-start/start-knife4j-version",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1691914117,formattedLastUpdatedAt:"2023\u5e748\u670813\u65e5",frontMatter:{id:"start-knife4j-version",title:"Knife4j\u7248\u672c\u53c2\u8003",description:"Knife4j\u9002\u914dSpring Boot\u7248\u672c"},sidebar:"docs",previous:{title:"\u5feb\u901f\u5f00\u59cb",permalink:"/docs/quick-start/"},next:{title:"\u5982\u4f55\u8d21\u732e\u6587\u6863",permalink:"/docs/community/joinus"}},g={},u=[{value:"1.\u524d\u4e16\u4eca\u751f",id:"1\u524d\u4e16\u4eca\u751f",level:2},{value:"2.Spring Boot\u7248\u672c\u517c\u5bb9\u6027",id:"2spring-boot\u7248\u672c\u517c\u5bb9\u6027",level:2},{value:"2.1 Spring Boot 2.x",id:"21-spring-boot-2x",level:3},{value:"2.1.1 Swagger2\u89c4\u8303",id:"211-swagger2\u89c4\u8303",level:4},{value:"2.1.2 OpenAPI3\u89c4\u8303",id:"212-openapi3\u89c4\u8303",level:4},{value:"2.2 Spring Boot 3.x",id:"22-spring-boot-3x",level:3},{value:"3.\u89c4\u8303\u8bf4\u660e",id:"3\u89c4\u8303\u8bf4\u660e",level:2},{value:"4.\u7f51\u5173\u805a\u5408",id:"4\u7f51\u5173\u805a\u5408",level:2},{value:"5.\u6700\u540e",id:"5\u6700\u540e",level:2}],m={toc:u},k="wrapper";function s(t){var e=t.components,n=(0,r.Z)(t,i);return(0,l.kt)(k,(0,a.Z)({},m,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5173\u4e8eKnife4j\u9002\u914d\u4e0d\u540cSpring Boot\u7248\u672c\u7684\u8bf4\u660e\u6587\u6863"),(0,l.kt)("admonition",{title:"\u7248\u672c\u89c4\u8303\u8bf4\u660e",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"\u672c\u6587\u6863\u65e8\u5728\u5e2e\u52a9\u5f00\u53d1\u8005\u9009\u62e9\u9002\u5408\u5176\u9879\u76ee\u7684Knife4j\u7248\u672c\u4e0eSpring Boot\u7248\u672c\u7684\u9002\u914d\u3002\u8bf7\u6839\u636e\u60a8\u7684\u9879\u76ee\u8981\u6c42\u548c\u4f7f\u7528\u7684Spring Boot\u7248\u672c\u9009\u62e9\u9002\u5f53\u7684Knife4j\u7248\u672c\u3002")),(0,l.kt)("h2",{id:"1\u524d\u4e16\u4eca\u751f"},"1.\u524d\u4e16\u4eca\u751f"),(0,l.kt)("p",null,"\u5728\u66f4\u540d\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e4b\u524d,\u539f\u6765\u7684\u540d\u79f0\u662f\u53eb",(0,l.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\uff0c\u8fd9\u662f\u4e24\u79cd\u4e0d\u4e00\u6837\u98ce\u683c\u7684Ui,\u5bf9\u6bd4\u60c5\u51b5\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u540d\u79f0"),(0,l.kt)("th",{parentName:"tr",align:null},"\u5f00\u53d1\u8bed\u8a00&\u6846\u67b6"),(0,l.kt)("th",{parentName:"tr",align:null},"\u72b6\u6001"),(0,l.kt)("th",{parentName:"tr",align:null},"\u6700\u540e\u7248\u672c"),(0,l.kt)("th",{parentName:"tr",align:null},"\u98ce\u683c"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j"),(0,l.kt)("td",{parentName:"tr",align:null},"Java\u3001JavaScript\u3001Vue"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6301\u7eed\u66f4\u65b0\u4e2d..."),(0,l.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,l.kt)("td",{parentName:"tr",align:null},"\u9ed1\u8272")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui"),(0,l.kt)("td",{parentName:"tr",align:null},"Java\u3001JavaScript\u3001jQuery"),(0,l.kt)("td",{parentName:"tr",align:null},"\u505c\u66f4"),(0,l.kt)("td",{parentName:"tr",align:null},"1.9.6"),(0,l.kt)("td",{parentName:"tr",align:null},"\u84dd\u8272")))),(0,l.kt)("p",null,"Knife4j\u4ece\u5f00\u6e90\u81f3\u4eca,\u76ee\u524d\u4e3b\u8981\u7ecf\u5386\u7248\u672c\u7684\u53d8\u5316\uff0c\u5206\u522b\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u7248\u672c"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1.0~1.9.6"),(0,l.kt)("td",{parentName:"tr",align:null},"\u540d\u79f0\u662f\u53eb",(0,l.kt)("inlineCode",{parentName:"td"},"swagger-bootstrap-ui"),",\u84dd\u8272\u98ce\u683cUi")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1.9.6"),(0,l.kt)("td",{parentName:"tr",align:null},"\u84dd\u8272\u76ae\u80a4\u98ce\u683c,\u5f00\u59cb\u66f4\u540d\uff0c\u589e\u52a0\u66f4\u591a\u540e\u7aef\u6a21\u5757")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.0~2.0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"Ui\u57fa\u4e8eVue2.0+AntdV\u91cd\u5199,\u9ed1\u8272\u98ce\u683c,\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"https://doc.xiaominfo.com/demo/doc.html",target:null,rel:null},"\u793a\u4f8b"),"\uff0c\u5e95\u5c42\u4f9d\u8d56\u7684springfox\u6846\u67b6\u7248\u672c\u662f2.9.2,\u4ec5\u63d0\u4f9bSwagger2\u89c4\u8303\u7684\u9002\u914d")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.0.6~2.0.9"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5e95\u5c42springfox\u6846\u67b6\u7248\u672c\u5347\u7ea7\u77e52.10.5,,\u4ec5\u63d0\u4f9bSwagger2\u89c4\u8303\u7684\u9002\u914d")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"3.0~3.0.3"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5e95\u5c42\u4f9d\u8d56springfox\u6846\u67b6\u7248\u672c\u5347\u7ea7\u81f33.0.3,OpenAPI\u89c4\u8303\u662fv3,\u8fc7\u5ea6\u7248\u672c\uff0c",(0,l.kt)("strong",{parentName:"td"},"\u5efa\u8bae\u5f00\u53d1\u8005\u4e0d\u8981\u4f7f\u7528"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"4.0~"),(0,l.kt)("td",{parentName:"tr",align:null},"\u533a\u5206OpenAPI2\u548cSwagger3\u7684Maven\u5750\u6807artifactId",(0,l.kt)("br",null)," OpenAPI2\u89c4\u8303\u670d\u52a1\u7aef\u89e3\u6790\u6846\u67b6\u7a33\u5b9a\u5728springfox2.10.5",(0,l.kt)("br",null),"OpenAPI3\u6846\u67b6\u670d\u52a1\u7aef\u89e3\u6790\u8ddf\u968fspringdoc\u9879\u76ee\u66f4\u65b0\u8fed\u4ee3",(0,l.kt)("br",null),(0,l.kt)("strong",{parentName:"td"},"\u5efa\u8bae\u5f00\u53d1\u8005\u4f7f\u7528\u8be5\u7248\u672c"),",\u8bf7\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/upgrading/upgrading-to-v4",target:null,rel:null},"4.x\u5347\u7ea7\u6587\u6863"))))),(0,l.kt)("h2",{id:"2spring-boot\u7248\u672c\u517c\u5bb9\u6027"},"2.Spring Boot\u7248\u672c\u517c\u5bb9\u6027"),(0,l.kt)("p",null,"\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u4e86\u89e3\u60a8\u7684\u9879\u76ee\u6240\u4f7f\u7528\u7684Spring Boot\u7248\u672c\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684Spring Boot\u7248\u672c\u53ca\u5176\u5bf9\u5e94\u7684Knife4j\u7248\u672c\u517c\u5bb9\u63a8\u8350\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Spring Boot\u7248\u672c"),(0,l.kt)("th",{parentName:"tr",align:null},"Knife4j Swagger2\u89c4\u8303"),(0,l.kt)("th",{parentName:"tr",align:null},"Knife4j OpenAPI3\u89c4\u8303"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1.5.x~2.0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"=Knife4j 4.0.0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.0~2.2"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j 2.0.0 ~ 2.0.6"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.2.x~2.4.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j 2.0.6 ~ 2.0.9"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.4.0~2.7.x"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},">= 3.0"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0"),(0,l.kt)("td",{parentName:"tr",align:null},">=Knife4j 4.0.0")))),(0,l.kt)("p",null,"Knife4j\u5728\u4e4b\u524d\u7684\u7248\u672c\u66f4\u65b0\u4e2d\uff0c\u9010\u6e10\u63d0\u4f9b\u4e86\u4e00\u4e9b\u670d\u52a1\u7aef\u9002\u914d\u7684\u589e\u5f3a\u7279\u6027\u529f\u80fd\u3002"),(0,l.kt)("p",null,"\u4f46\u662f\u5f00\u53d1\u8005\u5e94\u8be5\u660e\u767d\uff0c\u4e0d\u7ba1\u662fSwagger2\u89c4\u8303\u8fd8\u662fOpenAPI3\u89c4\u8303\uff0cKnife4j\u7684\u6700\u65b0\u7248\u672c\u7684\u7eafUi\u7248\u672c\uff0c\u662f\u53ef\u4ee5\u9002\u914dSpring Boot\u6240\u6709\u7248\u672c\u7684\u3002"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u5982\u679c\u4f60\u4e0d\u8003\u8651\u4f7f\u7528Knife4j\u63d0\u4f9b\u7684\u670d\u52a1\u7aef\u589e\u5f3a\u529f\u80fd\uff0c\u5f15\u5165Knife4j\u7684\u7eafUi\u7248\u672c\u6ca1\u6709\u4efb\u4f55\u9650\u5236\u3002\u53ea\u9700\u8981\u8003\u8651\u4e0d\u540c\u7684\u89c4\u8303\u5373\u53ef")),(0,l.kt)("h3",{id:"21-spring-boot-2x"},"2.1 Spring Boot 2.x"),(0,l.kt)("p",null,"\u5728Knife4j\u76844.0\u7248\u672c\u4e4b\u524d\uff0c\u5f00\u53d1\u8005\u5f15\u7528\u7684\u65b9\u5f0f\u662f\u901a\u8fc7",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-spring-boot-starter"),"\u8fdb\u884c\u4f7f\u7528\uff0c\u4f46\u662f\u57284.0\u7248\u672c\u4e4b\u540e\uff0c\u5f00\u53d1\u8005\u5728\u5f15\u7528\u65f6\u9700\u8981\u5bf9\u9009\u62e9\u4e0d\u540c\u7684\u89c4\u8303\u7248\u672c\u8fdb\u884c\u533a\u5206"),(0,l.kt)("p",null,"Knife4j\u5728\u7ec4\u4ef6\u4e2d\u9488\u5bf9\u4e0d\u540c\u7684\u89c4\u8303\u7248\u672c\u505a\u4e86\u533a\u5206\uff0cmaven\u7ec4\u4ef6\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"artifactId"),"\u5df2\u7ecf\u53d1\u751f\u4e86\u53d8\u5316\u3002"),(0,l.kt)("h4",{id:"211-swagger2\u89c4\u8303"},"2.1.1 Swagger2\u89c4\u8303"),(0,l.kt)("p",null,"\u57284.0\u7248\u672c\u4e4b\u524d\uff0c\u5e94\u7528\u5750\u6807\uff1a"),(0,l.kt)("p",null,"\u5f15\u7528\u7ec4\u4ef6maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n {<4.0.0\u7248\u672c}\n\n")),(0,l.kt)("p",null,"\u81ea4.0\u7248\u672c\u5f00\u59cb\uff0cmaven\u7ec4\u4ef6\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"artifactId"),"\u5df2\u7ecf\u53d1\u751f\u4e86\u53d8\u5316\u3002"),(0,l.kt)("p",null,"\u5f15\u7528\u7ec4\u4ef6maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-openapi2-spring-boot-starter\n {maven\u4ed3\u5e93\u6700\u65b0\u7248\u672c}\n\n")),(0,l.kt)("h4",{id:"212-openapi3\u89c4\u8303"},"2.1.2 OpenAPI3\u89c4\u8303"),(0,l.kt)("p",null,"\u81ea4.0\u7248\u672c\u5f00\u59cb\uff0cKnife4j\u63d0\u4f9b\u5bf9OpenAPI3\u89c4\u8303\u7684\u9002\u914d\uff0c\u5e95\u5c42\u89c4\u8303\u89e3\u6790\u6846\u67b6\u4f9d\u8d56",(0,l.kt)("a",{parentName:"p",href:"https://github.com/springdoc/springdoc-openapi",target:"_blank",rel:"noopener"},"springdoc-openapi"),"\u9879\u76ee"),(0,l.kt)("p",null,"\u5f15\u7528\u7ec4\u4ef6maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-openapi3-spring-boot-starter\n {maven\u4ed3\u5e93\u6700\u65b0\u7248\u672c}\n\n")),(0,l.kt)("h3",{id:"22-spring-boot-3x"},"2.2 Spring Boot 3.x"),(0,l.kt)("p",null,"\u7531\u4e8espringfox\u957f\u4e45\u672a\u66f4\u65b0\uff0c\u5e76\u4e14Swagger2\u89c4\u8303\u5728\u76ee\u524d\u6765\u770b\uff0c\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4e5f\u5e76\u672a\u5347\u7ea7\uff0c\u89c4\u8303\u5df2\u7ecf\u5168\u90e8\u5f80OpenAPI3\u89c4\u8303\u9760\u62e2\uff0c\u56e0\u6b64\uff0c\u5728Spring Boot 3.x\u7248\u672c\u4e2d\uff0c\u5f00\u53d1\u8005\u5e94\u8be5\u9009\u62e9OpenAPI3\u89c4\u8303\u6765\u4f5c\u4e3a\u5e94\u7528\u6846\u67b6\u7684\u5f00\u53d1\u9996\u9009\u65b9\u6848\u3002"),(0,l.kt)("p",null,"Knife4j\u81ea",(0,l.kt)("a",{parentName:"p",href:"/docs/upgrading/upgrading-to-v4",target:null,rel:null},"4.0\u7248\u672c"),"\u4e3aSpring Boot 3\u6846\u67b6\u63d0\u4f9b\u4e86\u9002\u914d"),(0,l.kt)("p",null,"\u5f15\u7528\u7ec4\u4ef6maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-openapi3-jakarta-spring-boot-starter\n {maven\u4ed3\u5e93\u6700\u65b0\u7248\u672c}\n\n")),(0,l.kt)("h2",{id:"3\u89c4\u8303\u8bf4\u660e"},"3.\u89c4\u8303\u8bf4\u660e"),(0,l.kt)("p",null,"\u9488\u5bf9",(0,l.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md",target:"_blank",rel:"noopener"},"Swagger2\u89c4\u8303"),"\u548c",(0,l.kt)("a",{parentName:"p",href:"https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md",target:"_blank",rel:"noopener"},"OpenAPI3\u89c4\u8303"),"\u7684\u8bf4\u660e\uff1a"),(0,l.kt)("admonition",{title:"\u670d\u52a1\u7aef\u89c4\u8303\u89e3\u6790\u8bf4\u660e",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"\u5728Spring Boot\u6846\u67b6\u4e2d,Knife4j\u5bf9\u4e8e\u670d\u52a1\u7aef\u5c06Spring\u7684\u5f00\u653e\u63a5\u53e3\u89e3\u6790\u6210Swagger2\u6216\u8005OpenAPI3\u89c4\u8303\u7684\u6846\u67b6\uff0c\u4e5f\u662f\u4f9d\u8d56\u7684\u7b2c\u4e09\u65b9\u6846\u67b6\u7ec4\u4ef6\u3002\u8bf4\u660e\u5982\u4e0b\uff1a"),(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"Swagger2\u89c4\u8303"),"\uff1a\u4f9d\u8d56",(0,l.kt)("a",{parentName:"li",href:"https://github.com/springfox/springfox",target:"_blank",rel:"noopener"},"Springfox"),"\u9879\u76ee\uff0c\u8be5\u9879\u76ee\u76ee\u524d\u51e0\u4e4e\u5904\u4e8e\u505c\u66f4\u72b6\u6001\uff0c\u4f46\u5f88\u591a\u8001\u9879\u76ee\u4f9d\u7136\u4f7f\u7528\u7684\u662f\u8be5\u89c4\u8303\uff0c\u6240\u4ee5Knife4j\u5728\u66f4\u65b0\u524d\u7aefUi\u7684\u540c\u65f6\u4e5f\u7ee7\u7eed\u4fdd\u6301\u4e86\u517c\u5bb9"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"OpenAPI3\u89c4\u8303"),"\uff1a\u4f9d\u8d56",(0,l.kt)("a",{parentName:"li",href:"https://github.com/springdoc/springdoc-openapi",target:"_blank",rel:"noopener"},"Springdoc"),"\u9879\u76ee\uff0c\u66f4\u65b0\u53d1\u7248\u9891\u7387\u975e\u5e38\u5feb\uff0c\u5efa\u8bae\u5f00\u53d1\u8005\u5c3d\u5feb\u8fc1\u79fb\u8fc7\u6765\u4f7f\u7528OpenAPI3\u89c4\u8303,Knife4j\u540e\u9762\u7684\u91cd\u5fc3\u4e5f\u4f1a\u5728\u8fd9\u91cc\u3002"))),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Knife4j\u7248\u672c"),(0,l.kt)("th",{parentName:"tr",align:null},"Swagger2\u89c4\u8303"),(0,l.kt)("th",{parentName:"tr",align:null},"OpenAPI3\u89c4\u8303"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1.0~1.9.6"),(0,l.kt)("td",{parentName:"tr",align:null},"springfox 2.9.2"),(0,l.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u7684\u524d\u8eab\uff0c\u540d\u79f0\u4e3a",(0,l.kt)("inlineCode",{parentName:"td"},"swagger-bootstrap-ui"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1.9.6~2.0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"springfox 2.9.2"),(0,l.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,l.kt)("td",{parentName:"tr",align:null})),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"2.0.6~2.0.9"),(0,l.kt)("td",{parentName:"tr",align:null},"springfox 2.10.5"),(0,l.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,l.kt)("td",{parentName:"tr",align:null})),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"3.0.0~3.0.3"),(0,l.kt)("td",{parentName:"tr",align:null},"springfox 3.0.3"),(0,l.kt)("td",{parentName:"tr",align:null},"\u65e0"),(0,l.kt)("td",{parentName:"tr",align:null},"\u8fc7\u5ea6\u7248\u672c\uff0c",(0,l.kt)("strong",{parentName:"td"},"\u5efa\u8bae\u5f00\u53d1\u8005\u4e0d\u8981\u4f7f\u7528"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"4.0.0~"),(0,l.kt)("td",{parentName:"tr",align:null},"springfox 2.10.5"),(0,l.kt)("td",{parentName:"tr",align:null},">=springdoc-openapi 1.6.9"),(0,l.kt)("td",{parentName:"tr",align:null},"Swagger2\u89c4\u8303\u7a33\u5b9a\u4f7f\u7528springfox2.10.5\u4fdd\u6301\u4e0d\u53d8\u3002\u5f00\u53d1\u8005\u5e94\u8be5\u5c3d\u65e9\u8fc1\u79fb\u5230OpenAPI3\u89c4\u8303\u4e0a\u6765,\u8bf7\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/upgrading/upgrading-to-v4",target:null,rel:null},"4.x\u5347\u7ea7\u6587\u6863"))))),(0,l.kt)("h2",{id:"4\u7f51\u5173\u805a\u5408"},"4.\u7f51\u5173\u805a\u5408"),(0,l.kt)("p",null,"\u81ea4.0\u7248\u672c\u540e,Knife4j\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9488\u5bf9\u5728Spring Cloud Gateway\u7f51\u5173\u8fdb\u884c\u805a\u5408\u7684\u7ec4\u4ef6",(0,l.kt)("a",{parentName:"p",href:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction",target:null,rel:null},"knife4j-gateway"),"\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u57fa\u4e8e\u6b64\u7ec4\u4ef6\u8f7b\u677e\u7684\u805a\u5408\u5404\u4e2a\u5b50\u670d\u52a1\u7684OpenAPI\u6587\u6863"),(0,l.kt)("p",null,"Maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-gateway-spring-boot-starter\n {\u5927\u4e8e4.0.0\u7248\u672c}\n\n")),(0,l.kt)("p",null,"\u7531\u4e8e\u5f00\u53d1\u7f51\u5173\u805a\u5408\u7ec4\u4ef6\u65f6\uff0cKnife4j\u6240\u5f15\u7528\u7684Spring Cloud Gateway\u7684\u4f9d\u8d56\u5168\u90e8\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"Optional"),"\u7c7b\u578b\uff0c\u5e38\u89c4\u64cd\u4f5c\u4e0b\uff0c\u5f00\u53d1\u8005\u5e94\u8be5\u662f\u5728Gateway\u7684\u4efb\u610f\u7248\u672c\u4e2d\u90fd\u80fd\u4f7f\u7528\uff0c\u4f46\u8fd8\u662f\u7ed9\u51fa\u6700\u4f4e\u7684\u63a8\u8350\u7248\u672c\u914d\u7f6e\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Spring Boot\u7248\u672c"),(0,l.kt)("th",{parentName:"tr",align:null},"Knife4j Gateway\u7f51\u5173\u805a\u5408\u7248\u672c"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},">=2.4.8~3.x"),(0,l.kt)("td",{parentName:"tr",align:null},">=4.0.0")))),(0,l.kt)("h2",{id:"5\u6700\u540e"},"5.\u6700\u540e"),(0,l.kt)("p",null,"\u5982\u679c\u60a8\u5728\u9009\u62e9\u4f7f\u7528Knife4j\u7684\u7248\u672c\u8fc7\u7a0b\u4e2d\u4ecd\u7136\u5b58\u5728\u7591\u60d1\uff0c\u53ef\u4ee5\u901a\u8fc7\u5173\u6ce8\u6587\u6863\u5e95\u90e8\u7684\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u70b9\u51fb\u83dc\u5355\u52a0\u5165\u5fae\u4fe1\u4ea4\u6d41\u7fa4\uff0c\u4e0e\u4f5c\u8005\u5f53\u9762\u5bf9\u8bdd\u3002"))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/37d786de.5e1ee74d.js b/knife4j-doc/gitee/assets/js/37d786de.5e1ee74d.js new file mode 100644 index 000000000..458ba663f --- /dev/null +++ b/knife4j-doc/gitee/assets/js/37d786de.5e1ee74d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3763],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=p(e,["components","mdxType","originalType","parentName"]),u=l(r),m=n,d=u["".concat(s,".").concat(m)]||u[m]||c[m]||o;return r?a.createElement(d,i(i({ref:t},g),{},{components:r})):a.createElement(d,i({ref:t},g))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[u]="string"==typeof e?e:n,i[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>d,frontMatter:()=>p,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),i=["components"],p={},s="[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",l={unversionedId:"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",id:"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",title:"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",description:"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",permalink:"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"},next:{title:"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]",permalink:"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"}},g={},u=[{value:"\u91cd\u8981\u8bf4\u660e",id:"\u91cd\u8981\u8bf4\u660e",level:2},{value:"\u7279\u6027&\u4f18\u5316",id:"\u7279\u6027\u4f18\u5316",level:2},{value:"UI\u6548\u679c\u5c55\u793a",id:"ui\u6548\u679c\u5c55\u793a",level:2},{value:"\u9879\u76ee\u5730\u5740",id:"\u9879\u76ee\u5730\u5740",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],c={toc:u},m="wrapper";function d(e){var t=e.components,p=(0,n.Z)(e,i);return(0,o.kt)(m,(0,a.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v196-20190828-\u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898"},"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com",target:null,rel:null},"http://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub:"),(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u91cd\u8981\u8bf4\u660e"},"\u91cd\u8981\u8bf4\u660e"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,"\u91cd\u8981\u7684\u4e8b\u60c5\u8bf4\u4e09\u904d!!!"),(0,o.kt)("p",null,"\u4e00\u5f00\u59cb\u9879\u76ee\u521d\u8877\u662f\u4e3a\u4e86\u5199\u4e00\u4e2a\u589e\u5f3a\u7248\u672c\u7684Swagger \u524d\u7aefUI,\u4f46\u662f\u968f\u7740\u9879\u76ee\u7684\u53d1\u5c55,\u9762\u5bf9\u8d8a\u6765\u8d8a\u591a\u7684\u4e2a\u6027\u5316\u9700\u6c42,\u4e0d\u5f97\u4e0d\u7f16\u5199\u540e\u7aefJava\u4ee3\u7801\u4ee5\u6ee1\u8db3\u65b0\u7684\u9700\u6c42,\u5728swagger-bootstrap-ui\u76841.8.5~1.9.6\u7248\u672c\u4e4b\u95f4,\u91c7\u7528\u7684\u662f\u540e\u7aefJava\u4ee3\u7801\u548cUi\u90fd\u6df7\u5408\u5728\u4e00\u4e2aJar\u5305\u91cc\u9762\u7684\u65b9\u5f0f\u63d0\u4f9b\u7ed9\u5f00\u53d1\u8005\u4f7f\u7528.\u8fd9\u79cd\u65b9\u5f0f\u867d\u8bf4\u5bf9\u4e8e\u96c6\u6210swagger\u6765\u8bf4\u5f88\u65b9\u4fbf,\u53ea\u9700\u8981\u5f15\u5165jar\u5305\u5373\u53ef,\u4f46\u662f\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u663e\u5f97\u6709\u4e9b\u81c3\u80bf\u3002"),(0,o.kt)("p",null,"\u56e0\u6b64,\u9879\u76ee\u6b63\u5f0f\u66f4\u540d\u4e3a",(0,o.kt)("strong",{parentName:"p"},"knife4j"),",\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef."),(0,o.kt)("p",null,"swagger-bootstrap-ui\u7684\u6240\u6709\u7279\u6027\u90fd\u4f1a\u96c6\u4e2d\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-spring-ui"),"\u5305\u4e2d,\u5e76\u4e14\u540e\u7eed\u4e5f\u4f1a\u6ee1\u8db3\u5f00\u53d1\u8005\u66f4\u591a\u7684\u4e2a\u6027\u5316\u9700\u6c42."),(0,o.kt)("p",null,"\u4e3b\u8981\u7684\u53d8\u5316\u662f,\u9879\u76ee\u7684\u76f8\u5173\u7c7b\u5305\u8def\u5f84\u66f4\u6362\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"com.github.xiaoymin.knife4j"),"\u524d\u7f00,\u5f00\u53d1\u8005\u4f7f\u7528\u589e\u5f3a\u6ce8\u89e3\u65f6\u9700\u8981\u66ff\u6362\u5305\u8def\u5f84"),(0,o.kt)("p",null,"\u540e\u7aefJava\u4ee3\u7801\u548cui\u5305\u5206\u79bb\u4e3a\u591a\u4e2a\u6a21\u5757\u7684jar\u5305,\u4ee5\u9762\u5bf9\u5728\u76ee\u524d\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u66f4\u52a0\u65b9\u4fbf\u7684\u4f7f\u7528\u589e\u5f3a\u6587\u6863\u6ce8\u89e3(\u4f7f\u7528SpringCloud\u5fae\u670d\u52a1\u9879\u76ee,\u53ea\u9700\u8981\u5728\u7f51\u5173\u5c42\u96c6\u6210UI\u7684jar\u5305\u5373\u53ef,\u56e0\u6b64\u5206\u79bb\u524d\u540e\u7aef)"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"knife4j"),"\u6cbf\u7528swagger-bootstrap-ui\u7684\u7248\u672c\u53f7,\u7b2c1\u4e2a\u7248\u672c\u4ece1.9.6\u5f00\u59cb,\u5173\u4e8e\u4f7f\u7528\u65b9\u6cd5,\u8bf7\u53c2\u8003\u6587\u6863"),(0,o.kt)("p",null,"\u7531\u4e8e\u66f4\u540d\u7ed9\u5927\u5bb6\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f~\uff01"),(0,o.kt)("h2",{id:"\u7279\u6027\u4f18\u5316"},"\u7279\u6027&\u4f18\u5316"),(0,o.kt)("p",null,"1\u3001\u89e3\u51b3Spring\u8def\u7531PathVariable\u4e0d\u663e\u793a\u7684\u60c5\u51b5\uff0c\u5e76\u4f18\u5316\u4ea4\u4e92\u4f53\u9a8c"),(0,o.kt)("p",null,"2\u3001\u89e3\u51b3\u54cd\u5e94\u4f53\u4e2d\u7684\u957f\u6574\u578b\u663e\u793a\u9519\u8bef,\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/135",target:"_blank",rel:"noopener"},"#135 @GitHub")),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u8bf7\u6c42\u5934Header\u662f\u4e2d\u6587\u7684\u60c5\u51b5,\u5982\u679c\u5305\u542b\u4e2d\u6587\u5219\u8fdb\u884cencodeURI\u51fd\u6570\u5904\u7406,\u5426\u5219\u4e0d\u505a\u4efb\u4f55\u5904\u7406",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/140",target:"_blank",rel:"noopener"},"#140 @GitHub")),(0,o.kt)("p",null,"4\u3001\u5347\u7ea7jQuery 1.X\u7cfb\u5217\u7248\u672c\u5230\u6700\u65b0\u7248\u672c",(0,o.kt)("inlineCode",{parentName:"p"},"1.12.4")),(0,o.kt)("p",null,"5\u3001\u521d\u59cb\u5316\u9875\u9762\u8bf7\u6c42Swagger\u63a5\u53e3\u8d44\u6e90\u65b9\u5f0f\u6539\u4e3a\u5f02\u6b65,\u5728jQuery\u7684ajax\u65b9\u6cd5\u53c2\u6570\u9879",(0,o.kt)("inlineCode",{parentName:"p"},"async:false"),"\u65f6,\u6d4f\u89c8\u5668\u4f1a\u629b\u51fa\u8b66\u544a\u7684\u95ee\u9898(\u540c\u6b65ajax\u8bf7\u6c42\u4f1a\u9020\u6210\u4e3b\u7ebf\u7a0b\u963b\u585e,\u5bf9\u7528\u6237\u4f53\u9a8c\u4e0d\u662f\u5f88\u597d,\u5df2\u88ab\u7f6e\u4e3a\u8fc7\u65f6)."),(0,o.kt)("p",null,"6\u3001\u652f\u6301supportedSubmitMethods,\u540e\u7aef\u914d\u7f6e",(0,o.kt)("inlineCode",{parentName:"p"},"UiConfiguration"),"\u7684Bean",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IVCQ0",target:"_blank",rel:"noopener"},"#IVCQ0 @Gitee")),(0,o.kt)("p",null,"7\u3001\u4f18\u5316\u4e0b\u8f7d\u4e2d\u6587\u4e71\u7801\u95ee\u9898,\u540e\u7aef\u9700\u8981\u6307\u5b9afilename\u503c,\u5e76\u4e14\u5bf9\u540d\u79f0\u8fdb\u884cURLEncoder.encode\u5904\u7406,UI\u524d\u7aef\u4f1a\u8fdb\u884cdecode\u6210\u4e2d\u6587,\u4fdd\u8bc1\u4e0b\u8f7d\u6b63\u5e38"),(0,o.kt)("p",null,"8\u3001\u4fee\u590dcurl\u72b6\u6001\u680f\u590d\u5236\u65f6\u5185\u5bb9\u88ab\u8f6c\u4e49\u7684bug",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/136",target:"_blank",rel:"noopener"},"#136 @GitHub")),(0,o.kt)("h2",{id:"ui\u6548\u679c\u5c55\u793a"},"UI\u6548\u679c\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"header-json.png",src:r(72742).Z,width:"1365",height:"626"}),"\n",(0,o.kt)("img",{src:r(93658).Z,width:"1364",height:"625"}),"\n",(0,o.kt)("img",{src:r(67554).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(20995).Z,width:"1918",height:"1005"}),"\n",(0,o.kt)("img",{src:r(21867).Z,width:"1920",height:"1011"})),(0,o.kt)("h2",{id:"\u9879\u76ee\u5730\u5740"},"\u9879\u76ee\u5730\u5740"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.9.6\n\n")),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,o.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}d.isMDXComponent=!0},72742:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/1-5bb20cbb0659f6d54060e3986e3a4229.png"},93658:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/2-b760048cc31a0b5e8f33fd4fd0e487f5.png"},67554:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/3-84ad6fbc82d84760895dd1be11816a17.png"},20995:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/4-b324bedccf50ddbce275f6f58d3fec4d.png"},21867:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/5-855a1d6f94bed54f7b64afc831f67706.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/37d786de.d073aaf0.js b/knife4j-doc/gitee/assets/js/37d786de.d073aaf0.js deleted file mode 100644 index ccfefd35f..000000000 --- a/knife4j-doc/gitee/assets/js/37d786de.d073aaf0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3763],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=p(e,["components","mdxType","originalType","parentName"]),c=l(r),m=n,d=c["".concat(s,".").concat(m)]||c[m]||u[m]||o;return r?a.createElement(d,i(i({ref:t},g),{},{components:r})):a.createElement(d,i({ref:t},g))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=c;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:n,i[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>m,frontMatter:()=>p,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),i=["components"],p={},s="[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",l={unversionedId:"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",id:"changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",title:"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",description:"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",permalink:"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"},next:{title:"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]",permalink:"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"}},g={},u=[{value:"\u91cd\u8981\u8bf4\u660e",id:"\u91cd\u8981\u8bf4\u660e",level:2},{value:"\u7279\u6027&\u4f18\u5316",id:"\u7279\u6027\u4f18\u5316",level:2},{value:"UI\u6548\u679c\u5c55\u793a",id:"ui\u6548\u679c\u5c55\u793a",level:2},{value:"\u9879\u76ee\u5730\u5740",id:"\u9879\u76ee\u5730\u5740",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],c={toc:u};function m(e){var t=e.components,p=(0,n.Z)(e,i);return(0,o.kt)("wrapper",(0,a.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v196-20190828-\u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898"},"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.9.6 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com",target:null,rel:null},"http://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub:"),(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u91cd\u8981\u8bf4\u660e"},"\u91cd\u8981\u8bf4\u660e"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u8fd9\u662fswagger-bootstrap-ui\u7684\u6700\u540e\u4e00\u4e2a\u7248\u672c")),(0,o.kt)("p",null,"\u91cd\u8981\u7684\u4e8b\u60c5\u8bf4\u4e09\u904d!!!"),(0,o.kt)("p",null,"\u4e00\u5f00\u59cb\u9879\u76ee\u521d\u8877\u662f\u4e3a\u4e86\u5199\u4e00\u4e2a\u589e\u5f3a\u7248\u672c\u7684Swagger \u524d\u7aefUI,\u4f46\u662f\u968f\u7740\u9879\u76ee\u7684\u53d1\u5c55,\u9762\u5bf9\u8d8a\u6765\u8d8a\u591a\u7684\u4e2a\u6027\u5316\u9700\u6c42,\u4e0d\u5f97\u4e0d\u7f16\u5199\u540e\u7aefJava\u4ee3\u7801\u4ee5\u6ee1\u8db3\u65b0\u7684\u9700\u6c42,\u5728swagger-bootstrap-ui\u76841.8.5~1.9.6\u7248\u672c\u4e4b\u95f4,\u91c7\u7528\u7684\u662f\u540e\u7aefJava\u4ee3\u7801\u548cUi\u90fd\u6df7\u5408\u5728\u4e00\u4e2aJar\u5305\u91cc\u9762\u7684\u65b9\u5f0f\u63d0\u4f9b\u7ed9\u5f00\u53d1\u8005\u4f7f\u7528.\u8fd9\u79cd\u65b9\u5f0f\u867d\u8bf4\u5bf9\u4e8e\u96c6\u6210swagger\u6765\u8bf4\u5f88\u65b9\u4fbf,\u53ea\u9700\u8981\u5f15\u5165jar\u5305\u5373\u53ef,\u4f46\u662f\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u663e\u5f97\u6709\u4e9b\u81c3\u80bf\u3002"),(0,o.kt)("p",null,"\u56e0\u6b64,\u9879\u76ee\u6b63\u5f0f\u66f4\u540d\u4e3a",(0,o.kt)("strong",{parentName:"p"},"knife4j"),",\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef."),(0,o.kt)("p",null,"swagger-bootstrap-ui\u7684\u6240\u6709\u7279\u6027\u90fd\u4f1a\u96c6\u4e2d\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-spring-ui"),"\u5305\u4e2d,\u5e76\u4e14\u540e\u7eed\u4e5f\u4f1a\u6ee1\u8db3\u5f00\u53d1\u8005\u66f4\u591a\u7684\u4e2a\u6027\u5316\u9700\u6c42."),(0,o.kt)("p",null,"\u4e3b\u8981\u7684\u53d8\u5316\u662f,\u9879\u76ee\u7684\u76f8\u5173\u7c7b\u5305\u8def\u5f84\u66f4\u6362\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"com.github.xiaoymin.knife4j"),"\u524d\u7f00,\u5f00\u53d1\u8005\u4f7f\u7528\u589e\u5f3a\u6ce8\u89e3\u65f6\u9700\u8981\u66ff\u6362\u5305\u8def\u5f84"),(0,o.kt)("p",null,"\u540e\u7aefJava\u4ee3\u7801\u548cui\u5305\u5206\u79bb\u4e3a\u591a\u4e2a\u6a21\u5757\u7684jar\u5305,\u4ee5\u9762\u5bf9\u5728\u76ee\u524d\u5fae\u670d\u52a1\u67b6\u6784\u4e0b,\u66f4\u52a0\u65b9\u4fbf\u7684\u4f7f\u7528\u589e\u5f3a\u6587\u6863\u6ce8\u89e3(\u4f7f\u7528SpringCloud\u5fae\u670d\u52a1\u9879\u76ee,\u53ea\u9700\u8981\u5728\u7f51\u5173\u5c42\u96c6\u6210UI\u7684jar\u5305\u5373\u53ef,\u56e0\u6b64\u5206\u79bb\u524d\u540e\u7aef)"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"knife4j"),"\u6cbf\u7528swagger-bootstrap-ui\u7684\u7248\u672c\u53f7,\u7b2c1\u4e2a\u7248\u672c\u4ece1.9.6\u5f00\u59cb,\u5173\u4e8e\u4f7f\u7528\u65b9\u6cd5,\u8bf7\u53c2\u8003\u6587\u6863"),(0,o.kt)("p",null,"\u7531\u4e8e\u66f4\u540d\u7ed9\u5927\u5bb6\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f~\uff01"),(0,o.kt)("h2",{id:"\u7279\u6027\u4f18\u5316"},"\u7279\u6027&\u4f18\u5316"),(0,o.kt)("p",null,"1\u3001\u89e3\u51b3Spring\u8def\u7531PathVariable\u4e0d\u663e\u793a\u7684\u60c5\u51b5\uff0c\u5e76\u4f18\u5316\u4ea4\u4e92\u4f53\u9a8c"),(0,o.kt)("p",null,"2\u3001\u89e3\u51b3\u54cd\u5e94\u4f53\u4e2d\u7684\u957f\u6574\u578b\u663e\u793a\u9519\u8bef,\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/135",target:"_blank",rel:"noopener"},"#135 @GitHub")),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u8bf7\u6c42\u5934Header\u662f\u4e2d\u6587\u7684\u60c5\u51b5,\u5982\u679c\u5305\u542b\u4e2d\u6587\u5219\u8fdb\u884cencodeURI\u51fd\u6570\u5904\u7406,\u5426\u5219\u4e0d\u505a\u4efb\u4f55\u5904\u7406",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/140",target:"_blank",rel:"noopener"},"#140 @GitHub")),(0,o.kt)("p",null,"4\u3001\u5347\u7ea7jQuery 1.X\u7cfb\u5217\u7248\u672c\u5230\u6700\u65b0\u7248\u672c",(0,o.kt)("inlineCode",{parentName:"p"},"1.12.4")),(0,o.kt)("p",null,"5\u3001\u521d\u59cb\u5316\u9875\u9762\u8bf7\u6c42Swagger\u63a5\u53e3\u8d44\u6e90\u65b9\u5f0f\u6539\u4e3a\u5f02\u6b65,\u5728jQuery\u7684ajax\u65b9\u6cd5\u53c2\u6570\u9879",(0,o.kt)("inlineCode",{parentName:"p"},"async:false"),"\u65f6,\u6d4f\u89c8\u5668\u4f1a\u629b\u51fa\u8b66\u544a\u7684\u95ee\u9898(\u540c\u6b65ajax\u8bf7\u6c42\u4f1a\u9020\u6210\u4e3b\u7ebf\u7a0b\u963b\u585e,\u5bf9\u7528\u6237\u4f53\u9a8c\u4e0d\u662f\u5f88\u597d,\u5df2\u88ab\u7f6e\u4e3a\u8fc7\u65f6)."),(0,o.kt)("p",null,"6\u3001\u652f\u6301supportedSubmitMethods,\u540e\u7aef\u914d\u7f6e",(0,o.kt)("inlineCode",{parentName:"p"},"UiConfiguration"),"\u7684Bean",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IVCQ0",target:"_blank",rel:"noopener"},"#IVCQ0 @Gitee")),(0,o.kt)("p",null,"7\u3001\u4f18\u5316\u4e0b\u8f7d\u4e2d\u6587\u4e71\u7801\u95ee\u9898,\u540e\u7aef\u9700\u8981\u6307\u5b9afilename\u503c,\u5e76\u4e14\u5bf9\u540d\u79f0\u8fdb\u884cURLEncoder.encode\u5904\u7406,UI\u524d\u7aef\u4f1a\u8fdb\u884cdecode\u6210\u4e2d\u6587,\u4fdd\u8bc1\u4e0b\u8f7d\u6b63\u5e38"),(0,o.kt)("p",null,"8\u3001\u4fee\u590dcurl\u72b6\u6001\u680f\u590d\u5236\u65f6\u5185\u5bb9\u88ab\u8f6c\u4e49\u7684bug",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/136",target:"_blank",rel:"noopener"},"#136 @GitHub")),(0,o.kt)("h2",{id:"ui\u6548\u679c\u5c55\u793a"},"UI\u6548\u679c\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"header-json.png",src:r(72742).Z,width:"1365",height:"626"}),"\n",(0,o.kt)("img",{src:r(93658).Z,width:"1364",height:"625"}),"\n",(0,o.kt)("img",{src:r(67554).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(20995).Z,width:"1918",height:"1005"}),"\n",(0,o.kt)("img",{src:r(21867).Z,width:"1920",height:"1011"})),(0,o.kt)("h2",{id:"\u9879\u76ee\u5730\u5740"},"\u9879\u76ee\u5730\u5740"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.9.6\n\n")),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,o.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}m.isMDXComponent=!0},72742:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/1-5bb20cbb0659f6d54060e3986e3a4229.png"},93658:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/2-b760048cc31a0b5e8f33fd4fd0e487f5.png"},67554:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/3-84ad6fbc82d84760895dd1be11816a17.png"},20995:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/4-b324bedccf50ddbce275f6f58d3fec4d.png"},21867:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/5-855a1d6f94bed54f7b64afc831f67706.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3ba4f482.72cff3dd.js b/knife4j-doc/gitee/assets/js/3ba4f482.72cff3dd.js new file mode 100644 index 000000000..7030b50a1 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3ba4f482.72cff3dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5438],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>m});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),p=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=p(e.components);return r.createElement(u.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=p(t),f=a,m=c["".concat(u,".").concat(f)]||c[f]||d[f]||o;return t?r.createElement(m,i(i({ref:n},s),{},{components:t})):r.createElement(m,i({ref:n},s))}));function m(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=f;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{t.d(n,{Z:()=>i});var r=t(67294),a=t(86010);const o={tabItem:"tabItem_Ymn6"};function i(e){var n=e.children,t=e.hidden,i=e.className;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,i),hidden:t},n)}},65488:(e,n,t)=>{t.d(n,{Z:()=>d});var r=t(87462),a=t(67294),o=t(86010),i=t(72389),l=t(67392),u=t(7094),p=t(12466);const s={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function c(e){var n,t,i=e.lazy,c=e.block,d=e.defaultValue,f=e.values,m=e.groupId,g=e.className,b=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&"value"in e.props)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),v=null!=f?f:b.map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes}})),y=(0,l.l)(v,(function(e,n){return e.value===n.value}));if(y.length>0)throw new Error('Docusaurus error: Duplicate values "'+y.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var w=null===d?d:null!=(n=null!=d?d:null==(t=b.find((function(e){return e.props.default})))?void 0:t.props.value)?n:b[0].props.value;if(null!==w&&!v.some((function(e){return e.value===w})))throw new Error('Docusaurus error: The has a defaultValue "'+w+'" but none of its children has the corresponding value. Available values are: '+v.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var h=(0,u.U)(),x=h.tabGroupChoices,k=h.setTabGroupChoices,j=(0,a.useState)(w),O=j[0],I=j[1],E=[],N=(0,p.o5)().blockElementScrollPositionUntilNextRender;if(null!=m){var S=x[m];null!=S&&S!==O&&v.some((function(e){return e.value===S}))&&I(S)}var T=function(e){var n=e.currentTarget,t=E.indexOf(n),r=v[t].value;r!==O&&(N(n),I(r),null!=m&&k(m,String(r)))},P=function(e){var n,t=null;switch(e.key){case"ArrowRight":var r,a=E.indexOf(e.currentTarget)+1;t=null!=(r=E[a])?r:E[0];break;case"ArrowLeft":var o,i=E.indexOf(e.currentTarget)-1;t=null!=(o=E[i])?o:E[E.length-1]}null==(n=t)||n.focus()};return a.createElement("div",{className:(0,o.Z)("tabs-container",s.tabList)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":c},g)},v.map((function(e){var n=e.value,t=e.label,i=e.attributes;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:O===n?0:-1,"aria-selected":O===n,key:n,ref:function(e){return E.push(e)},onKeyDown:P,onFocus:T,onClick:T},i,{className:(0,o.Z)("tabs__item",s.tabItem,null==i?void 0:i.className,{"tabs__item--active":O===n})}),null!=t?t:n)}))),i?(0,a.cloneElement)(b.filter((function(e){return e.props.value===O}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},b.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==O})}))))}function d(e){var n=(0,i.Z)();return a.createElement(c,(0,r.Z)({key:String(n)},e))}},99756:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>u,default:()=>m,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var r=t(87462),a=t(63366),o=(t(67294),t(3905)),i=(t(65488),t(85162),["components"]),l={},u="Spring Webflux\u96c6\u6210",p={unversionedId:"middleware-sources/spring-webflux/spring-webflux-introduction",id:"middleware-sources/spring-webflux/spring-webflux-introduction",title:"Spring Webflux\u96c6\u6210",description:"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd",source:"@site/docs/middleware-sources/spring-webflux/spring-webflux-introduction.mdx",sourceDirName:"middleware-sources/spring-webflux",slug:"/middleware-sources/spring-webflux/spring-webflux-introduction",permalink:"/docs/middleware-sources/spring-webflux/spring-webflux-introduction",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1678022183,formattedLastUpdatedAt:"2023\u5e743\u67085\u65e5",frontMatter:{},sidebar:"middleware-sources",previous:{title:"Spring Cloud Gateway\u7f51\u5173\u805a\u5408",permalink:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},next:{title:"1.1 \u4ecb\u7ecd",permalink:"/docs/middleware-sources/aggregation-introduction"}},s={},c=[],d={toc:c},f="wrapper";function m(e){var n=e.components,t=(0,a.Z)(e,i);return(0,o.kt)(f,(0,r.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"spring-webflux\u96c6\u6210"},"Spring Webflux\u96c6\u6210"),(0,o.kt)("admonition",{title:"\u6ce8\u610f\u4e8b\u9879",type:"danger"},(0,o.kt)("p",{parentName:"admonition"},"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd")),(0,o.kt)("p",null,"\u5728\u76ee\u524dKnife4j\u7684\u7248\u672c\u4e2d\uff0c\u867d\u6ca1\u6709\u76f4\u63a5\u63d0\u4f9b\u5728Spring Webflux\u6846\u67b6\u4e0b\u7684\u96c6\u6210starter\u5305\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u4f9d\u7136\u53ef\u4ee5\u4f7f\u7528Knife4j\u7684ui\u7ec4\u4ef6\uff0c\u8fd9\u5f97\u76ca\u4e8espringdoc-openapi\u9879\u76ee\u7684\u652f\u6301\u3002"),(0,o.kt)("p",null,"\u4f7f\u7528\u65b9\u6cd5"),(0,o.kt)("p",null,"1\u3001\u9488\u5bf9\u5355\u4f53Spring Webflux\u9879\u76ee\uff0c\u5f00\u53d1\u8005\u9996\u5148\u9700\u8981\u5f15\u5165springdoc-openapi\u6a21\u5757\u7684jar\u5305\uff0cMaven\u5750\u6807\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml",metastring:'title="Spring Boot < 3.0.0-M1 "',title:'"Spring',Boot:!0,"<":!0,"3.0.0-M1":!0,'"':!0},"\n org.springdoc\n springdoc-openapi-webflux-ui\n 1.6.14\n\n")),(0,o.kt)("p",null,"\u53c2\u8003demo\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-openapi3-spring-webflux-demo",target:"_blank",rel:"noopener"},"knife4j-openapi3-spring-webflux-demo")),(0,o.kt)("p",null,"\u5982\u679c\u4f60\u662fSpring Boot 3\uff0c\u90a3\u4e48Maven\u5750\u6807\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml",metastring:'title="Spring Boot >= 3.0.0-M1 "',title:'"Spring',Boot:!0,">":"","3.0.0-M1":!0,'"':!0},"\n org.springdoc\n springdoc-openapi-starter-webflux-ui\n 2.0.2\n\n")),(0,o.kt)("p",null,"\u53c2\u8003demo\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-openapi3-spring-boot3-webflux-demo",target:"_blank",rel:"noopener"},"knife4j-openapi3-spring-boot3-webflux-demo")),(0,o.kt)("p",null,"2\u3001\u5f15\u5165Knife4j 4.0\u7248\u672c\u63d0\u4f9b\u7684OpenAPI3\u89c4\u8303\u7684ui\u7ec4\u4ef6\u5305\uff0cMaven\u5750\u6807\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-openapi3-ui\n 4.0.0\n\n\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3ba4f482.c1b2f0b4.js b/knife4j-doc/gitee/assets/js/3ba4f482.c1b2f0b4.js deleted file mode 100644 index 2d11b6ad0..000000000 --- a/knife4j-doc/gitee/assets/js/3ba4f482.c1b2f0b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5438],{3905:(e,n,r)=>{r.d(n,{Zo:()=>s,kt:()=>f});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function i(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=t.createContext({}),p=function(e){var n=t.useContext(u),r=n;return e&&(r="function"==typeof e?e(n):i(i({},n),e)),r},s=function(e){var n=p(e.components);return t.createElement(u.Provider,{value:n},e.children)},c={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},d=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=p(r),f=a,m=d["".concat(u,".").concat(f)]||d[f]||c[f]||o;return r?t.createElement(m,i(i({ref:n},s),{},{components:r})):t.createElement(m,i({ref:n},s))}));function f(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.d(n,{Z:()=>i});var t=r(67294),a=r(86010);const o="tabItem_Ymn6";function i(e){var n=e.children,r=e.hidden,i=e.className;return t.createElement("div",{role:"tabpanel",className:(0,a.Z)(o,i),hidden:r},n)}},65488:(e,n,r)=>{r.d(n,{Z:()=>f});var t=r(87462),a=r(67294),o=r(86010),i=r(72389),l=r(67392),u=r(7094),p=r(12466);const s="tabList__CuJ",c="tabItem_LNqP";function d(e){var n,r,i=e.lazy,d=e.block,f=e.defaultValue,m=e.values,g=e.groupId,b=e.className,v=a.Children.map(e.children,(function(e){if((0,a.isValidElement)(e)&&"value"in e.props)return e;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})),y=null!=m?m:v.map((function(e){var n=e.props;return{value:n.value,label:n.label,attributes:n.attributes}})),w=(0,l.l)(y,(function(e,n){return e.value===n.value}));if(w.length>0)throw new Error('Docusaurus error: Duplicate values "'+w.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.');var h=null===f?f:null!=(n=null!=f?f:null==(r=v.find((function(e){return e.props.default})))?void 0:r.props.value)?n:v[0].props.value;if(null!==h&&!y.some((function(e){return e.value===h})))throw new Error('Docusaurus error: The has a defaultValue "'+h+'" but none of its children has the corresponding value. Available values are: '+y.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");var x=(0,u.U)(),k=x.tabGroupChoices,j=x.setTabGroupChoices,O=(0,a.useState)(h),E=O[0],N=O[1],I=[],S=(0,p.o5)().blockElementScrollPositionUntilNextRender;if(null!=g){var T=k[g];null!=T&&T!==E&&y.some((function(e){return e.value===T}))&&N(T)}var P=function(e){var n=e.currentTarget,r=I.indexOf(n),t=y[r].value;t!==E&&(S(n),N(t),null!=g&&j(g,String(t)))},C=function(e){var n,r=null;switch(e.key){case"ArrowRight":var t,a=I.indexOf(e.currentTarget)+1;r=null!=(t=I[a])?t:I[0];break;case"ArrowLeft":var o,i=I.indexOf(e.currentTarget)-1;r=null!=(o=I[i])?o:I[I.length-1]}null==(n=r)||n.focus()};return a.createElement("div",{className:(0,o.Z)("tabs-container",s)},a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":d},b)},y.map((function(e){var n=e.value,r=e.label,i=e.attributes;return a.createElement("li",(0,t.Z)({role:"tab",tabIndex:E===n?0:-1,"aria-selected":E===n,key:n,ref:function(e){return I.push(e)},onKeyDown:C,onFocus:P,onClick:P},i,{className:(0,o.Z)("tabs__item",c,null==i?void 0:i.className,{"tabs__item--active":E===n})}),null!=r?r:n)}))),i?(0,a.cloneElement)(v.filter((function(e){return e.props.value===E}))[0],{className:"margin-top--md"}):a.createElement("div",{className:"margin-top--md"},v.map((function(e,n){return(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==E})}))))}function f(e){var n=(0,i.Z)();return a.createElement(d,(0,t.Z)({key:String(n)},e))}},99756:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>s,contentTitle:()=>u,default:()=>f,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var t=r(87462),a=r(63366),o=(r(67294),r(3905)),i=(r(65488),r(85162),["components"]),l={},u="Spring Webflux\u96c6\u6210",p={unversionedId:"middleware-sources/spring-webflux/spring-webflux-introduction",id:"middleware-sources/spring-webflux/spring-webflux-introduction",title:"Spring Webflux\u96c6\u6210",description:"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd",source:"@site/docs/middleware-sources/spring-webflux/spring-webflux-introduction.mdx",sourceDirName:"middleware-sources/spring-webflux",slug:"/middleware-sources/spring-webflux/spring-webflux-introduction",permalink:"/docs/middleware-sources/spring-webflux/spring-webflux-introduction",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1678022183,formattedLastUpdatedAt:"2023\u5e743\u67085\u65e5",frontMatter:{},sidebar:"middleware-sources",previous:{title:"Spring Cloud Gateway\u7f51\u5173\u805a\u5408",permalink:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction"},next:{title:"1.1 \u4ecb\u7ecd",permalink:"/docs/middleware-sources/aggregation-introduction"}},s={},c=[],d={toc:c};function f(e){var n=e.components,r=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,t.Z)({},d,r,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"spring-webflux\u96c6\u6210"},"Spring Webflux\u96c6\u6210"),(0,o.kt)("admonition",{title:"\u6ce8\u610f\u4e8b\u9879",type:"danger"},(0,o.kt)("p",{parentName:"admonition"},"Spring Webflux\u6a21\u5f0f\u4e0b\u7684Knife4j\u4ec5\u4ec5\u662fui\u5305\uff0c\u76ee\u524d\u6ca1\u6709\u63d0\u4f9bKnife4j\u7684\u589e\u5f3a\u529f\u80fd")),(0,o.kt)("p",null,"\u5728\u76ee\u524dKnife4j\u7684\u7248\u672c\u4e2d\uff0c\u867d\u6ca1\u6709\u76f4\u63a5\u63d0\u4f9b\u5728Spring Webflux\u6846\u67b6\u4e0b\u7684\u96c6\u6210starter\u5305\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u4f9d\u7136\u53ef\u4ee5\u4f7f\u7528Knife4j\u7684ui\u7ec4\u4ef6\uff0c\u8fd9\u5f97\u76ca\u4e8espringdoc-openapi\u9879\u76ee\u7684\u652f\u6301\u3002"),(0,o.kt)("p",null,"\u4f7f\u7528\u65b9\u6cd5"),(0,o.kt)("p",null,"1\u3001\u9488\u5bf9\u5355\u4f53Spring Webflux\u9879\u76ee\uff0c\u5f00\u53d1\u8005\u9996\u5148\u9700\u8981\u5f15\u5165springdoc-openapi\u6a21\u5757\u7684jar\u5305\uff0cMaven\u5750\u6807\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml",metastring:'title="Spring Boot < 3.0.0-M1 "',title:'"Spring',Boot:!0,"<":!0,"3.0.0-M1":!0,'"':!0},"\n org.springdoc\n springdoc-openapi-webflux-ui\n 1.6.14\n\n")),(0,o.kt)("p",null,"\u53c2\u8003demo\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-openapi3-spring-webflux-demo",target:"_blank",rel:"noopener"},"knife4j-openapi3-spring-webflux-demo")),(0,o.kt)("p",null,"\u5982\u679c\u4f60\u662fSpring Boot 3\uff0c\u90a3\u4e48Maven\u5750\u6807\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml",metastring:'title="Spring Boot >= 3.0.0-M1 "',title:'"Spring',Boot:!0,">":"","3.0.0-M1":!0,'"':!0},"\n org.springdoc\n springdoc-openapi-starter-webflux-ui\n 2.0.2\n\n")),(0,o.kt)("p",null,"\u53c2\u8003demo\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/knife4j-openapi3-spring-boot3-webflux-demo",target:"_blank",rel:"noopener"},"knife4j-openapi3-spring-boot3-webflux-demo")),(0,o.kt)("p",null,"2\u3001\u5f15\u5165Knife4j 4.0\u7248\u672c\u63d0\u4f9b\u7684OpenAPI3\u89c4\u8303\u7684ui\u7ec4\u4ef6\u5305\uff0cMaven\u5750\u6807\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-openapi3-ui\n 4.0.0\n\n\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3bacdadd.636fc8cb.js b/knife4j-doc/gitee/assets/js/3bacdadd.636fc8cb.js deleted file mode 100644 index dfa1d6cfe..000000000 --- a/knife4j-doc/gitee/assets/js/3bacdadd.636fc8cb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9264],{3905:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>m});var a=t(67294);function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var u=a.createContext({}),k=function(e){var r=a.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},s=function(e){var r=k(e.components);return a.createElement(u.Provider,{value:r},e.children)},p={inlineCode:"code",wrapper:function(e){var r=e.children;return a.createElement(a.Fragment,{},r)}},c=a.forwardRef((function(e,r){var t=e.components,n=e.mdxType,i=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),c=k(t),m=n,d=c["".concat(u,".").concat(m)]||c[m]||p[m]||i;return t?a.createElement(d,l(l({ref:r},s),{},{components:t})):a.createElement(d,l({ref:r},s))}));function m(e,r){var t=arguments,n=r&&r.mdxType;if("string"==typeof e||n){var i=t.length,l=new Array(i);l[0]=c;var o={};for(var u in r)hasOwnProperty.call(r,u)&&(o[u]=r[u]);o.originalType=e,o.mdxType="string"==typeof e?e:n,l[1]=o;for(var k=2;k{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>u,default:()=>m,frontMatter:()=>o,metadata:()=>k,toc:()=>p});var a=t(87462),n=t(63366),i=(t(67294),t(3905)),l=["components"],o={},u="1.4 Eureka\u6a21\u5f0f",k={unversionedId:"middleware-sources/aggregation-eureka",id:"middleware-sources/aggregation-eureka",title:"1.4 Eureka\u6a21\u5f0f",description:"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI",source:"@site/docs/middleware-sources/aggregation-eureka.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/aggregation-eureka",permalink:"/docs/middleware-sources/aggregation-eureka",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672149817,formattedLastUpdatedAt:"2022\u5e7412\u670827\u65e5",frontMatter:{},sidebar:"middleware-sources",previous:{title:"1.3 Cloud\u6a21\u5f0f",permalink:"/docs/middleware-sources/aggregation-cloud"},next:{title:"1.5 Nacos\u6a21\u5f0f",permalink:"/docs/middleware-sources/aggregation-nacos"}},s={},p=[],c={toc:p};function m(e){var r=e.components,t=(0,n.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},c,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"14-eureka\u6a21\u5f0f"},"1.4 Eureka\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable-aggregation: true\n eureka:\n enable: false\n service-url: http://localhost:10000/eureka/\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n service-name: service-order\n location: /v2/api-docs?group=default\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Eureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-url"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679cEureka\u7684\u6ce8\u518c\u548c\u83b7\u53d6\u670d\u52a1\u9700\u8981\u8fdb\u884cBasic\u8ba4\u8bc1\uff0c\u5f00\u53d1\u8005\u9700\u8981\u914d\u7f6e\u8be5\u5c5e\u6027"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.enable"),":\u662f\u5426\u542f\u7528Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.usernae"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.password"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.service-name"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.swagger-version"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.service-path"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.password"),":Basic\u5bc6\u7801")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3bacdadd.aff268e3.js b/knife4j-doc/gitee/assets/js/3bacdadd.aff268e3.js new file mode 100644 index 000000000..0db33492f --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3bacdadd.aff268e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9264],{3905:(e,r,t)=>{t.d(r,{Zo:()=>s,kt:()=>d});var a=t(67294);function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var u=a.createContext({}),k=function(e){var r=a.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},s=function(e){var r=k(e.components);return a.createElement(u.Provider,{value:r},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var r=e.children;return a.createElement(a.Fragment,{},r)}},m=a.forwardRef((function(e,r){var t=e.components,n=e.mdxType,i=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),p=k(t),m=n,d=p["".concat(u,".").concat(m)]||p[m]||c[m]||i;return t?a.createElement(d,l(l({ref:r},s),{},{components:t})):a.createElement(d,l({ref:r},s))}));function d(e,r){var t=arguments,n=r&&r.mdxType;if("string"==typeof e||n){var i=t.length,l=new Array(i);l[0]=m;var o={};for(var u in r)hasOwnProperty.call(r,u)&&(o[u]=r[u]);o.originalType=e,o[p]="string"==typeof e?e:n,l[1]=o;for(var k=2;k{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>u,default:()=>d,frontMatter:()=>o,metadata:()=>k,toc:()=>p});var a=t(87462),n=t(63366),i=(t(67294),t(3905)),l=["components"],o={},u="1.4 Eureka\u6a21\u5f0f",k={unversionedId:"middleware-sources/aggregation-eureka",id:"middleware-sources/aggregation-eureka",title:"1.4 Eureka\u6a21\u5f0f",description:"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI",source:"@site/docs/middleware-sources/aggregation-eureka.md",sourceDirName:"middleware-sources",slug:"/middleware-sources/aggregation-eureka",permalink:"/docs/middleware-sources/aggregation-eureka",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672149817,formattedLastUpdatedAt:"2022\u5e7412\u670827\u65e5",frontMatter:{},sidebar:"middleware-sources",previous:{title:"1.3 Cloud\u6a21\u5f0f",permalink:"/docs/middleware-sources/aggregation-cloud"},next:{title:"1.5 Nacos\u6a21\u5f0f",permalink:"/docs/middleware-sources/aggregation-nacos"}},s={},p=[],c={toc:p},m="wrapper";function d(e){var r=e.components,t=(0,n.Z)(e,l);return(0,i.kt)(m,(0,a.Z)({},c,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"14-eureka\u6a21\u5f0f"},"1.4 Eureka\u6a21\u5f0f"),(0,i.kt)("p",null,"\u66f4\u52a0\u8be6\u7ec6\u7684\u5b9e\u6218demo\u8bf7\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u57fa\u4e8eEureka\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408OpenAPI")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u5f00\u53d1\u8005\u53ef\u4ee5\u4eceEureka\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u805a\u5408\u5df2\u7ecf\u6ce8\u518c\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u4ee5\u53ca\u6ce8\u518c\u7684\u670d\u52a1\u5fc5\u987b\u96c6\u6210OpenAPI\u5e76\u4e14\u80fd\u63d0\u4f9b\u63a5\u53e3\n\u8be5\u6a21\u5f0f\u7c7b\u4f3c\u4e8eCloud\u6a21\u5f0f\uff0c\u53ea\u662f\u9690\u85cf\u4e86\u670d\u52a1\u7684\u5730\u5740\u800c\u5df2")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable-aggregation: true\n eureka:\n enable: false\n service-url: http://localhost:10000/eureka/\n routes:\n - name: \u8ba2\u5355\u670d\u52a1\n service-name: service-order\n location: /v2/api-docs?group=default\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.enable"),":\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\uff0c\u5219\u4ee3\u8868\u542f\u7528Eureka\u6a21\u5f0f"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-url"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u5730\u5740"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679cEureka\u7684\u6ce8\u518c\u548c\u83b7\u53d6\u670d\u52a1\u9700\u8981\u8fdb\u884cBasic\u8ba4\u8bc1\uff0c\u5f00\u53d1\u8005\u9700\u8981\u914d\u7f6e\u8be5\u5c5e\u6027"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.enable"),":\u662f\u5426\u542f\u7528Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.usernae"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.service-auth.password"),":Eureka\u6ce8\u518c\u4e2d\u5fc3Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth"),":\u8be5\u5c5e\u6027\u662f\u4e00\u4e2a\u516c\u5171Basic\u9a8c\u8bc1\u5c5e\u6027(\u53ef\u9009)\uff0c\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684OpenAPI\u89c4\u8303\u7684\u670d\u52a1\u9700\u8981\u4ee5Basic\u9a8c\u8bc1\u8fdb\u884c\u9274\u6743\u8bbf\u95ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5982\u679c\u914d\u7f6e\u8be5\u5c5e\u6027\uff0c\u5219\u8be5\u6a21\u5f0f\u4e0b\u6240\u6709\u914d\u7f6e\u7684Routes\u8282\u70b9\u63a5\u53e3\u90fd\u4f1a\u4ee5Basic\u9a8c\u8bc1\u4fe1\u606f\u8bbf\u95ee\u63a5\u53e3"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.route-auth.password"),":Basic\u5bc6\u7801"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes"),":\u9700\u8981\u805a\u5408\u7684\u670d\u52a1\u96c6\u5408(\u5fc5\u9009)\uff0c\u53ef\u4ee5\u914d\u7f6e\u591a\u4e2a"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.name"),":\u670d\u52a1\u540d\u79f0(\u663e\u793a\u540d\u79f0\uff0c\u6700\u7ec8\u5728Ui\u7684\u5de6\u4e0a\u89d2\u4e0b\u62c9\u6846\u8fdb\u884c\u663e\u793a)\uff0c\u5982\u679c\u8be5\u5c5e\u6027\u4e0d\u914d\u7f6e\uff0c\u6700\u7ec8Ui\u4f1a\u663e\u793a",(0,i.kt)("inlineCode",{parentName:"li"},"serviceName")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.service-name"),":Eureka\u6ce8\u518c\u4e2d\u5fc3\u7684\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.uri"),":\u8be5\u670d\u52a1\u7684\u63a5\u53e3URI\u8d44\u6e90\uff0c\u5982\u679c\u662fHTTPS\uff0c\u5219\u9700\u8981\u5b8c\u6574\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.location:"),":\u5177\u4f53\u8d44\u6e90\u63a5\u53e3\u5730\u5740\uff0c\u6700\u7ec8Knife4j\u662f\u901a\u8fc7\u6ce8\u518c\u670d\u52a1uri+location\u7684\u7ec4\u5408\u8def\u5f84\u8fdb\u884c\u8bbf\u95ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.swagger-version"),":\u7248\u672c\u53f7\uff0c\u9ed8\u8ba4\u662f",(0,i.kt)("inlineCode",{parentName:"li"},"2.0"),"\uff0c\u53ef\u9009\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.service-path"),":\u8be5\u5c5e\u6027\u662f\u6700\u7ec8\u5728Ui\u4e2d\u5c55\u793a\u7684\u63a5\u53e3\u524d\u7f00\u5c5e\u6027\uff0c\u63d0\u4f9b\u8be5\u5c5e\u6027\u7684\u76ee\u7684\u4e5f\u662f\u56e0\u4e3a\u901a\u5e38\u5f00\u53d1\u8005\u5728\u4ee5Gateway\u7b49\u65b9\u5f0f\u805a\u5408\u65f6\uff0c\u9700\u8981\u4e00\u4e2a\u524d\u7f00\u8def\u5f84\u6765\u8fdb\u884c\u8f6c\u53d1\uff0c\u800c\u6700\u7ec8\u8fd9\u4e2a\u524d\u7f00\u8def\u5f84\u4f1a\u5728\u6bcf\u4e2a\u63a5\u53e3\u4e2d\u8fdb\u884c\u8ffd\u52a0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth"),":\u5982\u679c\u8be5Route\u8282\u70b9\u7684\u63a5\u53e3\u5f00\u542f\u4e86Basic\uff0c\u5e76\u4e14\u548c\u516c\u5171\u914d\u7f6e\u7684Basic\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5355\u72ec\u914d\u7f6e"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.enable"),":\u662f\u5426\u542f\u7528Basic\u9a8c\u8bc1"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.usernae"),":Basic\u7528\u6237\u540d"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"knife4j.eureka.routes.route-auth.password"),":Basic\u5bc6\u7801")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3be3da91.3ea79b5b.js b/knife4j-doc/gitee/assets/js/3be3da91.3ea79b5b.js deleted file mode 100644 index 9fdff2c92..000000000 --- a/knife4j-doc/gitee/assets/js/3be3da91.3ea79b5b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6050],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),m=s(n),k=r,c=m["".concat(o,".").concat(k)]||m[k]||g[k]||i;return n?a.createElement(c,l(l({ref:t},u),{},{components:n})):a.createElement(c,l({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:r,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>k,frontMatter:()=>p,metadata:()=>s,toc:()=>g});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=["components"],p={},o="[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",s={unversionedId:"changelog/x/2019-12-16-knife4j-2.0.0-issue",id:"changelog/x/2019-12-16-knife4j-2.0.0-issue",title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64.",source:"@site/docs/changelog/2.x/2019-12-16-knife4j-2.0.0-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2019-12-16-knife4j-2.0.0-issue",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"},next:{title:"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",permalink:"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"}},u={},g=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6700\u540e",id:"\u6700\u540e",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:g};function k(e){var t=e.components,p=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},m,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v200-20191216-knife4j-20\u53d1\u5e03\u6d85\u69c3\u91cd\u751f"},"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"2.0"),"\u7248\u672c\u4e3b\u8981\u662f\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Vue"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Ant Design Vue"),"\u5bf9\u524d\u7aefUi\u8fdb\u884c\u91cd\u5199,\u8be5\u7248\u672c\u662f\u771f\u6b63\u7684\u524d\u540e\u7aef\u5206\u79bb\u7248\u672c\uff0c\u540c\u65f6\u4f9d\u8d56\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Vue"),"\u7684\u6280\u672f\u751f\u6001,\u4ee5\u540e\u4f1a\u6709\u66f4\u591a\u6709\u8da3\u7684\u529f\u80fd\u5b9e\u73b0,\u5168\u65b9\u4f4d\u6ee1\u8db3\u5f00\u53d1\u8005\u7684\u9700\u8981."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"http://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.0\u7248):"),(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u4f7f\u7528Vue+Ant Design Vue\u5bf9Ui\u8fdb\u884c\u91cd\u5199,\u7edf\u4e00\u6574\u4f53\u754c\u9762\u98ce\u683c,\u66f4\u6e05\u6670\u7684\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("p",null,"2\u3001\u652f\u6301\u5728\u754c\u9762\u4e2d\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001\u79bb\u7ebfHtml\u683c\u5f0f\u7684\u6587\u6863\uff0cMarkdown\u3001Html\u98ce\u683c\u8f83\u4e4b\u524d\u90fd\u505a\u4e86\u6781\u81f4\u7684\u4f18\u5316\uff0cMarkdown\u683c\u5f0f\u4e3b\u8981\u662f\u9488\u5bf9\u6811\u5f62Model\u7684\u5c55\u793a\u901a\u8fc7\u7f29\u8fdb\u7684\u65b9\u5f0f\u5728md\u683c\u5f0f\u7684table\u4e2d\u663e\u793a\u66f4\u52a0\u76f4\u89c2,Html\u79bb\u7ebf\u6587\u6863\u548c\u5728\u7ebf\u7248\u98ce\u683c\u51e0\u4e4e\u6ca1\u6709\u533a\u522b\uff0c\u7b80\u6d01\u3001\u76f4\u89c2.",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c")),(0,i.kt)("p",null,"3\u3001\u5355\u63a5\u53e3\u6587\u6863\u9875\u7684\u590d\u5236\u6587\u6863\u4e5f\u662f\u901a\u8fc7\u590d\u5236Markdown\u683c\u5f0f\u7684\u95ee\u9898\uff0c\u540c\u4e0a\u4e3b\u8981\u4f18\u5316md\u683c\u5f0f\u7684table\u663e\u793a\u95ee\u9898\uff0c\u4ee5\u7f29\u8fdb\u7684\u65b9\u5f0f\u663e\u793a\u6811\u5f62\u8868\u683c"),(0,i.kt)("p",null,"4\u3001\u5bf9\u8c03\u8bd5\u680f\u8fdb\u884c\u4f18\u5316\u3001\u533a\u5206\u8bf7\u6c42\u5934\u548c\u8bf7\u6c42\u4f53\u53c2\u6570,\u4f7f\u7528tab\u6807\u7b7e\u9875\u7ec4\u4ef6\u53ef\u4ee5\u5bf9\u8bf7\u6c42\u53c2\u6570\u8fdb\u884c\u52a8\u6001\u7684\u6dfb\u52a0\u3001\u7ef4\u62a4\u3001\u5982\u679c\u4f60\u4f7f\u7528\u5bf9\u6587\u6863\u8fdb\u884c\u7f13\u5b58,\u6587\u6863\u9875\u7684\u52a8\u6001\u8c03\u8bd5\u53c2\u6570\u4f1a\u6301\u4e45\u5316\u5904\u7406."),(0,i.kt)("p",null,"5\u3001\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e(\u589e\u5f3a\u529f\u80fd)\u6709\u5220\u51cf,\u76ee\u524d\u53ea\u4fdd\u75594\u9879\u529f\u80fd\uff0c\u5373(\u8bf7\u6c42\u53c2\u6570\u7f13\u5b58\u3001\u8fc7\u6ee4\u91cd\u590d\u540c\u7c7b\u578b\u63a5\u53e3\u3001\u672c\u5730\u7f13\u5b58\u6253\u5f00tab\u63a5\u53e3\u3001\u6587\u6863\u589e\u5f3a)"),(0,i.kt)("p",null,"6\u3001Tab\u6807\u7b7e\u9875\u6253\u5f00\u63a5\u53e3\u3001\u53f3\u952e\u53ef\u4ee5\u6839\u636e\u9009\u62e9\u5173\u95ed\u4e0d\u540c\u7684Tab\u6807\u7b7e\u9875"),(0,i.kt)("p",null,"7\u3001\u8c03\u8bd5\u6846\u8bf7\u6c42\u5934\u3001\u8bf7\u6c42\u4f53\u5747\u652f\u6301\u52a8\u6001\u53c2\u6570\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u81ea\u884c\u6dfb\u52a0\u52a8\u6001\u53c2\u6570\u8fdb\u884c\u8c03\u8bd5,\u66f4\u52a0\u7075\u6d3b\u65b9\u4fbf"),(0,i.kt)("p",null,"8\u3001\u63d0\u4f9b\u589e\u5f3a\u76f4\u63a5\u8bbf\u95ee\u5730\u5740\uff0c",(0,i.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html#/plus"),"\uff0c\u540e\u7aef\u5728\u4fdd\u8bc1\u5f00\u542f\u589e\u5f3a\u6ce8\u89e3\u7684\u60c5\u51b5\u4e0b\u53ef\u76f4\u63a5\u4f7f\u7528\u8be5\u5730\u5740,\u4e0d\u9700\u8981\u5728\u524d\u7aef\u4e2a\u6027\u5316\u914d\u7f6e\u4e2d\u518d\u8fdb\u884c\u914d\u7f6e,\u65b9\u4fbf\u56e2\u961f\u76f4\u63a5\u8fdb\u884c\u6c9f\u901a"),(0,i.kt)("p",null,"9\u3001\u54cd\u5e94\u4e0b\u8f7d\u7c7b\u578b\u589e\u52a0\u81f3141\u79cd,\u51e0\u4e4e\u6db5\u76d6\u76ee\u524d\u5e38\u89c1\u7684\u6587\u4ef6\u7c7b\u578b"),(0,i.kt)("p",null,"10\u3001\u4fee\u590d\u54cd\u5e94\u4f53\u4e2d\u4f1a\u51fa\u73b0\u5c5e\u6027\u591a\u4f59\u53cc\u5f15\u53f7\u7684bug",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I125B2",target:"_blank",rel:"noopener"},"gitee # I125B2"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/156",target:"_blank",rel:"noopener"},"github #156")),(0,i.kt)("p",null,"11\u3001\u4fee\u590d\u8bf7\u6c42\u53c2\u6570\u6570\u636e\u7c7b\u578b\u7684format\u4e0d\u663e\u793a\u7684\u95ee\u9898,\u9488\u5bf9Long\u7c7b\u578b\u533a\u5206int64\u3001int32- ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/161",target:"_blank",rel:"noopener"},"github #161")),(0,i.kt)("p",null,"12\u3001\u89e3\u51b3\u591a\u4e2aSchema\u54cd\u5e94\u72b6\u6001\u7801\u7684\u60c5\u51b5\u4e0bSwaggerModels\u5b57\u6bb5\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/170",target:"_blank",rel:"noopener"},"github #170")),(0,i.kt)("p",null,"13\u3001\u8c03\u8bd5\u8bf7\u6c42\u9ed8\u8ba4\u8ffd\u52a0\u4e00\u4e2aUi\u7684\u8bf7\u6c42\u5934",(0,i.kt)("inlineCode",{parentName:"p"},"Request-Origion"),",\u503c\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\uff0c\u539f\u6765\u8be5\u503c\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"SwaggerBootsrapUi"),"\uff0c\u57282.0\u7248\u672c\u4e2d\u8fdb\u884c\u4e86\u53d8\u66f4."),(0,i.kt)("p",null,"14\u3001\u89e3\u51b3Models\u5c5e\u6027\u5d4c\u5957\u8fc7\u591a\u65f6,\u9875\u9762\u767d\u677f\uff0c\u6548\u7387\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/106",target:"_blank",rel:"noopener"},"github #106")),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.0\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"1\u3001\u79fb\u9664\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUi"),",\u4ee5\u540e\u7684\u589e\u5f3a\u5f00\u542f\u6ce8\u89e3\u8bf7\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4j")),(0,i.kt)("p",null,"2\u3001",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-spring-boot-starter"),"\u7ec4\u4ef6\u79fb\u9664\u9ed8\u8ba4springfox\u7684ui-jar\u5305",(0,i.kt)("inlineCode",{parentName:"p"},"springfox-swagger-ui"),",\u53ea\u4fdd\u7559",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-spring-ui"),",\u5f00\u53d1\u8005\u5982\u679c\u8981\u4f7f\u7528springfox\u7684ui\u5305\u9700\u8981\u81ea\u884c\u5728\u9879\u76ee\u4e2d\u5f15\u5165"),(0,i.kt)("p",null,"3\u3001\u5408\u5e76",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/12",target:"_blank",rel:"noopener"},"PR12-\u4fee\u590dIDEA debug\u65e0\u6cd5\u663e\u793a\u52a8\u6001Response\u7684\u95ee\u9898"),",\u4fee\u590d\u52a8\u6001\u7c7b\u52a0\u8f7d\u4e0d\u5230\u7684\u95ee\u9898"),(0,i.kt)("p",null,"\u4f7f\u7528SpringBoot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.0\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.0\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54951).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(38863).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79328).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(95350).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49364).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(75208).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49882).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,i.kt)("h2",{id:"\u6700\u540e"},"\u6700\u540e"),(0,i.kt)("p",null,"\u8fd9\u6b21\u7248\u672c\u662f\u57fa\u4e8eVue\u91cd\u5199\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u95ee\u9898\u6709\u6781\u5927\u7684\u53ef\u80fd\u96be\u514d\u8003\u8651\u4e0d\u5468,\u5927\u5bb6\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2d\u5982\u679c\u6709\u95ee\u9898\u4e5f\u6b22\u8fce\u53ca\u65f6\u901a\u8fc7issues\u548c\u6211\u6c9f\u901a,\u4f1a\u5c3d\u5feb\u4fee\u6b63\uff0c\u8c22\u8c22\u5927\u5bb6~\uff01\uff01"),(0,i.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,i.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,i.kt)("del",{parentName:"p"})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}k.isMDXComponent=!0},54951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},49364:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},75208:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},49882:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},79328:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},95350:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},38863:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3be3da91.48275dc4.js b/knife4j-doc/gitee/assets/js/3be3da91.48275dc4.js new file mode 100644 index 000000000..fe0b90be7 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3be3da91.48275dc4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6050],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),g=s(n),k=r,c=g["".concat(o,".").concat(k)]||g[k]||m[k]||i;return n?a.createElement(c,l(l({ref:t},u),{},{components:n})):a.createElement(c,l({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[g]="string"==typeof e?e:r,l[1]=p;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>c,frontMatter:()=>p,metadata:()=>s,toc:()=>g});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=["components"],p={},o="[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",s={unversionedId:"changelog/x/2019-12-16-knife4j-2.0.0-issue",id:"changelog/x/2019-12-16-knife4j-2.0.0-issue",title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64.",source:"@site/docs/changelog/2.x/2019-12-16-knife4j-2.0.0-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2019-12-16-knife4j-2.0.0-issue",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue"},next:{title:"[v1.9.6-2019/08/28 \u89e3\u51b3\u957f\u6574\u578b\u7cbe\u5ea6\u4e22\u5931\u7684\u95ee\u9898]",permalink:"/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue"}},u={},g=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6700\u540e",id:"\u6700\u540e",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:g},k="wrapper";function c(e){var t=e.components,p=(0,r.Z)(e,l);return(0,i.kt)(k,(0,a.Z)({},m,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v200-20191216-knife4j-20\u53d1\u5e03\u6d85\u69c3\u91cd\u751f"},"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u53d6\u540dknife4j\u662f\u5e0c\u671b\u5979\u80fd\u50cf\u4e00\u628a\u5315\u9996\u4e00\u6837\u5c0f\u5de7,\u8f7b\u91cf,\u5e76\u4e14\u529f\u80fd\u5f3a\u608d,\u66f4\u540d\u4e5f\u662f\u5e0c\u671b\u628a\u5979\u505a\u6210\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u901a\u7528\u6027\u89e3\u51b3\u65b9\u6848,\u4e0d\u4ec5\u4ec5\u53ea\u662f\u4e13\u6ce8\u4e8e\u524d\u7aefUi\u524d\u7aef.\u867d\u7136\u76ee\u524d\u8fd8\u53ea\u662f\u5728\u524d\u7aef\uff0c\u4f46\u4ee5\u540e\u529f\u80fd\u80af\u5b9a\u4e0d\u6b62\u4e8e\u6b64."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"2.0"),"\u7248\u672c\u4e3b\u8981\u662f\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Vue"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Ant Design Vue"),"\u5bf9\u524d\u7aefUi\u8fdb\u884c\u91cd\u5199,\u8be5\u7248\u672c\u662f\u771f\u6b63\u7684\u524d\u540e\u7aef\u5206\u79bb\u7248\u672c\uff0c\u540c\u65f6\u4f9d\u8d56\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Vue"),"\u7684\u6280\u672f\u751f\u6001,\u4ee5\u540e\u4f1a\u6709\u66f4\u591a\u6709\u8da3\u7684\u529f\u80fd\u5b9e\u73b0,\u5168\u65b9\u4f4d\u6ee1\u8db3\u5f00\u53d1\u8005\u7684\u9700\u8981."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"http://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.0\u7248):"),(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u4f7f\u7528Vue+Ant Design Vue\u5bf9Ui\u8fdb\u884c\u91cd\u5199,\u7edf\u4e00\u6574\u4f53\u754c\u9762\u98ce\u683c,\u66f4\u6e05\u6670\u7684\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("p",null,"2\u3001\u652f\u6301\u5728\u754c\u9762\u4e2d\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001\u79bb\u7ebfHtml\u683c\u5f0f\u7684\u6587\u6863\uff0cMarkdown\u3001Html\u98ce\u683c\u8f83\u4e4b\u524d\u90fd\u505a\u4e86\u6781\u81f4\u7684\u4f18\u5316\uff0cMarkdown\u683c\u5f0f\u4e3b\u8981\u662f\u9488\u5bf9\u6811\u5f62Model\u7684\u5c55\u793a\u901a\u8fc7\u7f29\u8fdb\u7684\u65b9\u5f0f\u5728md\u683c\u5f0f\u7684table\u4e2d\u663e\u793a\u66f4\u52a0\u76f4\u89c2,Html\u79bb\u7ebf\u6587\u6863\u548c\u5728\u7ebf\u7248\u98ce\u683c\u51e0\u4e4e\u6ca1\u6709\u533a\u522b\uff0c\u7b80\u6d01\u3001\u76f4\u89c2.",(0,i.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c")),(0,i.kt)("p",null,"3\u3001\u5355\u63a5\u53e3\u6587\u6863\u9875\u7684\u590d\u5236\u6587\u6863\u4e5f\u662f\u901a\u8fc7\u590d\u5236Markdown\u683c\u5f0f\u7684\u95ee\u9898\uff0c\u540c\u4e0a\u4e3b\u8981\u4f18\u5316md\u683c\u5f0f\u7684table\u663e\u793a\u95ee\u9898\uff0c\u4ee5\u7f29\u8fdb\u7684\u65b9\u5f0f\u663e\u793a\u6811\u5f62\u8868\u683c"),(0,i.kt)("p",null,"4\u3001\u5bf9\u8c03\u8bd5\u680f\u8fdb\u884c\u4f18\u5316\u3001\u533a\u5206\u8bf7\u6c42\u5934\u548c\u8bf7\u6c42\u4f53\u53c2\u6570,\u4f7f\u7528tab\u6807\u7b7e\u9875\u7ec4\u4ef6\u53ef\u4ee5\u5bf9\u8bf7\u6c42\u53c2\u6570\u8fdb\u884c\u52a8\u6001\u7684\u6dfb\u52a0\u3001\u7ef4\u62a4\u3001\u5982\u679c\u4f60\u4f7f\u7528\u5bf9\u6587\u6863\u8fdb\u884c\u7f13\u5b58,\u6587\u6863\u9875\u7684\u52a8\u6001\u8c03\u8bd5\u53c2\u6570\u4f1a\u6301\u4e45\u5316\u5904\u7406."),(0,i.kt)("p",null,"5\u3001\u6587\u6863\u7684\u4e2a\u6027\u5316\u914d\u7f6e(\u589e\u5f3a\u529f\u80fd)\u6709\u5220\u51cf,\u76ee\u524d\u53ea\u4fdd\u75594\u9879\u529f\u80fd\uff0c\u5373(\u8bf7\u6c42\u53c2\u6570\u7f13\u5b58\u3001\u8fc7\u6ee4\u91cd\u590d\u540c\u7c7b\u578b\u63a5\u53e3\u3001\u672c\u5730\u7f13\u5b58\u6253\u5f00tab\u63a5\u53e3\u3001\u6587\u6863\u589e\u5f3a)"),(0,i.kt)("p",null,"6\u3001Tab\u6807\u7b7e\u9875\u6253\u5f00\u63a5\u53e3\u3001\u53f3\u952e\u53ef\u4ee5\u6839\u636e\u9009\u62e9\u5173\u95ed\u4e0d\u540c\u7684Tab\u6807\u7b7e\u9875"),(0,i.kt)("p",null,"7\u3001\u8c03\u8bd5\u6846\u8bf7\u6c42\u5934\u3001\u8bf7\u6c42\u4f53\u5747\u652f\u6301\u52a8\u6001\u53c2\u6570\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u81ea\u884c\u6dfb\u52a0\u52a8\u6001\u53c2\u6570\u8fdb\u884c\u8c03\u8bd5,\u66f4\u52a0\u7075\u6d3b\u65b9\u4fbf"),(0,i.kt)("p",null,"8\u3001\u63d0\u4f9b\u589e\u5f3a\u76f4\u63a5\u8bbf\u95ee\u5730\u5740\uff0c",(0,i.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html#/plus"),"\uff0c\u540e\u7aef\u5728\u4fdd\u8bc1\u5f00\u542f\u589e\u5f3a\u6ce8\u89e3\u7684\u60c5\u51b5\u4e0b\u53ef\u76f4\u63a5\u4f7f\u7528\u8be5\u5730\u5740,\u4e0d\u9700\u8981\u5728\u524d\u7aef\u4e2a\u6027\u5316\u914d\u7f6e\u4e2d\u518d\u8fdb\u884c\u914d\u7f6e,\u65b9\u4fbf\u56e2\u961f\u76f4\u63a5\u8fdb\u884c\u6c9f\u901a"),(0,i.kt)("p",null,"9\u3001\u54cd\u5e94\u4e0b\u8f7d\u7c7b\u578b\u589e\u52a0\u81f3141\u79cd,\u51e0\u4e4e\u6db5\u76d6\u76ee\u524d\u5e38\u89c1\u7684\u6587\u4ef6\u7c7b\u578b"),(0,i.kt)("p",null,"10\u3001\u4fee\u590d\u54cd\u5e94\u4f53\u4e2d\u4f1a\u51fa\u73b0\u5c5e\u6027\u591a\u4f59\u53cc\u5f15\u53f7\u7684bug",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I125B2",target:"_blank",rel:"noopener"},"gitee # I125B2"),"\u3001",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/156",target:"_blank",rel:"noopener"},"github #156")),(0,i.kt)("p",null,"11\u3001\u4fee\u590d\u8bf7\u6c42\u53c2\u6570\u6570\u636e\u7c7b\u578b\u7684format\u4e0d\u663e\u793a\u7684\u95ee\u9898,\u9488\u5bf9Long\u7c7b\u578b\u533a\u5206int64\u3001int32- ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/161",target:"_blank",rel:"noopener"},"github #161")),(0,i.kt)("p",null,"12\u3001\u89e3\u51b3\u591a\u4e2aSchema\u54cd\u5e94\u72b6\u6001\u7801\u7684\u60c5\u51b5\u4e0bSwaggerModels\u5b57\u6bb5\u4e0d\u663e\u793a\u7684\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/170",target:"_blank",rel:"noopener"},"github #170")),(0,i.kt)("p",null,"13\u3001\u8c03\u8bd5\u8bf7\u6c42\u9ed8\u8ba4\u8ffd\u52a0\u4e00\u4e2aUi\u7684\u8bf7\u6c42\u5934",(0,i.kt)("inlineCode",{parentName:"p"},"Request-Origion"),",\u503c\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\uff0c\u539f\u6765\u8be5\u503c\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"SwaggerBootsrapUi"),"\uff0c\u57282.0\u7248\u672c\u4e2d\u8fdb\u884c\u4e86\u53d8\u66f4."),(0,i.kt)("p",null,"14\u3001\u89e3\u51b3Models\u5c5e\u6027\u5d4c\u5957\u8fc7\u591a\u65f6,\u9875\u9762\u767d\u677f\uff0c\u6548\u7387\u95ee\u9898",(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/106",target:"_blank",rel:"noopener"},"github #106")),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.0\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"1\u3001\u79fb\u9664\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableSwaggerBootstrapUi"),",\u4ee5\u540e\u7684\u589e\u5f3a\u5f00\u542f\u6ce8\u89e3\u8bf7\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4j")),(0,i.kt)("p",null,"2\u3001",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-spring-boot-starter"),"\u7ec4\u4ef6\u79fb\u9664\u9ed8\u8ba4springfox\u7684ui-jar\u5305",(0,i.kt)("inlineCode",{parentName:"p"},"springfox-swagger-ui"),",\u53ea\u4fdd\u7559",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-spring-ui"),",\u5f00\u53d1\u8005\u5982\u679c\u8981\u4f7f\u7528springfox\u7684ui\u5305\u9700\u8981\u81ea\u884c\u5728\u9879\u76ee\u4e2d\u5f15\u5165"),(0,i.kt)("p",null,"3\u3001\u5408\u5e76",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/pulls/12",target:"_blank",rel:"noopener"},"PR12-\u4fee\u590dIDEA debug\u65e0\u6cd5\u663e\u793a\u52a8\u6001Response\u7684\u95ee\u9898"),",\u4fee\u590d\u52a8\u6001\u7c7b\u52a0\u8f7d\u4e0d\u5230\u7684\u95ee\u9898"),(0,i.kt)("p",null,"\u4f7f\u7528SpringBoot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.0\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.0\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54951).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(38863).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79328).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(95350).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49364).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(75208).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49882).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,i.kt)("h2",{id:"\u6700\u540e"},"\u6700\u540e"),(0,i.kt)("p",null,"\u8fd9\u6b21\u7248\u672c\u662f\u57fa\u4e8eVue\u91cd\u5199\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u95ee\u9898\u6709\u6781\u5927\u7684\u53ef\u80fd\u96be\u514d\u8003\u8651\u4e0d\u5468,\u5927\u5bb6\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2d\u5982\u679c\u6709\u95ee\u9898\u4e5f\u6b22\u8fce\u53ca\u65f6\u901a\u8fc7issues\u548c\u6211\u6c9f\u901a,\u4f1a\u5c3d\u5feb\u4fee\u6b63\uff0c\u8c22\u8c22\u5927\u5bb6~\uff01\uff01"),(0,i.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,i.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,i.kt)("del",{parentName:"p"})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}c.isMDXComponent=!0},54951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},49364:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},75208:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},49882:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},79328:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},95350:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},38863:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3c1f2501.9e9f2f9f.js b/knife4j-doc/gitee/assets/js/3c1f2501.9e9f2f9f.js deleted file mode 100644 index 2428261a8..000000000 --- a/knife4j-doc/gitee/assets/js/3c1f2501.9e9f2f9f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3051],{3905:(e,n,r)=>{r.d(n,{Zo:()=>s,kt:()=>m});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function i(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=t.createContext({}),c=function(e){var n=t.useContext(l),r=n;return e&&(r="function"==typeof e?e(n):i(i({},n),e)),r},s=function(e){var n=c(e.components);return t.createElement(l.Provider,{value:n},e.children)},g={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},u=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=c(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||g[m]||o;return r?t.createElement(f,i(i({ref:n},s),{},{components:r})):t.createElement(f,i({ref:n},s))}));function m(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=u;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var c=2;c{r.r(n),r.d(n,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>p,metadata:()=>c,toc:()=>g});var t=r(87462),a=r(63366),o=(r(67294),r(3905)),i=["components"],p={},l="Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",c={unversionedId:"faq/springmvc-notshow",id:"faq/springmvc-notshow",title:"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",description:"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e",source:"@site/docs/faq/springmvc-notshow.md",sourceDirName:"faq",slug:"/faq/springmvc-notshow",permalink:"/docs/faq/springmvc-notshow",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604638019,formattedLastUpdatedAt:"2020\u5e7411\u67086\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"SpringMvc\u8bbf\u95ee\u9875\u9762404",permalink:"/docs/faq/springmvc-404"},next:{title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",permalink:"/docs/faq/swagger-des-not-found"}},s={},g=[],u={toc:g};function m(e){var n=e.components,r=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"spring-mvc\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863"},"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863"),(0,o.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e"),(0,o.kt)("p",null,"1\u3001\u9996\u5148\u4fdd\u8bc1SwaggerConfig\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u6b63\u786e\u7684Docket\u5bf9\u8c61(\u5373\u9ed8\u8ba4\u626b\u63cf\u7684\u5305\u8def\u5f84\u6216\u8005\u57fa\u4e8e",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperation"),"\u6ce8\u89e3)"),(0,o.kt)("p",null,"2\u3001\u5176\u6b21,\u533a\u522b\u4e8eSpringBoot\u7684\u6ce8\u5165,\u4e0d\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"@Configuration"),"\u6ce8\u89e3\u6ce8\u5165\u5230Spring\u7684IOC\u5bb9\u5668\u4e2d,\u91c7\u7528",(0,o.kt)("inlineCode",{parentName:"p"},""),"XML\u6ce8\u5165\u7684\u65b9\u5f0f\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d,\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},'\n')),(0,o.kt)("p",null,"3\u3001\u9700\u4fdd\u8bc1\u6ce8\u5165\u7684SwaggerConfig\u7684bean\u5728Spring\u7684MVC\u7684\u5bb9\u5668\u4e2d,\u56e0\u4e3aSpring MVC\u5b58\u5728\u7236\u5b50\u5bb9\u5668\u7684\u5173\u7cfb,\u5982\u679c\u4e0d\u5c06\u8be5Bean\u6ce8\u5165\u5230Spring MVC\u5bb9\u5668\u4e2d\u7684\u8bdd,Swagger\u5c31\u4f1a\u626b\u63cf\u4e0d\u5230Controller\u5c42\u7684\u63a5\u53e3\uff0c\u81ea\u7136\u4e5f\u5c31\u4e0d\u4f1a\u663e\u793a\u6587\u6863"),(0,o.kt)("p",null,"\u4f8b\u5982\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n swaggerDemoMvc\n org.springframework.web.servlet.DispatcherServlet\n \n contextConfigLocation\n \x3c!--\u5728\u7b2c\u4e8c\u6b65\u4e2d\u6ce8\u5165\u7684SwaggerConfig\u7684bean\u9700\u5199\u5728spring.xml\u6587\u4ef6\u4e2d--\x3e\n classpath:config/spring.xml\n \n 1\n \n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3c1f2501.c2655fe1.js b/knife4j-doc/gitee/assets/js/3c1f2501.c2655fe1.js new file mode 100644 index 000000000..3689a5310 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3c1f2501.c2655fe1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3051],{3905:(e,n,r)=>{r.d(n,{Zo:()=>s,kt:()=>f});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function i(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=t.createContext({}),c=function(e){var n=t.useContext(l),r=n;return e&&(r="function"==typeof e?e(n):i(i({},n),e)),r},s=function(e){var n=c(e.components);return t.createElement(l.Provider,{value:n},e.children)},g="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),g=c(r),m=a,f=g["".concat(l,".").concat(m)]||g[m]||u[m]||o;return r?t.createElement(f,i(i({ref:n},s),{},{components:r})):t.createElement(f,i({ref:n},s))}));function f(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var p={};for(var l in n)hasOwnProperty.call(n,l)&&(p[l]=n[l]);p.originalType=e,p[g]="string"==typeof e?e:a,i[1]=p;for(var c=2;c{r.r(n),r.d(n,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>c,toc:()=>g});var t=r(87462),a=r(63366),o=(r(67294),r(3905)),i=["components"],p={},l="Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",c={unversionedId:"faq/springmvc-notshow",id:"faq/springmvc-notshow",title:"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863",description:"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e",source:"@site/docs/faq/springmvc-notshow.md",sourceDirName:"faq",slug:"/faq/springmvc-notshow",permalink:"/docs/faq/springmvc-notshow",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u8096\u7389\u660e",lastUpdatedAt:1604638019,formattedLastUpdatedAt:"2020\u5e7411\u67086\u65e5",frontMatter:{},sidebar:"faq",previous:{title:"SpringMvc\u8bbf\u95ee\u9875\u9762404",permalink:"/docs/faq/springmvc-404"},next:{title:"Swagger\u5b57\u6bb5\u5c5e\u6027\u8bf4\u660e\u4e0d\u663e\u793a",permalink:"/docs/faq/swagger-des-not-found"}},s={},g=[],u={toc:g},m="wrapper";function f(e){var n=e.components,r=(0,a.Z)(e,i);return(0,o.kt)(m,(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"spring-mvc\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863"},"Spring MVC\u4e0d\u663e\u793a\u63a5\u53e3\u6587\u6863"),(0,o.kt)("p",null,"\u5f88\u591a\u670b\u53cb\u5728\u4f7f\u7528Spring MVC\u65f6,\u4f1a\u78b0\u5230\u63a5\u53e3\u6587\u6863\u6ca1\u6709\u7684\u60c5\u51b5,\u5728\u6b64\u5904\u505a\u4e00\u4e2a\u8bf4\u660e"),(0,o.kt)("p",null,"1\u3001\u9996\u5148\u4fdd\u8bc1SwaggerConfig\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u6b63\u786e\u7684Docket\u5bf9\u8c61(\u5373\u9ed8\u8ba4\u626b\u63cf\u7684\u5305\u8def\u5f84\u6216\u8005\u57fa\u4e8e",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperation"),"\u6ce8\u89e3)"),(0,o.kt)("p",null,"2\u3001\u5176\u6b21,\u533a\u522b\u4e8eSpringBoot\u7684\u6ce8\u5165,\u4e0d\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"@Configuration"),"\u6ce8\u89e3\u6ce8\u5165\u5230Spring\u7684IOC\u5bb9\u5668\u4e2d,\u91c7\u7528",(0,o.kt)("inlineCode",{parentName:"p"},""),"XML\u6ce8\u5165\u7684\u65b9\u5f0f\u6ce8\u5165\u5230Spring\u7684\u5bb9\u5668\u4e2d,\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},'\n')),(0,o.kt)("p",null,"3\u3001\u9700\u4fdd\u8bc1\u6ce8\u5165\u7684SwaggerConfig\u7684bean\u5728Spring\u7684MVC\u7684\u5bb9\u5668\u4e2d,\u56e0\u4e3aSpring MVC\u5b58\u5728\u7236\u5b50\u5bb9\u5668\u7684\u5173\u7cfb,\u5982\u679c\u4e0d\u5c06\u8be5Bean\u6ce8\u5165\u5230Spring MVC\u5bb9\u5668\u4e2d\u7684\u8bdd,Swagger\u5c31\u4f1a\u626b\u63cf\u4e0d\u5230Controller\u5c42\u7684\u63a5\u53e3\uff0c\u81ea\u7136\u4e5f\u5c31\u4e0d\u4f1a\u663e\u793a\u6587\u6863"),(0,o.kt)("p",null,"\u4f8b\u5982\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n swaggerDemoMvc\n org.springframework.web.servlet.DispatcherServlet\n \n contextConfigLocation\n \x3c!--\u5728\u7b2c\u4e8c\u6b65\u4e2d\u6ce8\u5165\u7684SwaggerConfig\u7684bean\u9700\u5199\u5728spring.xml\u6587\u4ef6\u4e2d--\x3e\n classpath:config/spring.xml\n \n 1\n \n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3e3c6fb6.6997b34e.js b/knife4j-doc/gitee/assets/js/3e3c6fb6.6997b34e.js deleted file mode 100644 index 52cacddb8..000000000 --- a/knife4j-doc/gitee/assets/js/3e3c6fb6.6997b34e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8510],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),l=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,g=p(e,["components","mdxType","originalType","parentName"]),u=l(r),d=n,b=u["".concat(i,".").concat(d)]||u[d]||c[d]||o;return r?a.createElement(b,s(s({ref:t},g),{},{components:r})):a.createElement(b,s({ref:t},g))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=u;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:n,s[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>i,default:()=>d,frontMatter:()=>p,metadata:()=>l,toc:()=>c});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],p={},i="[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",l={unversionedId:"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",id:"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",title:"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",description:"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",permalink:"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]",permalink:"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},next:{title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"}},g={},c=[],u={toc:c};function d(e){var t=e.components,p=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},u,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v180-20180810-\u8c03\u8bd5\u680f\u4f18\u5316"},"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.0 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u8bf7\u6c42\u53c2\u6570\u51fa\u73b0\u91cd\u590d\u95ee\u9898,\u53bb\u91cd"),(0,o.kt)("p",null,'2\u3001fixed \u65e0\u6cd5\u663e\u793aspring cloud \u5b50\u9879\u76ee\u8def\u5f84,\u9488\u5bf9basePath\u4e0d\u4e3a\u7a7a,\u6216\u8005\u4e0d\u4e3a"/"\u6839\u8def\u5f84\u7684\u60c5\u51b5,\u76f8\u5173api\u5730\u5740\u52a0\u4e0abasePath\u524d\u7f00'),(0,o.kt)("p",null,"3\u3001\u8c03\u6574\u83dc\u5355url\u5404\u65b9\u6cd5\u914d\u8272\u3001\u63a5\u53e3\u914d\u8272,\u6587\u6863\u4ecb\u7ecd\u3001\u8c03\u8bd5\u8fd4\u56de\u54cd\u5e94\u6570\u636ejson\u914d\u8272"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(42424).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,"4\u3001\u54cd\u5e94\u6a21\u5757\u6dfb\u52a0http\u54cd\u5e94\u7801\u3001\u63a5\u53e3\u8017\u65f6\u3001\u5927\u5c0f,\u53c2\u6570\u680f\u6dfb\u52a0\u5168\u9009\u6309\u94ae,\u8c03\u8bd5\u9875\u9762\u9488\u5bf9\u54cd\u5e94\u5185\u5bb9tab\u9009\u9879\u5361\u53bb\u9664\u7070\u8272\u80cc\u666f\u8272,\u4e3a\u9ed8\u8ba4\u767d\u8272\u5e95\u8272"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(41107).Z,width:"1918",height:"1057"})),(0,o.kt)("p",null,"5\u3001\u8c03\u8bd5\u54cd\u5e94\u6a21\u5757\u589e\u52a0raw\u3001curl\u4e24\u4e2a\u5b50tab\u9009\u9879\u5361,\u5b9e\u73b0curl\u529f\u80fd,\u65b9\u4fbf\u8fdc\u7a0b\u8c03\u8bd5"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(35013).Z,width:"1919",height:"1040"})),(0,o.kt)("p",null,"6\u3001\u9488\u5bf9\u63a5\u53e3\u4e8c\u8fdb\u5236\u8fd4\u56de,\u63d0\u4f9b\u4e0b\u8f7d\u6309\u94ae,\u53ef\u70b9\u51fb\u5f39\u51fa\u4e0b\u8f7d\u529f\u80fd"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(91116).Z,width:"1917",height:"1051"})),(0,o.kt)("p",null,"7\u3001fixed \u9488\u5bf9\u56fe\u7247\u8fd4\u56de\u65f6\u62a5DApiUI is not defined\u9519\u8bef"),(0,o.kt)("p",null,"8\u3001\u6587\u6863doc.html\u9875\u9762title\u6839\u636e\u7528\u6237\u81ea\u5b9a\u4e49title\u663e\u793a"),(0,o.kt)("p",null,"9\u3001\u53d1\u9001\u4e2d\u589e\u52a0loading\u6548\u679c"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(37599).Z,width:"1918",height:"1046"})),(0,o.kt)("p",null,"10\u3001\u8c03\u6574\u83dc\u5355\u9876\u90e8\u5206\u7ec4\u63a5\u53e3\u4f4d\u7f6e,\u79fb\u52a8\u5230\u6700\u5de6\u4fa7,\u6dfb\u52a0\u53ef\u9690\u85cf/\u663e\u793aMENU\u5143\u7d20"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(31188).Z,width:"1913",height:"1060"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(5621).Z,width:"1918",height:"1042"})),(0,o.kt)("p",null,"11\u3001fixed \u9488\u5bf9schema\u7c7b\u578b\u7684\u53c2\u6570,\u663e\u793a\u7c7b\u578b\u4e3astring\u7c7b\u578b,\u6309schema\u7c7b\u578b\u5c55\u793a"),(0,o.kt)("p",null,"12\u3001\u6587\u4ef6\u4e0a\u4f20\u652f\u6301\u6587\u4ef6\u591a\u9009"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(25544).Z,width:"1918",height:"1058"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.8.0\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}d.isMDXComponent=!0},35013:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/curl-6b46b92f7419b885285b5332375594f3.png"},91116:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/download-8574b8c8e499b5753df94a4614a7b069.png"},37599:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/loading-61fa58504c02f59d2519d30dea788865.png"},31188:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/m1-012ed3296fbf466a49bd13f3eb565bf0.png"},5621:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/m2-72b7fcef228af0bbebe3297def0bb4c3.png"},42424:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/methodJson-e2b563775c1a4e55422bd0191eb4820b.png"},41107:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/rcode-aeb12cd8c4be9e99ac00490fa4efa8ba.png"},25544:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/upload-69a7c3c55559330babe94dfab4b45a3b.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/3e3c6fb6.e421be70.js b/knife4j-doc/gitee/assets/js/3e3c6fb6.e421be70.js new file mode 100644 index 000000000..5195f56eb --- /dev/null +++ b/knife4j-doc/gitee/assets/js/3e3c6fb6.e421be70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8510],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),l=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(i.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,g=p(e,["components","mdxType","originalType","parentName"]),c=l(r),d=n,b=c["".concat(i,".").concat(d)]||c[d]||u[d]||o;return r?a.createElement(b,s(s({ref:t},g),{},{components:r})):a.createElement(b,s({ref:t},g))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=d;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[c]="string"==typeof e?e:n,s[1]=p;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>i,default:()=>b,frontMatter:()=>p,metadata:()=>l,toc:()=>c});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],p={},i="[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",l={unversionedId:"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",id:"changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",title:"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]",description:"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",permalink:"/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]",permalink:"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"},next:{title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"}},g={},c=[],u={toc:c},d="wrapper";function b(e){var t=e.components,p=(0,n.Z)(e,s);return(0,o.kt)(d,(0,a.Z)({},u,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v180-20180810-\u8c03\u8bd5\u680f\u4f18\u5316"},"[v1.8.0-2018/08/10 \u8c03\u8bd5\u680f\u4f18\u5316]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.0 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.0 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u8bf7\u6c42\u53c2\u6570\u51fa\u73b0\u91cd\u590d\u95ee\u9898,\u53bb\u91cd"),(0,o.kt)("p",null,'2\u3001fixed \u65e0\u6cd5\u663e\u793aspring cloud \u5b50\u9879\u76ee\u8def\u5f84,\u9488\u5bf9basePath\u4e0d\u4e3a\u7a7a,\u6216\u8005\u4e0d\u4e3a"/"\u6839\u8def\u5f84\u7684\u60c5\u51b5,\u76f8\u5173api\u5730\u5740\u52a0\u4e0abasePath\u524d\u7f00'),(0,o.kt)("p",null,"3\u3001\u8c03\u6574\u83dc\u5355url\u5404\u65b9\u6cd5\u914d\u8272\u3001\u63a5\u53e3\u914d\u8272,\u6587\u6863\u4ecb\u7ecd\u3001\u8c03\u8bd5\u8fd4\u56de\u54cd\u5e94\u6570\u636ejson\u914d\u8272"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(42424).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,"4\u3001\u54cd\u5e94\u6a21\u5757\u6dfb\u52a0http\u54cd\u5e94\u7801\u3001\u63a5\u53e3\u8017\u65f6\u3001\u5927\u5c0f,\u53c2\u6570\u680f\u6dfb\u52a0\u5168\u9009\u6309\u94ae,\u8c03\u8bd5\u9875\u9762\u9488\u5bf9\u54cd\u5e94\u5185\u5bb9tab\u9009\u9879\u5361\u53bb\u9664\u7070\u8272\u80cc\u666f\u8272,\u4e3a\u9ed8\u8ba4\u767d\u8272\u5e95\u8272"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(41107).Z,width:"1918",height:"1057"})),(0,o.kt)("p",null,"5\u3001\u8c03\u8bd5\u54cd\u5e94\u6a21\u5757\u589e\u52a0raw\u3001curl\u4e24\u4e2a\u5b50tab\u9009\u9879\u5361,\u5b9e\u73b0curl\u529f\u80fd,\u65b9\u4fbf\u8fdc\u7a0b\u8c03\u8bd5"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(35013).Z,width:"1919",height:"1040"})),(0,o.kt)("p",null,"6\u3001\u9488\u5bf9\u63a5\u53e3\u4e8c\u8fdb\u5236\u8fd4\u56de,\u63d0\u4f9b\u4e0b\u8f7d\u6309\u94ae,\u53ef\u70b9\u51fb\u5f39\u51fa\u4e0b\u8f7d\u529f\u80fd"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(91116).Z,width:"1917",height:"1051"})),(0,o.kt)("p",null,"7\u3001fixed \u9488\u5bf9\u56fe\u7247\u8fd4\u56de\u65f6\u62a5DApiUI is not defined\u9519\u8bef"),(0,o.kt)("p",null,"8\u3001\u6587\u6863doc.html\u9875\u9762title\u6839\u636e\u7528\u6237\u81ea\u5b9a\u4e49title\u663e\u793a"),(0,o.kt)("p",null,"9\u3001\u53d1\u9001\u4e2d\u589e\u52a0loading\u6548\u679c"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(37599).Z,width:"1918",height:"1046"})),(0,o.kt)("p",null,"10\u3001\u8c03\u6574\u83dc\u5355\u9876\u90e8\u5206\u7ec4\u63a5\u53e3\u4f4d\u7f6e,\u79fb\u52a8\u5230\u6700\u5de6\u4fa7,\u6dfb\u52a0\u53ef\u9690\u85cf/\u663e\u793aMENU\u5143\u7d20"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(31188).Z,width:"1913",height:"1060"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(5621).Z,width:"1918",height:"1042"})),(0,o.kt)("p",null,"11\u3001fixed \u9488\u5bf9schema\u7c7b\u578b\u7684\u53c2\u6570,\u663e\u793a\u7c7b\u578b\u4e3astring\u7c7b\u578b,\u6309schema\u7c7b\u578b\u5c55\u793a"),(0,o.kt)("p",null,"12\u3001\u6587\u4ef6\u4e0a\u4f20\u652f\u6301\u6587\u4ef6\u591a\u9009"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(25544).Z,width:"1918",height:"1058"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.8.0\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}b.isMDXComponent=!0},35013:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/curl-6b46b92f7419b885285b5332375594f3.png"},91116:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/download-8574b8c8e499b5753df94a4614a7b069.png"},37599:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/loading-61fa58504c02f59d2519d30dea788865.png"},31188:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/m1-012ed3296fbf466a49bd13f3eb565bf0.png"},5621:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/m2-72b7fcef228af0bbebe3297def0bb4c3.png"},42424:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/methodJson-e2b563775c1a4e55422bd0191eb4820b.png"},41107:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/rcode-aeb12cd8c4be9e99ac00490fa4efa8ba.png"},25544:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/upload-69a7c3c55559330babe94dfab4b45a3b.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/42310737.62e1bdc4.js b/knife4j-doc/gitee/assets/js/42310737.62e1bdc4.js deleted file mode 100644 index 30fc7eb2f..000000000 --- a/knife4j-doc/gitee/assets/js/42310737.62e1bdc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9156],{3905:(t,e,n)=>{n.d(e,{Zo:()=>m,kt:()=>d});var r=n(67294);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var p=r.createContext({}),u=function(t){var e=r.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},m=function(t){var e=u(t.components);return r.createElement(p.Provider,{value:e},t.children)},c={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},s=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,l=t.originalType,p=t.parentName,m=i(t,["components","mdxType","originalType","parentName"]),s=u(n),d=a,k=s["".concat(p,".").concat(d)]||s[d]||c[d]||l;return n?r.createElement(k,o(o({ref:e},m),{},{components:n})):r.createElement(k,o({ref:e},m))}));function d(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var l=n.length,o=new Array(l);o[0]=s;var i={};for(var p in e)hasOwnProperty.call(e,p)&&(i[p]=e[p]);i.originalType=t,i.mdxType="string"==typeof t?t:a,o[1]=i;for(var u=2;u{n.r(e),n.d(e,{assets:()=>m,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>u,toc:()=>c});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),o=["components"],i={},p="\u5982\u4f55\u8d21\u732e\u6587\u6863",u={unversionedId:"community/joinus",id:"community/joinus",title:"\u5982\u4f55\u8d21\u732e\u6587\u6863",description:"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0eKnife4j\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684\u8d21\u732e\u6587\u6863\u3002",source:"@site/docs/community/joinus.md",sourceDirName:"community",slug:"/community/joinus",permalink:"/docs/community/joinus",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"\u5feb\u901f\u5f00\u59cb",permalink:"/docs/quick-start/"},next:{title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",permalink:"/docs/community/contributing"}},m={},c=[],s={toc:c};function d(t){var e=t.components,n=(0,a.Z)(t,o);return(0,l.kt)("wrapper",(0,r.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u5982\u4f55\u8d21\u732e\u6587\u6863"},"\u5982\u4f55\u8d21\u732e\u6587\u6863"),(0,l.kt)("p",null,"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0e",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/IZUCU",target:"_blank",rel:"noopener"},"\u8d21\u732e"),"\u6587\u6863\u3002"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u5982\u4f55\u8d21\u732e\u6587\u6863")),(0,l.kt)("p",null,"\u76ee\u524dKnife4j\u7684\u65b0\u7248\u672c\u6587\u6863\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u7f16\u5199Markdown\u6587\u6863\u7684\u65b9\u5f0f\u6267\u884c\u53c2\u4e0e\u6587\u6863\u8d21\u732e\u3002\u4f60\u7684\u6587\u6863\u8d21\u732e\u80fd\u5e2e\u52a9\u5230\u6bcf\u4e00\u4e2a\u4f7f\u7528Knife4j\u7684\u4eba\uff0c\u793e\u533a\u7684\u58ee\u5927\u79bb\u4e0d\u5f00\u6bcf\u4e2a\u5f00\u53d1\u8005\u7684\u8d21\u732e\u3002"),(0,l.kt)("p",null,"Knife4j\u7684\u6587\u6863\u901a\u8fc7Docusaurus\u8fdb\u884c\u7f16\u5199\uff0c\u6587\u6863\u6e90\u7801\u4f4d\u4e8e",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/tree/dev/",target:"_blank",rel:"noopener"},"Knife4j"),"\u9879\u76eedev\u5206\u652f\u4e0b\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-doc"),"\u76ee\u5f55"),(0,l.kt)("p",null,"\u4e3b\u8981\u6b65\u9aa4\uff1a"),(0,l.kt)("p",null,"1\u3001\u5f00\u53d1\u8005\u5bf9\u4ed3\u5e93\u8fdb\u884cfork\u64cd\u4f5c\uff0c\u7136\u540epull\u5230\u672c\u5730"),(0,l.kt)("p",null,"2\u3001\u672c\u5730\u5b89\u88c5Docusaurus ,\u5177\u4f53\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/zh-CN/docs",target:"_blank",rel:"noopener"},"\u5b98\u65b9\u6587\u6863")),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u9700\u8981\u5b89\u88c5Node\u73af\u5883,Node\u7248\u672c\u5fc5\u987b\u7b26\u5408Docusaurus\u8981\u6c42")),(0,l.kt)("p",null,"3\u3001\u5b89\u88c5\u672c\u5730\u4f9d\u8d56",(0,l.kt)("inlineCode",{parentName:"p"},"npm install")),(0,l.kt)("p",null,"4\u3001\u8fd0\u884cKnife4j-doc\u6587\u6863\u67e5\u770b\u6548\u679c",(0,l.kt)("inlineCode",{parentName:"p"},"npm run start")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6587\u6863\u76ee\u5f55\u8bf4\u660e\uff1a")),(0,l.kt)("p",null,"\u76ee\u524dKnife4j-doc\u6587\u6863\u4e2d\u4e3b\u8981\u5305\u542b4\u4e2a\u9876\u7ea7\u76ee\u5f55\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u76ee\u5f55\u540d\u79f0"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"middleware"),(0,l.kt)("td",{parentName:"tr",align:null},"\u4e2d\u95f4\u4ef6")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"middleware-sources"),(0,l.kt)("td",{parentName:"tr",align:null},"\u4e2d\u95f4\u4ef6")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"features"),(0,l.kt)("td",{parentName:"tr",align:null},"\u589e\u5f3a\u5c5e\u6027")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"action"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5b9e\u6218\u6307\u5357,\u6b22\u8fce\u5f00\u53d1\u8005\u8d21\u732e\u6240\u6709\u5173\u4e8eKnife4j\u5b9e\u6218\u90e8\u5206\u7684\u6587\u7ae0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"oas"),(0,l.kt)("td",{parentName:"tr",align:null},"OAS\u89c4\u8303\uff0cOAS\u89c4\u8303\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u5305\u542b\u4e0d\u540c\u8bed\u8a00\u7aef\u7684\u6ce8\u89e3\u6216\u8bf4\u660e")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"changelog"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u8be6\u7ec6\u66f4\u65b0\u65e5\u5fd7")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"faq"),(0,l.kt)("td",{parentName:"tr",align:null},"FAQ\u95ee\u9898\u5217\u8868")))),(0,l.kt)("p",null,"\u6bcf\u4e2a\u4e0d\u540c\u7684\u76ee\u5f55\u4e2d\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728\u8be5\u76ee\u5f55\u521b\u5efamarkdown\u6587\u6863\u5373\u53ef\uff0c\u4e00\u7bc7markdown\u6587\u6863\u5373\u4ee3\u8868\u4e00\u7bc7\u6587\u6863\u8bf4\u660e\uff0c\u6700\u7ec8\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"docusaurus.config.js"),"\u4e2d\u6dfb\u52a0\u8be5markdown\u6587\u6863\u5230\u76f8\u5e94\u7684\u76ee\u5f55\u663e\u793a\u5373\u53ef"),(0,l.kt)("p",null,"\u5982\u679c\u6709\u66f4\u591a\u7684\u5b9e\u6218\u6587\u6863\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u73b0\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"action"),"\u76ee\u5f55\u521b\u5efa\u597d\u4e0e\u4e4b\u5bf9\u5e94\u7684Markdown\u6587\u6863\uff0c\u7136\u540e\u5728\u8fd9\u91cc\u81ea\u884c\u6dfb\u52a0\u76ee\u5f55"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u7bc7\u5e45\u4e2d\u6709\u56fe\u7247\uff0c\u4e14\u4e0d\u662f\u7f51\u7edc\u56fe\u7247\uff0c\u8d21\u732e\u8005\u53ef\u4ee5\u5c06\u56fe\u7247\u653e\u5728static/images\u7684\u76ee\u5f55\u4e2d.")),(0,l.kt)("p",null,"\u6587\u6863\u5199\u5b8c\u540e\uff0c\u5c31\u53ef\u4ee5\u5728Knife4j\u7684Gitee\u4ed3\u5e93\u4e2d\u5411\u4f5c\u8005\u53d1\u8d77PR\u8bf7\u6c42\u4e86\uff0c\u9700\u8981\u5c06PR\u8bf7\u6c42\u63d0\u4ea4\u5230",(0,l.kt)("strong",{parentName:"p"},"dev\u5206\u652f"),"\uff01\uff01\uff01"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/42310737.f4bbee39.js b/knife4j-doc/gitee/assets/js/42310737.f4bbee39.js new file mode 100644 index 000000000..8c23aa45a --- /dev/null +++ b/knife4j-doc/gitee/assets/js/42310737.f4bbee39.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9156],{3905:(t,e,n)=>{n.d(e,{Zo:()=>m,kt:()=>k});var r=n(67294);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var p=r.createContext({}),u=function(t){var e=r.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},m=function(t){var e=u(t.components);return r.createElement(p.Provider,{value:e},t.children)},c="mdxType",s={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},d=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,l=t.originalType,p=t.parentName,m=i(t,["components","mdxType","originalType","parentName"]),c=u(n),d=a,k=c["".concat(p,".").concat(d)]||c[d]||s[d]||l;return n?r.createElement(k,o(o({ref:e},m),{},{components:n})):r.createElement(k,o({ref:e},m))}));function k(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var l=n.length,o=new Array(l);o[0]=d;var i={};for(var p in e)hasOwnProperty.call(e,p)&&(i[p]=e[p]);i.originalType=t,i[c]="string"==typeof t?t:a,o[1]=i;for(var u=2;u{n.r(e),n.d(e,{assets:()=>m,contentTitle:()=>p,default:()=>k,frontMatter:()=>i,metadata:()=>u,toc:()=>c});var r=n(87462),a=n(63366),l=(n(67294),n(3905)),o=["components"],i={},p="\u5982\u4f55\u8d21\u732e\u6587\u6863",u={unversionedId:"community/joinus",id:"community/joinus",title:"\u5982\u4f55\u8d21\u732e\u6587\u6863",description:"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0eKnife4j\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684\u8d21\u732e\u6587\u6863\u3002",source:"@site/docs/community/joinus.md",sourceDirName:"community",slug:"/community/joinus",permalink:"/docs/community/joinus",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1677849789,formattedLastUpdatedAt:"2023\u5e743\u67083\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"Knife4j\u7248\u672c\u53c2\u8003",permalink:"/docs/quick-start/start-knife4j-version"},next:{title:"\u5982\u4f55\u8d21\u732e\u4ee3\u7801",permalink:"/docs/community/contributing"}},m={},c=[],s={toc:c},d="wrapper";function k(t){var e=t.components,n=(0,a.Z)(t,o);return(0,l.kt)(d,(0,r.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u5982\u4f55\u8d21\u732e\u6587\u6863"},"\u5982\u4f55\u8d21\u732e\u6587\u6863"),(0,l.kt)("p",null,"\u6211\u4eec\u6b22\u8fce\u60a8\u53c2\u4e0e",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u9879\u76ee\u3002\u6709\u5f88\u591a\u8d21\u732e\u65b9\u5f0f\uff0c\u5305\u62ec\u56de\u7b54\u6709\u5173issues\u7684\u95ee\u9898\uff0c\u7f16\u5199\u65b0\u4ee3\u7801\uff0c\u6539\u8fdb\u73b0\u6709\u4ee3\u7801\uff0c\u534f\u52a9\u7f16\u5199\u6587\u6863\uff0c\u5f00\u53d1\u793a\u4f8b\u6216\u6559\u7a0b\uff0c\u62a5\u544a\u9519\u8bef\u6216\u4ec5\u63d0\u51fa\u5efa\u8bae\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u6211\u4eec\u7684",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/IZUCU",target:"_blank",rel:"noopener"},"\u8d21\u732e"),"\u6587\u6863\u3002"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u5982\u4f55\u8d21\u732e\u6587\u6863")),(0,l.kt)("p",null,"\u76ee\u524dKnife4j\u7684\u65b0\u7248\u672c\u6587\u6863\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u7f16\u5199Markdown\u6587\u6863\u7684\u65b9\u5f0f\u6267\u884c\u53c2\u4e0e\u6587\u6863\u8d21\u732e\u3002\u4f60\u7684\u6587\u6863\u8d21\u732e\u80fd\u5e2e\u52a9\u5230\u6bcf\u4e00\u4e2a\u4f7f\u7528Knife4j\u7684\u4eba\uff0c\u793e\u533a\u7684\u58ee\u5927\u79bb\u4e0d\u5f00\u6bcf\u4e2a\u5f00\u53d1\u8005\u7684\u8d21\u732e\u3002"),(0,l.kt)("p",null,"Knife4j\u7684\u6587\u6863\u901a\u8fc7Docusaurus\u8fdb\u884c\u7f16\u5199\uff0c\u6587\u6863\u6e90\u7801\u4f4d\u4e8e",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/tree/dev/",target:"_blank",rel:"noopener"},"Knife4j"),"\u9879\u76eedev\u5206\u652f\u4e0b\u7684",(0,l.kt)("inlineCode",{parentName:"p"},"knife4j-doc"),"\u76ee\u5f55"),(0,l.kt)("p",null,"\u4e3b\u8981\u6b65\u9aa4\uff1a"),(0,l.kt)("p",null,"1\u3001\u5f00\u53d1\u8005\u5bf9\u4ed3\u5e93\u8fdb\u884cfork\u64cd\u4f5c\uff0c\u7136\u540epull\u5230\u672c\u5730"),(0,l.kt)("p",null,"2\u3001\u672c\u5730\u5b89\u88c5Docusaurus ,\u5177\u4f53\u53ef\u4ee5\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/zh-CN/docs",target:"_blank",rel:"noopener"},"\u5b98\u65b9\u6587\u6863")),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u9700\u8981\u5b89\u88c5Node\u73af\u5883,Node\u7248\u672c\u5fc5\u987b\u7b26\u5408Docusaurus\u8981\u6c42")),(0,l.kt)("p",null,"3\u3001\u5b89\u88c5\u672c\u5730\u4f9d\u8d56",(0,l.kt)("inlineCode",{parentName:"p"},"npm install")),(0,l.kt)("p",null,"4\u3001\u8fd0\u884cKnife4j-doc\u6587\u6863\u67e5\u770b\u6548\u679c",(0,l.kt)("inlineCode",{parentName:"p"},"npm run start")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6587\u6863\u76ee\u5f55\u8bf4\u660e\uff1a")),(0,l.kt)("p",null,"\u76ee\u524dKnife4j-doc\u6587\u6863\u4e2d\u4e3b\u8981\u5305\u542b4\u4e2a\u9876\u7ea7\u76ee\u5f55\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u76ee\u5f55\u540d\u79f0"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"middleware"),(0,l.kt)("td",{parentName:"tr",align:null},"\u4e2d\u95f4\u4ef6")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"middleware-sources"),(0,l.kt)("td",{parentName:"tr",align:null},"\u4e2d\u95f4\u4ef6")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"features"),(0,l.kt)("td",{parentName:"tr",align:null},"\u589e\u5f3a\u5c5e\u6027")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"action"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5b9e\u6218\u6307\u5357,\u6b22\u8fce\u5f00\u53d1\u8005\u8d21\u732e\u6240\u6709\u5173\u4e8eKnife4j\u5b9e\u6218\u90e8\u5206\u7684\u6587\u7ae0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"oas"),(0,l.kt)("td",{parentName:"tr",align:null},"OAS\u89c4\u8303\uff0cOAS\u89c4\u8303\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u5305\u542b\u4e0d\u540c\u8bed\u8a00\u7aef\u7684\u6ce8\u89e3\u6216\u8bf4\u660e")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"changelog"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u8be6\u7ec6\u66f4\u65b0\u65e5\u5fd7")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"faq"),(0,l.kt)("td",{parentName:"tr",align:null},"FAQ\u95ee\u9898\u5217\u8868")))),(0,l.kt)("p",null,"\u6bcf\u4e2a\u4e0d\u540c\u7684\u76ee\u5f55\u4e2d\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728\u8be5\u76ee\u5f55\u521b\u5efamarkdown\u6587\u6863\u5373\u53ef\uff0c\u4e00\u7bc7markdown\u6587\u6863\u5373\u4ee3\u8868\u4e00\u7bc7\u6587\u6863\u8bf4\u660e\uff0c\u6700\u7ec8\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"docusaurus.config.js"),"\u4e2d\u6dfb\u52a0\u8be5markdown\u6587\u6863\u5230\u76f8\u5e94\u7684\u76ee\u5f55\u663e\u793a\u5373\u53ef"),(0,l.kt)("p",null,"\u5982\u679c\u6709\u66f4\u591a\u7684\u5b9e\u6218\u6587\u6863\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u73b0\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"action"),"\u76ee\u5f55\u521b\u5efa\u597d\u4e0e\u4e4b\u5bf9\u5e94\u7684Markdown\u6587\u6863\uff0c\u7136\u540e\u5728\u8fd9\u91cc\u81ea\u884c\u6dfb\u52a0\u76ee\u5f55"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u7bc7\u5e45\u4e2d\u6709\u56fe\u7247\uff0c\u4e14\u4e0d\u662f\u7f51\u7edc\u56fe\u7247\uff0c\u8d21\u732e\u8005\u53ef\u4ee5\u5c06\u56fe\u7247\u653e\u5728static/images\u7684\u76ee\u5f55\u4e2d.")),(0,l.kt)("p",null,"\u6587\u6863\u5199\u5b8c\u540e\uff0c\u5c31\u53ef\u4ee5\u5728Knife4j\u7684Gitee\u4ed3\u5e93\u4e2d\u5411\u4f5c\u8005\u53d1\u8d77PR\u8bf7\u6c42\u4e86\uff0c\u9700\u8981\u5c06PR\u8bf7\u6c42\u63d0\u4ea4\u5230",(0,l.kt)("strong",{parentName:"p"},"dev\u5206\u652f"),"\uff01\uff01\uff01"))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/429fbca3.9419401f.js b/knife4j-doc/gitee/assets/js/429fbca3.9419401f.js deleted file mode 100644 index b49f33880..000000000 --- a/knife4j-doc/gitee/assets/js/429fbca3.9419401f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3867],{3905:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>g});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},f=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,f=p(e,["components","mdxType","originalType","parentName"]),u=s(r),g=o,d=u["".concat(c,".").concat(g)]||u[g]||l[g]||a;return r?n.createElement(d,i(i({ref:t},f),{},{components:r})):n.createElement(d,i({ref:t},f))}));function g(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>f,contentTitle:()=>c,default:()=>g,frontMatter:()=>p,metadata:()=>s,toc:()=>l});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],p={},c="springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a",s={unversionedId:"action/springfox/springfox20",id:"action/springfox/springfox20",title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a",description:"\u5f85\u7eed...",source:"@site/docs/action/springfox/springfox20.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox20",permalink:"/docs/action/springfox/springfox20",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60",permalink:"/docs/action/springfox/springfox19"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b",permalink:"/docs/action/springfox/springfox21"}},f={},l=[],u={toc:l};function g(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e8c\u5341-\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0mapjsonobject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a"},"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a"),(0,a.kt)("p",null,"\u5f85\u7eed..."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/429fbca3.a86a343c.js b/knife4j-doc/gitee/assets/js/429fbca3.a86a343c.js new file mode 100644 index 000000000..0b0a6a569 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/429fbca3.a86a343c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3867],{3905:(e,t,r)=>{r.d(t,{Zo:()=>f,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},f=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,f=p(e,["components","mdxType","originalType","parentName"]),l=s(r),g=o,d=l["".concat(c,".").concat(g)]||l[g]||u[g]||a;return r?n.createElement(d,i(i({ref:t},f),{},{components:r})):n.createElement(d,i({ref:t},f))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=g;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[l]="string"==typeof e?e:o,i[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>f,contentTitle:()=>c,default:()=>d,frontMatter:()=>p,metadata:()=>s,toc:()=>l});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],p={},c="springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a",s={unversionedId:"action/springfox/springfox20",id:"action/springfox/springfox20",title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a",description:"\u5f85\u7eed...",source:"@site/docs/action/springfox/springfox20.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox20",permalink:"/docs/action/springfox/springfox20",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e5d) guava\u5e93\u5b66\u4e60",permalink:"/docs/action/springfox/springfox19"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b",permalink:"/docs/action/springfox/springfox21"}},f={},l=[],u={toc:l},g="wrapper";function d(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)(g,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u4e8c\u5341-\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0mapjsonobject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a"},"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0Map\u3001JSONObject\u7b49\u52a8\u6001\u5b57\u6bb5\u663e\u793a"),(0,a.kt)("p",null,"\u5f85\u7eed..."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4359eaec.2286df96.js b/knife4j-doc/gitee/assets/js/4359eaec.2286df96.js deleted file mode 100644 index 2b0beb903..000000000 --- a/knife4j-doc/gitee/assets/js/4359eaec.2286df96.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9169],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var l=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function r(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),d=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=d(e.components);return l.createElement(o.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},s=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),s=d(n),k=a,m=s["".concat(o,".").concat(k)]||s[k]||c[k]||i;return n?l.createElement(m,r(r({ref:t},u),{},{components:n})):l.createElement(m,r({ref:t},u))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=s;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,r[1]=p;for(var d=2;d{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>k,frontMatter:()=>p,metadata:()=>d,toc:()=>c});var l=n(87462),a=n(63366),i=(n(67294),n(3905)),r=["components"],p={},o="4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",d={unversionedId:"middleware/knife4jCloud",id:"middleware/knife4jCloud",title:"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",description:"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd",source:"@site/docs/middleware/knife4jCloud.md",sourceDirName:"middleware",slug:"/middleware/knife4jCloud",permalink:"/docs/middleware/knife4jCloud",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},u={},c=[{value:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",id:"411-\u4ea7\u54c1\u4ecb\u7ecd",level:2},{value:"4.1.2 \u529f\u80fd\u4ecb\u7ecd",id:"412-\u529f\u80fd\u4ecb\u7ecd",level:2},{value:"4.1.2.1 \u767b\u5f55",id:"4121-\u767b\u5f55",level:3},{value:"4.1.2.2 \u5de5\u4f5c\u53f0",id:"4122-\u5de5\u4f5c\u53f0",level:3},{value:"4.1.2.3 \u9879\u76ee\u7ba1\u7406",id:"4123-\u9879\u76ee\u7ba1\u7406",level:3},{value:"4.1.2.4 \u670d\u52a1\u7ba1\u7406",id:"4124-\u670d\u52a1\u7ba1\u7406",level:3},{value:"4.1.2.5 \u9884\u89c8\u6587\u6863",id:"4125-\u9884\u89c8\u6587\u6863",level:3},{value:"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"4126-\u4e2a\u4eba\u4e2d\u5fc3",level:3},{value:"4.1.3 \u5f00\u653eAPI",id:"413-\u5f00\u653eapi",level:2},{value:"4.1.3.1 \u6ce8\u518cAPI",id:"4131-\u6ce8\u518capi",level:3},{value:"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c",level:3},{value:"4.1.4 \u4ea7\u54c1\u8bd5\u7528",id:"414-\u4ea7\u54c1\u8bd5\u7528",level:2}],s={toc:c};function k(e){var t=e.components,p=(0,a.Z)(e,r);return(0,i.kt)("wrapper",(0,l.Z)({},s,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"41-knife4jcloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"},"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"),(0,i.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684",(0,i.kt)("a",{parentName:"p",href:"/docs/middleware-sources/cloud-introduction",target:null,rel:null},"\u6587\u6863\u4ecb\u7ecd"))),(0,i.kt)("h2",{id:"411-\u4ea7\u54c1\u4ecb\u7ecd"},"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot 2.2.0.RELEASE"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Mybatis 3.5"),"\u8fdb\u884c\u5f00\u53d1."),(0,i.kt)("p",null,"\u5c06\u76ee\u524d\u5f00\u6e90\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u8fdb\u884c\u6574\u5408,\u901a\u8fc7\u4e91\u5e73\u53f0\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"OpenAPI v2"),"\u7684Swagger\u6587\u6863\u8fdb\u884c\u4e91\u7aef\u805a\u5408,\u5728\u7ebf\u5bf9Swagger\u6587\u6863\u8fdb\u884c\u6e32\u67d3\u548c\u8c03\u8bd5,\u975e\u5e38\u7075\u6d3b\u65b9\u4fbf,\u7279\u522b\u662f\u5728\u5fae\u670d\u52a1\u76db\u884c\u7684\u4eca\u5929,\u5bf9\u4e8e\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u6765\u8bf4,\u662f\u4e00\u6b3e\u975e\u5e38\u8f7b\u5de7\u3001\u65b9\u4fbf\u3001\u7b80\u5355\u3001\u6613\u7528\u7684\u4ea7\u54c1."),(0,i.kt)("p",null,"\u4ea7\u54c1\u7684\u4e3b\u8981\u4f18\u52bf\uff1a"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"1).\u8de8\u8bed\u8a00")),(0,i.kt)("p",null,"\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u90fd\u77e5\u9053,OpenAPI\u662f\u4e00\u5957\u6807\u51c6\u7684\u89c4\u8303,\u5728\u4e0d\u540c\u7684\u8bed\u8a00\u4e2d\u90fd\u6709\u76f8\u5e94\u7684\u5b9e\u73b0\u65b9\u5f0f,\u5305\u62ecJava\u3001Node\u3001Python\u3001.Net\u7b49\u8bed\u8a00,\u4f7f\u7528\u8303\u56f4\u975e\u5e38\u5e7f\u6cdb,\u7279\u522b\u662fJava\u4f53\u7cfb\u4e0bSpring\u7684\u751f\u6001\u975e\u5e38\u5b8c\u5584,Springfox\u7ec4\u4ef6\u63d0\u4f9b\u4e86\u5bf9OpenAPI\u7684\u652f\u6301,\u5c06SpringMVC\u63a5\u53e3\u548cSwagger\u7d27\u5bc6\u7684\u8054\u7cfb\u4e86\u8d77\u6765,\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5"),(0,i.kt)("p",null,"\u4e5f\u6b63\u662f\u56e0\u4e3a\u8fd9\u79cd\u539f\u56e0,Knife4j\u76ee\u524d\u7ecf\u5386\u8fd13\u5e74\u7684\u53d1\u5c55,OpenAPI2.0\u7248\u672c\u5df2\u7ecf\u8d8a\u6765\u8d8a\u6210\u719f,Java\u7684\u5f00\u53d1\u8005\u96c6\u6210Knife4j\u975e\u5e38\u65b9\u4fbf,\u4f46\u662f\u5176\u4ed6\u8bed\u8a00\u76ee\u524d\u60f3\u8981\u4f7f\u7528Knife4j\u90fd\u4f1a\u6709\u4e00\u4e9b\u96be\u5ea6,\u9700\u8981\u66f4\u6539\u76f8\u5173\u7684\u4ee3\u7801\u624d\u80fd\u505a\u5230\u96c6\u6210,\u4f7f\u7528\u4e0a\u5f88\u9ebb\u70e6"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u4f5c\u4e3a\u72ec\u7acb\u7684\u5e73\u53f0,\u4e0d\u7ba1\u662f\u63d0\u4f9bOpenAPI\u7684\u63a5\u53e3\u8fd8\u662f\u63d0\u4f9bSwagger\u7684JSON,\u90fd\u53ef\u4ee5\u901a\u8fc7\u5728\u5e73\u53f0\u4e0a\u7b80\u5355\u64cd\u4f5c,\u5373\u53ef\u60c5\u51b5\u5c06OpenAPIV2\u7684\u7ed3\u6784\u5728Knife4j\u7684Ui\u4e0a\u5c55\u793a\u51fa\u6765."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"2).\u5fae\u670d\u52a1\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408")),(0,i.kt)("p",null,"\u5728\u76ee\u524d\u7684Knife4j\u6280\u672f\u4ea4\u6d41\u7fa4\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5404\u4e2a\u5f00\u53d1\u8005\u8be2\u95ee\u5982\u4f55\u5728Spring Cloud\u7684\u5fae\u670d\u52a1\u6280\u672f\u67b6\u6784\u4e0b\u805a\u5408Swagger\u6587\u6863,\u6709\u7684\u4eba\u805a\u5408\u6210\u529f\u4e86,\u6709\u7684\u4eba\u805a\u5408\u5931\u8d25\u4e86"),(0,i.kt)("p",null,"\u7a76\u5176\u539f\u56e0,Spring Cloud\u6280\u672f\u67b6\u6784\u53d1\u5c55\u76f8\u5f53\u8fc5\u901f,\u90e8\u5206\u5f00\u53d1\u4eba\u5458\u65e0\u6687\u53bb\u901a\u8fc7\u8c03\u8bd5\u5e95\u5c42\u4ee3\u7801\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u78b0\u5230\u7684\u95ee\u9898,\u7279\u522b\u662fSwagger\u6587\u6863\u7684\u805a\u5408\u4e00\u822c\u90fd\u662f\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027\u8fdb\u884c\u805a\u5408,\u800c\u5fae\u670d\u52a1\u67b6\u6784\u7684\u7f51\u5173\u4ece",(0,i.kt)("inlineCode",{parentName:"p"},"Zuul"),"\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u7684\u8fed\u4ee3,\u90fd\u662f\u53d1\u5c55\u60ca\u4eba\u7684,\u65b0\u7248\u672c\u7684\u8fed\u4ee3\u5fc5\u7136\u4f1a\u78b0\u5230\u7248\u672c\u517c\u5bb9\u7684\u95ee\u9898,\u7f51\u5173\u7684\u8fed\u4ee3,\u6bcf\u4e00\u6b21\u7684\u8fed\u4ee3\u65b0\u589e\u4e86\u90a3\u4e9b\u7279\u6027,\u5220\u9664\u4e86\u90a3\u4e9b\u7279\u6027,\u5927\u90e8\u5206\u60c5\u51b5\u4e0b,\u6211\u4eec\u662f\u4e0d\u4f1a\u53bb\u770b\u8fed\u4ee3\u65e5\u5fd7\u7684.\u5347\u7ea7\u5c31\u5b8c\u4e8b\u4e86.\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6709\u4eba\u6210\u529f,\u6709\u4eba\u5931\u8d25"),(0,i.kt)("p",null,"\u90a3\u4e48,\u901a\u8fc7\u73b0\u8c61\u770b\u672c\u8d28,\u6211\u4eec\u78b0\u5230\u7684\u95ee\u9898\u5230\u5e95\u662f\u4ec0\u4e48?"),(0,i.kt)("p",null,"1\u3001\u7f51\u5173\u7248\u672c\u5347\u7ea7,\u5bfc\u81f4\u8bf7\u6c42Swagger\u63a5\u53e3\u5931\u8d25,\u6216\u8005\u4e22\u5931\u67d0\u4e2a\u5c5e\u6027"),(0,i.kt)("p",null,"2\u3001\u7f51\u5173\u914d\u7f6e\u4e0d\u6b63\u786e,\u8c03\u8bd5\u8f6c\u53d1\u5931\u8d25"),(0,i.kt)("p",null,"3\u3001\u7b49\u7b49..."),(0,i.kt)("p",null,"\u6211\u4eec\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b,\u5f15\u5165Swagger\u6587\u6863\u5982\u6b64\u7b80\u5355,\u4e3a\u4ec0\u4e48\u5728Spring Cloud\u7684\u4f53\u73b0\u8fd9\u4e48\u9ebb\u70e6?\u805a\u5408\u4ee3\u7801\u5199\u4e86\u4e00\u5927\u5806,\u8fd8\u8981\u8c03\u8bd5\u4e3a\u4f55\u5931\u8d25,\u4e0d\u540c\u7684\u7248\u672c\u6709\u4e0d\u540c\u7684\u8981\u6c42.\u7b49\u7b49"),(0,i.kt)("p",null,"\u90a3\u4e48,Knife4jCloud\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u5462?"),(0,i.kt)("p",null,"1\u3001Knife4jCloud\u628aSwagger\u7684\u7279\u6027\u5168\u90e8\u62bd\u8c61\u51fa\u6765,\u5168\u90e8\u653e\u5728\u5e73\u53f0\u91cc\u6765\u505a,\u4ed6\u5145\u5f53\u7684\u4e5f\u662f\u4e00\u4e2a\u7f51\u5173\u7684\u89d2\u8272,\u4f46\u662f\u662f\u81ea\u5df1\u6269\u5c55\u5b9e\u73b0\u7684,\u6269\u5c55\u7684\u76ee\u7684\u53ea\u6709\u4e00\u4e2a,\u5c31\u662f\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u8c03\u8bd5"),(0,i.kt)("p",null,"2\u3001Knife4jCloud\u4e2d\u4f1a\u628a\u6bcf\u4e00\u4e2aSwagger\u6587\u6863\u4f5c\u4e3a\u4e00\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff0c\u5fae\u670d\u52a1\u7684IP\u3001\u7aef\u53e3\u3001Swagger-JSONNeri\u90fd\u4f1a\u4fdd\u5b58\u5728\u5e73\u53f0\u4e2d"),(0,i.kt)("p",null,"\u8fd9\u6837\u5728\u5e73\u53f0\u4e2d,\u5bf9\u4e8eSwagger\u6587\u6863\u53ef\u4ee5\u8fdb\u884c\u4efb\u610f\u805a\u5408,\u548c\u5fae\u670d\u52a1\u5f7b\u5e95\u62dc\u62dc\u4e86~~"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"3).\u4e2a\u6027\u5316\u914d\u7f6e")),(0,i.kt)("p",null,"Knife4jCloud\u4ea7\u54c1\u672c\u8eab\u662f\u62e5\u6709\u7528\u6237\u7684\u89d2\u8272\u7684,\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06\u5e73\u53f0\u90e8\u7f72\u5728\u548c\u5b9e\u9645\u540c\u4e00\u4e2a\u7f51\u7edc\u73af\u5883\u4e2d,\u5bf9\u5916\u7684Swagger\u6587\u6863\u53ef\u4ee5\u901a\u8fc7Knife4jCloud\u505a\u5230\u7f51\u7edc\u9694\u79bb"),(0,i.kt)("p",null,"\u5bf9\u4e8e\u6bcf\u4e00\u4efdSwagger\u6587\u6863\u9875\u53ef\u4ee5\u505a\u5230\u662f\u5426\u767b\u5f55\u540e\u53ef\u770b,\u6587\u6863\u662f\u5426\u53ef\u4ee5\u8c03\u8bd5\u7b49\u7b49\u4e2a\u6027\u5316\u7684\u914d\u7f6e\u90fd\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u64cd\u4f5c"),(0,i.kt)("h2",{id:"412-\u529f\u80fd\u4ecb\u7ecd"},"4.1.2 \u529f\u80fd\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,i.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,i.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,i.kt)("h3",{id:"4121-\u767b\u5f55"},"4.1.2.1 \u767b\u5f55"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,i.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,i.kt)("h3",{id:"4122-\u5de5\u4f5c\u53f0"},"4.1.2.2 \u5de5\u4f5c\u53f0"),(0,i.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,i.kt)("h3",{id:"4123-\u9879\u76ee\u7ba1\u7406"},"4.1.2.3 \u9879\u76ee\u7ba1\u7406"),(0,i.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,i.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,i.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,i.kt)("h3",{id:"4124-\u670d\u52a1\u7ba1\u7406"},"4.1.2.4 \u670d\u52a1\u7ba1\u7406"),(0,i.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,i.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,i.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,i.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,i.kt)("h3",{id:"4125-\u9884\u89c8\u6587\u6863"},"4.1.2.5 \u9884\u89c8\u6587\u6863"),(0,i.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,i.kt)("h3",{id:"4126-\u4e2a\u4eba\u4e2d\u5fc3"},"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,i.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})),(0,i.kt)("h2",{id:"413-\u5f00\u653eapi"},"4.1.3 \u5f00\u653eAPI"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,i.kt)("h3",{id:"4131-\u6ce8\u518capi"},"4.1.3.1 \u6ce8\u518cAPI"),(0,i.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,i.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"application/json")),(0,i.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"POST")),(0,i.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,i.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,i.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,i.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:null,rel:null},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,i.kt)("h3",{id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c"},"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"1.Maven\u5f15\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,i.kt)("p",null,"2\u3001\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,i.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")),(0,i.kt)("h2",{id:"414-\u4ea7\u54c1\u8bd5\u7528"},"4.1.4 \u4ea7\u54c1\u8bd5\u7528"),(0,i.kt)("p",null,"\u53ef\u4ee5\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"http://cloud.xiaominfo.com",target:"_blank",rel:"noopener"},"http://cloud.xiaominfo.com"),"\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!"))}k.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4359eaec.4bf11a23.js b/knife4j-doc/gitee/assets/js/4359eaec.4bf11a23.js new file mode 100644 index 000000000..7b9efc7ea --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4359eaec.4bf11a23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9169],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(67294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var o=a.createContext({}),d=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=d(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=d(n),k=l,m=c["".concat(o,".").concat(k)]||c[k]||s[k]||i;return n?a.createElement(m,r(r({ref:t},u),{},{components:n})):a.createElement(m,r({ref:t},u))}));function m(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=n.length,r=new Array(i);r[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[c]="string"==typeof e?e:l,r[1]=p;for(var d=2;d{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>m,frontMatter:()=>p,metadata:()=>d,toc:()=>c});var a=n(87462),l=n(63366),i=(n(67294),n(3905)),r=["components"],p={},o="4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",d={unversionedId:"middleware/knife4jCloud",id:"middleware/knife4jCloud",title:"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0",description:"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684\u6587\u6863\u4ecb\u7ecd",source:"@site/docs/middleware/knife4jCloud.md",sourceDirName:"middleware",slug:"/middleware/knife4jCloud",permalink:"/docs/middleware/knife4jCloud",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},u={},c=[{value:"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd",id:"411-\u4ea7\u54c1\u4ecb\u7ecd",level:2},{value:"4.1.2 \u529f\u80fd\u4ecb\u7ecd",id:"412-\u529f\u80fd\u4ecb\u7ecd",level:2},{value:"4.1.2.1 \u767b\u5f55",id:"4121-\u767b\u5f55",level:3},{value:"4.1.2.2 \u5de5\u4f5c\u53f0",id:"4122-\u5de5\u4f5c\u53f0",level:3},{value:"4.1.2.3 \u9879\u76ee\u7ba1\u7406",id:"4123-\u9879\u76ee\u7ba1\u7406",level:3},{value:"4.1.2.4 \u670d\u52a1\u7ba1\u7406",id:"4124-\u670d\u52a1\u7ba1\u7406",level:3},{value:"4.1.2.5 \u9884\u89c8\u6587\u6863",id:"4125-\u9884\u89c8\u6587\u6863",level:3},{value:"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3",id:"4126-\u4e2a\u4eba\u4e2d\u5fc3",level:3},{value:"4.1.3 \u5f00\u653eAPI",id:"413-\u5f00\u653eapi",level:2},{value:"4.1.3.1 \u6ce8\u518cAPI",id:"4131-\u6ce8\u518capi",level:3},{value:"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c",id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c",level:3},{value:"4.1.4 \u4ea7\u54c1\u8bd5\u7528",id:"414-\u4ea7\u54c1\u8bd5\u7528",level:2}],s={toc:c},k="wrapper";function m(e){var t=e.components,p=(0,l.Z)(e,r);return(0,i.kt)(k,(0,a.Z)({},s,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"41-knife4jcloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"},"4.1 Knife4jCloud\u7efc\u5408\u7ba1\u7406\u5e73\u53f0"),(0,i.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684",(0,i.kt)("a",{parentName:"p",href:"/docs/middleware-sources/cloud-introduction",target:null,rel:null},"\u6587\u6863\u4ecb\u7ecd"))),(0,i.kt)("h2",{id:"411-\u4ea7\u54c1\u4ecb\u7ecd"},"4.1.1 \u4ea7\u54c1\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u662f\u4e00\u6b3e\u72ec\u7acb\u90e8\u7f72\u7684\u4e2d\u95f4\u4ef6,\u57fa\u4e8e",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot 2.2.0.RELEASE"),"+",(0,i.kt)("inlineCode",{parentName:"p"},"Mybatis 3.5"),"\u8fdb\u884c\u5f00\u53d1."),(0,i.kt)("p",null,"\u5c06\u76ee\u524d\u5f00\u6e90\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u8fdb\u884c\u6574\u5408,\u901a\u8fc7\u4e91\u5e73\u53f0\u5bf9",(0,i.kt)("inlineCode",{parentName:"p"},"OpenAPI v2"),"\u7684Swagger\u6587\u6863\u8fdb\u884c\u4e91\u7aef\u805a\u5408,\u5728\u7ebf\u5bf9Swagger\u6587\u6863\u8fdb\u884c\u6e32\u67d3\u548c\u8c03\u8bd5,\u975e\u5e38\u7075\u6d3b\u65b9\u4fbf,\u7279\u522b\u662f\u5728\u5fae\u670d\u52a1\u76db\u884c\u7684\u4eca\u5929,\u5bf9\u4e8e\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u6765\u8bf4,\u662f\u4e00\u6b3e\u975e\u5e38\u8f7b\u5de7\u3001\u65b9\u4fbf\u3001\u7b80\u5355\u3001\u6613\u7528\u7684\u4ea7\u54c1."),(0,i.kt)("p",null,"\u4ea7\u54c1\u7684\u4e3b\u8981\u4f18\u52bf\uff1a"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"1).\u8de8\u8bed\u8a00")),(0,i.kt)("p",null,"\u4f7f\u7528Swagger\u7684\u5f00\u53d1\u8005\u90fd\u77e5\u9053,OpenAPI\u662f\u4e00\u5957\u6807\u51c6\u7684\u89c4\u8303,\u5728\u4e0d\u540c\u7684\u8bed\u8a00\u4e2d\u90fd\u6709\u76f8\u5e94\u7684\u5b9e\u73b0\u65b9\u5f0f,\u5305\u62ecJava\u3001Node\u3001Python\u3001.Net\u7b49\u8bed\u8a00,\u4f7f\u7528\u8303\u56f4\u975e\u5e38\u5e7f\u6cdb,\u7279\u522b\u662fJava\u4f53\u7cfb\u4e0bSpring\u7684\u751f\u6001\u975e\u5e38\u5b8c\u5584,Springfox\u7ec4\u4ef6\u63d0\u4f9b\u4e86\u5bf9OpenAPI\u7684\u652f\u6301,\u5c06SpringMVC\u63a5\u53e3\u548cSwagger\u7d27\u5bc6\u7684\u8054\u7cfb\u4e86\u8d77\u6765,\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u63a5\u53e3\u7684\u8c03\u8bd5"),(0,i.kt)("p",null,"\u4e5f\u6b63\u662f\u56e0\u4e3a\u8fd9\u79cd\u539f\u56e0,Knife4j\u76ee\u524d\u7ecf\u5386\u8fd13\u5e74\u7684\u53d1\u5c55,OpenAPI2.0\u7248\u672c\u5df2\u7ecf\u8d8a\u6765\u8d8a\u6210\u719f,Java\u7684\u5f00\u53d1\u8005\u96c6\u6210Knife4j\u975e\u5e38\u65b9\u4fbf,\u4f46\u662f\u5176\u4ed6\u8bed\u8a00\u76ee\u524d\u60f3\u8981\u4f7f\u7528Knife4j\u90fd\u4f1a\u6709\u4e00\u4e9b\u96be\u5ea6,\u9700\u8981\u66f4\u6539\u76f8\u5173\u7684\u4ee3\u7801\u624d\u80fd\u505a\u5230\u96c6\u6210,\u4f7f\u7528\u4e0a\u5f88\u9ebb\u70e6"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u4f5c\u4e3a\u72ec\u7acb\u7684\u5e73\u53f0,\u4e0d\u7ba1\u662f\u63d0\u4f9bOpenAPI\u7684\u63a5\u53e3\u8fd8\u662f\u63d0\u4f9bSwagger\u7684JSON,\u90fd\u53ef\u4ee5\u901a\u8fc7\u5728\u5e73\u53f0\u4e0a\u7b80\u5355\u64cd\u4f5c,\u5373\u53ef\u60c5\u51b5\u5c06OpenAPIV2\u7684\u7ed3\u6784\u5728Knife4j\u7684Ui\u4e0a\u5c55\u793a\u51fa\u6765."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"2).\u5fae\u670d\u52a1\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408")),(0,i.kt)("p",null,"\u5728\u76ee\u524d\u7684Knife4j\u6280\u672f\u4ea4\u6d41\u7fa4\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5404\u4e2a\u5f00\u53d1\u8005\u8be2\u95ee\u5982\u4f55\u5728Spring Cloud\u7684\u5fae\u670d\u52a1\u6280\u672f\u67b6\u6784\u4e0b\u805a\u5408Swagger\u6587\u6863,\u6709\u7684\u4eba\u805a\u5408\u6210\u529f\u4e86,\u6709\u7684\u4eba\u805a\u5408\u5931\u8d25\u4e86"),(0,i.kt)("p",null,"\u7a76\u5176\u539f\u56e0,Spring Cloud\u6280\u672f\u67b6\u6784\u53d1\u5c55\u76f8\u5f53\u8fc5\u901f,\u90e8\u5206\u5f00\u53d1\u4eba\u5458\u65e0\u6687\u53bb\u901a\u8fc7\u8c03\u8bd5\u5e95\u5c42\u4ee3\u7801\u7684\u65b9\u5f0f\u6765\u89e3\u51b3\u78b0\u5230\u7684\u95ee\u9898,\u7279\u522b\u662fSwagger\u6587\u6863\u7684\u805a\u5408\u4e00\u822c\u90fd\u662f\u901a\u8fc7\u7f51\u5173\u7684\u7279\u6027\u8fdb\u884c\u805a\u5408,\u800c\u5fae\u670d\u52a1\u67b6\u6784\u7684\u7f51\u5173\u4ece",(0,i.kt)("inlineCode",{parentName:"p"},"Zuul"),"\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Cloud Gateway"),"\u7684\u8fed\u4ee3,\u90fd\u662f\u53d1\u5c55\u60ca\u4eba\u7684,\u65b0\u7248\u672c\u7684\u8fed\u4ee3\u5fc5\u7136\u4f1a\u78b0\u5230\u7248\u672c\u517c\u5bb9\u7684\u95ee\u9898,\u7f51\u5173\u7684\u8fed\u4ee3,\u6bcf\u4e00\u6b21\u7684\u8fed\u4ee3\u65b0\u589e\u4e86\u90a3\u4e9b\u7279\u6027,\u5220\u9664\u4e86\u90a3\u4e9b\u7279\u6027,\u5927\u90e8\u5206\u60c5\u51b5\u4e0b,\u6211\u4eec\u662f\u4e0d\u4f1a\u53bb\u770b\u8fed\u4ee3\u65e5\u5fd7\u7684.\u5347\u7ea7\u5c31\u5b8c\u4e8b\u4e86.\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6709\u4eba\u6210\u529f,\u6709\u4eba\u5931\u8d25"),(0,i.kt)("p",null,"\u90a3\u4e48,\u901a\u8fc7\u73b0\u8c61\u770b\u672c\u8d28,\u6211\u4eec\u78b0\u5230\u7684\u95ee\u9898\u5230\u5e95\u662f\u4ec0\u4e48?"),(0,i.kt)("p",null,"1\u3001\u7f51\u5173\u7248\u672c\u5347\u7ea7,\u5bfc\u81f4\u8bf7\u6c42Swagger\u63a5\u53e3\u5931\u8d25,\u6216\u8005\u4e22\u5931\u67d0\u4e2a\u5c5e\u6027"),(0,i.kt)("p",null,"2\u3001\u7f51\u5173\u914d\u7f6e\u4e0d\u6b63\u786e,\u8c03\u8bd5\u8f6c\u53d1\u5931\u8d25"),(0,i.kt)("p",null,"3\u3001\u7b49\u7b49..."),(0,i.kt)("p",null,"\u6211\u4eec\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b,\u5f15\u5165Swagger\u6587\u6863\u5982\u6b64\u7b80\u5355,\u4e3a\u4ec0\u4e48\u5728Spring Cloud\u7684\u4f53\u73b0\u8fd9\u4e48\u9ebb\u70e6?\u805a\u5408\u4ee3\u7801\u5199\u4e86\u4e00\u5927\u5806,\u8fd8\u8981\u8c03\u8bd5\u4e3a\u4f55\u5931\u8d25,\u4e0d\u540c\u7684\u7248\u672c\u6709\u4e0d\u540c\u7684\u8981\u6c42.\u7b49\u7b49"),(0,i.kt)("p",null,"\u90a3\u4e48,Knife4jCloud\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u5462?"),(0,i.kt)("p",null,"1\u3001Knife4jCloud\u628aSwagger\u7684\u7279\u6027\u5168\u90e8\u62bd\u8c61\u51fa\u6765,\u5168\u90e8\u653e\u5728\u5e73\u53f0\u91cc\u6765\u505a,\u4ed6\u5145\u5f53\u7684\u4e5f\u662f\u4e00\u4e2a\u7f51\u5173\u7684\u89d2\u8272,\u4f46\u662f\u662f\u81ea\u5df1\u6269\u5c55\u5b9e\u73b0\u7684,\u6269\u5c55\u7684\u76ee\u7684\u53ea\u6709\u4e00\u4e2a,\u5c31\u662f\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u8c03\u8bd5"),(0,i.kt)("p",null,"2\u3001Knife4jCloud\u4e2d\u4f1a\u628a\u6bcf\u4e00\u4e2aSwagger\u6587\u6863\u4f5c\u4e3a\u4e00\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff0c\u5fae\u670d\u52a1\u7684IP\u3001\u7aef\u53e3\u3001Swagger-JSONNeri\u90fd\u4f1a\u4fdd\u5b58\u5728\u5e73\u53f0\u4e2d"),(0,i.kt)("p",null,"\u8fd9\u6837\u5728\u5e73\u53f0\u4e2d,\u5bf9\u4e8eSwagger\u6587\u6863\u53ef\u4ee5\u8fdb\u884c\u4efb\u610f\u805a\u5408,\u548c\u5fae\u670d\u52a1\u5f7b\u5e95\u62dc\u62dc\u4e86~~"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"3).\u4e2a\u6027\u5316\u914d\u7f6e")),(0,i.kt)("p",null,"Knife4jCloud\u4ea7\u54c1\u672c\u8eab\u662f\u62e5\u6709\u7528\u6237\u7684\u89d2\u8272\u7684,\u5f00\u53d1\u8005\u53ef\u4ee5\u5c06\u5e73\u53f0\u90e8\u7f72\u5728\u548c\u5b9e\u9645\u540c\u4e00\u4e2a\u7f51\u7edc\u73af\u5883\u4e2d,\u5bf9\u5916\u7684Swagger\u6587\u6863\u53ef\u4ee5\u901a\u8fc7Knife4jCloud\u505a\u5230\u7f51\u7edc\u9694\u79bb"),(0,i.kt)("p",null,"\u5bf9\u4e8e\u6bcf\u4e00\u4efdSwagger\u6587\u6863\u9875\u53ef\u4ee5\u505a\u5230\u662f\u5426\u767b\u5f55\u540e\u53ef\u770b,\u6587\u6863\u662f\u5426\u53ef\u4ee5\u8c03\u8bd5\u7b49\u7b49\u4e2a\u6027\u5316\u7684\u914d\u7f6e\u90fd\u53ef\u4ee5\u5728\u5e73\u53f0\u4e2d\u8fdb\u884c\u64cd\u4f5c"),(0,i.kt)("h2",{id:"412-\u529f\u80fd\u4ecb\u7ecd"},"4.1.2 \u529f\u80fd\u4ecb\u7ecd"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud")," V1.0\u7248\u672c\u76ee\u524d\u63d0\u4f9b\u7684\u529f\u80fd\u4e3b\u8981\u5305\u62ec\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u4e2a\u4eba\u7528\u6237&\u767b\u5f55&\u6ce8\u518c\uff1a\u901a\u8fc7\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u6ce8\u518c,\u6570\u636e\u5b8c\u5168\u9694\u79bb,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("li",{parentName:"ul"},"\u5de5\u4f5c\u53f0\uff1a\u5f53\u524d\u9879\u76ee\u3001\u670d\u52a1\u7684\u7b80\u5355\u7edf\u8ba1\u60c5\u51b5"),(0,i.kt)("li",{parentName:"ul"},"\u9879\u76ee\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u9879\u76ee\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4"),(0,i.kt)("li",{parentName:"ul"},"\u670d\u52a1\u7ba1\u7406\uff1a\u53ef\u4ee5\u5bf9\u670d\u52a1\u5217\u8868\u8fdb\u884c\u7f16\u8f91\u7ef4\u62a4")),(0,i.kt)("h3",{id:"4121-\u767b\u5f55"},"4.1.2.1 \u767b\u5f55"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u901a\u8fc7\u4e2a\u4eba\u90ae\u7bb1\u7684\u65b9\u5f0f\u8fdb\u884c\u767b\u5f55\u6ce8\u518c,\u6240\u4ee5\u5728\u7cfb\u7edf\u6570\u636e\u662f\u5b8c\u5168\u9694\u79bb\u7684,\u6bcf\u4e2a\u4eba\u53ea\u80fd\u770b\u5230\u81ea\u5df1\u7684\u6570\u636e"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(32152).Z,width:"841",height:"581"})),(0,i.kt)("p",null,"\u6ce8\u518c\u754c\u9762\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11356).Z,width:"841",height:"581"})),(0,i.kt)("h3",{id:"4122-\u5de5\u4f5c\u53f0"},"4.1.2.2 \u5de5\u4f5c\u53f0"),(0,i.kt)("p",null,"\u5728\u9879\u76ee\u4e3b\u9875\u5de5\u4f5c\u53f0,\u4f1a\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u9879\u76ee\u6570\u91cf\u3001\u670d\u52a1\u6570\u91cf\u3001\u670d\u52a1\u5206\u7c7b\u60c5\u51b5"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(9484).Z,width:"1162",height:"503"})),(0,i.kt)("h3",{id:"4123-\u9879\u76ee\u7ba1\u7406"},"4.1.2.3 \u9879\u76ee\u7ba1\u7406"),(0,i.kt)("p",null,"\u9879\u76ee\u7ba1\u7406\u5305\u542b\u4e86\u5bf9\u5f53\u524d\u9879\u76ee\u7684\u65b0\u589e\u3001\u7f16\u8f91\u3001\u5220\u9664\u3001\u67e5\u8be2\u7b49\u529f\u80fd"),(0,i.kt)("p",null,"\u9879\u76ee\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\uff1a\u9879\u76ee\u7f16\u53f7\u3001\u9879\u76ee\u540d\u79f0\u3001\u9879\u76ee\u63cf\u8ff0"),(0,i.kt)("p",null,"\u9879\u76ee\u7f16\u53f7\u662f\u5168\u5c40\u552f\u4e00,\u5e76\u4e14\u53ea\u80fd\u662f\u6570\u5b57\u6216\u82f1\u6587\u6216\u8005\u662f\u82f1\u6587+\u6570\u5b57+\u4e0b\u5212\u7ebf\u7b49\u65b9\u5f0f\u7ec4\u6210"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(83205).Z,width:"1362",height:"623"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(41121).Z,width:"1366",height:"623"})),(0,i.kt)("h3",{id:"4124-\u670d\u52a1\u7ba1\u7406"},"4.1.2.4 \u670d\u52a1\u7ba1\u7406"),(0,i.kt)("p",null,"\u670d\u52a1\u5728Knife4jCloud\u4e2d\u7684\u5b9a\u4e49\u5176\u5b9e\u662f\u4e00\u4e2aOpenAPIv2\u7684\u5b9e\u4f8b,\u4e00\u4e2a\u670d\u52a1\u53ef\u4ee5\u662f\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u7684,\u4e5f\u53ef\u4ee5\u662f\u901a\u8fc7Swagger\u7684JSON\u6765\u521b\u5efa,\u6240\u4ee5\u5728\u670d\u52a1\u7ba1\u7406\u4e2d,\u5b58\u5728\u4e24\u79cd\u7c7b\u578b\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"API:\u5fae\u670d\u52a1\u5728\u7ebf\u7684\u65b9\u5f0f,\u83b7\u53d6\u5f97\u5230\u5f53\u524d\u7684OPenAPIv2\u7684\u5b9e\u4f8b,\u901a\u8fc7Knife4j\u7684Ui\u8fdb\u884c\u63a5\u53e3\u6e32\u67d3"),(0,i.kt)("li",{parentName:"ul"},"LOCAL:\u672c\u5730\u5316\u7684\u65b9\u5f0f,\u4f7f\u7528\u8005\u63d0\u4f9bSwagger\u7684JSON\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b")),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(5742).Z,width:"1365",height:"639"})),(0,i.kt)("p",null,"\u901a\u8fc7\u5728\u7ebfAPI\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u670d\u52a1\u5b9e\u4f8b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(11505).Z,width:"1363",height:"627"})),(0,i.kt)("p",null,"\u901a\u8fc7\u672c\u5730LOCAL\u7684\u65b9\u5f0f\u521b\u5efa"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54686).Z,width:"1366",height:"624"})),(0,i.kt)("h3",{id:"4125-\u9884\u89c8\u6587\u6863"},"4.1.2.5 \u9884\u89c8\u6587\u6863"),(0,i.kt)("p",null,"\u901a\u8fc7\u9879\u76ee\u7ba1\u7406\u5217\u8868\u4e2d\u7684\u64cd\u4f5c\u6309\u94ae,\u53ef\u4ee5\u9009\u62e9\u9884\u89c8\u6587\u6863\u67e5\u770b\u6587\u6863"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(14966).Z,width:"1365",height:"627"})),(0,i.kt)("h3",{id:"4126-\u4e2a\u4eba\u4e2d\u5fc3"},"4.1.2.6 \u4e2a\u4eba\u4e2d\u5fc3"),(0,i.kt)("p",null,"\u9f20\u6807\u60ac\u6d6e\u5728\u53f3\u4e0a\u89d2,\u53ef\u4ee5\u9009\u62e9\u7528\u6237\u4fe1\u606f\u3001\u91cd\u7f6e\u5bc6\u7801\u3001\u9000\u51fa\u7b49\u64cd\u4f5c"),(0,i.kt)("p",null,"\u5176\u4e2d\u7528\u6237\u4fe1\u606f\u4e2d\u5305\u542b\u4e86\u5f00\u653e\u6ce8\u518cAPI\u63a5\u53e3\u4e2d\u7684accessKey\u4fe1\u606f,\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(73818).Z,width:"1361",height:"622"})),(0,i.kt)("h2",{id:"413-\u5f00\u653eapi"},"4.1.3 \u5f00\u653eAPI"),(0,i.kt)("p",null,"Knife4jCloud\u5e73\u53f0\u5bf9\u5916\u63d0\u4f9b\u6ce8\u518cSwagger\u670d\u52a1\u7684\u5f00\u653eAPI\u63a5\u53e3,\u901a\u8fc7\u8be5\u63a5\u53e3,\u975eJava\u8bed\u8a00\u7684\u5f00\u53d1\u8005,\u53ef\u4ee5\u8fdb\u884c\u72ec\u7acb\u5f00\u53d1,\u505a\u5230Swagger\u6587\u6863\u7684\u9879\u76ee\u81ea\u542f\u52a8\u6ce8\u5165\u5e73\u53f0"),(0,i.kt)("h3",{id:"4131-\u6ce8\u518capi"},"4.1.3.1 \u6ce8\u518cAPI"),(0,i.kt)("p",null,"\u63a5\u53e3\u5730\u5740\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"/knife4j/cloud/upload")),(0,i.kt)("p",null,"\u63a5\u53e3\u7c7b\u578b\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"application/json")),(0,i.kt)("p",null,"\u63a5\u53e3\u65b9\u5f0f\uff1a",(0,i.kt)("inlineCode",{parentName:"p"},"POST")),(0,i.kt)("p",null,"\u63a5\u53e3\u53c2\u6570\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",\n "code":"APIFactory",\n "applicationHost":"192.168.0.152",\n "applicationPort":"9200",\n "ssl":false,\n "client":"",\n "cloudRoutes":[{\n "groupName":"\u8ba2\u5355\u670d\u52a1",\n "content":"{....}",\n "path":"/aaa/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1"\n }]\n}\n')),(0,i.kt)("p",null,"\u53c2\u6570\u8bf4\u660e\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"accessKey"),":\u8be5\u53c2\u6570\u662f\u6ce8\u518cAPI\u63a5\u53e3\u7684\u8ba4\u8bc1\u51ed\u8bc1,\u6bcf\u4e00\u4e2a\u6ce8\u518c\u7528\u6237\u62e5\u6709\u81ea\u5df1\u72ec\u7acb\u7684accessKey,\u5e73\u53f0\u6ce8\u518c\u6210\u529f\u540e\u53ef\u4ee5\u5728\u53f3\u4e0a\u89d2\u901a\u8fc7",(0,i.kt)("strong",{parentName:"li"},"\u4e2a\u4eba\u4fe1\u606f"),"\u4e2d\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"code"),":\u9879\u76ee\u7f16\u7801,\u5982\u679c\u5728\u5e73\u53f0\u4e2d\u4e0d\u5b58\u5728,\u5219\u6ce8\u518c\u4e0d\u4f1a\u6210\u529f,\u56e0\u6b64\u9700\u8981\u5148\u5728\u5e73\u53f0\u4e2d\u6dfb\u52a0\u9879\u76ee"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationHost"),":\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684IP\u5730\u5740,\u8be5\u53c2\u6570\u4e3b\u8981\u4f5c\u7528\u4e8eSwagger\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"applicationPort"),"\uff1a\u5f53\u524d\u5e94\u7528\u670d\u52a1\u7684\u7aef\u53e3\u53f7"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ssl"),":\u9ed8\u8ba4false,\u5982\u679c\u662ftrue,\u5219\u4ee3\u8868\u5f53\u524d\u670d\u52a1\u662fhttps"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"client"),":\u914d\u7f6e\u4e00\u4e2a\u5e94\u7528\u670d\u52a1\u7684Client\u5730\u5740,\u4e00\u822c\u662fhttp://host:port,Knife4j\u4f1a\u81ea\u52a8\u8bc6\u522b,\u5982\u679c\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u662f\u57df\u540d\u8bbf\u95ee,\u9632\u706b\u5899\u5c4f\u853d\u4e86\u7aef\u53e3\u53f7(\u4f8b\u5982\uff1a",(0,i.kt)("a",{parentName:"li",href:"http://doc.xiaominfo.com),%E5%88%99%E5%BC%80%E5%8F%91%E8%80%85%E5%9C%A8%E4%B8%8A%E4%BC%A0%E7%9A%84%E6%97%B6%E5%80%99%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E8%AF%A5%E5%B1%9E%E6%80%A7,%E5%90%A6%E5%88%99%E6%97%A0%E6%B3%95%E8%B0%83%E8%AF%95,%E8%AF%A5%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE%E5%90%8E%E5%88%99Host%E3%80%81Port%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%95%88,%E4%BC%9A%E6%A0%B9%E6%8D%AE%E8%AF%A5%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E8%A7%A3%E6%9E%90%E5%BE%97%E5%88%B0host%E5%92%8C%E7%AB%AF%E5%8F%A3,%E6%89%80%E4%BB%A5%E4%B8%A4%E4%B8%AA%E5%B1%9E%E6%80%A7%E9%85%8D%E7%BD%AE%E5%85%B6%E4%B8%AD%E4%B8%80%E4%B8%AA%E5%8D%B3%E5%8F%AF",target:"_blank",rel:"noopener"},"http://doc.xiaominfo.com),\u5219\u5f00\u53d1\u8005\u5728\u4e0a\u4f20\u7684\u65f6\u5019\u9700\u8981\u8bbe\u7f6e\u8be5\u5c5e\u6027,\u5426\u5219\u65e0\u6cd5\u8c03\u8bd5,\u8be5\u53c2\u6570\u8bbe\u7f6e\u540e\u5219Host\u3001Port\u4e0d\u4f1a\u751f\u6548,\u4f1a\u6839\u636e\u8be5\u5730\u5740\u81ea\u52a8\u89e3\u6790\u5f97\u5230host\u548c\u7aef\u53e3,\u6240\u4ee5\u4e24\u4e2a\u5c5e\u6027\u914d\u7f6e\u5176\u4e2d\u4e00\u4e2a\u5373\u53ef"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cloudRoutes"),":\u670d\u52a1\u5206\u7ec4",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"groupName"),":\u670d\u52a1\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content"),":\u8be5\u5185\u5bb9\u662fOpenAPIv2\u7684JSON\u7ed3\u6784"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path"),":\u63d0\u4f9b\u8bbf\u95ee\u5f97\u5230OpenAPIv2\u7684\u63a5\u53e3\u5730\u5740,\u5728\u5b9e\u9645\u9884\u89c8\u7684\u65f6\u5019,\u4f1a\u901a\u8fc7\u8be5\u63a5\u53e3\u5f97\u5230Swagger\u7684JSON\u5185\u5bb9\u8fdb\u884c\u6e32\u67d3")))),(0,i.kt)("h3",{id:"4132-spring-boot\u81ea\u52a8\u6ce8\u518c"},"4.1.3.2 Spring Boot\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u7684\u9879\u76ee\u662f\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\u8fdb\u884c\u5f00\u53d1,\u5e76\u4e14\u4e0d\u60f3\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u754c\u9762\u8fdb\u884c\u64cd\u4f5c,\u5e76\u4e14\u5df2\u7ecf\u96c6\u6210\u4e86springfox-swagger\u7ec4\u4ef6,\u90a3\u4e48,\u4f60\u53ef\u4ee5\u5f15\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4jCloud"),"\u63d0\u4f9b\u7684\u81ea\u52a8\u6ce8\u518c\u7684jar\u5305\u7ec4\u4ef6\u8fdb\u884c\u81ea\u52a8\u6ce8\u518c"),(0,i.kt)("p",null,"1.Maven\u5f15\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-discovery-spring-boot-starter\n \x3c!--\u5728\u5f15\u7528\u65f6\u8bf7\u5728maven\u4e2d\u592e\u4ed3\u5e93(http://search.maven.org)\u641c\u7d22\u6700\u65b0\u7248\u672c\u53f7--\x3e\n \x3c!-- \u8be5\u7248\u672c\u5fc5\u987b\u548cKnife4jCloud\u4e3b\u7248\u672c\u4e00\u81f4--\x3e\n 1.0\n\n")),(0,i.kt)("p",null,"2\u3001\u5728",(0,i.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u76f8\u5173\u53c2\u6570,\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"yml"),"\u4e3a\u4f8b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n cloud:\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684accessKey\n accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA\n ## \u9879\u76ee\u7f16\u53f7\n code: APITest\n ## Knife4jCloud\u7684\u5bf9\u5916\u57df\u540d\u5730\u5740\n server: http://127.0.0.1:19011\n ## \u5f53\u524d\u670d\u52a1\u662f\u5426\u662fHTTPS\u7684,\u9ed8\u8ba4\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u5e76\u4e14\u8be5\u53c2\u6570\u9ed8\u8ba4\u4e3afalse\n ssl: false\n ## \u53c2\u8003\u6ce8\u518cAPI\u4e2d\u7684client\u5c5e\u6027,\u8be5\u53c2\u6570\u53ef\u4ee5\u4e0d\u914d\u7f6e,\u53ea\u6709\u5728\u57df\u540d\u7684\u60c5\u51b5\u4e0b\u9700\u8981\u8fdb\u884c\u914d\u7f6e\n client: http://test.domain.com\n \n")),(0,i.kt)("p",null,"3\u3001\u5728Spring Boot\u5e94\u7528\u4e2d\u901a\u8fc7\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@EnableKnife4jCloudDiscovery"),"\u8fdb\u884c\u542f\u7528"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@EnableKnife4jCloudDiscovery\n@SpringBootApplication\npublic class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{\n //more..\n}\n")),(0,i.kt)("h2",{id:"414-\u4ea7\u54c1\u8bd5\u7528"},"4.1.4 \u4ea7\u54c1\u8bd5\u7528"),(0,i.kt)("p",null,"\u53ef\u4ee5\u8bbf\u95ee",(0,i.kt)("a",{parentName:"p",href:"http://cloud.xiaominfo.com",target:"_blank",rel:"noopener"},"http://cloud.xiaominfo.com"),"\u8fdb\u884c\u6ce8\u518c\u8bd5\u7528\u5427!!!"))}m.isMDXComponent=!0},5742:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png"},11505:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png"},54686:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png"},11356:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png"},32152:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png"},83205:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product-aa07656f0194aba29a91edc6bd05edad.png"},41121:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png"},14966:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png"},73818:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png"},9484:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/437b47ef.7434cece.js b/knife4j-doc/gitee/assets/js/437b47ef.7434cece.js new file mode 100644 index 000000000..aa1ef2aab --- /dev/null +++ b/knife4j-doc/gitee/assets/js/437b47ef.7434cece.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9665],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},p="mdxType",g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),p=l(t),d=o,f=p["".concat(c,".").concat(d)]||p[d]||g[d]||a;return t?r.createElement(f,i(i({ref:n},s),{},{components:t})):r.createElement(f,i({ref:n},s))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=d;var u={};for(var c in n)hasOwnProperty.call(n,c)&&(u[c]=n[c]);u.originalType=e,u[p]="string"==typeof e?e:o,i[1]=u;for(var l=2;l{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>u,metadata:()=>l,toc:()=>p});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],u={},c="2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",l={unversionedId:"action/springcloud-zuul",id:"action/springcloud-zuul",title:"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",description:"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?",source:"@site/docs/action/springcloud-zuul.md",sourceDirName:"action",slug:"/action/springcloud-zuul",permalink:"/docs/action/springcloud-zuul",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",permalink:"/docs/action/springcloud-gateway"},next:{title:"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)",permalink:"/docs/action/oauth2-implicit"}},s={},p=[{value:"2.2.1 \u9879\u76ee\u7ed3\u6784",id:"221-\u9879\u76ee\u7ed3\u6784",level:2},{value:"2.2.2 \u5fae\u670d\u52a1\u6a21\u5757",id:"222-\u5fae\u670d\u52a1\u6a21\u5757",level:2},{value:"2.2.3 \u6587\u6863\u6574\u5408",id:"223-\u6587\u6863\u6574\u5408",level:2},{value:"2.2.4 \u793a\u4f8b\u6e90\u7801",id:"224-\u793a\u4f8b\u6e90\u7801",level:2}],g={toc:p},d="wrapper";function f(e){var n=e.components,u=(0,o.Z)(e,i);return(0,a.kt)(d,(0,r.Z)({},g,u,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"22-spring-cloud-zuul\u96c6\u6210knife4j"},"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j"),(0,a.kt)("p",null,"\u5728\u57fa\u4e8e",(0,a.kt)("a",{parentName:"p",href:"/docs/solution/ui-front-nginx",target:null,rel:null},"nginx\u914d\u7f6e"),"\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?"),(0,a.kt)("p",null,"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e2d,\u5404\u4e2a\u5b50\u670d\u52a1\u90fd\u662f\u5206\u6563\u7684,\u6bcf\u4e2a\u670d\u52a1\u96c6\u6210\u4e86Swagger\u6587\u6863,\u4f46\u662f\u63a5\u53e3\u5bf9\u63a5\u65f6\u9700\u8981\u5355\u72ec\u5206\u522b\u8bbf\u95ee,\u5f88\u9ebb\u70e6,\u6548\u7387\u4f4e\u4e0b,"),(0,a.kt)("p",null,"\u800cZuul\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u6b64\u96be\u9898,\u5c06\u591a\u4e2a\u5fae\u670d\u52a1\u7684Swagger\u63a5\u53e3\u805a\u5408\u5230\u4e00\u4e2a\u6587\u6863\u4e2d,\u8fd9\u6837\u6574\u4e2a\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u53ea\u4f1a\u5b58\u5728\u4e00\u4e2a\u6587\u6863\u51fa\u53e3,\u7edf\u4e00\u6587\u6863\u53e3\u5f84"),(0,a.kt)("p",null,"\u672c\u6587\u6863\u53ea\u6d89\u53ca\u5982\u4f55\u6574\u5408Swagger\u53caZuul,\u5176\u4ed6\u76f8\u5173\u77e5\u8bc6\u70b9\u8bf7\u81ea\u884c\u641c\u7d22\u89e3\u51b3."),(0,a.kt)("h2",{id:"221-\u9879\u76ee\u7ed3\u6784"},"2.2.1 \u9879\u76ee\u7ed3\u6784"),(0,a.kt)("p",null,"\u6574\u4e2a\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"swagger-bootstrap-ui-zuul\n\u251c\u2500\u2500 service-server -- eureka\u670d\u52a1\u4e2d\u5fc3\n\u251c\u2500\u2500 service-order -- \u5fae\u670d\u52a1\u4e4b\u4e00\u8ba2\u5355\u670d\u52a1\u6a21\u5757\n\u251c\u2500\u2500 service-user -- \u5fae\u670d\u52a1\u4e4b\u4e00\u7528\u6237\u670d\u52a1\u6a21\u5757\n\u251c\u2500\u2500 service-doc -- \u6587\u6863\u4e2d\u5fc3,\u6574\u5408\u5fae\u670d\u52a1Swagger\u6587\u6863\n\n")),(0,a.kt)("p",null,"eureka\u6ce8\u518c\u670d\u52a1\u4e2d\u5fc3\u4ee5\u53ca\u5fae\u670d\u52a1\u6a21\u5757Swagger\u7684\u914d\u7f6e\u96c6\u6210\u4f7f\u7528\u8fd9\u91cc\u4e0d\u8fc7\u591a\u9a9c\u8ff0,\u548c\u5e38\u89c4\u65e0\u5f02."),(0,a.kt)("p",null,"\u6211\u4eec\u5728eureka\u670d\u52a1\u4e2d\u5fc3\u53ef\u4ee5\u770b\u5230\u6574\u4e2a\u5fae\u670d\u52a1\u6a21\u5757,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(80264).Z,width:"1339",height:"261"})),(0,a.kt)("h2",{id:"222-\u5fae\u670d\u52a1\u6a21\u5757"},"2.2.2 \u5fae\u670d\u52a1\u6a21\u5757"),(0,a.kt)("p",null,"\u8ba2\u5355\u3001\u7528\u6237\u4e24\u4e2a\u5fae\u670d\u52a1\u6a21\u5757\u914d\u7f6e\u6ca1\u6709\u4ec0\u4e48\u533a\u522b,\u90fd\u662f\u5c06\u81ea\u5df1\u7684\u670d\u52a1\u6ce8\u518c\u5230eureka\u4e2d,\u5e76\u4e14\u6bcf\u4e2a\u5fae\u670d\u52a1\u90fd\u96c6\u6210Swagger\u7684\u914d\u7f6e"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceUserApplication {\n\n static Logger logger= LoggerFactory.getLogger(ServiceUserApplication.class);\n //...\n\n}\n")),(0,a.kt)("p",null,"\u6b64\u5904\u9700\u8981\u6ce8\u610f\u7684\u662fSwagger\u7684\u914d\u7f6e\u4e2d,\u4e0d\u9700\u8981\u8bbe\u7f6e",(0,a.kt)("inlineCode",{parentName:"p"},"groupName"),"\u5c5e\u6027"),(0,a.kt)("p",null,"Swagger\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUI\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n\n @Bean(value = "userApi")\n @Order(value = 1)\n public Docket groupRestApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .apiInfo(groupApiInfo())\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))\n .paths(PathSelectors.any())\n\n .build().securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.newArrayList(apiKey(),apiKey1()));\n }\n\n private ApiInfo groupApiInfo(){\n return new ApiInfoBuilder()\n .title("swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01")\n .description("
swagger-bootstrap-ui-demo RESTful APIs
")\n .termsOfServiceUrl("http://www.group.com/")\n .contact("group@qq.com")\n .version("1.0")\n .build();\n }\n\n\n\n private ApiKey apiKey() {\n return new ApiKey("BearerToken", "Authorization", "header");\n }\n private ApiKey apiKey1() {\n return new ApiKey("BearerToken1", "Authorization-x", "header");\n }\n\n private SecurityContext securityContext() {\n return SecurityContext.builder()\n .securityReferences(defaultAuth())\n .forPaths(PathSelectors.regex("/.*"))\n .build();\n }\n private SecurityContext securityContext1() {\n return SecurityContext.builder()\n .securityReferences(defaultAuth1())\n .forPaths(PathSelectors.regex("/.*"))\n .build();\n }\n\n List defaultAuth() {\n AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");\n AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];\n authorizationScopes[0] = authorizationScope;\n return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));\n }\n List defaultAuth1() {\n AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");\n AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];\n authorizationScopes[0] = authorizationScope;\n return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));\n }\n\n}\n')),(0,a.kt)("h2",{id:"223-\u6587\u6863\u6574\u5408"},"2.2.3 \u6587\u6863\u6574\u5408"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"service-doc"),"\u6a21\u5757\u662f\u6700\u7ec8\u6574\u5408user\u3001order\u4e24\u4e2a\u5fae\u670d\u52a1\u6587\u6863\u7684\u7edf\u4e00\u6587\u6863\u51fa\u53e3,\u800c\u672c\u8eab\u4e5f\u6ce8\u518c\u5230eureka\u670d\u52a1\u4e2d\u5fc3\u4e2d."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"@EnableDiscoveryClient\n@EnableEurekaClient\n@EnableZuulProxy\n@SpringBootApplication\npublic class ServiceDocApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(ServiceDocApplication.class, args);\n }\n\n}\n")),(0,a.kt)("p",null,"\u6700\u540e\u91cd\u5199SwaggerResource,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Component\n@Primary\npublic class SwaggerResourceConfig implements SwaggerResourcesProvider {\n\n Logger logger= LoggerFactory.getLogger(SwaggerResourceConfig.class);\n\n\n @Autowired\n RouteLocator routeLocator;\n\n @Override\n public List get() {\n //\u83b7\u53d6\u6240\u6709router\n List resources = new ArrayList<>();\n List routes = routeLocator.getRoutes();\n logger.info("Route Size:{}",routes.size());\n for (Route route:routes) {\n resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs")));\n }\n return resources;\n }\n private SwaggerResource swaggerResource(String name, String location) {\n logger.info("name:{},location:{}",name,location);\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(name);\n swaggerResource.setLocation(location);\n swaggerResource.setSwaggerVersion("2.0");\n return swaggerResource;\n }\n}\n')),(0,a.kt)("p",null,"\u6700\u7ec8\u6548\u679c\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(95198).Z,width:"1362",height:"622"})),(0,a.kt)("h2",{id:"224-\u793a\u4f8b\u6e90\u7801"},"2.2.4 \u793a\u4f8b\u6e90\u7801"),(0,a.kt)("p",null,"\u4ee5\u4e0a\u6e90\u7801\u53ef\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"swagger-bootstrap-ui-demo"),"\u4e2d\u7684\u5b50\u9879\u76ee",(0,a.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui-zuul")))}f.isMDXComponent=!0},80264:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/eureka-a512d65c4a729b6f17d3a84c61f72839.png"},95198:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/sbu-f64117c439b81df93d37493f2c318aa5.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/437b47ef.c63a5050.js b/knife4j-doc/gitee/assets/js/437b47ef.c63a5050.js deleted file mode 100644 index 2b1720ce1..000000000 --- a/knife4j-doc/gitee/assets/js/437b47ef.c63a5050.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9665],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>d});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},g=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,s=u(e,["components","mdxType","originalType","parentName"]),g=l(t),d=o,f=g["".concat(c,".").concat(d)]||g[d]||p[d]||a;return t?r.createElement(f,i(i({ref:n},s),{},{components:t})):r.createElement(f,i({ref:n},s))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=g;var u={};for(var c in n)hasOwnProperty.call(n,c)&&(u[c]=n[c]);u.originalType=e,u.mdxType="string"==typeof e?e:o,i[1]=u;for(var l=2;l{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>d,frontMatter:()=>u,metadata:()=>l,toc:()=>p});var r=t(87462),o=t(63366),a=(t(67294),t(3905)),i=["components"],u={},c="2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",l={unversionedId:"action/springcloud-zuul",id:"action/springcloud-zuul",title:"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j",description:"\u5728\u57fa\u4e8enginx\u914d\u7f6e\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?",source:"@site/docs/action/springcloud-zuul.md",sourceDirName:"action",slug:"/action/springcloud-zuul",permalink:"/docs/action/springcloud-zuul",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"action",previous:{title:"2.1 Spring Cloud Gateway\u96c6\u6210Knife4j",permalink:"/docs/action/springcloud-gateway"},next:{title:"3.1 \u7b80\u5316\u6a21\u5f0f(implicit)",permalink:"/docs/action/oauth2-implicit"}},s={},p=[{value:"2.2.1 \u9879\u76ee\u7ed3\u6784",id:"221-\u9879\u76ee\u7ed3\u6784",level:2},{value:"2.2.2 \u5fae\u670d\u52a1\u6a21\u5757",id:"222-\u5fae\u670d\u52a1\u6a21\u5757",level:2},{value:"2.2.3 \u6587\u6863\u6574\u5408",id:"223-\u6587\u6863\u6574\u5408",level:2},{value:"2.2.4 \u793a\u4f8b\u6e90\u7801",id:"224-\u793a\u4f8b\u6e90\u7801",level:2}],g={toc:p};function d(e){var n=e.components,u=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},g,u,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"22-spring-cloud-zuul\u96c6\u6210knife4j"},"2.2 Spring Cloud Zuul\u96c6\u6210Knife4j"),(0,a.kt)("p",null,"\u5728\u57fa\u4e8e",(0,a.kt)("a",{parentName:"p",href:"/docs/solution/ui-front-nginx",target:null,rel:null},"nginx\u914d\u7f6e"),"\u7684\u73af\u8282,\u5176\u5b9e\u6211\u4eec\u5df2\u7ecf\u53ef\u4ee5\u5229\u7528nginx\u7684\u914d\u7f6e,\u5e2e\u52a9\u6211\u4eec\u805a\u5408\u6587\u6863\u670d\u52a1\u4e86,\u800c\u901a\u8fc7\u4ee3\u7801\u7684\u65b9\u5f0f\u8be5\u5982\u4f55\u5b9e\u73b0?"),(0,a.kt)("p",null,"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e2d,\u5404\u4e2a\u5b50\u670d\u52a1\u90fd\u662f\u5206\u6563\u7684,\u6bcf\u4e2a\u670d\u52a1\u96c6\u6210\u4e86Swagger\u6587\u6863,\u4f46\u662f\u63a5\u53e3\u5bf9\u63a5\u65f6\u9700\u8981\u5355\u72ec\u5206\u522b\u8bbf\u95ee,\u5f88\u9ebb\u70e6,\u6548\u7387\u4f4e\u4e0b,"),(0,a.kt)("p",null,"\u800cZuul\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u6b64\u96be\u9898,\u5c06\u591a\u4e2a\u5fae\u670d\u52a1\u7684Swagger\u63a5\u53e3\u805a\u5408\u5230\u4e00\u4e2a\u6587\u6863\u4e2d,\u8fd9\u6837\u6574\u4e2a\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u53ea\u4f1a\u5b58\u5728\u4e00\u4e2a\u6587\u6863\u51fa\u53e3,\u7edf\u4e00\u6587\u6863\u53e3\u5f84"),(0,a.kt)("p",null,"\u672c\u6587\u6863\u53ea\u6d89\u53ca\u5982\u4f55\u6574\u5408Swagger\u53caZuul,\u5176\u4ed6\u76f8\u5173\u77e5\u8bc6\u70b9\u8bf7\u81ea\u884c\u641c\u7d22\u89e3\u51b3."),(0,a.kt)("h2",{id:"221-\u9879\u76ee\u7ed3\u6784"},"2.2.1 \u9879\u76ee\u7ed3\u6784"),(0,a.kt)("p",null,"\u6574\u4e2a\u9879\u76ee\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"swagger-bootstrap-ui-zuul\n\u251c\u2500\u2500 service-server -- eureka\u670d\u52a1\u4e2d\u5fc3\n\u251c\u2500\u2500 service-order -- \u5fae\u670d\u52a1\u4e4b\u4e00\u8ba2\u5355\u670d\u52a1\u6a21\u5757\n\u251c\u2500\u2500 service-user -- \u5fae\u670d\u52a1\u4e4b\u4e00\u7528\u6237\u670d\u52a1\u6a21\u5757\n\u251c\u2500\u2500 service-doc -- \u6587\u6863\u4e2d\u5fc3,\u6574\u5408\u5fae\u670d\u52a1Swagger\u6587\u6863\n\n")),(0,a.kt)("p",null,"eureka\u6ce8\u518c\u670d\u52a1\u4e2d\u5fc3\u4ee5\u53ca\u5fae\u670d\u52a1\u6a21\u5757Swagger\u7684\u914d\u7f6e\u96c6\u6210\u4f7f\u7528\u8fd9\u91cc\u4e0d\u8fc7\u591a\u9a9c\u8ff0,\u548c\u5e38\u89c4\u65e0\u5f02."),(0,a.kt)("p",null,"\u6211\u4eec\u5728eureka\u670d\u52a1\u4e2d\u5fc3\u53ef\u4ee5\u770b\u5230\u6574\u4e2a\u5fae\u670d\u52a1\u6a21\u5757,\u5982\u4e0b\u56fe\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(80264).Z,width:"1339",height:"261"})),(0,a.kt)("h2",{id:"222-\u5fae\u670d\u52a1\u6a21\u5757"},"2.2.2 \u5fae\u670d\u52a1\u6a21\u5757"),(0,a.kt)("p",null,"\u8ba2\u5355\u3001\u7528\u6237\u4e24\u4e2a\u5fae\u670d\u52a1\u6a21\u5757\u914d\u7f6e\u6ca1\u6709\u4ec0\u4e48\u533a\u522b,\u90fd\u662f\u5c06\u81ea\u5df1\u7684\u670d\u52a1\u6ce8\u518c\u5230eureka\u4e2d,\u5e76\u4e14\u6bcf\u4e2a\u5fae\u670d\u52a1\u90fd\u96c6\u6210Swagger\u7684\u914d\u7f6e"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"@EnableEurekaClient\n@SpringBootApplication\npublic class ServiceUserApplication {\n\n static Logger logger= LoggerFactory.getLogger(ServiceUserApplication.class);\n //...\n\n}\n")),(0,a.kt)("p",null,"\u6b64\u5904\u9700\u8981\u6ce8\u610f\u7684\u662fSwagger\u7684\u914d\u7f6e\u4e2d,\u4e0d\u9700\u8981\u8bbe\u7f6e",(0,a.kt)("inlineCode",{parentName:"p"},"groupName"),"\u5c5e\u6027"),(0,a.kt)("p",null,"Swagger\u914d\u7f6e\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Configuration\n@EnableSwagger2\n@EnableSwaggerBootstrapUI\n@Import(BeanValidatorPluginsConfiguration.class)\npublic class SwaggerConfiguration {\n\n @Bean(value = "userApi")\n @Order(value = 1)\n public Docket groupRestApi() {\n return new Docket(DocumentationType.SWAGGER_2)\n .apiInfo(groupApiInfo())\n .select()\n .apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))\n .paths(PathSelectors.any())\n\n .build().securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.newArrayList(apiKey(),apiKey1()));\n }\n\n private ApiInfo groupApiInfo(){\n return new ApiInfoBuilder()\n .title("swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01")\n .description("
swagger-bootstrap-ui-demo RESTful APIs
")\n .termsOfServiceUrl("http://www.group.com/")\n .contact("group@qq.com")\n .version("1.0")\n .build();\n }\n\n\n\n private ApiKey apiKey() {\n return new ApiKey("BearerToken", "Authorization", "header");\n }\n private ApiKey apiKey1() {\n return new ApiKey("BearerToken1", "Authorization-x", "header");\n }\n\n private SecurityContext securityContext() {\n return SecurityContext.builder()\n .securityReferences(defaultAuth())\n .forPaths(PathSelectors.regex("/.*"))\n .build();\n }\n private SecurityContext securityContext1() {\n return SecurityContext.builder()\n .securityReferences(defaultAuth1())\n .forPaths(PathSelectors.regex("/.*"))\n .build();\n }\n\n List defaultAuth() {\n AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");\n AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];\n authorizationScopes[0] = authorizationScope;\n return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));\n }\n List defaultAuth1() {\n AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");\n AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];\n authorizationScopes[0] = authorizationScope;\n return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));\n }\n\n}\n')),(0,a.kt)("h2",{id:"223-\u6587\u6863\u6574\u5408"},"2.2.3 \u6587\u6863\u6574\u5408"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"service-doc"),"\u6a21\u5757\u662f\u6700\u7ec8\u6574\u5408user\u3001order\u4e24\u4e2a\u5fae\u670d\u52a1\u6587\u6863\u7684\u7edf\u4e00\u6587\u6863\u51fa\u53e3,\u800c\u672c\u8eab\u4e5f\u6ce8\u518c\u5230eureka\u670d\u52a1\u4e2d\u5fc3\u4e2d."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"@EnableDiscoveryClient\n@EnableEurekaClient\n@EnableZuulProxy\n@SpringBootApplication\npublic class ServiceDocApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(ServiceDocApplication.class, args);\n }\n\n}\n")),(0,a.kt)("p",null,"\u6700\u540e\u91cd\u5199SwaggerResource,\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@Component\n@Primary\npublic class SwaggerResourceConfig implements SwaggerResourcesProvider {\n\n Logger logger= LoggerFactory.getLogger(SwaggerResourceConfig.class);\n\n\n @Autowired\n RouteLocator routeLocator;\n\n @Override\n public List get() {\n //\u83b7\u53d6\u6240\u6709router\n List resources = new ArrayList<>();\n List routes = routeLocator.getRoutes();\n logger.info("Route Size:{}",routes.size());\n for (Route route:routes) {\n resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs")));\n }\n return resources;\n }\n private SwaggerResource swaggerResource(String name, String location) {\n logger.info("name:{},location:{}",name,location);\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(name);\n swaggerResource.setLocation(location);\n swaggerResource.setSwaggerVersion("2.0");\n return swaggerResource;\n }\n}\n')),(0,a.kt)("p",null,"\u6700\u7ec8\u6548\u679c\u5982\u4e0b\uff1a"),(0,a.kt)("p",null,(0,a.kt)("img",{src:t(95198).Z,width:"1362",height:"622"})),(0,a.kt)("h2",{id:"224-\u793a\u4f8b\u6e90\u7801"},"2.2.4 \u793a\u4f8b\u6e90\u7801"),(0,a.kt)("p",null,"\u4ee5\u4e0a\u6e90\u7801\u53ef\u53c2\u8003",(0,a.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"swagger-bootstrap-ui-demo"),"\u4e2d\u7684\u5b50\u9879\u76ee",(0,a.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui-zuul")))}d.isMDXComponent=!0},80264:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/eureka-a512d65c4a729b6f17d3a84c61f72839.png"},95198:(e,n,t)=>{t.d(n,{Z:()=>r});const r=t.p+"assets/images/sbu-f64117c439b81df93d37493f2c318aa5.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/43f733f1.a5105d21.js b/knife4j-doc/gitee/assets/js/43f733f1.a5105d21.js deleted file mode 100644 index f68d704d0..000000000 --- a/knife4j-doc/gitee/assets/js/43f733f1.a5105d21.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6714],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=u(n),m=a,f=d["".concat(p,".").concat(m)]||d[m]||c[m]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>m,frontMatter:()=>l,metadata:()=>u,toc:()=>c});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",u={unversionedId:"features/includeRequestParameter",id:"features/includeRequestParameter",title:"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/includeRequestParameter.md",sourceDirName:"features",slug:"/features/includeRequestParameter",permalink:"/docs/features/includeRequestParameter",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/filterRequestParameter"},next:{title:"3.13 \u641c\u7d22API\u63a5\u53e3",permalink:"/docs/features/search"}},s={},c=[{value:"3.12.1 \u8868\u5355\u8bf7\u6c42",id:"3121-\u8868\u5355\u8bf7\u6c42",level:2},{value:"3.12.2 JSON\u8bf7\u6c42",id:"3122-json\u8bf7\u6c42",level:2}],d={toc:c};function m(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"312-\u5305\u542b\u8bf7\u6c42\u53c2\u6570"},"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d,Knife4j\u63d0\u4f9b\u4e86\u5ffd\u7565\u53c2\u6570\u7684\u7279\u6027,\u8fd9\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u67d0\u4e9b\u573a\u666f\u4e2d\u5927\u5927\u63d0\u9ad8\u6587\u6863\u7684\u53ef\u53d8\u6027\u64cd\u4f5c"),(0,o.kt)("p",null,"\u4f46\u6709\u65f6\u5019\u9700\u8981\u5ffd\u7565\u7684\u53c2\u6570\u592a\u591a\u65f6,\u6211\u4eec\u9700\u8981\u5199\u5f88\u591a\u7684\u5ffd\u7565\u53c2\u6570\u5c5e\u6027,\u6b64\u65f6,\u4e00\u4e2a\u4e0e\u5ffd\u7565\u53c2\u6570\u5bf9\u7acb\u53d6\u53cd\u7684\u7279\u6027\u5c31\u663e\u5f97\u5f88\u6709\u5e2e\u52a9\u4e86"),(0,o.kt)("p",null,"\u4f7f\u7528\u81ea\u5b9a\u4e49\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"ApiOperationSupport"),"\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"includeParameters"),"\u5c5e\u6027,\u53ef\u4ee5\u5f3a\u5236\u5305\u542b\u8981\u663e\u793a\u7684\u53c2\u6570.\u53bb\u9664\u591a\u4f59\u7684\u53c2\u6570\u663e\u793a"),(0,o.kt)("p",null,"include\u7684\u89c4\u5219\u5982\u4e0b\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u4f8b\u5982\u65b0\u589e\u63a5\u53e3\u65f6,\u67d0\u5b9e\u4f53\u7c7b\u4e0d\u9700\u8981\u663e\u793aId,\u5373\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u5bf9\u53c2\u6570\u8fdb\u884c\u5ffd\u7565.",(0,o.kt)("inlineCode",{parentName:"li"},'includeParameters={"id"}')),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5c42\u6b21\u7684\u53c2\u6570\u5305\u542b\u5173\u7cfb,\u5219\u4f7f\u7528",(0,o.kt)("strong",{parentName:"li"},"\u540d\u79f0.\u5c5e\u6027"),"\u7684\u65b9\u5f0f,\u4f8b\u5982 ",(0,o.kt)("inlineCode",{parentName:"li"},'includeParameters={"uptModel.id","uptModel.uptPo.id"}'),",\u5176\u4e2duptModel\u662f\u5b9e\u4f53\u5bf9\u8c61\u53c2\u6570\u540d\u79f0,id\u4e3a\u5176\u5c5e\u6027,uptPo\u4e3a\u5b9e\u4f53\u7c7b,\u4f5c\u4e3auptModel\u7c7b\u7684\u5c5e\u6027\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},"\u4e00\u822c\u662fform\u8868\u5355\u7c7b\u7684\u8bf7\u6c42,\u4e0d\u9700\u8981\u8bbe\u7f6e\u53c2\u6570\u540d\u79f0,\u76f4\u63a5\u7ed9\u5b9a\u5c5e\u6027\u503c\u540d\u79f0\u5373\u53ef")),(0,o.kt)("h2",{id:"3121-\u8868\u5355\u8bf7\u6c42"},"3.12.1 \u8868\u5355\u8bf7\u6c42"),(0,o.kt)("p",null,"\u7b80\u5355\u8bf7\u6c42\u6bd4\u8f83\u7b80\u5355,\u4e00\u822c\u4ee5formdata\u6216\u8005x-www-form-urlencoded\u7c7b\u578b\u7684\u8bf7\u6c42\u5c45\u591a,\u9488\u5bf9\u8fd9\u79cd\u8bf7\u6c42\u7684\u53c2\u6570\u5305\u542b\u5173\u7cfb,\u6211\u4eec\u5728\u5f00\u53d1\u4e2d\u53ea\u9700\u8981\u76f4\u63a5\u5199\u4e0a\u76f8\u5e94\u7684\u5c5e\u6027\u540d\u79f0\u5373\u53ef"),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(order = 40,includeParameters = {"ignoreLabels","longUser.ids"})\n@ApiOperation(value = "\u5305\u542b\u53c2\u6570\u503c-Form\u7c7b\u578b1")\n@PostMapping("/ex1c")\npublic Rest findAllc12(IgnoreP1 ignoreP1) {\n Rest r=new Rest<>();\n r.setData(ignoreP1);\n return r;\n}\n')),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"IgnoreP1.java"),"\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'public class IgnoreP1 {\n @ApiModelProperty(value = "\u59d3\u540da\u554a",example = "\u4f60\u597d")\n private String name;\n\n @ApiModelProperty(value = "\u7528\u6237\u5217\u8868")\n private LongUser longUser;\n\n @ApiModelProperty(value = "\u6807\u7b7e\u96c6\u5408")\n private List ignoreLabels;\n //getter and setter...\n\n}\n')),(0,o.kt)("h2",{id:"3122-json\u8bf7\u6c42"},"3.12.2 JSON\u8bf7\u6c42"),(0,o.kt)("p",null,"JSON\u8bf7\u6c42\u76f8\u6bd4\u8f83\u7b80\u5355\u8bf7\u6c42\u6709\u4e00\u4e2a\u533a\u522b,\u9700\u8981\u628a\u4e00\u7ea7\u53c2\u6570\u540d\u79f0\u5e26\u4e0a"),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(order = 42,includeParameters = {"ignoreP1.ignoreLabels.code","ignoreP1.longUser.ids"})\n@ApiOperation(value = "\u5305\u542b\u53c2\u6570\u503c-JSON\u7c7b\u578b1")\n@PostMapping("/exc3")\npublic Rest findAllc3(@RequestBody IgnoreP1 ignoreP1) {\n Rest r=new Rest<>();\n r.setData(ignoreP1);\n return r;\n}\n')),(0,o.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u793a\u4f8b\u4e2d,\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON\u8bf7\u6c42\u5e94\u7528,",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreP1"),"\u5c31\u662f\u53c2\u6570\u540d\u79f0,\u5728\u5305\u542b\u8be5JSON\u4e0b\u7684\u67d0\u4e9b\u5c5e\u6027\u65f6,\u5fc5\u987b\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"includeParameters"),"\u5c5e\u6027\u4e2d\u6307\u660e"),(0,o.kt)("p",null,"\u4f8b\u5982\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreP1.longUser.ids")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/43f733f1.f923eb4f.js b/knife4j-doc/gitee/assets/js/43f733f1.f923eb4f.js new file mode 100644 index 000000000..d03b340fd --- /dev/null +++ b/knife4j-doc/gitee/assets/js/43f733f1.f923eb4f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6714],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),u=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=u(n),m=a,f=c["".concat(p,".").concat(m)]||c[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>f,frontMatter:()=>l,metadata:()=>u,toc:()=>c});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",u={unversionedId:"features/includeRequestParameter",id:"features/includeRequestParameter",title:"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/includeRequestParameter.md",sourceDirName:"features",slug:"/features/includeRequestParameter",permalink:"/docs/features/includeRequestParameter",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/filterRequestParameter"},next:{title:"3.13 \u641c\u7d22API\u63a5\u53e3",permalink:"/docs/features/search"}},s={},c=[{value:"3.12.1 \u8868\u5355\u8bf7\u6c42",id:"3121-\u8868\u5355\u8bf7\u6c42",level:2},{value:"3.12.2 JSON\u8bf7\u6c42",id:"3122-json\u8bf7\u6c42",level:2}],d={toc:c},m="wrapper";function f(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)(m,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"312-\u5305\u542b\u8bf7\u6c42\u53c2\u6570"},"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d,Knife4j\u63d0\u4f9b\u4e86\u5ffd\u7565\u53c2\u6570\u7684\u7279\u6027,\u8fd9\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u67d0\u4e9b\u573a\u666f\u4e2d\u5927\u5927\u63d0\u9ad8\u6587\u6863\u7684\u53ef\u53d8\u6027\u64cd\u4f5c"),(0,o.kt)("p",null,"\u4f46\u6709\u65f6\u5019\u9700\u8981\u5ffd\u7565\u7684\u53c2\u6570\u592a\u591a\u65f6,\u6211\u4eec\u9700\u8981\u5199\u5f88\u591a\u7684\u5ffd\u7565\u53c2\u6570\u5c5e\u6027,\u6b64\u65f6,\u4e00\u4e2a\u4e0e\u5ffd\u7565\u53c2\u6570\u5bf9\u7acb\u53d6\u53cd\u7684\u7279\u6027\u5c31\u663e\u5f97\u5f88\u6709\u5e2e\u52a9\u4e86"),(0,o.kt)("p",null,"\u4f7f\u7528\u81ea\u5b9a\u4e49\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"ApiOperationSupport"),"\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"includeParameters"),"\u5c5e\u6027,\u53ef\u4ee5\u5f3a\u5236\u5305\u542b\u8981\u663e\u793a\u7684\u53c2\u6570.\u53bb\u9664\u591a\u4f59\u7684\u53c2\u6570\u663e\u793a"),(0,o.kt)("p",null,"include\u7684\u89c4\u5219\u5982\u4e0b\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u4f8b\u5982\u65b0\u589e\u63a5\u53e3\u65f6,\u67d0\u5b9e\u4f53\u7c7b\u4e0d\u9700\u8981\u663e\u793aId,\u5373\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u5bf9\u53c2\u6570\u8fdb\u884c\u5ffd\u7565.",(0,o.kt)("inlineCode",{parentName:"li"},'includeParameters={"id"}')),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5c42\u6b21\u7684\u53c2\u6570\u5305\u542b\u5173\u7cfb,\u5219\u4f7f\u7528",(0,o.kt)("strong",{parentName:"li"},"\u540d\u79f0.\u5c5e\u6027"),"\u7684\u65b9\u5f0f,\u4f8b\u5982 ",(0,o.kt)("inlineCode",{parentName:"li"},'includeParameters={"uptModel.id","uptModel.uptPo.id"}'),",\u5176\u4e2duptModel\u662f\u5b9e\u4f53\u5bf9\u8c61\u53c2\u6570\u540d\u79f0,id\u4e3a\u5176\u5c5e\u6027,uptPo\u4e3a\u5b9e\u4f53\u7c7b,\u4f5c\u4e3auptModel\u7c7b\u7684\u5c5e\u6027\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},"\u4e00\u822c\u662fform\u8868\u5355\u7c7b\u7684\u8bf7\u6c42,\u4e0d\u9700\u8981\u8bbe\u7f6e\u53c2\u6570\u540d\u79f0,\u76f4\u63a5\u7ed9\u5b9a\u5c5e\u6027\u503c\u540d\u79f0\u5373\u53ef")),(0,o.kt)("h2",{id:"3121-\u8868\u5355\u8bf7\u6c42"},"3.12.1 \u8868\u5355\u8bf7\u6c42"),(0,o.kt)("p",null,"\u7b80\u5355\u8bf7\u6c42\u6bd4\u8f83\u7b80\u5355,\u4e00\u822c\u4ee5formdata\u6216\u8005x-www-form-urlencoded\u7c7b\u578b\u7684\u8bf7\u6c42\u5c45\u591a,\u9488\u5bf9\u8fd9\u79cd\u8bf7\u6c42\u7684\u53c2\u6570\u5305\u542b\u5173\u7cfb,\u6211\u4eec\u5728\u5f00\u53d1\u4e2d\u53ea\u9700\u8981\u76f4\u63a5\u5199\u4e0a\u76f8\u5e94\u7684\u5c5e\u6027\u540d\u79f0\u5373\u53ef"),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(order = 40,includeParameters = {"ignoreLabels","longUser.ids"})\n@ApiOperation(value = "\u5305\u542b\u53c2\u6570\u503c-Form\u7c7b\u578b1")\n@PostMapping("/ex1c")\npublic Rest findAllc12(IgnoreP1 ignoreP1) {\n Rest r=new Rest<>();\n r.setData(ignoreP1);\n return r;\n}\n')),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"IgnoreP1.java"),"\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'public class IgnoreP1 {\n @ApiModelProperty(value = "\u59d3\u540da\u554a",example = "\u4f60\u597d")\n private String name;\n\n @ApiModelProperty(value = "\u7528\u6237\u5217\u8868")\n private LongUser longUser;\n\n @ApiModelProperty(value = "\u6807\u7b7e\u96c6\u5408")\n private List ignoreLabels;\n //getter and setter...\n\n}\n')),(0,o.kt)("h2",{id:"3122-json\u8bf7\u6c42"},"3.12.2 JSON\u8bf7\u6c42"),(0,o.kt)("p",null,"JSON\u8bf7\u6c42\u76f8\u6bd4\u8f83\u7b80\u5355\u8bf7\u6c42\u6709\u4e00\u4e2a\u533a\u522b,\u9700\u8981\u628a\u4e00\u7ea7\u53c2\u6570\u540d\u79f0\u5e26\u4e0a"),(0,o.kt)("p",null,"\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(order = 42,includeParameters = {"ignoreP1.ignoreLabels.code","ignoreP1.longUser.ids"})\n@ApiOperation(value = "\u5305\u542b\u53c2\u6570\u503c-JSON\u7c7b\u578b1")\n@PostMapping("/exc3")\npublic Rest findAllc3(@RequestBody IgnoreP1 ignoreP1) {\n Rest r=new Rest<>();\n r.setData(ignoreP1);\n return r;\n}\n')),(0,o.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u793a\u4f8b\u4e2d,\u662f\u4e00\u4e2a\u6807\u51c6\u7684JSON\u8bf7\u6c42\u5e94\u7528,",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreP1"),"\u5c31\u662f\u53c2\u6570\u540d\u79f0,\u5728\u5305\u542b\u8be5JSON\u4e0b\u7684\u67d0\u4e9b\u5c5e\u6027\u65f6,\u5fc5\u987b\u5728",(0,o.kt)("inlineCode",{parentName:"p"},"includeParameters"),"\u5c5e\u6027\u4e2d\u6307\u660e"),(0,o.kt)("p",null,"\u4f8b\u5982\uff1a",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreP1.longUser.ids")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/451a3c05.73270ae2.js b/knife4j-doc/gitee/assets/js/451a3c05.73270ae2.js new file mode 100644 index 000000000..c17bbf748 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/451a3c05.73270ae2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8563],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),s=c(n),d=a,f=s["".concat(l,".").concat(d)]||s[d]||m[d]||o;return n?r.createElement(f,p(p({ref:t},u),{},{components:n})):r.createElement(f,p({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,p=new Array(o);p[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[s]="string"==typeof e?e:a,p[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),p=["components"],i={},l="3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",c={unversionedId:"features/author",id:"features/author",title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb",source:"@site/docs/features/author.md",sourceDirName:"features",slug:"/features/author",permalink:"/docs/features/author",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.2 i18n\u56fd\u9645\u5316",permalink:"/docs/features/i18n"},next:{title:"3.4 \u81ea\u5b9a\u4e49\u6587\u6863",permalink:"/docs/features/selfdocument"}},u={},s=[],m={toc:s},d="wrapper";function f(e){var t=e.components,i=(0,a.Z)(e,p);return(0,o.kt)(d,(0,r.Z)({},m,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"33-\u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005"},"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548")),(0,o.kt)("p",null,"\u6709\u65f6\u5019\u5728\u5f00\u53d1\u63a5\u53e3\u65f6,\u6211\u4eec\u5e0c\u671b\u7ed9\u8be5\u63a5\u53e3\u6dfb\u52a0\u4e00\u4e2a\u4f5c\u8005,\u8fd9\u6837\u524d\u7aef\u6216\u8005\u522b\u4e2a\u56e2\u961f\u6765\u5bf9\u63a5\u8be5\u63a5\u53e3\u65f6,\u5982\u679c\u8be5\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\u6216\u8005\u8c03\u7528\u6709\u95ee\u9898,\u90fd\u80fd\u51c6\u786e\u627e\u5230\u8be5\u4eba,\u63d0\u5347\u6548\u7387"),(0,o.kt)("p",null,"\u6dfb\u52a0\u4f5c\u8005\u9700\u8981\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport")),(0,o.kt)("p",null,"\u63a5\u53e3\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(author = "xiaoymin@foxmail.com")\n@ApiOperation(value = "\u5199\u6587\u6863\u6ce8\u91ca\u6211\u662f\u8ba4\u771f\u7684")\n@GetMapping("/getRealDoc")\npublic Rest getRealDoc(){\n Rest r=new Rest<>();\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n r.setData(new RealDescription());\n return r;\n}\n')),(0,o.kt)("p",null,"\u5728\u6587\u6863\u4e2d\u663e\u793a\u6548\u679c\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(11968).Z,width:"970",height:"266"})),(0,o.kt)("p",null,"\u57282.0.3\u7248\u672c\u4e2d,\u6536\u5230\u5f00\u53d1\u8005\u53cd\u9988\u5e0c\u671b\u80fd\u5728Controller\u4e0a\u589e\u52a0\u4f5c\u8005\u7684\u6ce8\u89e3"),(0,o.kt)("p",null,"\u6240\u4ee3\u8868\u7684\u610f\u601d\u662f\u8be5Controller\u6a21\u5757\u4e0b\u6240\u6709\u7684\u63a5\u53e3\u90fd\u662f\u8be5\u4f5c\u8005\u8d1f\u8d23\u5f00\u53d1,\u5f53\u7136\u7528@ApiOperationSupport\u7684\u6ce8\u89e3\u4e5f\u80fd\u8986\u76d6"),(0,o.kt)("p",null,"\u56e0\u6b64,\u57282.0.3\u7248\u672c\u4e2d\u65b0\u589e\u52a0\u4e86",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiSupport"),"\u6ce8\u89e3,\u8be5\u6ce8\u89e3\u76ee\u524d\u6709\u4e24\u4e2a\u5c5e\u6027,\u5206\u522b\u662fauthor(\u4f5c\u8005)\u548corder(\u6392\u5e8f)"),(0,o.kt)("p",null,"\u4f7f\u7528\u4ee3\u7801\u793a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@Api(tags = "2.0.3\u7248\u672c-20200312")\n@ApiSupport(author = "xiaoymin@foxmail.com",order = 284)\n@RestController\n@RequestMapping("/api/nxew203")\npublic class Api203Constroller {\n \n \n}\n')),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(59099).Z,width:"927",height:"183"})),(0,o.kt)("p",null,"\u5728\u6587\u6863\u4e2d\u663e\u793a\u6548\u679c\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(11968).Z,width:"970",height:"266"})),(0,o.kt)("p",null," \u5f00\u53d1\u8005\u5982\u679c\u9047\u5230\u6392\u5e8f\u4e0d\u751f\u6548\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u63a5\u53e3\u8fd4\u56de\u7684OpenAPI\u89c4\u8303\u4e2d\uff0c\u5206\u7ec4",(0,o.kt)("inlineCode",{parentName:"p"},"path"),"\u8282\u70b9\u4e0b\u662f\u5426\u5305\u542b",(0,o.kt)("inlineCode",{parentName:"p"},"x-author"),"\u7684\u6269\u5c55\u5c5e\u6027"))}f.isMDXComponent=!0},11968:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/debug-3-4fc3752c8c435178e915c993ab68d4ca.png"},59099:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/author-a06719c02ec35d2099188f7c1c8bd0de.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/451a3c05.d44521f2.js b/knife4j-doc/gitee/assets/js/451a3c05.d44521f2.js deleted file mode 100644 index fb7294adf..000000000 --- a/knife4j-doc/gitee/assets/js/451a3c05.d44521f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8563],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(l,".").concat(d)]||m[d]||s[d]||o;return n?r.createElement(f,p(p({ref:t},u),{},{components:n})):r.createElement(f,p({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,p=new Array(o);p[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:a,p[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),p=["components"],i={},l="3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",c={unversionedId:"features/author",id:"features/author",title:"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb",source:"@site/docs/features/author.md",sourceDirName:"features",slug:"/features/author",permalink:"/docs/features/author",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.2 i18n\u56fd\u9645\u5316",permalink:"/docs/features/i18n"},next:{title:"3.4 \u81ea\u5b9a\u4e49\u6587\u6863",permalink:"/docs/features/selfdocument"}},u={},s=[],m={toc:s};function d(e){var t=e.components,i=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,r.Z)({},m,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"33-\u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005"},"3.3 \u63a5\u53e3\u6dfb\u52a0\u4f5c\u8005"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.7\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548")),(0,o.kt)("p",null,"\u6709\u65f6\u5019\u5728\u5f00\u53d1\u63a5\u53e3\u65f6,\u6211\u4eec\u5e0c\u671b\u7ed9\u8be5\u63a5\u53e3\u6dfb\u52a0\u4e00\u4e2a\u4f5c\u8005,\u8fd9\u6837\u524d\u7aef\u6216\u8005\u522b\u4e2a\u56e2\u961f\u6765\u5bf9\u63a5\u8be5\u63a5\u53e3\u65f6,\u5982\u679c\u8be5\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\u6216\u8005\u8c03\u7528\u6709\u95ee\u9898,\u90fd\u80fd\u51c6\u786e\u627e\u5230\u8be5\u4eba,\u63d0\u5347\u6548\u7387"),(0,o.kt)("p",null,"\u6dfb\u52a0\u4f5c\u8005\u9700\u8981\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j"),"\u63d0\u4f9b\u7684\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport")),(0,o.kt)("p",null,"\u63a5\u53e3\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperationSupport(author = "xiaoymin@foxmail.com")\n@ApiOperation(value = "\u5199\u6587\u6863\u6ce8\u91ca\u6211\u662f\u8ba4\u771f\u7684")\n@GetMapping("/getRealDoc")\npublic Rest getRealDoc(){\n Rest r=new Rest<>();\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n r.setData(new RealDescription());\n return r;\n}\n')),(0,o.kt)("p",null,"\u5728\u6587\u6863\u4e2d\u663e\u793a\u6548\u679c\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(11968).Z,width:"970",height:"266"})),(0,o.kt)("p",null,"\u57282.0.3\u7248\u672c\u4e2d,\u6536\u5230\u5f00\u53d1\u8005\u53cd\u9988\u5e0c\u671b\u80fd\u5728Controller\u4e0a\u589e\u52a0\u4f5c\u8005\u7684\u6ce8\u89e3"),(0,o.kt)("p",null,"\u6240\u4ee3\u8868\u7684\u610f\u601d\u662f\u8be5Controller\u6a21\u5757\u4e0b\u6240\u6709\u7684\u63a5\u53e3\u90fd\u662f\u8be5\u4f5c\u8005\u8d1f\u8d23\u5f00\u53d1,\u5f53\u7136\u7528@ApiOperationSupport\u7684\u6ce8\u89e3\u4e5f\u80fd\u8986\u76d6"),(0,o.kt)("p",null,"\u56e0\u6b64,\u57282.0.3\u7248\u672c\u4e2d\u65b0\u589e\u52a0\u4e86",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiSupport"),"\u6ce8\u89e3,\u8be5\u6ce8\u89e3\u76ee\u524d\u6709\u4e24\u4e2a\u5c5e\u6027,\u5206\u522b\u662fauthor(\u4f5c\u8005)\u548corder(\u6392\u5e8f)"),(0,o.kt)("p",null,"\u4f7f\u7528\u4ee3\u7801\u793a\u4f8b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@Api(tags = "2.0.3\u7248\u672c-20200312")\n@ApiSupport(author = "xiaoymin@foxmail.com",order = 284)\n@RestController\n@RequestMapping("/api/nxew203")\npublic class Api203Constroller {\n \n \n}\n')),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(59099).Z,width:"927",height:"183"})),(0,o.kt)("p",null,"\u5728\u6587\u6863\u4e2d\u663e\u793a\u6548\u679c\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(11968).Z,width:"970",height:"266"})),(0,o.kt)("p",null," \u5f00\u53d1\u8005\u5982\u679c\u9047\u5230\u6392\u5e8f\u4e0d\u751f\u6548\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u63a5\u53e3\u8fd4\u56de\u7684OpenAPI\u89c4\u8303\u4e2d\uff0c\u5206\u7ec4",(0,o.kt)("inlineCode",{parentName:"p"},"path"),"\u8282\u70b9\u4e0b\u662f\u5426\u5305\u542b",(0,o.kt)("inlineCode",{parentName:"p"},"x-author"),"\u7684\u6269\u5c55\u5c5e\u6027"))}d.isMDXComponent=!0},11968:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/debug-3-4fc3752c8c435178e915c993ab68d4ca.png"},59099:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/author-a06719c02ec35d2099188f7c1c8bd0de.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4ba84b5e.7b37b182.js b/knife4j-doc/gitee/assets/js/4ba84b5e.7b37b182.js deleted file mode 100644 index b68661c60..000000000 --- a/knife4j-doc/gitee/assets/js/4ba84b5e.7b37b182.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; (self.webpackChunk = self.webpackChunk || []).push([[5073], { 3905: (e, n, t) => { t.d(n, { Zo: () => u, kt: () => g }); var a = t(67294); function r(e, n, t) { return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e } function l(e, n) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var a = Object.getOwnPropertySymbols(e); n && (a = a.filter((function (n) { return Object.getOwnPropertyDescriptor(e, n).enumerable }))), t.push.apply(t, a) } return t } function i(e) { for (var n = 1; n < arguments.length; n++) { var t = null != arguments[n] ? arguments[n] : {}; n % 2 ? l(Object(t), !0).forEach((function (n) { r(e, n, t[n]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : l(Object(t)).forEach((function (n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n)) })) } return e } function o(e, n) { if (null == e) return {}; var t, a, r = function (e, n) { if (null == e) return {}; var t, a, r = {}, l = Object.keys(e); for (a = 0; a < l.length; a++)t = l[a], n.indexOf(t) >= 0 || (r[t] = e[t]); return r }(e, n); if (Object.getOwnPropertySymbols) { var l = Object.getOwnPropertySymbols(e); for (a = 0; a < l.length; a++)t = l[a], n.indexOf(t) >= 0 || Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]) } return r } var p = a.createContext({}), d = function (e) { var n = a.useContext(p), t = n; return e && (t = "function" == typeof e ? e(n) : i(i({}, n), e)), t }, u = function (e) { var n = d(e.components); return a.createElement(p.Provider, { value: n }, e.children) }, s = { inlineCode: "code", wrapper: function (e) { var n = e.children; return a.createElement(a.Fragment, {}, n) } }, c = a.forwardRef((function (e, n) { var t = e.components, r = e.mdxType, l = e.originalType, p = e.parentName, u = o(e, ["components", "mdxType", "originalType", "parentName"]), c = d(t), g = r, m = c["".concat(p, ".").concat(g)] || c[g] || s[g] || l; return t ? a.createElement(m, i(i({ ref: n }, u), {}, { components: t })) : a.createElement(m, i({ ref: n }, u)) })); function g(e, n) { var t = arguments, r = n && n.mdxType; if ("string" == typeof e || r) { var l = t.length, i = new Array(l); i[0] = c; var o = {}; for (var p in n) hasOwnProperty.call(n, p) && (o[p] = n[p]); o.originalType = e, o.mdxType = "string" == typeof e ? e : r, i[1] = o; for (var d = 2; d < l; d++)i[d] = t[d]; return a.createElement.apply(null, i) } return a.createElement.apply(null, t) } c.displayName = "MDXCreateElement" }, 91940: (e, n, t) => { t.r(n), t.d(n, { assets: () => u, contentTitle: () => p, default: () => g, frontMatter: () => o, metadata: () => d, toc: () => s }); var a = t(87462), r = t(63366), l = (t(67294), t(3905)), i = ["components"], o = {}, p = "Spring Cloud Gateway\u7f51\u5173\u805a\u5408", d = { unversionedId: "middleware-sources/spring-cloud-gateway/spring-gateway-introduction", id: "middleware-sources/spring-cloud-gateway/spring-gateway-introduction", title: "Spring Cloud Gateway\u7f51\u5173\u805a\u5408", description: "\u7b80\u4ecb", source: "@site/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.md", sourceDirName: "middleware-sources/spring-cloud-gateway", slug: "/middleware-sources/spring-cloud-gateway/spring-gateway-introduction", permalink: "/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction", draft: !1, tags: [], version: "current", lastUpdatedBy: "xiaoyumin", lastUpdatedAt: 1680398489, formattedLastUpdatedAt: "2023\u5e744\u67082\u65e5", frontMatter: {}, sidebar: "middleware-sources", previous: { title: "\u4e2d\u95f4\u4ef6\u4ecb\u7ecd", permalink: "/docs/middleware-sources/" }, next: { title: "Spring Webflux\u96c6\u6210", permalink: "/docs/middleware-sources/spring-webflux/spring-webflux-introduction" } }, u = {}, s = [{ value: "\u7b80\u4ecb", id: "\u7b80\u4ecb", level: 2 }, { value: "\u4f7f\u7528", id: "\u4f7f\u7528", level: 2 }, { value: "\u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)", id: "\u624b\u52a8\u914d\u7f6e\u805a\u5408manual", level: 3 }, { value: "\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f(discover)", id: "\u670d\u52a1\u53d1\u73b0\u6a21\u5f0fdiscover", level: 3 }, { value: "\u914d\u7f6e\u5c5e\u6027", id: "\u914d\u7f6e\u5c5e\u6027", level: 4 }, { value: "\u573a\u666fcase", id: "\u573a\u666fcase", level: 4 }, { value: "\u8bbf\u95ee\u5730\u5740", id: "\u8bbf\u95ee\u5730\u5740", level: 4 }], c = { toc: s }; function g(e) { var n = e.components, t = (0, r.Z)(e, i); return (0, l.kt)("wrapper", (0, a.Z)({}, c, t, { components: n, mdxType: "MDXLayout" }), (0, l.kt)("h1", { id: "spring-cloud-gateway\u7f51\u5173\u805a\u5408" }, "Spring Cloud Gateway\u7f51\u5173\u805a\u5408"), (0, l.kt)("h2", { id: "\u7b80\u4ecb" }, "\u7b80\u4ecb"), (0, l.kt)("admonition", { type: "tip" }, (0, l.kt)("p", { parentName: "admonition" }, "1\u3001Knife4j \u5728", (0, l.kt)("a", { parentName: "p", href: "../../upgrading/upgrading-to-v4", target: null, rel: null }, "v4.0"), "\u7248\u672c\u63d0\u4f9b\u4e86\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173\u805a\u5408\u6587\u6863\u7684\u4e2d\u95f4\u4ef6"), (0, l.kt)("p", { parentName: "admonition" }, "2\u3001\u5728\u4f7f\u7528\u8be5\u7ec4\u4ef6\u65f6\uff0c\u5982\u679c\u5f00\u53d1\u8005\u5728\u7f51\u5173\u5c42\u9762\u505a\u4e86\u9274\u6743\u7b49\u64cd\u4f5c\uff0c\u9700\u8981\u628aUi\u8d44\u6e90\u4ee5\u53ca\u76f8\u5173\u7684API\u63a5\u53e3\u653e\u5f00\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u65e0\u6cd5\u8bbf\u95ee\u7684\u60c5\u51b5\uff0c\u653e\u5f00\u8d44\u6e90\u6e05\u5355\u53ef\u4ee5", (0, l.kt)("a", { parentName: "p", href: "../../features/accessControl", target: null, rel: null }, "\u53c2\u8003\u6587\u6863"))), (0, l.kt)("p", null, "\u81ea4.0\u7248\u672c\u540e,Knife4j\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9488\u5bf9\u5728Spring Cloud Gateway\u7f51\u5173\u8fdb\u884c\u805a\u5408\u7684\u7ec4\u4ef6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u57fa\u4e8e\u6b64\u7ec4\u4ef6\u8f7b\u677e\u7684\u805a\u5408\u5404\u4e2a\u5b50\u670d\u52a1\u7684OpenAPI\u6587\u6863"), (0, l.kt)("p", null, "\u503c\u5f97\u6ce8\u610f\u7684\u4e8b\u9879\uff1a"), (0, l.kt)("ul", null, (0, l.kt)("li", { parentName: "ul" }, "\u751f\u4ea7\u73af\u5883\u4e0a\u7ebf\u65f6\uff0c\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7\u914d\u7f6e", (0, l.kt)("inlineCode", { parentName: "li" }, "knife4j.gateway.enabled: false"), "\u8fdb\u884c\u5173\u95ed,\u907f\u514d\u63a5\u53e3\u6cc4\u6f0f\uff0c\u9020\u6210\u5b89\u5168\u95ee\u9898"), (0, l.kt)("li", { parentName: "ul" }, "\u652f\u6301\u670d\u52a1\u53d1\u73b0", (0, l.kt)("inlineCode", { parentName: "li" }, "knife4j.gateway.discover.enabled: true"), ",\u8be5\u5c5e\u6027", (0, l.kt)("a", { parentName: "li", href: "https://gitee.com/xiaoym/knife4j/milestones/181381", target: "_blank", rel: "noopener" }, "4.1.0"), "\u540e\u65b0\u589e"), (0, l.kt)("li", { parentName: "ul" }, "\u670d\u52a1\u53d1\u73b0\u4e2d\u6ce8\u610f\u6392\u9664\u7f51\u5173\u670d\u52a1")), (0, l.kt)("h2", { id: "\u4f7f\u7528" }, "\u4f7f\u7528"), (0, l.kt)("p", null, "Maven\u5750\u6807\u5982\u4e0b\uff1a"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-xml" }, "\n com.github.xiaoymin\n knife4j-gateway-spring-boot-starter\n 4.3.0\n\n")), (0, l.kt)("h3", { id: "\u624b\u52a8\u914d\u7f6e\u805a\u5408manual" }, "\u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)"), (0, l.kt)("p", null, "\u624b\u52a8\u914d\u7f6e\u805a\u5408\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Cloud Gateway\u7f51\u5173\u7684yml\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u5373\u53ef\u3002"), (0, l.kt)("p", null, "\u5728", (0, l.kt)("inlineCode", { parentName: "p" }, "application.yml"), "\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u8def\u7531\u89c4\u5219(\u8be5\u914d\u7f6e\u53ef\u4ee5\u914d\u7f6e\u5728Nacos\u914d\u7f6e\u4e2d\u5fc3\u4e2d\uff0c\u5b9e\u65f6\u751f\u6548)\uff0c\u914d\u7f6e\u89c4\u5219\u5982\u4e0b\uff1a"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "\nknife4j:\n # \u805a\u5408swagger\u6587\u6863\n gateway:\n enabled: true\n # \u6307\u5b9a\u624b\u52a8\u914d\u7f6e\u7684\u6a21\u5f0f(\u9ed8\u8ba4\u4e3a\u8be5\u6a21\u5f0f)\n strategy: manual\n routes:\n - name: \u7528\u6237\u670d\u52a1\n # \u771f\u5b9e\u5b50\u670d\u52a1\u8bbf\u95eeurl\u5730\u5740-\u63d0\u4f9bOpenAPI\u7684\u6587\u6863\n url: /user-service/v2/api-docs?group=default\n service-name: user-service\n # \u8def\u7531\u524d\u7f00\n # \u517c\u5bb9OpenAPI3\u89c4\u8303\u5728\u805a\u5408\u65f6\u4e22\u5931contextPath\u5c5e\u6027\u7684\u5f02\u5e38\u60c5\u51b5\uff0c\u7531\u5f00\u53d1\u8005\u81ea\u5df1\u914d\u7f6econtextPath,Knife4j\u7684\u524d\u7aefUi\u505a\u517c\u5bb9\u5904\u7406,\u4e0eurl\u5c5e\u6027\u72ec\u7acb\u4e0d\u51b2\u7a81\uff0c\u4ec5OpenAPI3\u89c4\u8303\u805a\u5408\u9700\u8981\uff0cOpenAPI2\u89c4\u8303\u4e0d\u9700\u8981\u8bbe\u7f6e\u6b64\u5c5e\u6027,\u9ed8\u8ba4\u4e3a(apiPathPrefix)\n context-path: /\n order: 2\n - name: \u8ba2\u5355\u670d\u52a1\n url: /order-service/v2/api-docs?group=default\n service-name: order-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n order: 3\n\n")), (0, l.kt)("p", null, "\u914d\u7f6e\u5c5e\u6027\u8bf4\u660e\uff1a"), (0, l.kt)("table", null, (0, l.kt)("thead", { parentName: "table" }, (0, l.kt)("tr", { parentName: "thead" }, (0, l.kt)("th", { parentName: "tr", align: "left" }, "\u914d\u7f6e\u5c5e\u6027\u540d\u79f0"), (0, l.kt)("th", { parentName: "tr", align: null }, "\u7c7b\u578b"), (0, l.kt)("th", { parentName: "tr", align: null }, "\u63cf\u8ff0"), (0, l.kt)("th", { parentName: "tr", align: null }, "\u9ed8\u8ba4\u503c"))), (0, l.kt)("tbody", { parentName: "table" }, (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.enabled")), (0, l.kt)("td", { parentName: "tr", align: null }, "boolean"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u662f\u5426\u5f00\u542f\u4f7f\u7528Gateway\u7f51\u5173\u805a\u5408\u7ec4\u4ef6"), (0, l.kt)("td", { parentName: "tr", align: null }, (0, l.kt)("inlineCode", { parentName: "td" }, "false"))), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.strategy")), (0, l.kt)("td", { parentName: "tr", align: null }, "enum"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u805a\u5408\u7684\u7b56\u7565\uff0c\u4e3b\u8981\u652f\u6301\u4e24\u79cd\uff0c\u5206\u522b\u662f\u624b\u52a8\u914d\u7f6e(", (0, l.kt)("inlineCode", { parentName: "td" }, "manual"), ")\u3001\u670d\u52a1\u53d1\u73b0(", (0, l.kt)("inlineCode", { parentName: "td" }, "discover"), ")"), (0, l.kt)("td", { parentName: "tr", align: null }, (0, l.kt)("inlineCode", { parentName: "td" }, "manual"))), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes")), (0, l.kt)("td", { parentName: "tr", align: null }, "array{Router}"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u901a\u8fc7\u8def\u7531\u6ce8\u518c\u6587\u6863"), (0, l.kt)("td", { parentName: "tr", align: null })), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes[0].name")), (0, l.kt)("td", { parentName: "tr", align: null }, "string"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u754c\u9762\u663e\u793a\u5206\u7ec4\u540d\u79f0"), (0, l.kt)("td", { parentName: "tr", align: null }, (0, l.kt)("inlineCode", { parentName: "td" }, "null"))), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes[0].url")), (0, l.kt)("td", { parentName: "tr", align: null }, "string"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u6587\u6863\u5730\u5740"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u5b50\u670d\u52a1\u7684Swagger\u8d44\u6e90\u63a5\u53e3\u5730\u5740(Swagger2\u9ed8\u8ba4/v2/api-docs,\u53ea\u9700\u8981\u914d\u7f6egroup\u53c2\u6570\u5373\u53ef)\uff0c\u56e0\u4e3a\u662f\u4ece\u7f51\u5173\u5c42\u8d70\uff0c\u5f00\u53d1\u8005\u914d\u7f6e\u65f6\u522b\u5fd8\u8bb0\u4e86\u7f51\u5173\u524d\u7f00\u5730\u5740\u3002")), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes[0].service-name")), (0, l.kt)("td", { parentName: "tr", align: null }, "string"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u8bbf\u95ee\u670d\u52a1\u540d\u79f0"), (0, l.kt)("td", { parentName: "tr", align: null }, (0, l.kt)("inlineCode", { parentName: "td" }, "null"))), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes[0].order")), (0, l.kt)("td", { parentName: "tr", align: null }, "int"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u6392\u5e8f"), (0, l.kt)("td", { parentName: "tr", align: null }, "0")), (0, l.kt)("tr", { parentName: "tbody" }, (0, l.kt)("td", { parentName: "tr", align: "left" }, (0, l.kt)("inlineCode", { parentName: "td" }, "knife4j.gateway.routes[0].context-path")), (0, l.kt)("td", { parentName: "tr", align: null }, "string"), (0, l.kt)("td", { parentName: "tr", align: null }, "\u8def\u7531\u524d\u7f00,\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u81ea\u884c\u914d\u7f6e"), (0, l.kt)("td", { parentName: "tr", align: null }, "/")))), (0, l.kt)("h3", { id: "\u670d\u52a1\u53d1\u73b0\u6a21\u5f0fdiscover" }, "\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f(discover)"), (0, l.kt)("p", null, "\u5982\u679c\u5b50\u670d\u52a1\u975e\u5e38\u591a\u7684\u60c5\u51b5\u4e0b\uff0c\u90a3\u4e48\u624b\u52a8\u914d\u7f6e\u5c31\u4f1a\u663e\u5f97\u5f88\u7d2f\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\uff0c\u81ea\u52a8\u4ece\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408\u6587\u6863\uff0c\u4e0d\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\uff0c\u6709\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\uff1a"), (0, l.kt)("admonition", { title: "\u6ce8\u610f\u4e8b\u9879", type: "danger" }, (0, l.kt)("ul", { parentName: "admonition" }, (0, l.kt)("li", { parentName: "ul" }, "\u5b50\u670d\u52a1\u5fc5\u987b\u7edf\u4e00\u89c4\u8303\u5b9e\u73b0\uff0c\u7edf\u4e00\u4f7f\u7528OpenAPI2\u6216\u8005OpenAPI3\u7684\u7248\u672c"), (0, l.kt)("li", { parentName: "ul" }, "\u5b50\u670d\u52a1\u9700\u8981\u63d0\u4f9b\u9ed8\u8ba4", (0, l.kt)("inlineCode", { parentName: "li" }, "default"), "\u5206\u7ec4\uff0c\u8be5\u5206\u7ec4\u662f\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408\u7684url"))), (0, l.kt)("h4", { id: "\u914d\u7f6e\u5c5e\u6027" }, "\u914d\u7f6e\u5c5e\u6027"), (0, l.kt)("p", null, "\u5728\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\u7684\u914d\u7f6e\u5c5e\u6027\u5982\u4e0b\uff1a"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "knife4j:\n gateway:\n # \u662f\u5426\u5f00\u542f\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4`default`\u5206\u7ec4\n strategy: discover\n # \u5b50\u670d\u52a1\u5b58\u5728\u5176\u4ed6\u5206\u7ec4\u60c5\u51b5\uff0c\u805a\u5408\u5176\u4ed6\u5206\u7ec4\uff0c\u53ea\u80fd\u624b\u52a8\u914d\u7f6e\n routes:\n - name: \u7528\u6237\u670d\u52a1-1\n # \u5b50\u670d\u52a1\u5b58\u5728\u5176\u4ed6\u5206\u7ec4\u60c5\u51b5\uff0c\u805a\u5408\u5176\u4ed6\u5206\u7ec4\n url: /user-service/v2/api-docs?group=\u7528\u6237\u670d\u52a1\n # \u670d\u52a1\u540d\u79f0(Optional)\n service-name: user-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n # \u6392\u5e8f\n order: 2\n - name: \u8ba2\u5355\u670d\u52a1-2\n url: /order-service/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1\n service-name: order-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n order: 3\n # \u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u7684\u914d\u7f6e\n discover:\n # \u5f00\u542f\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(swagger2|openapi3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1) \n excluded-services:\n - gateway-service\n # \u5982\u679c\u5b50\u670d\u52a1\u662fOpenAPI3\uff0c\u5e76\u4e14\u6709\u4e2a\u6027\u5316\u914d\u7f6e\n oas3:\n url: /v3/api-docs?group=default\n oauth2-redirect-url: ''\n validator-url: ''\n # \u5982\u4f55\u5b50\u670d\u52a1\u662fSwagger2\uff0c\u5e76\u4e14\u4e2a\u6027\u5316\u914d\u7f6e\n swagger2:\n url: /v2/api-docs?group=default\n # \u5355\u4e2a\u670d\u52a1\u7684\u4e2a\u6027\u5316\u914d\u7f6e\uff0ckey-\u670d\u52a1\u540d\u79f0\uff0cvalue-\u914d\u7f6e\u4fe1\u606f\n service-config:\n # \u5047\u8bbeorder\u670d\u52a1(\u5177\u4f53\u771f\u5b9e\u670d\u52a1\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u60c5\u51b5\u914d\u7f6e)\n order-service:\n # \u8be5\u670d\u52a1\u7684\u6392\u5e8f\n order: 0\n # \u5206\u7ec4\u663e\u793a\u540d\u79f0\n group-name: \u8ba2\u5355\u670d\u52a1\u540d\u79f0\n # \u517c\u5bb9OpenAPI3\u89c4\u8303\u5728\u805a\u5408\u65f6\u4e22\u5931contextPath\u5c5e\u6027\u7684\u5f02\u5e38\u60c5\u51b5\uff0c\u7531\u5f00\u53d1\u8005\u81ea\u5df1\u914d\u7f6econtextPath,Knife4j\u7684\u524d\u7aefUi\u505a\u517c\u5bb9\u5904\u7406,\u4e0eurl\u5c5e\u6027\u72ec\u7acb\u4e0d\u51b2\u7a81\uff0c\u4ec5OpenAPI3\u89c4\u8303\u805a\u5408\u9700\u8981\uff0cOpenAPI2\u89c4\u8303\u4e0d\u9700\u8981\u8bbe\u7f6e\u6b64\u5c5e\u6027,\u9ed8\u8ba4\u4e3a(apiPathPrefix)\n context-path: /\n\n\n")), (0, l.kt)("h4", { id: "\u573a\u666fcase" }, "\u573a\u666fcase"), (0, l.kt)("p", null, "2.1 \u6240\u6709\u5b50\u670d\u52a1\u5168\u90e8\u662fOpenAPI3\u89c4\u8303"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4`default`\u5206\u7ec4\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n\n")), (0, l.kt)("p", null, "2.2 \u6240\u6709\u5b50\u670d\u52a1\u5168\u90e8\u662fSwagger2\u89c4\u8303\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4", (0, l.kt)("inlineCode", { parentName: "p" }, "default"), "\u5206\u7ec4"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : swagger2\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n")), (0, l.kt)("p", null, "2.3 \u5b50\u670d\u52a1\u4e2d\u9664\u4e86", (0, l.kt)("inlineCode", { parentName: "p" }, "default"), "\u5206\u7ec4\uff0c\u8fd8\u6709\u522b\u7684\u5206\u7ec4\uff0c\u6d4b\u8bd5\uff0c\u6211\u4eec\u9700\u8981\u5355\u72ec\u805a\u5408(\u56e0\u4e3adiscover\u6a21\u5f0f\u53ea\u805a\u5408\u9ed8\u8ba4)\uff0c\u6b64\u65f6\uff0c\u5219\u590d\u7528", (0, l.kt)("inlineCode", { parentName: "p" }, "routes"), "\u81ea\u5b9a\u4e49\u5c5e\u6027"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : swagger2\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n # \u4e2a\u6027\u5316\u5b9a\u5236\u7684\u90e8\u5206\u5b50\u670d\u52a1\u5206\u7ec4\u60c5\u51b5 \n routes:\n - name: \u7528\u6237\u670d\u52a1\n service-name: user-service\n url: /user/v2/api-docs?group=\u7ec4\u7ec7\u7ba1\u7406\n order: 1\n - name: \u8ba2\u5355\u670d\u52a1\n service-name: order-service\n url: /order/v2/api-docs?group=\u8ba2\u5355\u7ba1\u7406\n order: 1\n")), (0, l.kt)("p", null, "2.4 \u5728discover\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\uff0c\u5982\u679c\u6211\u4eec\u5e0c\u671b\u5bf9\u805a\u5408\u8d77\u6765\u7684\u5fae\u670d\u52a1\u63d0\u4f9b\u4e00\u4e9b\u4e2a\u6027\u5316\u914d\u7f6e\uff0c\u4f8b\u5982\uff1a\u6392\u5e8f\u3001\u5206\u7ec4\u91cd\u547d\u540d\u3001context-path\u914d\u7f6e\u7b49\u7b49\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u670d\u52a1\u914d\u7f6e\u5bf9\u6bcf\u4e2a\u670d\u52a1\u8fdb\u884c\u914d\u7f6e\uff0c\u5982\u4e0b\uff1a"), (0, l.kt)("pre", null, (0, l.kt)("code", { parentName: "pre", className: "language-yml" }, "knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n # \u5404\u4e2a\u805a\u5408\u670d\u52a1\u7684\u4e2a\u6027\u5316\u914d\u7f6e\uff0ckey:\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u7684\u670d\u52a1\u540d\u79f0\uff0cvalue\uff1a\u4e2a\u6027\u5316\u914d\u7f6e\n service-config:\n user-service:\n # \u6392\u5e8f\n order: 1\n # \u524d\u7aef\u663e\u793a\u540d\u79f0\n group-name : \u7528\u6237\u670d\u52a1\n # \u91cd\u65b0\u6307\u5b9abasePath\uff0c\u4e00\u822c\u5728OpenAPI3\u89c4\u8303\u4e2d\u9700\u8981\n context-path: /user\n order-service:\n # \u6392\u5e8f\n order: 2\n # \u524d\u7aef\u663e\u793a\u540d\u79f0\n group-name : \u8ba2\u5355\u670d\u52a1\n # \u91cd\u65b0\u6307\u5b9abasePath\uff0c\u4e00\u822c\u5728OpenAPI3\u89c4\u8303\u4e2d\u9700\u8981\n context-path: /order\n")), (0, l.kt)("h4", { id: "\u8bbf\u95ee\u5730\u5740" }, "\u8bbf\u95ee\u5730\u5740"), (0, l.kt)("p", null, "http://{gateway.host}:{gateway.port}/doc.html")) } g.isMDXComponent = !0 } }]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4ba84b5e.c9a3c6b9.js b/knife4j-doc/gitee/assets/js/4ba84b5e.c9a3c6b9.js new file mode 100644 index 000000000..add5ce0e2 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4ba84b5e.c9a3c6b9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5073],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p=a.createContext({}),d=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=d(e.components);return a.createElement(p.Provider,{value:n},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},g=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),s=d(t),g=r,m=s["".concat(p,".").concat(g)]||s[g]||c[g]||l;return t?a.createElement(m,i(i({ref:n},u),{},{components:t})):a.createElement(m,i({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=g;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o[s]="string"==typeof e?e:r,i[1]=o;for(var d=2;d{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>s});var a=t(87462),r=t(63366),l=(t(67294),t(3905)),i=["components"],o={},p="Spring Cloud Gateway\u7f51\u5173\u805a\u5408",d={unversionedId:"middleware-sources/spring-cloud-gateway/spring-gateway-introduction",id:"middleware-sources/spring-cloud-gateway/spring-gateway-introduction",title:"Spring Cloud Gateway\u7f51\u5173\u805a\u5408",description:"\u7b80\u4ecb",source:"@site/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.md",sourceDirName:"middleware-sources/spring-cloud-gateway",slug:"/middleware-sources/spring-cloud-gateway/spring-gateway-introduction",permalink:"/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1691914117,formattedLastUpdatedAt:"2023\u5e748\u670813\u65e5",frontMatter:{},sidebar:"middleware-sources",previous:{title:"\u4e2d\u95f4\u4ef6\u4ecb\u7ecd",permalink:"/docs/middleware-sources/"},next:{title:"Spring Webflux\u96c6\u6210",permalink:"/docs/middleware-sources/spring-webflux/spring-webflux-introduction"}},u={},s=[{value:"\u7b80\u4ecb",id:"\u7b80\u4ecb",level:2},{value:"\u4f7f\u7528",id:"\u4f7f\u7528",level:2},{value:"\u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)",id:"\u624b\u52a8\u914d\u7f6e\u805a\u5408manual",level:3},{value:"\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f(discover)",id:"\u670d\u52a1\u53d1\u73b0\u6a21\u5f0fdiscover",level:3},{value:"\u914d\u7f6e\u5c5e\u6027",id:"\u914d\u7f6e\u5c5e\u6027",level:4},{value:"\u6392\u9664\u670d\u52a1",id:"\u6392\u9664\u670d\u52a1",level:4},{value:"\u573a\u666fcase",id:"\u573a\u666fcase",level:4},{value:"\u8bbf\u95ee\u5730\u5740",id:"\u8bbf\u95ee\u5730\u5740",level:4}],c={toc:s},g="wrapper";function m(e){var n=e.components,t=(0,r.Z)(e,i);return(0,l.kt)(g,(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"spring-cloud-gateway\u7f51\u5173\u805a\u5408"},"Spring Cloud Gateway\u7f51\u5173\u805a\u5408"),(0,l.kt)("h2",{id:"\u7b80\u4ecb"},"\u7b80\u4ecb"),(0,l.kt)("admonition",{type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"1\u3001Knife4j \u5728",(0,l.kt)("a",{parentName:"p",href:"../../upgrading/upgrading-to-v4",target:null,rel:null},"v4.0"),"\u7248\u672c\u63d0\u4f9b\u4e86\u57fa\u4e8eSpring Cloud Gateway\u7f51\u5173\u805a\u5408\u6587\u6863\u7684\u4e2d\u95f4\u4ef6"),(0,l.kt)("p",{parentName:"admonition"},"2\u3001\u5728\u4f7f\u7528\u8be5\u7ec4\u4ef6\u65f6\uff0c\u5982\u679c\u5f00\u53d1\u8005\u5728\u7f51\u5173\u5c42\u9762\u505a\u4e86\u9274\u6743\u7b49\u64cd\u4f5c\uff0c\u9700\u8981\u628aUi\u8d44\u6e90\u4ee5\u53ca\u76f8\u5173\u7684API\u63a5\u53e3\u653e\u5f00\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u65e0\u6cd5\u8bbf\u95ee\u7684\u60c5\u51b5\uff0c\u653e\u5f00\u8d44\u6e90\u6e05\u5355\u53ef\u4ee5",(0,l.kt)("a",{parentName:"p",href:"../../features/accessControl",target:null,rel:null},"\u53c2\u8003\u6587\u6863")),(0,l.kt)("p",{parentName:"admonition"},"3\u3001\u5b9e\u6218\u6587\u7ae0\u8bf7\u53c2\u8003\uff1a",(0,l.kt)("a",{parentName:"p",href:"/docs/blog/gateway/knife4j-gateway-introduce",target:null,rel:null},"Spring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u6587\u6863\u805a\u5408?\u5c31\u7528\u5b83\u4e86"))),(0,l.kt)("p",null,"\u81ea4.0\u7248\u672c\u540e,Knife4j\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9488\u5bf9\u5728Spring Cloud Gateway\u7f51\u5173\u8fdb\u884c\u805a\u5408\u7684\u7ec4\u4ef6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u57fa\u4e8e\u6b64\u7ec4\u4ef6\u8f7b\u677e\u7684\u805a\u5408\u5404\u4e2a\u5b50\u670d\u52a1\u7684OpenAPI\u6587\u6863"),(0,l.kt)("p",null,"\u503c\u5f97\u6ce8\u610f\u7684\u4e8b\u9879\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u751f\u4ea7\u73af\u5883\u4e0a\u7ebf\u65f6\uff0c\u914d\u7f6e\u6587\u4ef6\u901a\u8fc7\u914d\u7f6e",(0,l.kt)("inlineCode",{parentName:"li"},"knife4j.gateway.enabled: false"),"\u8fdb\u884c\u5173\u95ed,\u907f\u514d\u63a5\u53e3\u6cc4\u6f0f\uff0c\u9020\u6210\u5b89\u5168\u95ee\u9898"),(0,l.kt)("li",{parentName:"ul"},"\u652f\u6301\u670d\u52a1\u53d1\u73b0",(0,l.kt)("inlineCode",{parentName:"li"},"knife4j.gateway.discover.enabled: true"),",\u8be5\u5c5e\u6027",(0,l.kt)("a",{parentName:"li",href:"https://gitee.com/xiaoym/knife4j/milestones/181381",target:"_blank",rel:"noopener"},"4.1.0"),"\u540e\u65b0\u589e"),(0,l.kt)("li",{parentName:"ul"},"\u670d\u52a1\u53d1\u73b0\u4e2d\u6ce8\u610f\u6392\u9664\u7f51\u5173\u670d\u52a1")),(0,l.kt)("h2",{id:"\u4f7f\u7528"},"\u4f7f\u7528"),(0,l.kt)("p",null,"Maven\u5750\u6807\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-gateway-spring-boot-starter\n 4.3.0\n\n")),(0,l.kt)("h3",{id:"\u624b\u52a8\u914d\u7f6e\u805a\u5408manual"},"\u624b\u52a8\u914d\u7f6e\u805a\u5408(manual)"),(0,l.kt)("p",null,"\u624b\u52a8\u914d\u7f6e\u805a\u5408\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728Spring Cloud Gateway\u7f51\u5173\u7684yml\u914d\u7f6e\u6587\u4ef6\u4e2d\u8fdb\u884c\u914d\u7f6e\u5373\u53ef\u3002"),(0,l.kt)("p",null,"\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"application.yml"),"\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u8def\u7531\u89c4\u5219(\u8be5\u914d\u7f6e\u53ef\u4ee5\u914d\u7f6e\u5728Nacos\u914d\u7f6e\u4e2d\u5fc3\u4e2d\uff0c\u5b9e\u65f6\u751f\u6548)\uff0c\u914d\u7f6e\u89c4\u5219\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"\nknife4j:\n # \u805a\u5408swagger\u6587\u6863\n gateway:\n enabled: true\n # \u6392\u5e8f\u89c4\u5219(tag/operation\u6392\u5e8f\u81ea4.2.0\u7248\u672c\u65b0\u589e)\n # \u53d6\u503c\uff1aalpha-\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u5b98\u65b9swagger-ui\u9ed8\u8ba4\u5b9e\u73b0,order-Knife4j\u63d0\u4f9b\u7684\u589e\u5f3a\u6392\u5e8f\u89c4\u5219\uff0c\u5f00\u53d1\u8005\u53ef\u6269\u5c55x-order\uff0c\u6839\u636e\u6570\u503c\u6765\u81ea\u5b9a\u4e49\u6392\u5e8f\n tags-sorter: order\n operations-sorter: order\n # \u6307\u5b9a\u624b\u52a8\u914d\u7f6e\u7684\u6a21\u5f0f(\u9ed8\u8ba4\u4e3a\u8be5\u6a21\u5f0f)\n strategy: manual\n routes:\n - name: \u7528\u6237\u670d\u52a1\n # \u771f\u5b9e\u5b50\u670d\u52a1\u8bbf\u95eeurl\u5730\u5740-\u63d0\u4f9bOpenAPI\u7684\u6587\u6863\n url: /user-service/v2/api-docs?group=default\n service-name: user-service\n # \u8def\u7531\u524d\u7f00\n # \u517c\u5bb9OpenAPI3\u89c4\u8303\u5728\u805a\u5408\u65f6\u4e22\u5931contextPath\u5c5e\u6027\u7684\u5f02\u5e38\u60c5\u51b5\uff0c\u7531\u5f00\u53d1\u8005\u81ea\u5df1\u914d\u7f6econtextPath,Knife4j\u7684\u524d\u7aefUi\u505a\u517c\u5bb9\u5904\u7406,\u4e0eurl\u5c5e\u6027\u72ec\u7acb\u4e0d\u51b2\u7a81\uff0c\u4ec5OpenAPI3\u89c4\u8303\u805a\u5408\u9700\u8981\uff0cOpenAPI2\u89c4\u8303\u4e0d\u9700\u8981\u8bbe\u7f6e\u6b64\u5c5e\u6027,\u9ed8\u8ba4\u4e3a(apiPathPrefix)\n context-path: /\n order: 2\n - name: \u8ba2\u5355\u670d\u52a1\n url: /order-service/v2/api-docs?group=default\n service-name: order-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n order: 3\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u5c5e\u6027\u8bf4\u660e\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"\u914d\u7f6e\u5c5e\u6027\u540d\u79f0"),(0,l.kt)("th",{parentName:"tr",align:null},"\u7c7b\u578b"),(0,l.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"),(0,l.kt)("th",{parentName:"tr",align:null},"\u9ed8\u8ba4\u503c"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.enabled")),(0,l.kt)("td",{parentName:"tr",align:null},"boolean"),(0,l.kt)("td",{parentName:"tr",align:null},"\u662f\u5426\u5f00\u542f\u4f7f\u7528Gateway\u7f51\u5173\u805a\u5408\u7ec4\u4ef6"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"false"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.strategy")),(0,l.kt)("td",{parentName:"tr",align:null},"enum"),(0,l.kt)("td",{parentName:"tr",align:null},"\u805a\u5408\u7684\u7b56\u7565\uff0c\u4e3b\u8981\u652f\u6301\u4e24\u79cd\uff0c\u5206\u522b\u662f\u624b\u52a8\u914d\u7f6e(",(0,l.kt)("inlineCode",{parentName:"td"},"manual"),")\u3001\u670d\u52a1\u53d1\u73b0(",(0,l.kt)("inlineCode",{parentName:"td"},"discover"),")"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"manual"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes")),(0,l.kt)("td",{parentName:"tr",align:null},"array{Router}"),(0,l.kt)("td",{parentName:"tr",align:null},"\u901a\u8fc7\u8def\u7531\u6ce8\u518c\u6587\u6863"),(0,l.kt)("td",{parentName:"tr",align:null})),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes[0].name")),(0,l.kt)("td",{parentName:"tr",align:null},"string"),(0,l.kt)("td",{parentName:"tr",align:null},"\u754c\u9762\u663e\u793a\u5206\u7ec4\u540d\u79f0"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes[0].url")),(0,l.kt)("td",{parentName:"tr",align:null},"string"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6587\u6863\u5730\u5740"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5b50\u670d\u52a1\u7684Swagger\u8d44\u6e90\u63a5\u53e3\u5730\u5740(Swagger2\u9ed8\u8ba4/v2/api-docs,\u53ea\u9700\u8981\u914d\u7f6egroup\u53c2\u6570\u5373\u53ef)\uff0c\u56e0\u4e3a\u662f\u4ece\u7f51\u5173\u5c42\u8d70\uff0c\u5f00\u53d1\u8005\u914d\u7f6e\u65f6\u522b\u5fd8\u8bb0\u4e86\u7f51\u5173\u524d\u7f00\u5730\u5740\u3002")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes[0].service-name")),(0,l.kt)("td",{parentName:"tr",align:null},"string"),(0,l.kt)("td",{parentName:"tr",align:null},"\u8bbf\u95ee\u670d\u52a1\u540d\u79f0"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"null"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes[0].order")),(0,l.kt)("td",{parentName:"tr",align:null},"int"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6392\u5e8f"),(0,l.kt)("td",{parentName:"tr",align:null},"0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"knife4j.gateway.routes[0].context-path")),(0,l.kt)("td",{parentName:"tr",align:null},"string"),(0,l.kt)("td",{parentName:"tr",align:null},"\u8def\u7531\u524d\u7f00,\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u81ea\u884c\u914d\u7f6e"),(0,l.kt)("td",{parentName:"tr",align:null},"/")))),(0,l.kt)("h3",{id:"\u670d\u52a1\u53d1\u73b0\u6a21\u5f0fdiscover"},"\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f(discover)"),(0,l.kt)("p",null,"\u5982\u679c\u5b50\u670d\u52a1\u975e\u5e38\u591a\u7684\u60c5\u51b5\u4e0b\uff0c\u90a3\u4e48\u624b\u52a8\u914d\u7f6e\u5c31\u4f1a\u663e\u5f97\u5f88\u7d2f\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\uff0c\u81ea\u52a8\u4ece\u6ce8\u518c\u4e2d\u5fc3\u805a\u5408\u6587\u6863\uff0c\u4e0d\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\uff0c\u6709\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879\uff0c\u5f00\u53d1\u8005\u9700\u8981\u6ce8\u610f\uff1a"),(0,l.kt)("admonition",{title:"\u6ce8\u610f\u4e8b\u9879",type:"danger"},(0,l.kt)("ul",{parentName:"admonition"},(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u5fc5\u987b\u7edf\u4e00\u89c4\u8303\u5b9e\u73b0\uff0c\u7edf\u4e00\u4f7f\u7528OpenAPI2\u6216\u8005OpenAPI3\u7684\u7248\u672c"),(0,l.kt)("li",{parentName:"ul"},"\u5b50\u670d\u52a1\u9700\u8981\u63d0\u4f9b\u9ed8\u8ba4",(0,l.kt)("inlineCode",{parentName:"li"},"default"),"\u5206\u7ec4\uff0c\u8be5\u5206\u7ec4\u662f\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\u81ea\u52a8\u805a\u5408\u7684url"))),(0,l.kt)("h4",{id:"\u914d\u7f6e\u5c5e\u6027"},"\u914d\u7f6e\u5c5e\u6027"),(0,l.kt)("p",null,"\u5728\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\u7684\u914d\u7f6e\u5c5e\u6027\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n gateway:\n # \u662f\u5426\u5f00\u542f\n enabled: true\n # \u6392\u5e8f\u89c4\u5219(tag/operation\u6392\u5e8f\u81ea4.2.0\u7248\u672c\u65b0\u589e)\n # \u53d6\u503c\uff1aalpha-\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u5b98\u65b9swagger-ui\u9ed8\u8ba4\u5b9e\u73b0,order-Knife4j\u63d0\u4f9b\u7684\u589e\u5f3a\u6392\u5e8f\u89c4\u5219\uff0c\u5f00\u53d1\u8005\u53ef\u6269\u5c55x-order\uff0c\u6839\u636e\u6570\u503c\u6765\u81ea\u5b9a\u4e49\u6392\u5e8f\n tags-sorter: order\n operations-sorter: order\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4`default`\u5206\u7ec4\n strategy: discover\n # \u5b50\u670d\u52a1\u5b58\u5728\u5176\u4ed6\u5206\u7ec4\u60c5\u51b5\uff0c\u805a\u5408\u5176\u4ed6\u5206\u7ec4\uff0c\u53ea\u80fd\u624b\u52a8\u914d\u7f6e\n routes:\n - name: \u7528\u6237\u670d\u52a1-1\n # \u5b50\u670d\u52a1\u5b58\u5728\u5176\u4ed6\u5206\u7ec4\u60c5\u51b5\uff0c\u805a\u5408\u5176\u4ed6\u5206\u7ec4\n url: /user-service/v2/api-docs?group=\u7528\u6237\u670d\u52a1\n # \u670d\u52a1\u540d\u79f0(Optional)\n service-name: user-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n # \u6392\u5e8f\n order: 2\n - name: \u8ba2\u5355\u670d\u52a1-2\n url: /order-service/v2/api-docs?group=\u8ba2\u5355\u670d\u52a1\n service-name: order-service\n # \u8def\u7531\u524d\u7f00\n context-path: /\n order: 3\n # \u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u7684\u914d\u7f6e\n discover:\n # \u5f00\u542f\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(swagger2|openapi3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1) \n excluded-services:\n - gateway-service\n # \u5982\u679c\u5b50\u670d\u52a1\u662fOpenAPI3\uff0c\u5e76\u4e14\u6709\u4e2a\u6027\u5316\u914d\u7f6e\n oas3:\n url: /v3/api-docs?group=default\n oauth2-redirect-url: ''\n validator-url: ''\n # \u5982\u4f55\u5b50\u670d\u52a1\u662fSwagger2\uff0c\u5e76\u4e14\u4e2a\u6027\u5316\u914d\u7f6e\n swagger2:\n url: /v2/api-docs?group=default\n # \u5355\u4e2a\u670d\u52a1\u7684\u4e2a\u6027\u5316\u914d\u7f6e\uff0ckey-\u670d\u52a1\u540d\u79f0\uff0cvalue-\u914d\u7f6e\u4fe1\u606f\n service-config:\n # \u5047\u8bbeorder\u670d\u52a1(\u5177\u4f53\u771f\u5b9e\u670d\u52a1\u5f00\u53d1\u8005\u6839\u636e\u81ea\u5df1\u7684\u60c5\u51b5\u914d\u7f6e)\n order-service:\n # \u8be5\u670d\u52a1\u7684\u6392\u5e8f\n order: 0\n # \u5206\u7ec4\u663e\u793a\u540d\u79f0\n group-name: \u8ba2\u5355\u670d\u52a1\u540d\u79f0\n # \u517c\u5bb9OpenAPI3\u89c4\u8303\u5728\u805a\u5408\u65f6\u4e22\u5931contextPath\u5c5e\u6027\u7684\u5f02\u5e38\u60c5\u51b5\uff0c\u7531\u5f00\u53d1\u8005\u81ea\u5df1\u914d\u7f6econtextPath,Knife4j\u7684\u524d\u7aefUi\u505a\u517c\u5bb9\u5904\u7406,\u4e0eurl\u5c5e\u6027\u72ec\u7acb\u4e0d\u51b2\u7a81\uff0c\u4ec5OpenAPI3\u89c4\u8303\u805a\u5408\u9700\u8981\uff0cOpenAPI2\u89c4\u8303\u4e0d\u9700\u8981\u8bbe\u7f6e\u6b64\u5c5e\u6027,\u9ed8\u8ba4\u4e3a(apiPathPrefix)\n context-path: /\n # \u8be5\u5c5e\u6027\u81ea4.2.0\u6dfb\u52a0\uff0c\u652f\u6301\u5b50\u670d\u52a1\u975e`default`\u5206\u7ec4\u7684\u5176\u4ed6\u5206\u7ec4\u805a\u5408\n # \u53c2\u8003 https://gitee.com/xiaoym/knife4j/pulls/87\n group-names:\n - \u5206\u7ec41\n - \u5206\u7ec42\n\n\n")),(0,l.kt)("h4",{id:"\u6392\u9664\u670d\u52a1"},"\u6392\u9664\u670d\u52a1"),(0,l.kt)("p",null,"\u81ea4.2.0\u7248\u672c\uff0c\u5728Spring Cloud Gateway\u7f51\u5173\u805a\u5408\u65f6\uff0c\u5f00\u53d1\u8005\u53ef\u81ea\u5b9a\u4e49\u6392\u9664\u670d\u52a1\u7684\u89c4\u5219\uff0c\u5b9e\u73b0",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u5f00\u653e\u7684\u63a5\u53e3\u5373\u53ef"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u4e3b\u8981\u89e3\u51b3\u5728Dubbo\u7b49\u670d\u52a1\u7684\u573a\u666f\u4e2d\u805a\u5408\u4e86\u4e0d\u5fc5\u8981\u7684\u670d\u52a1\u3002\u53c2\u8003",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I6YLMB",target:"_blank",rel:"noopener"},"Gitee#I6YLMB"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-javascript"},'@Slf4j\n@Component\npublic class MyExcludeService implements GatewayServiceExcludeService {\n @Override\n public Set exclude(Environment environment, Knife4jGatewayProperties properties, List services) {\n log.info("\u81ea\u5b9a\u4e49\u8fc7\u6ee4\u5668.");\n if (!CollectionUtils.isEmpty(services)){\n // \u6392\u9664\u6ce8\u518c\u4e2d\u5fc3\u5305\u542border\u5b57\u773c\u7684\u670d\u52a1\n return services.stream().filter(s -> s.contains("order")).collect(Collectors.toSet());\n }\n return new TreeSet<>();\n }\n}\n')),(0,l.kt)("h4",{id:"\u573a\u666fcase"},"\u573a\u666fcase"),(0,l.kt)("p",null,"2.1 \u6240\u6709\u5b50\u670d\u52a1\u5168\u90e8\u662fOpenAPI3\u89c4\u8303"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4`default`\u5206\u7ec4\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n\n")),(0,l.kt)("p",null,"2.2 \u6240\u6709\u5b50\u670d\u52a1\u5168\u90e8\u662fSwagger2\u89c4\u8303\uff0c\u5e76\u4e14\u662f\u9ed8\u8ba4",(0,l.kt)("inlineCode",{parentName:"p"},"default"),"\u5206\u7ec4"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : swagger2\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n")),(0,l.kt)("p",null,"2.3 \u5b50\u670d\u52a1\u4e2d\u9664\u4e86",(0,l.kt)("inlineCode",{parentName:"p"},"default"),"\u5206\u7ec4\uff0c\u8fd8\u6709\u522b\u7684\u5206\u7ec4\uff0c\u6d4b\u8bd5\uff0c\u6211\u4eec\u9700\u8981\u5355\u72ec\u805a\u5408(\u56e0\u4e3adiscover\u6a21\u5f0f\u53ea\u805a\u5408\u9ed8\u8ba4)\uff0c\u6b64\u65f6\uff0c\u5219\u590d\u7528",(0,l.kt)("inlineCode",{parentName:"p"},"routes"),"\u81ea\u5b9a\u4e49\u5c5e\u6027"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : swagger2\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n # \u4e2a\u6027\u5316\u5b9a\u5236\u7684\u90e8\u5206\u5b50\u670d\u52a1\u5206\u7ec4\u60c5\u51b5 \n routes:\n - name: \u7528\u6237\u670d\u52a1\n service-name: user-service\n url: /user/v2/api-docs?group=\u7ec4\u7ec7\u7ba1\u7406\n order: 1\n - name: \u8ba2\u5355\u670d\u52a1\n service-name: order-service\n url: /order/v2/api-docs?group=\u8ba2\u5355\u7ba1\u7406\n order: 1\n")),(0,l.kt)("p",null,"2.4 \u5728discover\u670d\u52a1\u53d1\u73b0\u6a21\u5f0f\u4e0b\uff0c\u5982\u679c\u6211\u4eec\u5e0c\u671b\u5bf9\u805a\u5408\u8d77\u6765\u7684\u5fae\u670d\u52a1\u63d0\u4f9b\u4e00\u4e9b\u4e2a\u6027\u5316\u914d\u7f6e\uff0c\u4f8b\u5982\uff1a\u6392\u5e8f\u3001\u5206\u7ec4\u91cd\u547d\u540d\u3001context-path\u914d\u7f6e\u7b49\u7b49\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u670d\u52a1\u914d\u7f6e\u5bf9\u6bcf\u4e2a\u670d\u52a1\u8fdb\u884c\u914d\u7f6e\uff0c\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n gateway:\n enabled: true\n # \u6307\u5b9a\u670d\u52a1\u53d1\u73b0\u7684\u6a21\u5f0f\u805a\u5408\u5fae\u670d\u52a1\u6587\u6863\n strategy: discover\n discover:\n enabled: true\n # \u6307\u5b9a\u7248\u672c\u53f7(Swagger2|OpenAPI3)\n version : openapi3\n # \u9700\u8981\u6392\u9664\u7684\u5fae\u670d\u52a1(eg:\u7f51\u5173\u670d\u52a1)\n excluded-services:\n - gateway-service\n # \u5404\u4e2a\u805a\u5408\u670d\u52a1\u7684\u4e2a\u6027\u5316\u914d\u7f6e\uff0ckey:\u6ce8\u518c\u4e2d\u5fc3\u4e2d\u7684\u670d\u52a1\u540d\u79f0\uff0cvalue\uff1a\u4e2a\u6027\u5316\u914d\u7f6e\n service-config:\n user-service:\n # \u6392\u5e8f\n order: 1\n # \u524d\u7aef\u663e\u793a\u540d\u79f0\n group-name : \u7528\u6237\u670d\u52a1\n # \u91cd\u65b0\u6307\u5b9abasePath\uff0c\u4e00\u822c\u5728OpenAPI3\u89c4\u8303\u4e2d\u9700\u8981\n context-path: /user\n order-service:\n # \u6392\u5e8f\n order: 2\n # \u524d\u7aef\u663e\u793a\u540d\u79f0\n group-name : \u8ba2\u5355\u670d\u52a1\n # \u91cd\u65b0\u6307\u5b9abasePath\uff0c\u4e00\u822c\u5728OpenAPI3\u89c4\u8303\u4e2d\u9700\u8981\n context-path: /order\n")),(0,l.kt)("h4",{id:"\u8bbf\u95ee\u5730\u5740"},"\u8bbf\u95ee\u5730\u5740"),(0,l.kt)("p",null,"http://{gateway.host}:{gateway.port}/doc.html"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4c3d092f.5779cdf5.js b/knife4j-doc/gitee/assets/js/4c3d092f.5779cdf5.js new file mode 100644 index 000000000..5d8952c93 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4c3d092f.5779cdf5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4742],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},g="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),g=l(n),u=a,m=g["".concat(s,".").concat(u)]||g[u]||c[u]||i;return n?r.createElement(m,o(o({ref:t},d),{},{components:n})):r.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[g]="string"==typeof e?e:a,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>p,metadata:()=>l,toc:()=>g});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),o=["components"],p={},s="springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f",l={unversionedId:"action/springfox/springfox13",id:"action/springfox/springfox13",title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f",description:"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a",source:"@site/docs/action/springfox/springfox13.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox13",permalink:"/docs/action/springfox/springfox13",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408",permalink:"/docs/action/springfox/springfox12"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408",permalink:"/docs/action/springfox/springfox14"}},d={},g=[{value:"Swagger\u6807\u51c6",id:"swagger\u6807\u51c6",level:2},{value:"Swagger\u6839\u5bf9\u8c61\u6269\u5c55",id:"swagger\u6839\u5bf9\u8c61\u6269\u5c55",level:3},{value:"path\u63a5\u53e3\u6269\u5c55",id:"path\u63a5\u53e3\u6269\u5c55",level:3},{value:"more",id:"more",level:3},{value:"Springfox\u5b9e\u73b0",id:"springfox\u5b9e\u73b0",level:2}],c={toc:g},u="wrapper";function m(e){var t=e.components,p=(0,a.Z)(e,o);return(0,i.kt)(u,(0,r.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u5341\u4e09-\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f"},"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f"),(0,i.kt)("p",null,"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a"),(0,i.kt)("p",null,"1.\u83b7\u53d6\u9a8c\u8bc1\u7801 -> 2.\u6821\u9a8c\u7528\u6237\u540d\u662f\u5426\u6709\u6548 -> 3.\u6ce8\u518c\u9a8c\u8bc1 -> 4.\u767b\u5f55"),(0,i.kt)("p",null,"\u5982\u679c\u6211\u4eec\u6ca1\u6709\u6392\u5e8f\u7684\u60c5\u51b5\u4e0b,\u4e0a\u9762\u7684\u63a5\u53e3\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\u53ef\u80fd\u662f\u6742\u4e71\u65e0\u7ae0\u7684,\u5bf9\u4e8e\u521d\u7ea7\u7684\u63a5\u53e3\u5bf9\u63a5\u4eba\u5458\u6765\u8bf4,\u6392\u5e8f\u66f4\u80fd\u8ba9\u5f00\u53d1\u8005\u628a\u5f53\u524d\u7684\u9700\u6c42\u6e05\u6670\u660e\u4e86\u7684\u7528\u4ee3\u7801\u6765\u5b9e\u73b0\u6389,\u4e3a\u6b64\uff0c\u63a5\u53e3\u6587\u6863\u7684\u4f5c\u7528\u4e5f\u80fd\u6700\u5927\u5316."),(0,i.kt)("p",null,"\u90a3\u4e48,\u5728swagger\u7684\u6807\u51c6\u4e2d,\u90a3\u4e9b\u5141\u8bb8\u6211\u4eec\u81ea\u5b9a\u4e49\u6269\u5c55,\u5728Springfox\u4e2d\u6211\u4eec\u53c8\u5982\u4f55\u6765\u5b9e\u73b0\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u6269\u5c55\u5462?"),(0,i.kt)("h2",{id:"swagger\u6807\u51c6"},"Swagger\u6807\u51c6"),(0,i.kt)("p",null,"\u5148\u6765\u770bSwagger\u5b9a\u4e49\u7684\u51e0\u4e2a\u6807\u51c6\u5c5e\u6027,\u53ef\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"https://swagger.io/specification/v2/",target:"_blank",rel:"noopener"},"\u5b98\u65b9\u6587\u6863")),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"swagger"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"string")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"th"},"Required.")," Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be ",(0,i.kt)("inlineCode",{parentName:"th"},'"2.0"'),"."))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"info"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#infoObject",target:"_blank",rel:"noopener"},"Info Object")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"td"},"Required.")," Provides metadata about the API. The metadata can be used by the clients if needed.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"host"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:null},"The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the ",(0,i.kt)("inlineCode",{parentName:"td"},"host")," is not included, the host serving the documentation is to be used (including the port). The ",(0,i.kt)("inlineCode",{parentName:"td"},"host")," does not support ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathTemplating",target:"_blank",rel:"noopener"},"path templating"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"basePath"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:null},"The base path on which the API is served, which is relative to the ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#swaggerHost",target:"_blank",rel:"noopener"},(0,i.kt)("inlineCode",{parentName:"a"},"host")),". If it is not included, the API is served directly under the ",(0,i.kt)("inlineCode",{parentName:"td"},"host"),". The value MUST start with a leading slash (",(0,i.kt)("inlineCode",{parentName:"td"},"/"),"). The ",(0,i.kt)("inlineCode",{parentName:"td"},"basePath")," does not support ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathTemplating",target:"_blank",rel:"noopener"},"path templating"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"schemes"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"The transfer protocol of the API. Values MUST be from the list: ",(0,i.kt)("inlineCode",{parentName:"td"},'"http"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"https"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"ws"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"wss"'),". If the ",(0,i.kt)("inlineCode",{parentName:"td"},"schemes")," is not included, the default scheme to be used is the one used to access the Swagger definition itself.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"consumes"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#mimeTypes",target:"_blank",rel:"noopener"},"Mime Types"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"produces"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#mimeTypes",target:"_blank",rel:"noopener"},"Mime Types"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"paths"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathsObject",target:"_blank",rel:"noopener"},"Paths Object")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"td"},"Required.")," The available paths and operations for the API.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"definitions"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#definitionsObject",target:"_blank",rel:"noopener"},"Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold data types produced and consumed by operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"parameters"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#parametersDefinitionsObject",target:"_blank",rel:"noopener"},"Parameters Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold parameters that can be used across operations. This property ",(0,i.kt)("em",{parentName:"td"},"does not")," define global parameters for all operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"responses"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#responsesDefinitionsObject",target:"_blank",rel:"noopener"},"Responses Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold responses that can be used across operations. This property ",(0,i.kt)("em",{parentName:"td"},"does not")," define global responses for all operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"securityDefinitions"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#securityDefinitionsObject",target:"_blank",rel:"noopener"},"Security Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"Security scheme definitions that can be used across the specification.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"security"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#securityRequirementObject",target:"_blank",rel:"noopener"},"Security Requirement Object"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"tags"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#tagObject",target:"_blank",rel:"noopener"},"Tag Object"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#operationObject",target:"_blank",rel:"noopener"},"Operation Object"),"must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"externalDocs"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#externalDocumentationObject",target:"_blank",rel:"noopener"},"External Documentation Object")),(0,i.kt)("td",{parentName:"tr",align:null},"Additional external documentation.")))),(0,i.kt)("p",null,"\u5728\u4e0a\u9762\u5b9a\u4e49\u7684\u6807\u51c6\u5b57\u6bb5\u4e2d,\u6700\u540e\u4e00\u4e2a\u662f\u6269\u5c55\u5bf9\u8c61,\u6211\u4eec\u5728Java\u5bf9\u8c61\u4e2d",(0,i.kt)("inlineCode",{parentName:"p"},"io.swagger.models.Swagger"),"\u4e2d\u53ef\u4ee5\u770b\u5230\u4ed6\u7684\u5b9a\u4e49"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'\npublic class Swagger {\n protected String swagger = "2.0";\n protected Info info;\n protected String host;\n protected String basePath;\n protected List tags;\n protected List schemes;\n protected List consumes;\n protected List produces;\n protected List security;\n protected Map paths;\n protected Map securityDefinitions;\n protected Map definitions;\n protected Map parameters;\n protected Map responses;\n protected ExternalDocs externalDocs;\n //\u6269\u5c55\u5c5e\u6027\n protected Map vendorExtensions;\n //setter and getter\n}\n')),(0,i.kt)("p",null,"\u6240\u4ee5\u4ece\u4e0a\u9762\u7684\u63a5\u53e3\u5b9a\u4e49\u6765\u770b,\u6211\u4eec\u6700\u7ec8\u53ef\u4ee5\u6765\u4e00\u4e00\u67e5\u770bSwagger\u652f\u6301\u54ea\u4e9b\u5bf9\u8c61\u8fdb\u884c\u81ea\u5b9a\u4e49\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("h3",{id:"swagger\u6839\u5bf9\u8c61\u6269\u5c55"},"Swagger\u6839\u5bf9\u8c61\u6269\u5c55"),(0,i.kt)("p",null,"\u5728Swagger\u7684\u6839\u5bf9\u8c61\u4e2d,\u6211\u4eec\u770b\u5230\u4ed6\u662f\u6709",(0,i.kt)("inlineCode",{parentName:"p"},"vendorExtensions"),"\u6269\u5c55\u5c5e\u6027\u7684\u652f\u6301\u7684\uff0c\u662f\u4e00\u4e2a\u6563\u5217\u7684\u6570\u636e\u7ed3\u6784\u7c7b\u578b\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u53ef\u4ee5\u5728Swagger\u7684\u6839\u5bf9\u8c61\u4e2d\u6dfb\u52a0\u591a\u4e2a\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("p",null,"\u6269\u5c55\u5c5e\u6027\u540d\u79f0\u7684\u89c4\u5219\u5fc5\u987b\u662f\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u6765\u5f00\u5934\uff0c\u6240\u6709\u7684\u90fd\u662f\u8fd9\u4e2a\u89c4\u5219"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Field Pattern"),(0,i.kt)("th",{parentName:"tr",align:"center"},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"^x-"),(0,i.kt)("td",{parentName:"tr",align:"center"},"Any"),(0,i.kt)("td",{parentName:"tr",align:null},"Allows extensions to the Swagger Schema. The field name MUST begin with ",(0,i.kt)("inlineCode",{parentName:"td"},"x-"),", for example, ",(0,i.kt)("inlineCode",{parentName:"td"},"x-internal-id"),". The value can be ",(0,i.kt)("inlineCode",{parentName:"td"},"null"),", a primitive, an array or an object. See ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#vendorExtensions",target:"_blank",rel:"noopener"},"Vendor Extensions")," for further details.")))),(0,i.kt)("p",null,"\u770b\u5230\u6b64\u5904,\u4ee5\u524d\u5728swagger-bootstrap-ui\u76841.8.5\u7248\u672c\u4e2d\u6dfb\u52a0\u7684\u6269\u5c55\u5c5e\u6027\u90fd\u662f\u4e0d\u89c4\u8303\u7684,\u56e0\u4e3a\u6ca1\u6709\u5e94\u7528swagger\u7684\u6807\u51c6\u89c4\u5219\uff0c\u5728\u540e\u671f\u7684\u7248\u672c\u4e2d\u8981\u91cd\u5199\u8be5\u89c4\u5219\u5b9e\u73b0"),(0,i.kt)("p",null,"\u6240\u4ee5,\u6211\u4eec\u5728Swagger\u6839\u8def\u5f84\u6269\u5c55\u7684\u89c4\u5219\u6700\u7ec8\u751f\u6210\u7684JSON\u683c\u5f0f\u53ef\u80fd\u662f\u8fd9\u6837\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "swagger": "2.0",\n "info": {\n "description": "
swagger-bootstrap-ui-demo RESTful APIs
",\n "version": "1.0",\n "title": "swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01",\n "termsOfService": "http://www.group.com/",\n "contact": {\n "name": "group@qq.com"\n }\n },\n "host": "127.0.0.1:8999",\n "basePath": "/",\n "tags": [\n {\n "name": "1.8.2\u7248\u672c",\n "description": "Api 182 Controller"\n }\n ],\n "paths": {\n "/2/api/new187/postRequest": {\n "post": {\n "tags": [\n "api-1871-controller"\n ],\n "summary": "\u7248\u672c2-post\u8bf7\u6c42\u53c2\u6570Hidden\u5c5e\u6027\u662f\u5426\u751f\u6548",\n "operationId": "postRequestUsingPOST_1",\n "consumes": [\n "application/json"\n ],\n "produces": [\n "*/*"\n ],\n "parameters": [\n {\n "in": "body",\n "name": "model187",\n "description": "model187",\n "required": true,\n "schema": {\n "originalRef": "Model187",\n "$ref": "#/definitions/Model187"\n }\n }\n ],\n "responses": {\n "200": {\n "description": "OK",\n "schema": {\n "originalRef": "Rest\xabModel187\xbb",\n "$ref": "#/definitions/Rest\xabModel187\xbb"\n }\n },\n "201": {\n "description": "Created"\n },\n "401": {\n "description": "Unauthorized"\n },\n "403": {\n "description": "Forbidden"\n },\n "404": {\n "description": "Not Found"\n }\n },\n "security": [\n {\n "BearerToken": [\n "global"\n ]\n },\n {\n "BearerToken1": [\n "global"\n ]\n }\n ],\n "deprecated": false\n }\n }\n },\n "securityDefinitions": {\n "BearerToken": {\n "type": "apiKey",\n "name": "Authorization",\n "in": "header"\n }\n },\n "definitions": {\n "AInfoVo": {\n "type": "object",\n "required": [\n "aId",\n "bList"\n ],\n "properties": {\n "aId": {\n "type": "string",\n "description": "A\u8bb0\u5f55\u4e3b\u952e"\n },\n "bList": {\n "type": "object",\n "description": "B\u4fe1\u606fMap, key\u4e3aBInfoVo\u7684\u4e3b\u952epkId",\n "additionalProperties": {\n "originalRef": "BInfoVo",\n "$ref": "#/definitions/BInfoVo"\n }\n }\n },\n "title": "AInfoVo",\n "description": "A\u4fe1\u606f"\n },\n "ActInteger": {\n "type": "object",\n "properties": {\n "doub1": {\n "type": "number",\n "format": "double",\n "description": "double\u7c7b\u578b\u5c5e\u6027"\n },\n "float1": {\n "type": "number",\n "format": "float",\n "description": "float\u7c7b\u578b\u5c5e\u6027"\n },\n "name": {\n "type": "string"\n },\n "number": {\n "type": "integer",\n "format": "int64",\n "description": "Long\u7c7b\u578b"\n },\n "price": {\n "type": "number",\n "description": "BigDecimal\u7c7b\u578b\u5c5e\u6027"\n },\n "sort": {\n "type": "integer",\n "format": "int32",\n "description": "int\u7c7b\u578b"\n }\n },\n "title": "ActInteger"\n },\n "Actor": {\n "type": "object",\n "properties": {\n "address": {\n "type": "string"\n },\n "deepOne": {\n "originalRef": "DeepOne",\n "$ref": "#/definitions/DeepOne"\n },\n "recipt": {\n "originalRef": "Recipt",\n "$ref": "#/definitions/Recipt"\n },\n "sort": {\n "type": "integer",\n "format": "int32"\n }\n },\n "title": "Actor"\n }\n },\n "x-description":"Swagger\u6269\u5c55\u5c5e\u6027\u4e4b\u4e00Description"\n}\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"x-description"),"\u5c5e\u6027\u5c31\u662f\u6211\u4eec\u6269\u5c55\u7684\u6807\u51c6\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u6211\u4eec\u5728Java\u4ee3\u7801\u4e2d\u4e5f\u53ef\u4ee5\u8fd9\u4e48\u6765\u5b9e\u73b0\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'Swagger swagger = mapper.mapDocumentation(documentation);\nswagger.setVendorExtension("x-description","Swagger\u6269\u5c55\u5c5e\u6027\u4e4b\u4e00Description");\n')),(0,i.kt)("h3",{id:"path\u63a5\u53e3\u6269\u5c55"},"path\u63a5\u53e3\u6269\u5c55"),(0,i.kt)("p",null,"\u540c\u4e0a\u9762\u7684\u89c4\u5219,path\u4e2d\u5b9a\u4e49\u7684\u5c5e\u6027\uff0c\u6211\u4eec\u540c\u6837\u53ef\u4ee5\u6269\u5c55\u6211\u4eec\u7684\u89c4\u5219,\u6b64\u65f6\u6211\u4eec\u7684\u9700\u6c42,\u6839\u636e\u63a5\u53e3\u6765\u6392\u5e8f\u5c31\u53ef\u4ee5\u901a\u8fc7path\u589e\u52a0\u6269\u5c55\u5c5e\u6027\u6765\u5b9e\u73b0,\u6bd4\u5982\u6211\u4eec\u7ed9path\u6dfb\u52a0\u4e00\u4e2a\u6269\u5c55\u5c5e\u6027",(0,i.kt)("inlineCode",{parentName:"p"},"x-order")),(0,i.kt)("p",null,"path\u7684JSON\u7ed3\u6784\u5c31\u53ef\u80fd\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'"/2/api/new187/postRequest": {\n "post": {\n "tags": [\n "api-1871-controller"\n ],\n "summary": "\u7248\u672c2-post\u8bf7\u6c42\u53c2\u6570Hidden\u5c5e\u6027\u662f\u5426\u751f\u6548",\n "operationId": "postRequestUsingPOST_1",\n "consumes": [\n "application/json"\n ],\n "produces": [\n "*/*"\n ],\n "parameters": [\n {\n "in": "body",\n "name": "model187",\n "description": "model187",\n "required": true,\n "schema": {\n "originalRef": "Model187",\n "$ref": "#/definitions/Model187"\n }\n }\n ],\n "responses": {\n "200": {\n "description": "OK",\n "schema": {\n "originalRef": "Rest\xabModel187\xbb",\n "$ref": "#/definitions/Rest\xabModel187\xbb"\n }\n },\n "201": {\n "description": "Created"\n },\n "401": {\n "description": "Unauthorized"\n },\n "403": {\n "description": "Forbidden"\n },\n "404": {\n "description": "Not Found"\n }\n },\n "security": [\n {\n "BearerToken": [\n "global"\n ]\n },\n {\n "BearerToken1": [\n "global"\n ]\n }\n ],\n "deprecated": false,\n "x-order":"1"\n }\n}\n')),(0,i.kt)("h3",{id:"more"},"more"),(0,i.kt)("p",null,"swagger\u5728Open API\u7684\u89c4\u8303\u6587\u6863\u4e2d\u58f0\u660e\u7684\u662f\u4efb\u610f\u5bf9\u8c61\u90fd\u53ef\u4ee5\u6709\u5bf9\u8c61\u6269\u5c55,\u53ea\u8981\u7b26\u5408\u6269\u5c55\u89c4\u5219\u5373\u53ef(\u5373\u6269\u5c55\u5c5e\u6027\u540d\u79f0\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934)"),(0,i.kt)("h2",{id:"springfox\u5b9e\u73b0"},"Springfox\u5b9e\u73b0"),(0,i.kt)("p",null,"\u6211\u4eec\u77e5\u9053\u4e86\u6269\u5c55\u89c4\u5219\u7684\u5b9a\u4e49,\u90a3\u4e48\u5728Springfox\u4e2d\u6211\u4eec\u5982\u4f55\u81ea\u5b9a\u4e49\u5b9e\u73b0\u5462?"),(0,i.kt)("p",null,"\u5728\u524d\u9762\u7684\u6587\u7ae0\u4e2d,\u6211\u4eec\u4ecb\u7ecd\u4e86springfox\u4f7f\u7528\u4e86Spring Plugin\u7cfb\u7edf\u6765\u589e\u5f3a\u6574\u4e2a\u6846\u67b6\u7684\u53ef\u6269\u5c55\u6027,\u6211\u60f3\u6b64\u65f6\u7684\u4f60\u5e94\u8be5\u80fd\u660e\u767d\u4e86\uff0c\u5982\u679c\u8981\u6269\u5c55path\u63a5\u53e3\u7684\u5c5e\u6027,\u90a3\u4e48\uff0c\u5176\u5b9e\u6211\u4eec\u53ea\u9700\u8981\u627e\u5230Springfox\u63d0\u4f9b\u7684Plugin\u63a5\u53e3\uff0c\u7136\u540e\u589e\u52a0\u4e00\u4e2aPlugin\u7684\u63a5\u53e3\u5b9e\u73b0\uff0c\u628a\u6211\u4eec\u7684\u6269\u5c55\u5c5e\u6027\u589e\u52a0\u8fdb\u53bb\u5373\u53ef"),(0,i.kt)("p",null,"\u63a5\u4e0b\u6765,\u6211\u4eec\u5b9e\u73b0\u4e0a\u9762path\u63a5\u53e3\u7684\u81ea\u5b9a\u4e49",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),"\u7684\u5c5e\u6027\u6269\u5c55\u5b9e\u73b0."),(0,i.kt)("p",null,"\u6211\u4eec\u5148\u6765\u770bSpringfox\u5c06\u81ea\u5df1\u7684Documentation\u5bf9\u8c61\u8f6c\u6362\u4e3aSwagger\u6807\u51c6\u5bf9\u8c61\u7684\u4ee3\u7801"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Override\npublic Swagger mapDocumentation(Documentation from) {\n if ( from == null ) {\n return null;\n }\n\n Swagger swagger = new Swagger();\n\n swagger.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );\n swagger.setSchemes( mapSchemes( from.getSchemes() ) );\n //path\u8f6c\u6362\n swagger.setPaths( mapApiListings( from.getApiListings() ) );\n swagger.setHost( from.getHost() );\n swagger.setDefinitions( modelMapper.modelsFromApiListings( from.getApiListings() ) );\n swagger.setSecurityDefinitions( securityMapper.toSecuritySchemeDefinitions( from.getResourceListing() ) );\n ApiInfo info = fromResourceListingInfo( from );\n if ( info != null ) {\n swagger.setInfo( mapApiInfo( info ) );\n }\n swagger.setBasePath( from.getBasePath() );\n swagger.setTags( tagSetToTagList( from.getTags() ) );\n List list2 = from.getConsumes();\n if ( list2 != null ) {\n swagger.setConsumes( new ArrayList( list2 ) );\n }\n else {\n swagger.setConsumes( null );\n }\n List list3 = from.getProduces();\n if ( list3 != null ) {\n swagger.setProduces( new ArrayList( list3 ) );\n }\n else {\n swagger.setProduces( null );\n }\n\n return swagger;\n}\n")),(0,i.kt)("p",null,"\u65e2\u7136\u6211\u4eec\u7684\u76ee\u6807\u662fpath,\u90a3\u4e48\u6765\u770b",(0,i.kt)("inlineCode",{parentName:"p"},"mapApiListings"),"\u65b9\u6cd5"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"protected Map mapApiListings(Multimap apiListings) {\n Map paths = newTreeMap();\n for (ApiListing each : apiListings.values()) {\n for (ApiDescription api : each.getApis()) {\n paths.put(api.getPath(), mapOperations(api, Optional.fromNullable(paths.get(api.getPath()))));\n }\n }\n return paths;\n }\n")),(0,i.kt)("p",null,"\u7a0b\u5e8f\u7684\u903b\u8f91\u662f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u58f0\u660e\u4e00\u4e2amap\u6570\u7ec4,key\u662f\u63a5\u53e3\u8def\u5f84,value\u662fpath\u5bf9\u8c61"),(0,i.kt)("li",{parentName:"ul"},"\u904d\u5386springfox\u4e2d\u7684ApiListing\u96c6\u5408\u5bf9\u8c61(\u7c7b\u4f3c\u4e8econtroller)"),(0,i.kt)("li",{parentName:"ul"},"\u904d\u5386ApiDescription\u7ed3\u5408\u5bf9\u8c61\uff08\u7c7b\u4f3c\u4e8e\u63a5\u53e3method\uff09"),(0,i.kt)("li",{parentName:"ul"},"\u6700\u7ec8\u62ff\u5230apiDescription\u7684\u63a5\u53e3\u5730\u5740,\u5c06operation\u5bf9\u8c61\u8f6c\u6362\u4e3apath")),(0,i.kt)("p",null,"\u7ee7\u7eed\u6765\u770b",(0,i.kt)("inlineCode",{parentName:"p"},"mapOperations"),"\u65b9\u6cd5"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"private Path mapOperations(ApiDescription api, Optional existingPath) {\n Path path = existingPath.or(new Path());\n for (springfox.documentation.service.Operation each : nullToEmptyList(api.getOperations())) {\n Operation operation = mapOperation(each);\n path.set(each.getMethod().toString().toLowerCase(), operation);\n }\n return path;\n }\n")),(0,i.kt)("p",null,"\u5faa\u73af\u904d\u5386\u6240\u6709\u7684Operation,\u6b64\u5904\u4e3a\u4ec0\u4e48\u6709\u5faa\u73af,\u56e0\u4e3a\u6211\u4eec\u540c\u4e00\u4e2a\u63a5\u53e3\u5141\u8bb8\u5b58\u5728\u4e0d\u540c\u7684\u8bf7\u6c42\u65b9\u5f0f(GET|POST|PUT|DELETE...),\u4f46\u662f\u8bf7\u6c42\u4f53\u53ef\u4ee5\u76f8\u540c"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Override\nprotected io.swagger.models.Operation mapOperation(Operation from) {\n if ( from == null ) {\n return null;\n }\n\n io.swagger.models.Operation operation = new io.swagger.models.Operation();\n\n operation.setSecurity( mapAuthorizations( from.getSecurityReferences() ) );\n operation.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );\n")),(0,i.kt)("p",null,"\u770b\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"mapOperation"),"\u65b9\u6cd5\u65f6,\u6211\u4eec\u7ec8\u4e8e\u770b\u5230\u4e86setVendorExtensions\u7684\u64cd\u4f5c,\u5373\u8d4b\u503c\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("p",null,"\u90a3\u4e48\u6765\u770b\u6269\u5c55\u5c5e\u6027\u662f\u5982\u4f55\u6765\u5b9e\u73b0\u7684"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Mapper\npublic class VendorExtensionsMapper {\n\n public Map mapExtensions(List from) {\n Map extensions = newTreeMap();\n Iterable listExtensions = from(from)\n .filter(ListVendorExtension.class);\n for (ListVendorExtension each : listExtensions) {\n extensions.put(each.getName(), each.getValue());\n }\n Iterable> objectExtensions = from(from)\n .filter(ObjectVendorExtension.class)\n .transform(toExtensionMap());\n for (Map each : objectExtensions) {\n extensions.putAll(each);\n }\n Iterable propertyExtensions = from(from)\n .filter(StringVendorExtension.class);\n for (StringVendorExtension each : propertyExtensions) {\n extensions.put(each.getName(), each.getValue());\n }\n return extensions;\n }\n")),(0,i.kt)("p",null,"\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"VendorExtensionsMapper"),"\u4e2d\u7684\u6269\u5c55\u5c5e\u6027\u65b9\u6cd5,\u6211\u4eec\u770b\u5230,springfox\u76ee\u524d\u505a\u4e86\u9650\u5236,\u56e0\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"VendorExtension"),"\u662f\u63a5\u53e3,\u6211\u4eec\u53ef\u4ee5\u6709\u6211\u4eec\u81ea\u5df1\u7684\u5b9a\u4e49\u5b9e\u73b0,\u4f46\u662fspringfox\u6700\u7ec8\u4f1a\u5bf9\u6269\u5c55\u63a5\u53e3\u8fdb\u884cfilter\u8fc7\u6ee4,\u4ece\u4ee3\u7801\u4e2d\u6211\u4eec\u770b\u5230,springfox\u76ee\u524d\u53ea\u5141\u8bb8\u4e09\u79cd\u6269\u5c55\u5b9e\u73b0"),(0,i.kt)("p",null,"\u5206\u522b\u662f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},'ListVendorExtension:\u5217\u8868\u7684\u5f62\u5f0f,\u8be5\u5bf9\u8c61\u652f\u6301\u6cdb\u578b\uff0c\u6700\u7ec8\u5f62\u5f0f\uff1a"x-field":',"[{field:value}]"),(0,i.kt)("li",{parentName:"ul"},'ObjectVendorExtension:\u5bf9\u8c61\u7684\u6269\u5c55\u5f62\u5f0f,\u6700\u7ec8\u7684\u6269\u5c55\u5f62\u5f0f\u662f\uff1a"x-field":',"[{field:value}]"),(0,i.kt)("li",{parentName:"ul"},'StringVendorExtension:string\u7c7b\u578b\u7684\u6269\u5c55\u5b9e\u73b0\uff0c\u6700\u7ec8\u7684\u6269\u5c55\u5f62\u5f0f\u662f"x-field":"value"')),(0,i.kt)("p",null,"\u65e2\u7136springfox\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u9ed8\u8ba4\u7684\u4e09\u79cd\u6269\u5c55\u5b9e\u73b0,\u90a3\u4e48\u9488\u5bf9\u4e0a\u9762\u7684\u6211\u4eec\u9700\u8981\u6269\u5c55path\u7684\u6269\u5c55\u5c5e\u6027,\u6211\u4eec\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"StringVendorExtension:string"),"\u8fd9\u79cd\u7c7b\u578b\u5373\u53ef"),(0,i.kt)("p",null,"\u9488\u5bf9path\u7684operation\u64cd\u4f5c\uff0c\u6211\u4eec\u5728\u524d\u9762\u4e5f\u4ecb\u7ecd\u8fc7,springfox\u6700\u7ec8\u4f7f\u7528\u7684\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"OperationBuilderPlugin"),"\u63a5\u53e3"),(0,i.kt)("p",null,"\u90a3\u4e48\u6211\u4eec\u53ea\u9700\u8981\u5199\u4e00\u4e2a",(0,i.kt)("inlineCode",{parentName:"p"},"OperationBuilderPlugin"),"Plugin\u63a5\u53e3\u7684\u5b9e\u73b0\u5373\u53ef"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Component\n@Order(Ordered.HIGHEST_PRECEDENCE+100)\npublic class OperationPositionBulderPlugin implements OperationBuilderPlugin {\n @Override\n public void apply(OperationContext context) {\n context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order","1")));\n }\n\n @Override\n public boolean supports(DocumentationType delimiter) {\n return true;\n }\n}\n')),(0,i.kt)("p",null,"\u76ee\u524d\u5047\u8bbe\u6211\u4eec\u7ed9\u6240\u6709\u7684\u63a5\u53e3\u90fd\u8d4b\u4e88\u6269\u5c55\u5c5e\u6027",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),',\u9ed8\u8ba4\u503c\u4e3a"1"'),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u6765\u770b/v2/api-docs\u63a5\u53e3\u54cd\u5e94\u7684JSON\u793a\u4f8b"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(55474).Z,width:"721",height:"306"})),(0,i.kt)("p",null,"\u4e0a\u56fe\u4e2d,\u6211\u4eec\u5176\u5b9e\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u6269\u5c55\u5c5e\u6027\u5b9e\u73b0\u4e86"),(0,i.kt)("p",null,"\u7136\u540e\u6211\u4eec\u5728\u7ed3\u5408\u6211\u4eec\u81ea\u5b9a\u4e49\u7684swagger-bootstrap-ui\u524d\u7aefUI\u6e32\u67d3\u7a0b\u5e8f,\u628aorder\u5b57\u6bb5\u4f5c\u4e3apath\u63a5\u53e3\u7684\u6392\u5e8f\u5b57\u6bb5\uff0c\u5728\u9875\u9762\u8fdb\u884c\u6392\u5e8f\u663e\u793a,\u8fd9\u6837\u6211\u4eec\u5c31\u5b9e\u73b0\u4e86\u6211\u4eec\u7684\u63a5\u53e3\u81ea\u5b9a\u4e49\u6392\u5e8f\u89c4\u5219\u4e86"),(0,i.kt)("p",null,"\u6709\u53ef\u80fd\u7ec6\u5fc3\u7684\u670b\u53cb\u4f1a\u95ee,\u6211\u4eec\u7ed9\u7684order\u503c\u90fd\u662f1,\u5982\u679c\u7ed9\u4e0e\u5f00\u53d1\u8005\u5728\u4ee3\u7801\u4e2d\u7ed9\u63a5\u53e3\u81ea\u5b9a\u4e49\u7684\u503c\u5462"),(0,i.kt)("p",null,"\u6b64\u65f6\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eswagger-bootstrap-ui\u63d0\u4f9b\u7684\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"li"},"@ApiOperationSort"),"\u8fdb\u884c\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eswagger\u7684\u9ed8\u8ba4\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"li"},"@ApiOperation"),"\u4e2d\u7684postion\u5c5e\u6027\u8fdb\u884c\u4e8c\u6b21\u5229\u7528")),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u7684\u63a5\u53e3\u4ee3\u7801\u53ef\u80fd\u4f1a\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOr33der")\n@ApiOperation(value = "\u521b\u5efa\u8ba2\u5355",position = 2)\npublic Rest createOrdetr(@RequestBody Order order,HttpSession httpSession){\n Rest r=new Rest<>();\n r.setData(order);\n return r;\n}\n\n@PostMapping("/createOrder")\n@ApiOperationSort(3)\n@ApiOperation(value = "hash\u6d4b\u8bd5",nickname = "test")\npublic Rest createOrder(@RequestBody Order order){\n Rest r=new Rest<>();\n r.setData(order);\n return r;\n}\n')),(0,i.kt)("p",null,"\u4e24\u79cd\u65b9\u5f0f,\u53d6\u7b2c\u4e00\u79cd\u5373\u53ef"),(0,i.kt)("p",null,"\u8fd9\u65f6,\u6211\u4eec\u66f4\u6539\u4e00\u4e0b\u4e0a\u9762\u6211\u4eec\u7684Plugin\u63a5\u53e3\u5b9e\u73b0"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Override\npublic void apply(OperationContext context) {\n int position=Integer.MAX_VALUE;\n //\u9996\u5148\u67e5\u627eApiOperation\u6ce8\u89e3\n Optional api=context.findAnnotation(ApiOperation.class);\n if (api.isPresent()){\n //\u5224\u65adpostion\u662f\u5426\u6709\u503c\n int posit=api.get().position();\n if (posit!=0){\n position=posit;\n }else{\n Optional apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);\n if (apiOperationSortOptional.isPresent()){\n position=apiOperationSortOptional.get().value();\n }\n }\n }else{\n Optional apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);\n if (apiOperationSortOptional.isPresent()){\n position=apiOperationSortOptional.get().value();\n }\n }\n\n context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order",String.valueOf(position))));\n}\n')),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u518d\u6765\u770bJSON\u6548\u679c"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(85114).Z,width:"855",height:"317"})),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u770b\u5230\uff0c\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u5c5e\u6027\u5df2\u7ecf\u51fa\u73b0\u4e86,\u800c\u4e14\u662f\u6839\u636e\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7684\u5b9e\u73b0,\u6b64\u65f6\u6211\u4eec\u7684\u76ee\u7684\u4e5f\u8fbe\u5230\u4e86."))}m.isMDXComponent=!0},55474:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/springfox-19-extensions-012354ec3050f2d287067a6cfd295c60.png"},85114:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/springfox-19-extensions1-d70b05fe5f91c45a535d594aa14bff08.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4c3d092f.bf07bd28.js b/knife4j-doc/gitee/assets/js/4c3d092f.bf07bd28.js deleted file mode 100644 index eb5be2908..000000000 --- a/knife4j-doc/gitee/assets/js/4c3d092f.bf07bd28.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4742],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>u});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=p(e,["components","mdxType","originalType","parentName"]),c=l(n),u=a,m=c["".concat(s,".").concat(u)]||c[u]||g[u]||i;return n?r.createElement(m,o(o({ref:t},d),{},{components:n})):r.createElement(m,o({ref:t},d))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=c;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p.mdxType="string"==typeof e?e:a,o[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>p,metadata:()=>l,toc:()=>g});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),o=["components"],p={},s="springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f",l={unversionedId:"action/springfox/springfox13",id:"action/springfox/springfox13",title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f",description:"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a",source:"@site/docs/action/springfox/springfox13.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox13",permalink:"/docs/action/springfox/springfox13",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e8c) \u904d\u5386\u63a5\u53e3\u83b7\u53d6ApiDescription\u96c6\u5408",permalink:"/docs/action/springfox/springfox12"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u56db) \u5f52\u6863\u5f97\u5230ApiListing\u63a5\u53e3\u96c6\u5408",permalink:"/docs/action/springfox/springfox14"}},d={},g=[{value:"Swagger\u6807\u51c6",id:"swagger\u6807\u51c6",level:2},{value:"Swagger\u6839\u5bf9\u8c61\u6269\u5c55",id:"swagger\u6839\u5bf9\u8c61\u6269\u5c55",level:3},{value:"path\u63a5\u53e3\u6269\u5c55",id:"path\u63a5\u53e3\u6269\u5c55",level:3},{value:"more",id:"more",level:3},{value:"Springfox\u5b9e\u73b0",id:"springfox\u5b9e\u73b0",level:2}],c={toc:g};function u(e){var t=e.components,p=(0,a.Z)(e,o);return(0,i.kt)("wrapper",(0,r.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u5341\u4e09-\u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f"},"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e09) \u81ea\u5b9a\u4e49\u6269\u5c55\u5b9e\u73b0\u63a5\u53e3\u7684\u6392\u5e8f"),(0,i.kt)("p",null,"\u5f88\u591a\u65f6\u5019,Swagger\u5b9a\u4e49\u7684\u6807\u51c6\u5e76\u4e0d\u80fd\u6ee1\u8db3\u6211\u4eec\u5b9e\u9645\u7684\u9700\u6c42,\u6bd4\u5982\u62ff\u5206\u7ec4\u540e\u7684\u63a5\u53e3\u6765\u8bf4,\u6709\u9002\u5408\u6211\u4eec\u5e0c\u671b\u6211\u4eec\u7684\u63a5\u53e3\u80fd\u591f\u6392\u5e8f,\u5047\u5982\u6211\u4eec\u5f53\u524d\u6709\u4e00\u4e2a\u6ce8\u518c\u7684\u9700\u6c42\u5b9e\u73b0,\u90a3\u4e48\u4ed6\u7684\u63a5\u53e3\u53ef\u80fd\u662f\u8fd9\u6837\u7684\uff1a"),(0,i.kt)("p",null,"1.\u83b7\u53d6\u9a8c\u8bc1\u7801 -> 2.\u6821\u9a8c\u7528\u6237\u540d\u662f\u5426\u6709\u6548 -> 3.\u6ce8\u518c\u9a8c\u8bc1 -> 4.\u767b\u5f55"),(0,i.kt)("p",null,"\u5982\u679c\u6211\u4eec\u6ca1\u6709\u6392\u5e8f\u7684\u60c5\u51b5\u4e0b,\u4e0a\u9762\u7684\u63a5\u53e3\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\u53ef\u80fd\u662f\u6742\u4e71\u65e0\u7ae0\u7684,\u5bf9\u4e8e\u521d\u7ea7\u7684\u63a5\u53e3\u5bf9\u63a5\u4eba\u5458\u6765\u8bf4,\u6392\u5e8f\u66f4\u80fd\u8ba9\u5f00\u53d1\u8005\u628a\u5f53\u524d\u7684\u9700\u6c42\u6e05\u6670\u660e\u4e86\u7684\u7528\u4ee3\u7801\u6765\u5b9e\u73b0\u6389,\u4e3a\u6b64\uff0c\u63a5\u53e3\u6587\u6863\u7684\u4f5c\u7528\u4e5f\u80fd\u6700\u5927\u5316."),(0,i.kt)("p",null,"\u90a3\u4e48,\u5728swagger\u7684\u6807\u51c6\u4e2d,\u90a3\u4e9b\u5141\u8bb8\u6211\u4eec\u81ea\u5b9a\u4e49\u6269\u5c55,\u5728Springfox\u4e2d\u6211\u4eec\u53c8\u5982\u4f55\u6765\u5b9e\u73b0\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u6269\u5c55\u5462?"),(0,i.kt)("h2",{id:"swagger\u6807\u51c6"},"Swagger\u6807\u51c6"),(0,i.kt)("p",null,"\u5148\u6765\u770bSwagger\u5b9a\u4e49\u7684\u51e0\u4e2a\u6807\u51c6\u5c5e\u6027,\u53ef\u53c2\u8003",(0,i.kt)("a",{parentName:"p",href:"https://swagger.io/specification/v2/",target:"_blank",rel:"noopener"},"\u5b98\u65b9\u6587\u6863")),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"swagger"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"string")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"th"},"Required.")," Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be ",(0,i.kt)("inlineCode",{parentName:"th"},'"2.0"'),"."))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"info"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#infoObject",target:"_blank",rel:"noopener"},"Info Object")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"td"},"Required.")," Provides metadata about the API. The metadata can be used by the clients if needed.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"host"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:null},"The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the ",(0,i.kt)("inlineCode",{parentName:"td"},"host")," is not included, the host serving the documentation is to be used (including the port). The ",(0,i.kt)("inlineCode",{parentName:"td"},"host")," does not support ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathTemplating",target:"_blank",rel:"noopener"},"path templating"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"basePath"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:null},"The base path on which the API is served, which is relative to the ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#swaggerHost",target:"_blank",rel:"noopener"},(0,i.kt)("inlineCode",{parentName:"a"},"host")),". If it is not included, the API is served directly under the ",(0,i.kt)("inlineCode",{parentName:"td"},"host"),". The value MUST start with a leading slash (",(0,i.kt)("inlineCode",{parentName:"td"},"/"),"). The ",(0,i.kt)("inlineCode",{parentName:"td"},"basePath")," does not support ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathTemplating",target:"_blank",rel:"noopener"},"path templating"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"schemes"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"The transfer protocol of the API. Values MUST be from the list: ",(0,i.kt)("inlineCode",{parentName:"td"},'"http"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"https"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"ws"'),", ",(0,i.kt)("inlineCode",{parentName:"td"},'"wss"'),". If the ",(0,i.kt)("inlineCode",{parentName:"td"},"schemes")," is not included, the default scheme to be used is the one used to access the Swagger definition itself.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"consumes"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#mimeTypes",target:"_blank",rel:"noopener"},"Mime Types"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"produces"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("inlineCode",{parentName:"td"},"string"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#mimeTypes",target:"_blank",rel:"noopener"},"Mime Types"),".")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"paths"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#pathsObject",target:"_blank",rel:"noopener"},"Paths Object")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("strong",{parentName:"td"},"Required.")," The available paths and operations for the API.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"definitions"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#definitionsObject",target:"_blank",rel:"noopener"},"Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold data types produced and consumed by operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"parameters"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#parametersDefinitionsObject",target:"_blank",rel:"noopener"},"Parameters Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold parameters that can be used across operations. This property ",(0,i.kt)("em",{parentName:"td"},"does not")," define global parameters for all operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"responses"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#responsesDefinitionsObject",target:"_blank",rel:"noopener"},"Responses Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"An object to hold responses that can be used across operations. This property ",(0,i.kt)("em",{parentName:"td"},"does not")," define global responses for all operations.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"securityDefinitions"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#securityDefinitionsObject",target:"_blank",rel:"noopener"},"Security Definitions Object")),(0,i.kt)("td",{parentName:"tr",align:null},"Security scheme definitions that can be used across the specification.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"security"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#securityRequirementObject",target:"_blank",rel:"noopener"},"Security Requirement Object"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"tags"),(0,i.kt)("td",{parentName:"tr",align:null},"[",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#tagObject",target:"_blank",rel:"noopener"},"Tag Object"),"]"),(0,i.kt)("td",{parentName:"tr",align:null},"A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#operationObject",target:"_blank",rel:"noopener"},"Operation Object"),"must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"externalDocs"),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#externalDocumentationObject",target:"_blank",rel:"noopener"},"External Documentation Object")),(0,i.kt)("td",{parentName:"tr",align:null},"Additional external documentation.")))),(0,i.kt)("p",null,"\u5728\u4e0a\u9762\u5b9a\u4e49\u7684\u6807\u51c6\u5b57\u6bb5\u4e2d,\u6700\u540e\u4e00\u4e2a\u662f\u6269\u5c55\u5bf9\u8c61,\u6211\u4eec\u5728Java\u5bf9\u8c61\u4e2d",(0,i.kt)("inlineCode",{parentName:"p"},"io.swagger.models.Swagger"),"\u4e2d\u53ef\u4ee5\u770b\u5230\u4ed6\u7684\u5b9a\u4e49"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'\npublic class Swagger {\n protected String swagger = "2.0";\n protected Info info;\n protected String host;\n protected String basePath;\n protected List tags;\n protected List schemes;\n protected List consumes;\n protected List produces;\n protected List security;\n protected Map paths;\n protected Map securityDefinitions;\n protected Map definitions;\n protected Map parameters;\n protected Map responses;\n protected ExternalDocs externalDocs;\n //\u6269\u5c55\u5c5e\u6027\n protected Map vendorExtensions;\n //setter and getter\n}\n')),(0,i.kt)("p",null,"\u6240\u4ee5\u4ece\u4e0a\u9762\u7684\u63a5\u53e3\u5b9a\u4e49\u6765\u770b,\u6211\u4eec\u6700\u7ec8\u53ef\u4ee5\u6765\u4e00\u4e00\u67e5\u770bSwagger\u652f\u6301\u54ea\u4e9b\u5bf9\u8c61\u8fdb\u884c\u81ea\u5b9a\u4e49\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("h3",{id:"swagger\u6839\u5bf9\u8c61\u6269\u5c55"},"Swagger\u6839\u5bf9\u8c61\u6269\u5c55"),(0,i.kt)("p",null,"\u5728Swagger\u7684\u6839\u5bf9\u8c61\u4e2d,\u6211\u4eec\u770b\u5230\u4ed6\u662f\u6709",(0,i.kt)("inlineCode",{parentName:"p"},"vendorExtensions"),"\u6269\u5c55\u5c5e\u6027\u7684\u652f\u6301\u7684\uff0c\u662f\u4e00\u4e2a\u6563\u5217\u7684\u6570\u636e\u7ed3\u6784\u7c7b\u578b\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u53ef\u4ee5\u5728Swagger\u7684\u6839\u5bf9\u8c61\u4e2d\u6dfb\u52a0\u591a\u4e2a\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("p",null,"\u6269\u5c55\u5c5e\u6027\u540d\u79f0\u7684\u89c4\u5219\u5fc5\u987b\u662f\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u6765\u5f00\u5934\uff0c\u6240\u6709\u7684\u90fd\u662f\u8fd9\u4e2a\u89c4\u5219"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Field Pattern"),(0,i.kt)("th",{parentName:"tr",align:"center"},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"^x-"),(0,i.kt)("td",{parentName:"tr",align:"center"},"Any"),(0,i.kt)("td",{parentName:"tr",align:null},"Allows extensions to the Swagger Schema. The field name MUST begin with ",(0,i.kt)("inlineCode",{parentName:"td"},"x-"),", for example, ",(0,i.kt)("inlineCode",{parentName:"td"},"x-internal-id"),". The value can be ",(0,i.kt)("inlineCode",{parentName:"td"},"null"),", a primitive, an array or an object. See ",(0,i.kt)("a",{parentName:"td",href:"https://swagger.io/specification/v2/#vendorExtensions",target:"_blank",rel:"noopener"},"Vendor Extensions")," for further details.")))),(0,i.kt)("p",null,"\u770b\u5230\u6b64\u5904,\u4ee5\u524d\u5728swagger-bootstrap-ui\u76841.8.5\u7248\u672c\u4e2d\u6dfb\u52a0\u7684\u6269\u5c55\u5c5e\u6027\u90fd\u662f\u4e0d\u89c4\u8303\u7684,\u56e0\u4e3a\u6ca1\u6709\u5e94\u7528swagger\u7684\u6807\u51c6\u89c4\u5219\uff0c\u5728\u540e\u671f\u7684\u7248\u672c\u4e2d\u8981\u91cd\u5199\u8be5\u89c4\u5219\u5b9e\u73b0"),(0,i.kt)("p",null,"\u6240\u4ee5,\u6211\u4eec\u5728Swagger\u6839\u8def\u5f84\u6269\u5c55\u7684\u89c4\u5219\u6700\u7ec8\u751f\u6210\u7684JSON\u683c\u5f0f\u53ef\u80fd\u662f\u8fd9\u6837\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "swagger": "2.0",\n "info": {\n "description": "
swagger-bootstrap-ui-demo RESTful APIs
",\n "version": "1.0",\n "title": "swagger-bootstrap-ui\u5f88\u68d2~~~\uff01\uff01\uff01",\n "termsOfService": "http://www.group.com/",\n "contact": {\n "name": "group@qq.com"\n }\n },\n "host": "127.0.0.1:8999",\n "basePath": "/",\n "tags": [\n {\n "name": "1.8.2\u7248\u672c",\n "description": "Api 182 Controller"\n }\n ],\n "paths": {\n "/2/api/new187/postRequest": {\n "post": {\n "tags": [\n "api-1871-controller"\n ],\n "summary": "\u7248\u672c2-post\u8bf7\u6c42\u53c2\u6570Hidden\u5c5e\u6027\u662f\u5426\u751f\u6548",\n "operationId": "postRequestUsingPOST_1",\n "consumes": [\n "application/json"\n ],\n "produces": [\n "*/*"\n ],\n "parameters": [\n {\n "in": "body",\n "name": "model187",\n "description": "model187",\n "required": true,\n "schema": {\n "originalRef": "Model187",\n "$ref": "#/definitions/Model187"\n }\n }\n ],\n "responses": {\n "200": {\n "description": "OK",\n "schema": {\n "originalRef": "Rest\xabModel187\xbb",\n "$ref": "#/definitions/Rest\xabModel187\xbb"\n }\n },\n "201": {\n "description": "Created"\n },\n "401": {\n "description": "Unauthorized"\n },\n "403": {\n "description": "Forbidden"\n },\n "404": {\n "description": "Not Found"\n }\n },\n "security": [\n {\n "BearerToken": [\n "global"\n ]\n },\n {\n "BearerToken1": [\n "global"\n ]\n }\n ],\n "deprecated": false\n }\n }\n },\n "securityDefinitions": {\n "BearerToken": {\n "type": "apiKey",\n "name": "Authorization",\n "in": "header"\n }\n },\n "definitions": {\n "AInfoVo": {\n "type": "object",\n "required": [\n "aId",\n "bList"\n ],\n "properties": {\n "aId": {\n "type": "string",\n "description": "A\u8bb0\u5f55\u4e3b\u952e"\n },\n "bList": {\n "type": "object",\n "description": "B\u4fe1\u606fMap, key\u4e3aBInfoVo\u7684\u4e3b\u952epkId",\n "additionalProperties": {\n "originalRef": "BInfoVo",\n "$ref": "#/definitions/BInfoVo"\n }\n }\n },\n "title": "AInfoVo",\n "description": "A\u4fe1\u606f"\n },\n "ActInteger": {\n "type": "object",\n "properties": {\n "doub1": {\n "type": "number",\n "format": "double",\n "description": "double\u7c7b\u578b\u5c5e\u6027"\n },\n "float1": {\n "type": "number",\n "format": "float",\n "description": "float\u7c7b\u578b\u5c5e\u6027"\n },\n "name": {\n "type": "string"\n },\n "number": {\n "type": "integer",\n "format": "int64",\n "description": "Long\u7c7b\u578b"\n },\n "price": {\n "type": "number",\n "description": "BigDecimal\u7c7b\u578b\u5c5e\u6027"\n },\n "sort": {\n "type": "integer",\n "format": "int32",\n "description": "int\u7c7b\u578b"\n }\n },\n "title": "ActInteger"\n },\n "Actor": {\n "type": "object",\n "properties": {\n "address": {\n "type": "string"\n },\n "deepOne": {\n "originalRef": "DeepOne",\n "$ref": "#/definitions/DeepOne"\n },\n "recipt": {\n "originalRef": "Recipt",\n "$ref": "#/definitions/Recipt"\n },\n "sort": {\n "type": "integer",\n "format": "int32"\n }\n },\n "title": "Actor"\n }\n },\n "x-description":"Swagger\u6269\u5c55\u5c5e\u6027\u4e4b\u4e00Description"\n}\n')),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"x-description"),"\u5c5e\u6027\u5c31\u662f\u6211\u4eec\u6269\u5c55\u7684\u6807\u51c6\u7684\u6269\u5c55\u5c5e\u6027\uff0c\u6211\u4eec\u5728Java\u4ee3\u7801\u4e2d\u4e5f\u53ef\u4ee5\u8fd9\u4e48\u6765\u5b9e\u73b0\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'Swagger swagger = mapper.mapDocumentation(documentation);\nswagger.setVendorExtension("x-description","Swagger\u6269\u5c55\u5c5e\u6027\u4e4b\u4e00Description");\n')),(0,i.kt)("h3",{id:"path\u63a5\u53e3\u6269\u5c55"},"path\u63a5\u53e3\u6269\u5c55"),(0,i.kt)("p",null,"\u540c\u4e0a\u9762\u7684\u89c4\u5219,path\u4e2d\u5b9a\u4e49\u7684\u5c5e\u6027\uff0c\u6211\u4eec\u540c\u6837\u53ef\u4ee5\u6269\u5c55\u6211\u4eec\u7684\u89c4\u5219,\u6b64\u65f6\u6211\u4eec\u7684\u9700\u6c42,\u6839\u636e\u63a5\u53e3\u6765\u6392\u5e8f\u5c31\u53ef\u4ee5\u901a\u8fc7path\u589e\u52a0\u6269\u5c55\u5c5e\u6027\u6765\u5b9e\u73b0,\u6bd4\u5982\u6211\u4eec\u7ed9path\u6dfb\u52a0\u4e00\u4e2a\u6269\u5c55\u5c5e\u6027",(0,i.kt)("inlineCode",{parentName:"p"},"x-order")),(0,i.kt)("p",null,"path\u7684JSON\u7ed3\u6784\u5c31\u53ef\u80fd\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'"/2/api/new187/postRequest": {\n "post": {\n "tags": [\n "api-1871-controller"\n ],\n "summary": "\u7248\u672c2-post\u8bf7\u6c42\u53c2\u6570Hidden\u5c5e\u6027\u662f\u5426\u751f\u6548",\n "operationId": "postRequestUsingPOST_1",\n "consumes": [\n "application/json"\n ],\n "produces": [\n "*/*"\n ],\n "parameters": [\n {\n "in": "body",\n "name": "model187",\n "description": "model187",\n "required": true,\n "schema": {\n "originalRef": "Model187",\n "$ref": "#/definitions/Model187"\n }\n }\n ],\n "responses": {\n "200": {\n "description": "OK",\n "schema": {\n "originalRef": "Rest\xabModel187\xbb",\n "$ref": "#/definitions/Rest\xabModel187\xbb"\n }\n },\n "201": {\n "description": "Created"\n },\n "401": {\n "description": "Unauthorized"\n },\n "403": {\n "description": "Forbidden"\n },\n "404": {\n "description": "Not Found"\n }\n },\n "security": [\n {\n "BearerToken": [\n "global"\n ]\n },\n {\n "BearerToken1": [\n "global"\n ]\n }\n ],\n "deprecated": false,\n "x-order":"1"\n }\n}\n')),(0,i.kt)("h3",{id:"more"},"more"),(0,i.kt)("p",null,"swagger\u5728Open API\u7684\u89c4\u8303\u6587\u6863\u4e2d\u58f0\u660e\u7684\u662f\u4efb\u610f\u5bf9\u8c61\u90fd\u53ef\u4ee5\u6709\u5bf9\u8c61\u6269\u5c55,\u53ea\u8981\u7b26\u5408\u6269\u5c55\u89c4\u5219\u5373\u53ef(\u5373\u6269\u5c55\u5c5e\u6027\u540d\u79f0\u4ee5",(0,i.kt)("inlineCode",{parentName:"p"},"x-"),"\u5f00\u5934)"),(0,i.kt)("h2",{id:"springfox\u5b9e\u73b0"},"Springfox\u5b9e\u73b0"),(0,i.kt)("p",null,"\u6211\u4eec\u77e5\u9053\u4e86\u6269\u5c55\u89c4\u5219\u7684\u5b9a\u4e49,\u90a3\u4e48\u5728Springfox\u4e2d\u6211\u4eec\u5982\u4f55\u81ea\u5b9a\u4e49\u5b9e\u73b0\u5462?"),(0,i.kt)("p",null,"\u5728\u524d\u9762\u7684\u6587\u7ae0\u4e2d,\u6211\u4eec\u4ecb\u7ecd\u4e86springfox\u4f7f\u7528\u4e86Spring Plugin\u7cfb\u7edf\u6765\u589e\u5f3a\u6574\u4e2a\u6846\u67b6\u7684\u53ef\u6269\u5c55\u6027,\u6211\u60f3\u6b64\u65f6\u7684\u4f60\u5e94\u8be5\u80fd\u660e\u767d\u4e86\uff0c\u5982\u679c\u8981\u6269\u5c55path\u63a5\u53e3\u7684\u5c5e\u6027,\u90a3\u4e48\uff0c\u5176\u5b9e\u6211\u4eec\u53ea\u9700\u8981\u627e\u5230Springfox\u63d0\u4f9b\u7684Plugin\u63a5\u53e3\uff0c\u7136\u540e\u589e\u52a0\u4e00\u4e2aPlugin\u7684\u63a5\u53e3\u5b9e\u73b0\uff0c\u628a\u6211\u4eec\u7684\u6269\u5c55\u5c5e\u6027\u589e\u52a0\u8fdb\u53bb\u5373\u53ef"),(0,i.kt)("p",null,"\u63a5\u4e0b\u6765,\u6211\u4eec\u5b9e\u73b0\u4e0a\u9762path\u63a5\u53e3\u7684\u81ea\u5b9a\u4e49",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),"\u7684\u5c5e\u6027\u6269\u5c55\u5b9e\u73b0."),(0,i.kt)("p",null,"\u6211\u4eec\u5148\u6765\u770bSpringfox\u5c06\u81ea\u5df1\u7684Documentation\u5bf9\u8c61\u8f6c\u6362\u4e3aSwagger\u6807\u51c6\u5bf9\u8c61\u7684\u4ee3\u7801"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Override\npublic Swagger mapDocumentation(Documentation from) {\n if ( from == null ) {\n return null;\n }\n\n Swagger swagger = new Swagger();\n\n swagger.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );\n swagger.setSchemes( mapSchemes( from.getSchemes() ) );\n //path\u8f6c\u6362\n swagger.setPaths( mapApiListings( from.getApiListings() ) );\n swagger.setHost( from.getHost() );\n swagger.setDefinitions( modelMapper.modelsFromApiListings( from.getApiListings() ) );\n swagger.setSecurityDefinitions( securityMapper.toSecuritySchemeDefinitions( from.getResourceListing() ) );\n ApiInfo info = fromResourceListingInfo( from );\n if ( info != null ) {\n swagger.setInfo( mapApiInfo( info ) );\n }\n swagger.setBasePath( from.getBasePath() );\n swagger.setTags( tagSetToTagList( from.getTags() ) );\n List list2 = from.getConsumes();\n if ( list2 != null ) {\n swagger.setConsumes( new ArrayList( list2 ) );\n }\n else {\n swagger.setConsumes( null );\n }\n List list3 = from.getProduces();\n if ( list3 != null ) {\n swagger.setProduces( new ArrayList( list3 ) );\n }\n else {\n swagger.setProduces( null );\n }\n\n return swagger;\n}\n")),(0,i.kt)("p",null,"\u65e2\u7136\u6211\u4eec\u7684\u76ee\u6807\u662fpath,\u90a3\u4e48\u6765\u770b",(0,i.kt)("inlineCode",{parentName:"p"},"mapApiListings"),"\u65b9\u6cd5"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"protected Map mapApiListings(Multimap apiListings) {\n Map paths = newTreeMap();\n for (ApiListing each : apiListings.values()) {\n for (ApiDescription api : each.getApis()) {\n paths.put(api.getPath(), mapOperations(api, Optional.fromNullable(paths.get(api.getPath()))));\n }\n }\n return paths;\n }\n")),(0,i.kt)("p",null,"\u7a0b\u5e8f\u7684\u903b\u8f91\u662f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u58f0\u660e\u4e00\u4e2amap\u6570\u7ec4,key\u662f\u63a5\u53e3\u8def\u5f84,value\u662fpath\u5bf9\u8c61"),(0,i.kt)("li",{parentName:"ul"},"\u904d\u5386springfox\u4e2d\u7684ApiListing\u96c6\u5408\u5bf9\u8c61(\u7c7b\u4f3c\u4e8econtroller)"),(0,i.kt)("li",{parentName:"ul"},"\u904d\u5386ApiDescription\u7ed3\u5408\u5bf9\u8c61\uff08\u7c7b\u4f3c\u4e8e\u63a5\u53e3method\uff09"),(0,i.kt)("li",{parentName:"ul"},"\u6700\u7ec8\u62ff\u5230apiDescription\u7684\u63a5\u53e3\u5730\u5740,\u5c06operation\u5bf9\u8c61\u8f6c\u6362\u4e3apath")),(0,i.kt)("p",null,"\u7ee7\u7eed\u6765\u770b",(0,i.kt)("inlineCode",{parentName:"p"},"mapOperations"),"\u65b9\u6cd5"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"private Path mapOperations(ApiDescription api, Optional existingPath) {\n Path path = existingPath.or(new Path());\n for (springfox.documentation.service.Operation each : nullToEmptyList(api.getOperations())) {\n Operation operation = mapOperation(each);\n path.set(each.getMethod().toString().toLowerCase(), operation);\n }\n return path;\n }\n")),(0,i.kt)("p",null,"\u5faa\u73af\u904d\u5386\u6240\u6709\u7684Operation,\u6b64\u5904\u4e3a\u4ec0\u4e48\u6709\u5faa\u73af,\u56e0\u4e3a\u6211\u4eec\u540c\u4e00\u4e2a\u63a5\u53e3\u5141\u8bb8\u5b58\u5728\u4e0d\u540c\u7684\u8bf7\u6c42\u65b9\u5f0f(GET|POST|PUT|DELETE...),\u4f46\u662f\u8bf7\u6c42\u4f53\u53ef\u4ee5\u76f8\u540c"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Override\nprotected io.swagger.models.Operation mapOperation(Operation from) {\n if ( from == null ) {\n return null;\n }\n\n io.swagger.models.Operation operation = new io.swagger.models.Operation();\n\n operation.setSecurity( mapAuthorizations( from.getSecurityReferences() ) );\n operation.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );\n")),(0,i.kt)("p",null,"\u770b\u5230",(0,i.kt)("inlineCode",{parentName:"p"},"mapOperation"),"\u65b9\u6cd5\u65f6,\u6211\u4eec\u7ec8\u4e8e\u770b\u5230\u4e86setVendorExtensions\u7684\u64cd\u4f5c,\u5373\u8d4b\u503c\u6269\u5c55\u5c5e\u6027"),(0,i.kt)("p",null,"\u90a3\u4e48\u6765\u770b\u6269\u5c55\u5c5e\u6027\u662f\u5982\u4f55\u6765\u5b9e\u73b0\u7684"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},"@Mapper\npublic class VendorExtensionsMapper {\n\n public Map mapExtensions(List from) {\n Map extensions = newTreeMap();\n Iterable listExtensions = from(from)\n .filter(ListVendorExtension.class);\n for (ListVendorExtension each : listExtensions) {\n extensions.put(each.getName(), each.getValue());\n }\n Iterable> objectExtensions = from(from)\n .filter(ObjectVendorExtension.class)\n .transform(toExtensionMap());\n for (Map each : objectExtensions) {\n extensions.putAll(each);\n }\n Iterable propertyExtensions = from(from)\n .filter(StringVendorExtension.class);\n for (StringVendorExtension each : propertyExtensions) {\n extensions.put(each.getName(), each.getValue());\n }\n return extensions;\n }\n")),(0,i.kt)("p",null,"\u901a\u8fc7",(0,i.kt)("inlineCode",{parentName:"p"},"VendorExtensionsMapper"),"\u4e2d\u7684\u6269\u5c55\u5c5e\u6027\u65b9\u6cd5,\u6211\u4eec\u770b\u5230,springfox\u76ee\u524d\u505a\u4e86\u9650\u5236,\u56e0\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"VendorExtension"),"\u662f\u63a5\u53e3,\u6211\u4eec\u53ef\u4ee5\u6709\u6211\u4eec\u81ea\u5df1\u7684\u5b9a\u4e49\u5b9e\u73b0,\u4f46\u662fspringfox\u6700\u7ec8\u4f1a\u5bf9\u6269\u5c55\u63a5\u53e3\u8fdb\u884cfilter\u8fc7\u6ee4,\u4ece\u4ee3\u7801\u4e2d\u6211\u4eec\u770b\u5230,springfox\u76ee\u524d\u53ea\u5141\u8bb8\u4e09\u79cd\u6269\u5c55\u5b9e\u73b0"),(0,i.kt)("p",null,"\u5206\u522b\u662f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},'ListVendorExtension:\u5217\u8868\u7684\u5f62\u5f0f,\u8be5\u5bf9\u8c61\u652f\u6301\u6cdb\u578b\uff0c\u6700\u7ec8\u5f62\u5f0f\uff1a"x-field":',"[{field:value}]"),(0,i.kt)("li",{parentName:"ul"},'ObjectVendorExtension:\u5bf9\u8c61\u7684\u6269\u5c55\u5f62\u5f0f,\u6700\u7ec8\u7684\u6269\u5c55\u5f62\u5f0f\u662f\uff1a"x-field":',"[{field:value}]"),(0,i.kt)("li",{parentName:"ul"},'StringVendorExtension:string\u7c7b\u578b\u7684\u6269\u5c55\u5b9e\u73b0\uff0c\u6700\u7ec8\u7684\u6269\u5c55\u5f62\u5f0f\u662f"x-field":"value"')),(0,i.kt)("p",null,"\u65e2\u7136springfox\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u9ed8\u8ba4\u7684\u4e09\u79cd\u6269\u5c55\u5b9e\u73b0,\u90a3\u4e48\u9488\u5bf9\u4e0a\u9762\u7684\u6211\u4eec\u9700\u8981\u6269\u5c55path\u7684\u6269\u5c55\u5c5e\u6027,\u6211\u4eec\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"StringVendorExtension:string"),"\u8fd9\u79cd\u7c7b\u578b\u5373\u53ef"),(0,i.kt)("p",null,"\u9488\u5bf9path\u7684operation\u64cd\u4f5c\uff0c\u6211\u4eec\u5728\u524d\u9762\u4e5f\u4ecb\u7ecd\u8fc7,springfox\u6700\u7ec8\u4f7f\u7528\u7684\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"OperationBuilderPlugin"),"\u63a5\u53e3"),(0,i.kt)("p",null,"\u90a3\u4e48\u6211\u4eec\u53ea\u9700\u8981\u5199\u4e00\u4e2a",(0,i.kt)("inlineCode",{parentName:"p"},"OperationBuilderPlugin"),"Plugin\u63a5\u53e3\u7684\u5b9e\u73b0\u5373\u53ef"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Component\n@Order(Ordered.HIGHEST_PRECEDENCE+100)\npublic class OperationPositionBulderPlugin implements OperationBuilderPlugin {\n @Override\n public void apply(OperationContext context) {\n context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order","1")));\n }\n\n @Override\n public boolean supports(DocumentationType delimiter) {\n return true;\n }\n}\n')),(0,i.kt)("p",null,"\u76ee\u524d\u5047\u8bbe\u6211\u4eec\u7ed9\u6240\u6709\u7684\u63a5\u53e3\u90fd\u8d4b\u4e88\u6269\u5c55\u5c5e\u6027",(0,i.kt)("inlineCode",{parentName:"p"},"x-order"),',\u9ed8\u8ba4\u503c\u4e3a"1"'),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u6765\u770b/v2/api-docs\u63a5\u53e3\u54cd\u5e94\u7684JSON\u793a\u4f8b"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(55474).Z,width:"721",height:"306"})),(0,i.kt)("p",null,"\u4e0a\u56fe\u4e2d,\u6211\u4eec\u5176\u5b9e\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u6269\u5c55\u5c5e\u6027\u5b9e\u73b0\u4e86"),(0,i.kt)("p",null,"\u7136\u540e\u6211\u4eec\u5728\u7ed3\u5408\u6211\u4eec\u81ea\u5b9a\u4e49\u7684swagger-bootstrap-ui\u524d\u7aefUI\u6e32\u67d3\u7a0b\u5e8f,\u628aorder\u5b57\u6bb5\u4f5c\u4e3apath\u63a5\u53e3\u7684\u6392\u5e8f\u5b57\u6bb5\uff0c\u5728\u9875\u9762\u8fdb\u884c\u6392\u5e8f\u663e\u793a,\u8fd9\u6837\u6211\u4eec\u5c31\u5b9e\u73b0\u4e86\u6211\u4eec\u7684\u63a5\u53e3\u81ea\u5b9a\u4e49\u6392\u5e8f\u89c4\u5219\u4e86"),(0,i.kt)("p",null,"\u6709\u53ef\u80fd\u7ec6\u5fc3\u7684\u670b\u53cb\u4f1a\u95ee,\u6211\u4eec\u7ed9\u7684order\u503c\u90fd\u662f1,\u5982\u679c\u7ed9\u4e0e\u5f00\u53d1\u8005\u5728\u4ee3\u7801\u4e2d\u7ed9\u63a5\u53e3\u81ea\u5b9a\u4e49\u7684\u503c\u5462"),(0,i.kt)("p",null,"\u6b64\u65f6\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eswagger-bootstrap-ui\u63d0\u4f9b\u7684\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"li"},"@ApiOperationSort"),"\u8fdb\u884c\u83b7\u53d6"),(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eswagger\u7684\u9ed8\u8ba4\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"li"},"@ApiOperation"),"\u4e2d\u7684postion\u5c5e\u6027\u8fdb\u884c\u4e8c\u6b21\u5229\u7528")),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u7684\u63a5\u53e3\u4ee3\u7801\u53ef\u80fd\u4f1a\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOr33der")\n@ApiOperation(value = "\u521b\u5efa\u8ba2\u5355",position = 2)\npublic Rest createOrdetr(@RequestBody Order order,HttpSession httpSession){\n Rest r=new Rest<>();\n r.setData(order);\n return r;\n}\n\n@PostMapping("/createOrder")\n@ApiOperationSort(3)\n@ApiOperation(value = "hash\u6d4b\u8bd5",nickname = "test")\npublic Rest createOrder(@RequestBody Order order){\n Rest r=new Rest<>();\n r.setData(order);\n return r;\n}\n')),(0,i.kt)("p",null,"\u4e24\u79cd\u65b9\u5f0f,\u53d6\u7b2c\u4e00\u79cd\u5373\u53ef"),(0,i.kt)("p",null,"\u8fd9\u65f6,\u6211\u4eec\u66f4\u6539\u4e00\u4e0b\u4e0a\u9762\u6211\u4eec\u7684Plugin\u63a5\u53e3\u5b9e\u73b0"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@Override\npublic void apply(OperationContext context) {\n int position=Integer.MAX_VALUE;\n //\u9996\u5148\u67e5\u627eApiOperation\u6ce8\u89e3\n Optional api=context.findAnnotation(ApiOperation.class);\n if (api.isPresent()){\n //\u5224\u65adpostion\u662f\u5426\u6709\u503c\n int posit=api.get().position();\n if (posit!=0){\n position=posit;\n }else{\n Optional apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);\n if (apiOperationSortOptional.isPresent()){\n position=apiOperationSortOptional.get().value();\n }\n }\n }else{\n Optional apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);\n if (apiOperationSortOptional.isPresent()){\n position=apiOperationSortOptional.get().value();\n }\n }\n\n context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order",String.valueOf(position))));\n}\n')),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u518d\u6765\u770bJSON\u6548\u679c"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(85114).Z,width:"855",height:"317"})),(0,i.kt)("p",null,"\u6b64\u65f6,\u6211\u4eec\u770b\u5230\uff0c\u6211\u4eec\u7684\u81ea\u5b9a\u4e49\u5c5e\u6027\u5df2\u7ecf\u51fa\u73b0\u4e86,\u800c\u4e14\u662f\u6839\u636e\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7684\u5b9e\u73b0,\u6b64\u65f6\u6211\u4eec\u7684\u76ee\u7684\u4e5f\u8fbe\u5230\u4e86."))}u.isMDXComponent=!0},55474:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/springfox-19-extensions-012354ec3050f2d287067a6cfd295c60.png"},85114:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/springfox-19-extensions1-d70b05fe5f91c45a535d594aa14bff08.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4c664172.74de6433.js b/knife4j-doc/gitee/assets/js/4c664172.74de6433.js deleted file mode 100644 index e04f75bab..000000000 --- a/knife4j-doc/gitee/assets/js/4c664172.74de6433.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7340],{3905:(e,r,n)=>{n.d(r,{Zo:()=>c,kt:()=>w});var t=n(67294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=t.createContext({}),u=function(e){var r=t.useContext(g),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},c=function(e){var r=u(e.components);return t.createElement(g.Provider,{value:r},e.children)},p={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},l=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,a=e.originalType,g=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),l=u(n),w=o,f=l["".concat(g,".").concat(w)]||l[w]||p[w]||a;return n?t.createElement(f,s(s({ref:r},c),{},{components:n})):t.createElement(f,s({ref:r},c))}));function w(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=l;var i={};for(var g in r)hasOwnProperty.call(r,g)&&(i[g]=r[g]);i.originalType=e,i.mdxType="string"==typeof e?e:o,s[1]=i;for(var u=2;u{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>g,default:()=>w,frontMatter:()=>i,metadata:()=>u,toc:()=>p});var t=n(87462),o=n(63366),a=(n(67294),n(3905)),s=["components"],i={},g="springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces",u={unversionedId:"action/springfox/springfox16",id:"action/springfox/springfox16",title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces",description:"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684",source:"@site/docs/action/springfox/springfox16.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox16",permalink:"/docs/action/springfox/springfox16",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61",permalink:"/docs/action/springfox/springfox15"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs",permalink:"/docs/action/springfox/springfox17"}},c={},p=[],l={toc:p};function w(e){var r=e.components,n=(0,o.Z)(e,s);return(0,a.kt)("wrapper",(0,t.Z)({},l,n,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u5341\u516d-\u5206\u7ec4\u63a5\u53e3swagger-resouces"},"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces"),(0,a.kt)("p",null,"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684"),(0,a.kt)("p",null,"\u5728springfox\u4e2d,\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86springfox-swagger-ui\u6765\u5448\u73b0\u6700\u7ec8\u7684\u63a5\u53e3\u4fe1\u606f.\u5728ui\u754c\u9762\u4e2d\u6709\u4e24\u4e2a\u6838\u5fc3\u63a5\u53e3\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"swagger-resources:swagger\u5206\u7ec4\u63a5\u53e3\uff0c\u521b\u5efa\u591a\u5c11Docket,\u5c31\u4f1a\u6709\u591a\u5c11\u5206\u7ec4\u4fe1\u606f"),(0,a.kt)("li",{parentName:"ul"},"/v2/api-docs:Swagger\u63a5\u53e3\u793a\u4f8b\u4fe1\u606f,\u901a\u8fc7Documentation\u5bf9\u8c61\u6700\u7ec8\u8f93\u51fa\u4e3aSwagger\u6807\u51c6\u4fe1\u606f")),(0,a.kt)("p",null,"\u5148\u6765\u770b\u63a5\u53e3\u6e90\u7801\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Controller\n@ApiIgnore\n@RequestMapping("/swagger-resources")\npublic class ApiResourceController {\n\n\n @Autowired(required = false)\n private SecurityConfiguration securityConfiguration;\n @Autowired(required = false)\n private UiConfiguration uiConfiguration;\n\n private final SwaggerResourcesProvider swaggerResources;\n\n @Autowired\n public ApiResourceController(SwaggerResourcesProvider swaggerResources) {\n this.swaggerResources = swaggerResources;\n }\n\n @RequestMapping(value = "/configuration/security")\n @ResponseBody\n public ResponseEntity securityConfiguration() {\n return new ResponseEntity(\n Optional.fromNullable(securityConfiguration).or(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK);\n }\n\n @RequestMapping(value = "/configuration/ui")\n @ResponseBody\n public ResponseEntity uiConfiguration() {\n return new ResponseEntity(\n Optional.fromNullable(uiConfiguration).or(UiConfigurationBuilder.builder().build()), HttpStatus.OK);\n }\n\n @RequestMapping\n @ResponseBody\n public ResponseEntity> swaggerResources() {\n return new ResponseEntity>(swaggerResources.get(), HttpStatus.OK);\n }\n}\n\n')),(0,a.kt)("p",null,"\u901a\u8fc7swaggerResources.get()\u65b9\u6cd5\u83b7\u53d6\u6700\u7ec8\u7684\u4fe1\u606f"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"SwaggerResourcesProvider"),"\u662f\u63a5\u53e3,\u5728springfox\u4e2d\u53ea\u6709\u4e00\u4e2a\u5b9e\u73b0\u7c7b",(0,a.kt)("inlineCode",{parentName:"p"},"InMemorySwaggerResourcesProvider")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Component\npublic class InMemorySwaggerResourcesProvider implements SwaggerResourcesProvider {\n private final String swagger1Url;\n private final String swagger2Url;\n\n @VisibleForTesting\n boolean swagger1Available;\n @VisibleForTesting\n boolean swagger2Available;\n\n private final DocumentationCache documentationCache;\n\n @Autowired\n public InMemorySwaggerResourcesProvider(\n Environment environment,\n DocumentationCache documentationCache) {\n swagger1Url = environment.getProperty("springfox.documentation.swagger.v1.path", "/api-docs");\n swagger2Url = environment.getProperty("springfox.documentation.swagger.v2.path", "/v2/api-docs");\n swagger1Available = classByName("springfox.documentation.swagger1.web.Swagger1Controller").isPresent();\n swagger2Available = classByName("springfox.documentation.swagger2.web.Swagger2Controller").isPresent();\n this.documentationCache = documentationCache;\n }\n\n @Override\n public List get() {\n List resources = new ArrayList();\n\n for (Map.Entry entry : documentationCache.all().entrySet()) {\n String swaggerGroup = entry.getKey();\n if (swagger1Available) {\n SwaggerResource swaggerResource = resource(swaggerGroup, swagger1Url);\n swaggerResource.setSwaggerVersion("1.2");\n resources.add(swaggerResource);\n }\n\n if (swagger2Available) {\n SwaggerResource swaggerResource = resource(swaggerGroup, swagger2Url);\n swaggerResource.setSwaggerVersion("2.0");\n resources.add(swaggerResource);\n }\n }\n Collections.sort(resources);\n return resources;\n }\n\n private SwaggerResource resource(String swaggerGroup, String baseUrl) {\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(swaggerGroup);\n swaggerResource.setUrl(swaggerLocation(baseUrl, swaggerGroup));\n return swaggerResource;\n }\n\n private String swaggerLocation(String swaggerUrl, String swaggerGroup) {\n String base = Optional.of(swaggerUrl).get();\n if (Docket.DEFAULT_GROUP_NAME.equals(swaggerGroup)) {\n return base;\n }\n return base + "?group=" + swaggerGroup;\n }\n}\n\n')),(0,a.kt)("p",null,"\u901a\u8fc7\u904d\u5386",(0,a.kt)("inlineCode",{parentName:"p"},"DocumentationCache"),"\u4e2d\u7f13\u5b58\u7684Documentation\u5bf9\u8c61,\u5f97\u5230\u63a5\u53e3\u6587\u6863\u4fe1\u606f\u7684\u5206\u7ec4\u4fe1\u606f,\u54cd\u5e94",(0,a.kt)("inlineCode",{parentName:"p"},"SwaggerResource"),"\u7684\u96c6\u5408\u4fe1\u606f"),(0,a.kt)("p",null,"SwaggerResource\u4fe1\u606f\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\u4fe1\u606f\uff1a\u540d\u79f0\uff0curl\u3001swagger\u7248\u672c"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"\n@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class SwaggerResource implements Comparable {\n private String name;\n private String url;\n private String swaggerVersion;\n @Override\n public int compareTo(SwaggerResource other) {\n return ComparisonChain.start()\n .compare(this.swaggerVersion, other.swaggerVersion)\n .compare(this.name, other.name)\n .result();\n }\n\n}\n")),(0,a.kt)("p",null,"\u5728\u5f00\u53d1",(0,a.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u8fc7\u7a0b\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5f88\u591a\u670b\u53cb\u63d0\u95ee,\u6709\u4ec0\u4e48\u65b9\u5f0f\u80fd\u5bf9\u6587\u6863\u7684\u5206\u7ec4\u4fe1\u606f\u8fdb\u884c\u6392\u5e8f\u7684\u5417\uff1f"),(0,a.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u4e0a\u9762\u7684\u6e90\u7801\u53ef\u4ee5\u770b\u5230,\u5176\u5b9eSwaggerResource\u5b9e\u73b0\u4e86Comparable\u63a5\u53e3,\u4f46\u662f\u4ed6\u7684\u6392\u5e8f\u89c4\u5219\u662f\u5148\u6839\u636eswagger\u7684\u7248\u672c\u8fdb\u884c\u6392\u5e8f\uff0c\u7136\u540e\u5bf9\u540d\u79f0\u8fdb\u884c\u6392\u5e8f,asc\u987a\u5e8f\u6392\u5e8f"),(0,a.kt)("p",null,"\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u5b9e\u73b0\u6211\u4eec\u81ea\u5b9a\u4e49\u7684\u6392\u5e8f\u65b9\u5f0f\u5462?\u540e\u9762\u6211\u4f1a\u8be6\u7ec6\u4ecb\u7ecd."))}w.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4c664172.c8d9ea1d.js b/knife4j-doc/gitee/assets/js/4c664172.c8d9ea1d.js new file mode 100644 index 000000000..da5a40328 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4c664172.c8d9ea1d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7340],{3905:(e,r,n)=>{n.d(r,{Zo:()=>c,kt:()=>f});var t=n(67294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function s(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=t.createContext({}),u=function(e){var r=t.useContext(g),n=r;return e&&(n="function"==typeof e?e(r):s(s({},r),e)),n},c=function(e){var r=u(e.components);return t.createElement(g.Provider,{value:r},e.children)},p="mdxType",l={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},w=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,a=e.originalType,g=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),w=o,f=p["".concat(g,".").concat(w)]||p[w]||l[w]||a;return n?t.createElement(f,s(s({ref:r},c),{},{components:n})):t.createElement(f,s({ref:r},c))}));function f(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=w;var i={};for(var g in r)hasOwnProperty.call(r,g)&&(i[g]=r[g]);i.originalType=e,i[p]="string"==typeof e?e:o,s[1]=i;for(var u=2;u{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>g,default:()=>f,frontMatter:()=>i,metadata:()=>u,toc:()=>p});var t=n(87462),o=n(63366),a=(n(67294),n(3905)),s=["components"],i={},g="springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces",u={unversionedId:"action/springfox/springfox16",id:"action/springfox/springfox16",title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces",description:"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684",source:"@site/docs/action/springfox/springfox16.md",sourceDirName:"action/springfox",slug:"/action/springfox/springfox16",permalink:"/docs/action/springfox/springfox16",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660577531,formattedLastUpdatedAt:"2022\u5e748\u670815\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e94) \u5f52\u6863\u5f97\u5230Documentation\u6587\u6863\u5bf9\u8c61",permalink:"/docs/action/springfox/springfox15"},next:{title:"springfox \u6e90\u7801\u5206\u6790(\u5341\u4e03) Swagger2\u63a5\u53e3\u6587\u6863\u793a\u4f8b\u63a5\u53e3api-docs",permalink:"/docs/action/springfox/springfox17"}},c={},p=[],l={toc:p},w="wrapper";function f(e){var r=e.components,n=(0,o.Z)(e,s);return(0,a.kt)(w,(0,t.Z)({},l,n,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"springfox-\u6e90\u7801\u5206\u6790\u5341\u516d-\u5206\u7ec4\u63a5\u53e3swagger-resouces"},"springfox \u6e90\u7801\u5206\u6790(\u5341\u516d) \u5206\u7ec4\u63a5\u53e3swagger-resouces"),(0,a.kt)("p",null,"\u901a\u8fc7\u524d\u9762\u7684\u5206\u6790,\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u4e86springfox\u7684Documentation\u6587\u6863\u5bf9\u8c61,\u5c06\u6211\u4eec\u7684RESTful\u63a5\u53e3\u6700\u7ec8\u8f6c\u6362\u4e3a\u4e86\u6587\u6863\u5bf9\u8c61,\u6587\u6863\u5bf9\u8c61\u662f\u5305\u542b\u4e86\u63a5\u53e3\u5217\u8868\u3001\u5206\u7ec4\u4fe1\u606f\u7b49\u5c5e\u6027\u7684"),(0,a.kt)("p",null,"\u5728springfox\u4e2d,\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86springfox-swagger-ui\u6765\u5448\u73b0\u6700\u7ec8\u7684\u63a5\u53e3\u4fe1\u606f.\u5728ui\u754c\u9762\u4e2d\u6709\u4e24\u4e2a\u6838\u5fc3\u63a5\u53e3\uff1a"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"swagger-resources:swagger\u5206\u7ec4\u63a5\u53e3\uff0c\u521b\u5efa\u591a\u5c11Docket,\u5c31\u4f1a\u6709\u591a\u5c11\u5206\u7ec4\u4fe1\u606f"),(0,a.kt)("li",{parentName:"ul"},"/v2/api-docs:Swagger\u63a5\u53e3\u793a\u4f8b\u4fe1\u606f,\u901a\u8fc7Documentation\u5bf9\u8c61\u6700\u7ec8\u8f93\u51fa\u4e3aSwagger\u6807\u51c6\u4fe1\u606f")),(0,a.kt)("p",null,"\u5148\u6765\u770b\u63a5\u53e3\u6e90\u7801\uff1a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Controller\n@ApiIgnore\n@RequestMapping("/swagger-resources")\npublic class ApiResourceController {\n\n\n @Autowired(required = false)\n private SecurityConfiguration securityConfiguration;\n @Autowired(required = false)\n private UiConfiguration uiConfiguration;\n\n private final SwaggerResourcesProvider swaggerResources;\n\n @Autowired\n public ApiResourceController(SwaggerResourcesProvider swaggerResources) {\n this.swaggerResources = swaggerResources;\n }\n\n @RequestMapping(value = "/configuration/security")\n @ResponseBody\n public ResponseEntity securityConfiguration() {\n return new ResponseEntity(\n Optional.fromNullable(securityConfiguration).or(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK);\n }\n\n @RequestMapping(value = "/configuration/ui")\n @ResponseBody\n public ResponseEntity uiConfiguration() {\n return new ResponseEntity(\n Optional.fromNullable(uiConfiguration).or(UiConfigurationBuilder.builder().build()), HttpStatus.OK);\n }\n\n @RequestMapping\n @ResponseBody\n public ResponseEntity> swaggerResources() {\n return new ResponseEntity>(swaggerResources.get(), HttpStatus.OK);\n }\n}\n\n')),(0,a.kt)("p",null,"\u901a\u8fc7swaggerResources.get()\u65b9\u6cd5\u83b7\u53d6\u6700\u7ec8\u7684\u4fe1\u606f"),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"SwaggerResourcesProvider"),"\u662f\u63a5\u53e3,\u5728springfox\u4e2d\u53ea\u6709\u4e00\u4e2a\u5b9e\u73b0\u7c7b",(0,a.kt)("inlineCode",{parentName:"p"},"InMemorySwaggerResourcesProvider")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'\n@Component\npublic class InMemorySwaggerResourcesProvider implements SwaggerResourcesProvider {\n private final String swagger1Url;\n private final String swagger2Url;\n\n @VisibleForTesting\n boolean swagger1Available;\n @VisibleForTesting\n boolean swagger2Available;\n\n private final DocumentationCache documentationCache;\n\n @Autowired\n public InMemorySwaggerResourcesProvider(\n Environment environment,\n DocumentationCache documentationCache) {\n swagger1Url = environment.getProperty("springfox.documentation.swagger.v1.path", "/api-docs");\n swagger2Url = environment.getProperty("springfox.documentation.swagger.v2.path", "/v2/api-docs");\n swagger1Available = classByName("springfox.documentation.swagger1.web.Swagger1Controller").isPresent();\n swagger2Available = classByName("springfox.documentation.swagger2.web.Swagger2Controller").isPresent();\n this.documentationCache = documentationCache;\n }\n\n @Override\n public List get() {\n List resources = new ArrayList();\n\n for (Map.Entry entry : documentationCache.all().entrySet()) {\n String swaggerGroup = entry.getKey();\n if (swagger1Available) {\n SwaggerResource swaggerResource = resource(swaggerGroup, swagger1Url);\n swaggerResource.setSwaggerVersion("1.2");\n resources.add(swaggerResource);\n }\n\n if (swagger2Available) {\n SwaggerResource swaggerResource = resource(swaggerGroup, swagger2Url);\n swaggerResource.setSwaggerVersion("2.0");\n resources.add(swaggerResource);\n }\n }\n Collections.sort(resources);\n return resources;\n }\n\n private SwaggerResource resource(String swaggerGroup, String baseUrl) {\n SwaggerResource swaggerResource = new SwaggerResource();\n swaggerResource.setName(swaggerGroup);\n swaggerResource.setUrl(swaggerLocation(baseUrl, swaggerGroup));\n return swaggerResource;\n }\n\n private String swaggerLocation(String swaggerUrl, String swaggerGroup) {\n String base = Optional.of(swaggerUrl).get();\n if (Docket.DEFAULT_GROUP_NAME.equals(swaggerGroup)) {\n return base;\n }\n return base + "?group=" + swaggerGroup;\n }\n}\n\n')),(0,a.kt)("p",null,"\u901a\u8fc7\u904d\u5386",(0,a.kt)("inlineCode",{parentName:"p"},"DocumentationCache"),"\u4e2d\u7f13\u5b58\u7684Documentation\u5bf9\u8c61,\u5f97\u5230\u63a5\u53e3\u6587\u6863\u4fe1\u606f\u7684\u5206\u7ec4\u4fe1\u606f,\u54cd\u5e94",(0,a.kt)("inlineCode",{parentName:"p"},"SwaggerResource"),"\u7684\u96c6\u5408\u4fe1\u606f"),(0,a.kt)("p",null,"SwaggerResource\u4fe1\u606f\u4e3b\u8981\u5305\u542b\u7684\u5b57\u6bb5\u4fe1\u606f\uff1a\u540d\u79f0\uff0curl\u3001swagger\u7248\u672c"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},"\n@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class SwaggerResource implements Comparable {\n private String name;\n private String url;\n private String swaggerVersion;\n @Override\n public int compareTo(SwaggerResource other) {\n return ComparisonChain.start()\n .compare(this.swaggerVersion, other.swaggerVersion)\n .compare(this.name, other.name)\n .result();\n }\n\n}\n")),(0,a.kt)("p",null,"\u5728\u5f00\u53d1",(0,a.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u8fc7\u7a0b\u4e2d,\u7ecf\u5e38\u4f1a\u78b0\u5230\u5f88\u591a\u670b\u53cb\u63d0\u95ee,\u6709\u4ec0\u4e48\u65b9\u5f0f\u80fd\u5bf9\u6587\u6863\u7684\u5206\u7ec4\u4fe1\u606f\u8fdb\u884c\u6392\u5e8f\u7684\u5417\uff1f"),(0,a.kt)("p",null,"\u6211\u4eec\u901a\u8fc7\u4e0a\u9762\u7684\u6e90\u7801\u53ef\u4ee5\u770b\u5230,\u5176\u5b9eSwaggerResource\u5b9e\u73b0\u4e86Comparable\u63a5\u53e3,\u4f46\u662f\u4ed6\u7684\u6392\u5e8f\u89c4\u5219\u662f\u5148\u6839\u636eswagger\u7684\u7248\u672c\u8fdb\u884c\u6392\u5e8f\uff0c\u7136\u540e\u5bf9\u540d\u79f0\u8fdb\u884c\u6392\u5e8f,asc\u987a\u5e8f\u6392\u5e8f"),(0,a.kt)("p",null,"\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u5b9e\u73b0\u6211\u4eec\u81ea\u5b9a\u4e49\u7684\u6392\u5e8f\u65b9\u5f0f\u5462?\u540e\u9762\u6211\u4f1a\u8be6\u7ec6\u4ecb\u7ecd."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4e260ea9.03675f0b.js b/knife4j-doc/gitee/assets/js/4e260ea9.03675f0b.js new file mode 100644 index 000000000..5c7cd0c0c --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4e260ea9.03675f0b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1173],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>m});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=a.createContext({}),c=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=c(e.components);return a.createElement(o.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=c(n),k=i,m=u["".concat(o,".").concat(k)]||u[k]||d[k]||r;return n?a.createElement(m,l(l({ref:t},s),{},{components:n})):a.createElement(m,l({ref:t},s))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[u]="string"==typeof e?e:i,l[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>p,metadata:()=>c,toc:()=>u});var a=n(87462),i=n(63366),r=(n(67294),n(3905)),l=["components"],p={id:"knife4j-new-product-idea",title:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",description:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",keywords:["knife4j","Knife4jInsight","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e749\u670817\u65e5"},o=void 0,c={unversionedId:"blog/product/knife4j-new-product-idea",id:"blog/product/knife4j-new-product-idea",title:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",description:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",source:"@site/docs/blog/product/knife4j-new-product.mdx",sourceDirName:"blog/product",slug:"/blog/product/knife4j-new-product-idea",permalink:"/docs/blog/product/knife4j-new-product-idea",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1694061184,formattedLastUpdatedAt:"2023\u5e749\u67087\u65e5",sidebarPosition:4,frontMatter:{id:"knife4j-new-product-idea",title:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",description:"Knife4j\u65b0\u4ea7\u54c1\u7684\u60f3\u6cd5",keywords:["knife4j","Knife4jInsight","Knife4j\u805a\u5408","\u6587\u6863\u805a\u5408","\u5fae\u670d\u52a1\u805a\u5408\u6587\u6863"],sidebar_position:4,author:"\u516b\u4e00\u83dc\u5200",data:"2023\u5e749\u670817\u65e5"}},s={},u=[{value:"\u5199\u5728\u5f00\u5934",id:"\u5199\u5728\u5f00\u5934",level:2},{value:"\u65b0\u60f3\u6cd5",id:"\u65b0\u60f3\u6cd5",level:2},{value:"\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406",id:"\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406",level:3},{value:"\u5f00\u53d1\u5bc6\u94a5\u7edf\u4e00\u7ba1\u7406",id:"\u5f00\u53d1\u5bc6\u94a5\u7edf\u4e00\u7ba1\u7406",level:3},{value:"\u4e0b\u6e38\u670d\u52a1\u7edf\u4e00\u7ba1\u7406",id:"\u4e0b\u6e38\u670d\u52a1\u7edf\u4e00\u7ba1\u7406",level:3},{value:"LLM\u5927\u6a21\u578b\u7ed3\u5408",id:"llm\u5927\u6a21\u578b\u7ed3\u5408",level:3},{value:"\u7ed3\u5c3e",id:"\u7ed3\u5c3e",level:2}],d={toc:u},k="wrapper";function m(e){var t=e.components,p=(0,i.Z)(e,l);return(0,r.kt)(k,(0,a.Z)({},d,p,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"\u5199\u5728\u5f00\u5934"},"\u5199\u5728\u5f00\u5934"),(0,r.kt)("p",null,"Knife4j\u7684\u53d1\u5c55\u5df2\u7ecf\u6709\u597d\u51e0\u4e2a\u5e74\u5934\u4e86\uff0c\u6700\u8fd1\u60f3\u6765\uff0c\u867d\u7136\u8fd9\u4e2a\u5c0f\u7ec4\u4ef6\u4e0d\u592a\u7a33\u5b9a\uff0c\u4f46\u6709\u6bcf\u5929\u4f9d\u7136\u6536\u5230\u5f88\u591a\u5c0f\u4f19\u4f34\u7684\u79ef\u6781\u53cd\u9988\uff0c\u8fd9\u8ba9\u6211\u53c8\u4e0d\u7531\u81ea\u4e3b\u7684\u5bf9\u8fd9\u4e2a\u9879\u76ee\u4ea7\u751f\u4e86\u7f81\u7eca\u3002\u4e00\u76f4\u4ee5\u6765\uff0c\u603b\u60f3\u628a\u4e00\u4e9b\u5de5\u4f5c\u4e2d\u7684\u60f3\u6cd5\uff0c\u4ee5\u53ca\u548cKnife4j\u5468\u8fb9\u751f\u6001\u76f8\u5173\u7684\u5185\u5bb9\u7ed3\u5408\u8d77\u6765\uff0c\u505a\u4e00\u4e9b\u4e0d\u4e00\u6837\u7684\u4e8b\u60c5\u3002"),(0,r.kt)("p",null,"\u5728Knife4j\u76ee\u524d\u7684\u751f\u6001\u4e2d\uff0c\u6211\u4e3b\u8981\u4e3aKnife4j\u5199\u4e86\u4e00\u4e9b\u6280\u672f\u7684\u7ec4\u4ef6\uff0c\u4e3b\u8981\u5305\u62ec\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Knife4j-ui\uff1a\u524d\u7aef\u7ec4\u4ef6\u90e8\u5206\uff0c\u4e3b\u8981\u57fa\u4e8eSwagger2/OpenAPI3\u89c4\u8303\u7684\u8bc6\u522b\uff0c\u901a\u8fc7\u4e0d\u540c\u7684\u5c55\u73b0\u53ca\u4ea4\u4e92\uff0c\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e0d\u540c\u7684\u4f53\u9a8c"),(0,r.kt)("li",{parentName:"ul"},"knife4j-aggregation:\u524d\u671f\u57fa\u4e8eServlet\u751f\u6001\u4f53\u7cfb\u4e0b\u7684\u805a\u5408\u7ec4\u4ef6\uff0c\u89e3\u51b3\u5728Spring Cloud Gateway\u7b49\u5f02\u6b65\u7f16\u7801\u8f83\u56f0\u96be\u7684\u4eba\u6587\u6863\u805a\u5408\u95ee\u9898\uff0c\u6253\u901a\u5404\u4e2a\u6ce8\u518c\u4e2d\u5fc3\u7ec4\u4ef6(Nacos\\Eureka\\Consul\u7b49)\u5b9e\u73b0\u63a5\u53e3\u6587\u6863\u7684\u805a\u5408"),(0,r.kt)("li",{parentName:"ul"},"knife4j-gateway\uff1aSpring Cloud Gateway\u7f51\u5173\u4e0b\u7684\u805a\u5408\u7ec4\u4ef6\uff0c4\u884c\u914d\u7f6e\u641e\u5b9a\u7f51\u5173\u4e0b\u7684\u63a5\u53e3\u6587\u6863\u805a\u5408"),(0,r.kt)("li",{parentName:"ul"},"Knife4j-extension:\u57fa\u4e8eChrome\u6d4f\u89c8\u5668\u7684\u8c03\u8bd5\u63d2\u4ef6\uff0c\u53ea\u8981\u662fSwagger2/OpenAPI\u89c4\u8303\uff0c\u5c31\u53ef\u4ee5\u9884\u89c8\u6587\u6863/\u8c03\u8bd5\u6587\u6863\uff0c\u4e3a\u4e86\u4e0a\u67b6\u8fd8\u5f00\u901a\u4e86vista\u5361\uff0c\u4ed8\u8d39\u7ed9Google5\u7f8e\u5143\uff0c\u73b0\u5728\u4e0b\u67b6\u4e86(\u957f\u65f6\u95f4\u6ca1\u66f4\u65b0\u4ee3\u7801\u6709\u6f0f\u6d1e\u88ab\u8feb\u4e0b\u67b6)\ud83d\ude02\u3002\u3002\u3002"),(0,r.kt)("li",{parentName:"ul"},"knife4j-insight\uff1a\u72ec\u7acb\u8fd0\u884c\u7684\u805a\u5408\u4e2d\u95f4\u4ef6\uff0c\u5c06\u786c\u76d8/Nacos\u7b49\u4f5c\u4e3aSwagger2/OpenAPI3\u89c4\u8303\u7684\u6570\u636e\u6e90\uff0c\u590d\u7528aggregation\u7684\u751f\u6001\uff0c\u805a\u5408\u5404\u4e2a\u6ce8\u518c\u4e2d\u5fc3\uff0c\u5b9e\u73b0\u5e73\u53f0\u5316\uff0c\u805a\u5408\u6240\u6709\u63a5\u53e3\u89c4\u8303\uff0c\u7edf\u4e00\u9884\u89c8/\u8c03\u8bd5\u3002\u3002\u66f4\u65b0\u4e863\u4e2a\u7248\u672c(\u6211\u89c9\u5f97\u81ea\u5df1\u601d\u8def\u633a\u597d\u7684)\u3002\u3002\ud83d\ude02")),(0,r.kt)("h2",{id:"\u65b0\u60f3\u6cd5"},"\u65b0\u60f3\u6cd5"),(0,r.kt)("p",null,"\u6700\u8fd1\u8fd9\u6bb5\u65f6\u95f4\uff0c\u4e3b\u8981\u601d\u8003\u7684\u662fKnife4j\u8fd9\u4e2a\u9879\u76ee\u5e94\u8be5\u5982\u4f55\u53d1\u5c55\u4e0b\u53bb\uff0c\u5982\u679c\u505a\u65b0\u4ea7\u54c1\uff0c\u4e0e\u5e02\u9762\u4e0a\u5df2\u7ecf\u5b58\u5728\u7684\u5176\u4ed6\u4ea7\u54c1\u5982\u4f55\u505a\u5dee\u5f02\u5316\u7684\u7ade\u4e89\u3002"),(0,r.kt)("p",null,"\u601d\u6765\u60f3\u53bb\uff0c\u6211\u53c8\u6709\u4e86\u65b0\u7684\u65b9\u5411\u548c\u76ee\u6807\uff5e\uff01"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u6298\u817e\u65b0\u4ea7\u54c1\u7684\u5fc3\u6001\u4e00\u76f4\u6ca1\u505c\u8fc7\u3002\u3002")),(0,r.kt)("p",null,"\u5e02\u9762\u4e0a\u7684\u4ea7\u54c1\u5305\u62ec",(0,r.kt)("inlineCode",{parentName:"p"},"Postman"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"Apifox"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"Apipost"),"\u7b49\u7b49\uff0c\u4e13\u6ce8\u5728\u81ea\u5df1\u7684\u9886\u57df\u91cc\u9762\uff0c\u8986\u76d6\u9762\u90fd\u633a\u5e7f\u7684\uff0c\u800cKnife4j\u597d\u50cf\u4ee5Ui\u754c\u9762\u4ea4\u4e92\u8d77\u5bb6\uff0c\u53d7\u4f17\u8981\u5b85\u4e00\u4e9b\uff0c\u60f3\u60f3\u8fd9\u4e9b\u4ea7\u54c1\u7684\u8bcd\u4e91\u5173\u952e\u5b57\uff1a",(0,r.kt)("inlineCode",{parentName:"p"},"API\u6587\u6863"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u8c03\u8bd5"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u534f\u4f5c"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u6d4b\u8bd5"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"API\u8bbe\u8ba1"),"\u7b49\u7b49"),(0,r.kt)("p",null,"\u6bcf\u4e00\u4e2a\u5173\u952e\u5b57\u91cc\u9762\u6240\u9700\u8981\u6295\u5165\u7684\u7cbe\u529b\uff0c\u90fd\u662fKnife4j\u65e0\u6cd5\u4f01\u53ca\u7684\uff0c\u800c\u4e14\u6211\u5728\u5f88\u65e9\u4e4b\u524d\u5206\u4eabKnife4j\u7684\u5b9a\u4f4d\u65f6\uff0c\u6211\u4e00\u76f4\u60f3\u628a\u4ed6\u4f5c\u4e3a\u4e00\u4e2a\u5de5\u5177\u8f93\u51fa\uff0c\u5355\u7eaf\u7684\u5de5\u5177\uff0c\u56e0\u6b64\uff0c\u5305\u62ec\uff1a",(0,r.kt)("inlineCode",{parentName:"p"},"\u534f\u4f5c"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u6d89\u53ca"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u81ea\u52a8\u5316"),"\u7b49\u7b49\u6807\u7b7e\uff0c\u90fd\u4e0d\u9002\u5408\u6211"),(0,r.kt)("p",null,"\u90a3\u4e48\uff0c\u5e94\u8be5\u505a\u4ec0\u4e48\uff1f\u505a\u4e00\u70b9\u4e0d\u4e00\u6837\u7684\u5462\uff1f"),(0,r.kt)("p",null,"Knife4jInsight\u8fd9\u4e2a\u4ea7\u54c1\u7684\u601d\u8def\u6211\u81ea\u8ba4\u4e3a\u8fd8\u662f\u5f97\u53d1\u5c55\u4e0b\u53bb,\u53ea\u4e0d\u8fc7\u9700\u8981\u66f4\u52a0\u4ea7\u54c1\u5316\u4e00\u4e0b\uff0c\u505a\u6210\u5e73\u53f0\uff0c\u7ed9\u7528\u6237\u63d0\u4f9b\u66f4\u65b9\u4fbf\u7684\u53ef\u64cd\u4f5c\u5316\u7684\u754c\u9762\uff0c\u7b80\u5316\u6574\u4e2a\u4f7f\u7528\u6b65\u9aa4\u3002"),(0,r.kt)("p",null,"\u57fa\u4e8e\u8fd9\u4e2a\u60f3\u6cd5\uff0c\u548c\u8111\u5b50\u91cc\u8e66\u51fa\u4e86\u4e00\u4e9b\u65b0\u7684Idea\uff0c\u5305\u62ec\uff1a",(0,r.kt)("inlineCode",{parentName:"p"},"\u5f00\u653e\u5e73\u53f0"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"\u63a5\u53e3\u5c55\u793a"),"\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"LLM\u5927\u6a21\u578b"),"\u3002"),(0,r.kt)("p",null,"\u6211\u6709\u4e86\u4e00\u4e2a\u4ea7\u54c1\u7684\u5927\u81f4\u96cf\u5f62\uff0c\u6211\u753b\u4e86\u4e00\u4e2a\u8349\u56fe\uff0c\u5927\u6982\u662f\u8fd9\u4e2a\u6837\u5b50\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"\u56fe1.\u4ea7\u54c1\u67b6\u6784\u56fe",src:n(98933).Z,width:"1131",height:"741"})),(0,r.kt)("p",null,"\u5728\u4e0a\u56fe\u4e2d\uff0cKnife4jInsight\u662f\u4e00\u4e2a\u72ec\u7acb\u670d\u52a1\u7ec4\u4ef6\uff0c\u4f9d\u9644\u5728Apache APISIX\u7f51\u5173\u7ec4\u4ef6\u4e0b\u7684\u670d\u52a1\u3002\u90a3\u4e48\uff0c\u4ea7\u54c1\u5b9a\u4f4d\u662f\u4ec0\u4e48\u5462\uff1f"),(0,r.kt)("p",null,"\u4ea7\u54c1\u5b9a\u4f4d\uff1a",(0,r.kt)("strong",{parentName:"p"},"\u7edf\u4e00\u7684\u901a\u7528\u63a5\u53e3\u6587\u6863\u53ca\u5f00\u653e\u5e73\u53f0\u670d\u52a1\u7cfb\u7edf")),(0,r.kt)("p",null,"\u5728\u529f\u80fd\u4e0a\uff0c\u4e3b\u8981\u662f\u4e09\u5927\u5757\u7684\u529f\u80fd\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406"),"\uff1a\u501f\u52a9\u4e8eKnife4j\u7684\u524d\u7aef\u754c\u9762\uff0c\u63a5\u53e3\u6587\u6863\u5b8c\u5168\u9075\u5faaSwagger2/OpenAPI3\u89c4\u8303\uff0c\u4e0b\u6e38\u6216\u8005\u5916\u6e38\u670d\u52a1\u7684\u63a5\u53e3\u6587\u6863\uff0c\u53ea\u9700\u8981\u662f\u7b26\u5408\u89c4\u8303\u7684\uff0c\u90fd\u53ef\u4ee5\u7edf\u4e00\u5728\u5e73\u53f0\u8fdb\u884c\u7ba1\u7406\u7ef4\u62a4\uff0c\u5e76\u63d0\u4f9b\u6587\u6863\u6700\u57fa\u7840\u7684\u9884\u89c8\u3001\u8c03\u8bd5\u3001\u9274\u6743\u8bbf\u95ee\u7b49\u529f\u80fd"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"\u5f00\u53d1\u5bc6\u94a5\u7edf\u4e00\u7ba1\u7406\uff1a"),"\u5f00\u53d1\u8005\u5f00\u653e\u7684API\u63a5\u53e3\uff0c\u5f88\u591a\u65f6\u5019\uff0c\u5982\u679c\u8981\u5bf9\u5916\u7684\u60c5\u51b5\u4e0b\uff0c\u901a\u5e38\u5f00\u53d1\u8005\u4eec\u90fd\u9700\u8981\u5b9e\u73b0\u63a5\u53e3\u7684\u9274\u6743\u63a7\u5236\u903b\u8f91\uff0c\u800c\u5982\u679c\u6bcf\u4e2a\u670d\u52a1\u6216\u4e0d\u540c\u7684\u9879\u76ee\u90fd\u5b9e\u73b0\u4e00\u904d\uff0c\u90a3\u592a\u8017\u8d39\u7cbe\u529b\u4e86\uff0c\u90a3\u4e48\u6211\u89c9\u5f97\u53ea\u8981\u662f\u805a\u5408\u4e0a\u6765\u7684\u63a5\u53e3\u6587\u6863\uff0c\u6240\u5bf9\u5e94\u7684\u4e0b\u6e38\u670d\u52a1\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7\u8be5\u5e73\u53f0\u8fdb\u884c\u7edf\u4e00\u7684\u7ba1\u7406\uff0c\u5206\u914d\u9274\u6743\u53ca\u7ba1\u7406\u5f00\u653e\u7528\u6237"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"\u4e0b\u6e38\u670d\u52a1\u7edf\u4e00\u7ba1\u7406\uff1a"),"\u4e00\u65e6\u6d89\u53ca\u5230\u5f00\u653e\u5e73\u53f0\uff0c\u90a3\u4e48\u7f51\u5173\u7684\u4f01\u4e1a\u7ea7\u522b\u9ad8\u6027\u80fd\u8981\u6c42\u4e0d\u53ef\u907f\u514d\uff0c\u8fd9\u4e0d\u662fKnife4j\u7684\u5f3a\u9879\uff0c\u4f5c\u8005\u4e5f\u6ca1\u8fd9\u4e2a\u80fd\u529b\uff0c\u4f5c\u4e3a\u5f00\u653e\u5e73\u53f0\u7f51\u5173\u5c42\uff0c\u8fd9\u91cc\u8003\u8651Apache APISIX\u6765\u5b9e\u73b0\u670d\u52a1\u7684\u5206\u53d1\uff0c\u4f9d\u9760Apache APISIX\u63d0\u4f9b\u7684Admin API\u63a5\u53e3\uff0c\u5e73\u53f0\u901a\u8fc7\u5c06\u4e0b\u6e38\u670d\u52a1\u7684\u8f6c\u53d1\u89c4\u5219\u8fdb\u884c\u52a8\u6001\u6ce8\u518c\uff0c\u8fd9\u6837\u63a5\u53e3\u6587\u6863\u548c\u5f00\u653e\u5e73\u53f0\u5c31\u4ece\u529f\u80fd\u804c\u8d23\u4e0a\u8fdb\u884c\u4e86\u533a\u5206\uff0c\u4e92\u76f8\u5b58\u5728\u4f9d\u8d56\u5173\u7cfb\uff0c\u4f46\u804c\u8d23\u5206\u5de5\u4e0d\u540c")),(0,r.kt)("p",null,"\u5e73\u53f0\u7684\u7f51\u5173\u9274\u6743\uff0c\u901a\u8fc7\u5b9e\u73b0Apache APIXIS\u7684\u9274\u6743\u63d2\u4ef6\uff0c\u690d\u5165\u5230\u7f51\u5173\u7ec4\u4ef6\u4e2d\uff0c\u6b64\u65f6\u6240\u6709\u5f00\u653e\u5e73\u53f0\u7684\u7f51\u5173\u5165\u53e3\u6d41\u91cf\uff0c\u90fd\u4f1a\u901a\u8fc7\u8be5\u63d2\u4ef6\u4e0e",(0,r.kt)("inlineCode",{parentName:"p"},"Knife4jInsight"),"\u4e2d\u7684\u5f00\u53d1\u5bc6\u94a5\u8fdb\u884c\u8054\u52a8\uff0c\u5b9e\u73b0\u63a5\u53e3\u7684\u9274\u6743\u3002"),(0,r.kt)("h3",{id:"\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406"},"\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406"),(0,r.kt)("p",null,"\u5148\u6765\u770b\u5f00\u653e\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406\uff0c\u8003\u8651\u5230\u6211\u4eec\u8981\u4e0e\u5f00\u6e90Knife4j\u9879\u76ee\u5171\u540c\u53d1\u5c55\uff0c\u56e0\u6b64\u4ea7\u54c1\u7684\u529f\u80fd\u4e0a\uff0c\u4e5f\u662f\u4ee5\u5f00\u6e90Knife4j\u4e3a\u4e3b\uff0c\u63a5\u53e3\u6587\u6863\u5b8c\u5168\u9075\u5faaSwagger2/OpenAPI3\u89c4\u8303\uff0c\u5728\u8fd9\u4e2a\u573a\u666f\u4e0b\uff0c\u5b9e\u73b0\u6587\u6863\u7684\u7edf\u4e00\u7ba1\u7406\u548c\u805a\u5408"),(0,r.kt)("p",null,"\u4e3b\u8981\u5305\u62ec\u4e24\u4e2a\u529f\u80fd\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Namespace"),"\uff1a\u547d\u540d\u7a7a\u95f4(namespace)\u662f\u5e73\u53f0\u4e2d\u62bd\u8c61\u7684\u6982\u5ff5,\u4e00\u4e2anamespace\u4e0b\u53ef\u4ee5\u5141\u8bb8\u5b58\u5728\u591a\u4e2aOpenAPI\u89c4\u8303\u5b9e\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u8bb2\u8be5\u529f\u80fd\u7406\u89e3\u4e3a\u4f01\u4e1a\u3001\u9879\u76ee\u3001\u90e8\u95e8\u3001\u4ea7\u54c1\u7b49\u7b49"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"ApiRegister"),"\uff1a\u670d\u52a1\u5b9e\u4f8b(ApiRegister)\u662f\u4e00\u4e2aOpenAPI\u89c4\u8303\u7684\u6700\u5c0f\u5355\u5143,\u5c06OpenAPI\u63a5\u53e3\u89c4\u8303\u6570\u636e\u6e90\u901a\u8fc7\u81ea\u52a8\u6ce8\u518c\u6216\u624b\u52a8\u586b\u62a5\u7684\u65b9\u5f0f,\u4fdd\u5b58\u5728\u5e73\u53f0\u4e2d\u540e\u5373\u53ef\u8fdb\u884c\u63a5\u53e3\u6587\u6863\u7684\u5728\u7ebf\u9884\u89c8\u529f\u80fd\uff0c\u8fd9\u6837\u7684\u597d\u5904\u662f\u6211\u4eec\u5373\u53ef\u4ee5\u5bf9\u63a5\u53e3\u6587\u6863\u8fdb\u884c\u5f52\u6863\u4fdd\u5b58\uff0c\u53c8\u53ef\u4ee5\u548c\u4e0b\u6e38\u670d\u52a1\u8054\u52a8\uff0c\u6253\u901a\u8c03\u8bd5\u3002"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"\u6587\u6863\u7528\u6237\u4e2d\u5fc3"),": \u6bcf\u4e00\u4e2anamespace\u4e0b\u7684\u6587\u6863\u90fd\u662f\u6709\u9274\u6743\u5c5e\u6027\u7684\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u5bf9\u9f50\u662f\u5426\u5f00\u653e\uff0c\u8fd9\u6837\u7684\u597d\u5904\u662f\u4fdd\u6301\u63a5\u53e3\u7684\ud83d\udd10\u5b89\u5168\uff0c\u907f\u514d\u6240\u6709\u4eba\u90fd\u80fd\u8bbf\u95ee")),(0,r.kt)("p",null,"\u5148\u6765\u770b\u4e0b\u4e00\u754c\u9762\u539f\u578b\u3002"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u547d\u540d\u7a7a\u95f4(namespace)"),"\uff1anamespace\u5217\u8868\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u7684\u9879\u76ee\u5217\u8868\uff0c\u5e76\u4e14namespac\u662f\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u7684\uff0c\u5982\u679c\u5f53\u524dnamespace\u4e0b\u9762\u6709\u63a5\u53e3\u5b9e\u4f8b\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u901a\u8fc7Knife4j\u7684\u524d\u7aef\u754c\u9762\u8fdb\u884c\u9884\u89c8\u548c\u8c03\u8bd5"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"\u56fe2.\u547d\u540d\u7a7a\u95f4",src:n(96255).Z,width:"3024",height:"1494"})),(0,r.kt)("p",null," \u70b9\u51fbnamespaceId\u67e5\u770b\u6587\u6863\u6548\u679c\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"\u56fe3.\u547d\u540d\u7a7a\u95f4\u6587\u6863\u5c55\u793a",src:n(91559).Z,width:"3024",height:"1732"})),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u670d\u52a1\u5b9e\u4f8b(ApiRegister)"),":\u662f\u4e00\u4e2aOpenAPI\u89c4\u8303\u7684\u6700\u5c0f\u5355\u5143,\u53ef\u4ee5\u901a\u8fc7\u63a5\u53e3\u81ea\u52a8\u6ce8\u518c\u4e0a\u6765\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5e73\u53f0\u8fdb\u884c\u4e3b\u52a8\u7f16\u8f91\u6dfb\u52a0"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"}," \u5305\u62ec\u63a5\u53e3\u7684\u89c4\u8303\u7c7b\u578b\uff0c\u6570\u636e\u6765\u6e90\u7c7b\u578b\uff0c\u6ce8\u518c\u7c7b\u578b\u7b49\u7b49\u4fe1\u606f\u3002")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"\u56fe4.\u63a5\u53e3\u5b9e\u4f8b",src:n(12565).Z,width:"3024",height:"1732"})),(0,r.kt)("p",null,"\u660e\u7ec6\u4fe1\u606f\u5c55\u793a\u5982\u4e0b\uff1a"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"\u56fe5.\u63a5\u53e3\u5b9e\u4f8b\u6587\u6863\u5c55\u793a",src:n(34544).Z,width:"3024",height:"2546"})),(0,r.kt)("p",null,"\u540c\u6837\uff0c\u5f53\u4e2aAPIRegister\u4e5f\u662f\u53ef\u4ee5\u72ec\u7acb\u8bbf\u95ee\u7684\uff0c\u5e73\u53f0\u63d0\u4f9b\u7684\u5355\u5b9e\u4f8b\u7684\u8bbf\u95ee\u65b9\u6cd5\uff1a"),(0,r.kt)("h3",{id:"\u5f00\u53d1\u5bc6\u94a5\u7edf\u4e00\u7ba1\u7406"},(0,r.kt)("strong",{parentName:"h3"},"\u5f00\u53d1\u5bc6\u94a5\u7edf\u4e00\u7ba1\u7406")),(0,r.kt)("p",null,"\u5f00\u53d1\u8005\u5f00\u653e\u7684API\u63a5\u53e3\uff0c\u5f88\u591a\u65f6\u5019\uff0c\u5982\u679c\u8981\u5bf9\u5916\u7684\u60c5\u51b5\u4e0b\uff0c\u901a\u5e38\u5f00\u53d1\u8005\u4eec\u90fd\u9700\u8981\u5b9e\u73b0\u63a5\u53e3\u7684\u9274\u6743\u63a7\u5236\u903b\u8f91\uff0c\u800c\u5982\u679c\u6bcf\u4e2a\u670d\u52a1\u6216\u4e0d\u540c\u7684\u9879\u76ee\u90fd\u5b9e\u73b0\u4e00\u904d\uff0c\u90a3\u592a\u8017\u8d39\u7cbe\u529b\u4e86\uff0c\u90a3\u4e48\u6211\u89c9\u5f97\u53ea\u8981\u662f\u805a\u5408\u4e0a\u6765\u7684\u63a5\u53e3\u6587\u6863\uff0c\u6240\u5bf9\u5e94\u7684\u4e0b\u6e38\u670d\u52a1\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7\u8be5\u5e73\u53f0\u8fdb\u884c\u7edf\u4e00\u7684\u7ba1\u7406\uff0c\u5206\u914d\u9274\u6743\u53ca\u7ba1\u7406\u5f00\u653e\u7528\u6237"),(0,r.kt)("h3",{id:"\u4e0b\u6e38\u670d\u52a1\u7edf\u4e00\u7ba1\u7406"},(0,r.kt)("strong",{parentName:"h3"},"\u4e0b\u6e38\u670d\u52a1\u7edf\u4e00\u7ba1\u7406")),(0,r.kt)("p",null,"\u4e00\u65e6\u6d89\u53ca\u5230\u5f00\u653e\u5e73\u53f0\uff0c\u90a3\u4e48\u7f51\u5173\u7684\u4f01\u4e1a\u7ea7\u522b\u9ad8\u6027\u80fd\u8981\u6c42\u4e0d\u53ef\u907f\u514d\uff0c\u8fd9\u4e0d\u662fKnife4j\u7684\u5f3a\u9879\uff0c\u4f5c\u8005\u4e5f\u6ca1\u8fd9\u4e2a\u80fd\u529b\uff0c\u4f5c\u4e3a\u5f00\u653e\u5e73\u53f0\u7f51\u5173\u5c42\uff0c\u8fd9\u91cc\u8003\u8651Apache APISIX\u6765\u5b9e\u73b0\u670d\u52a1\u7684\u5206\u53d1\uff0c\u4f9d\u9760Apache APISIX\u63d0\u4f9b\u7684Admin API\u63a5\u53e3\uff0c\u5e73\u53f0\u901a\u8fc7\u5c06\u4e0b\u6e38\u670d\u52a1\u7684\u8f6c\u53d1\u89c4\u5219\u8fdb\u884c\u52a8\u6001\u6ce8\u518c\uff0c\u8fd9\u6837\u63a5\u53e3\u6587\u6863\u548c\u5f00\u653e\u5e73\u53f0\u5c31\u4ece\u529f\u80fd\u804c\u8d23\u4e0a\u8fdb\u884c\u4e86\u533a\u5206\uff0c\u4e92\u76f8\u5b58\u5728\u4f9d\u8d56\u5173\u7cfb\uff0c\u4f46\u804c\u8d23\u5206\u5de5\u4e0d\u540c"),(0,r.kt)("h3",{id:"llm\u5927\u6a21\u578b\u7ed3\u5408"},"LLM\u5927\u6a21\u578b\u7ed3\u5408"),(0,r.kt)("p",null,"\u76ee\u524d\uff0cAIGC\u706b\u70ed\u53d1\u5c55\u7684\u5f53\u4e0b\uff0c\u5927\u6a21\u578b\u843d\u5730\u66f4\u591a\u4ea7\u54c1\u7684\u573a\u666f\uff0c\u6211\u89c9\u5f97\u662f\u4e0d\u53ef\u907f\u514d\u7684\uff0c\u800c\u5bf9\u4e8e\u5728Knife4jInsight\u5e73\u53f0\u4e2d\uff0c\u6211\u76ee\u524d\u4e5f\u60f3\u5230\u4e86\u4e00\u4e9bLLM\u5927\u6a21\u578b\u53ef\u4ee5\u843d\u5730\u7684\u573a\u666f\uff0c\u4e3b\u8981\u5305\u62ec\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"\u63a5\u53e3\u7684i18n\u8f6c\u5316\uff1a\u672c\u8eabKnife4j\u63d0\u4f9b\u7684\u754c\u9762\u76ee\u524d\u662f\u652f\u6301\u4e2d\u82f1\u6587\u7684\uff0c\u4f46\u662f\u5f00\u53d1\u8005\u5982\u679c\u8981\u63d0\u4f9b\u82f1\u6587\u7684\u63a5\u53e3\u6587\u6863\u63cf\u8ff0\uff0c\u901a\u5e38\u5728\u9879\u76ee\u5f00\u53d1\u9636\u6bb5\uff0c\u6216\u8005\u5b9a\u4e49OpenAPI\u63a5\u53e3\u89c4\u8303\u65f6\uff0c\u6280\u672f\u5c42\u9762\u5c31\u9700\u8981\u63d0\u4f9b\u652f\u6301\uff0c\u800c\u5982\u679c\u901a\u8fc7\u5e73\u53f0\u4e2d\u5927\u6a21\u578b\u7684\u7ffb\u8bd1\u5de5\u5177\uff0c\u57fa\u4e8ePrompt\u5de5\u7a0b\uff0c\u5c06OpenAPI\u6570\u636e\u6e90\u76f4\u63a5\u751f\u6210\u5bf9\u5e94\u7684\u76ee\u6807\u8bed\u8a00\uff0c\u90a3\u4e48\u5f00\u53d1\u8005\u5c31\u65e0\u9700\u5728\u6280\u672f\u542f\u52a8\u63a5\u53e3\u8003\u8651i18n\u7684\u4e8b\u60c5\uff0cKnife4jInsight\u5e73\u53f0\u4e2d\u81ea\u52a8\u96c6\u6210\u5373\u53ef\u5feb\u901f\u5b9e\u73b0\u3002"),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{alt:"\u56fe6.LLM\u5927\u6a21\u578b",src:n(48370).Z,width:"1488",height:"1346"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"\u4ee3\u7801\u6a21\u7248\uff1a\u5c06Prompt\u5de5\u7a0b+OpenAPI\u89c4\u8303\u7ed3\u5408\uff0c\u690d\u5165\u5230Knife4j\u5230\u6bcf\u4e00\u4e2a\u529f\u80fd\u70b9\u4e2d\uff0c\u5305\u62ec\u4ee3\u7801\u793a\u4f8b\u751f\u6210\u3001curl\u7b49\u7b49\u4e0d\u540c\u7684\u573a\u666f\uff0c\u8c03\u8bd5LLM\u5927\u6a21\u578b\u7684Prompt\u5de5\u7a0b\uff0c\u5c06\u5e42\u7b49\u6027\u7684\u63a5\u53e3\u8f93\u51fa\u5230\u5e94\u7528\u6d4b\uff0c\u7ed9\u4e88\u5f00\u53d1\u8005\u66f4\u591a\u7684\u4fbf\u5229\u3002"),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{alt:"\u56fe7.LLM\u5927\u6a21\u578b",src:n(88915).Z,width:"1582",height:"1166"})))),(0,r.kt)("h2",{id:"\u7ed3\u5c3e"},"\u7ed3\u5c3e"),(0,r.kt)("p",null,"\u4ee5\u4e0a\u5c31\u662f\u6211\u7684\u4e00\u4e9b\u65b0\u60f3\u6cd5\uff0c\u5982\u679c\u60a8\u5bf9\u8be5\u4ea7\u54c1\u611f\u5174\u8da3\uff0c\u6b22\u8fce\u548c\u6211\u8054\u7cfb(",(0,r.kt)("a",{parentName:"p",href:"mailto:xiaoymin@foxmail.com",target:"_blank",rel:"noopener"},"xiaoymin@foxmail.com"),")\uff5e\uff5e\uff5e"))}m.isMDXComponent=!0},98933:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/Knife4jInsight-1210a90b5ed9e1ae9a2704ec69d6e9c3.png"},48370:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/LLM\u5927\u6a21\u578b-936e2ce46c352d281f79b9ecb143aa48.png"},34544:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/api-info-b2a9d8e05123e9cc6a566096c6c02e75.png"},12565:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/api-d4d5285cfad83f462df78e57cbcf66a5.jpg"},88915:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/llm2-98ed462e8e0c180a00fb19b0b9bdd759.png"},91559:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/namespace-show-14e3b4dd38ac86345de594ef9bc90e1c.jpg"},96255:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/namespace-b0c09760cea4f55d3e4e574ddc83a8c1.jpg"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4e923243.336b948e.js b/knife4j-doc/gitee/assets/js/4e923243.336b948e.js deleted file mode 100644 index 17601ec68..000000000 --- a/knife4j-doc/gitee/assets/js/4e923243.336b948e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1934],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),g=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},l=function(e){var t=g(e.components);return a.createElement(i.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),c=g(r),m=n,b=c["".concat(i,".").concat(m)]||c[m]||u[m]||o;return r?a.createElement(b,s(s({ref:t},l),{},{components:r})):a.createElement(b,s({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:n,s[1]=p;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>p,metadata:()=>g,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],p={},i="[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]",g={unversionedId:"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",id:"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",title:"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]",description:"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",permalink:"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]",permalink:"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},next:{title:"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]",permalink:"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"}},l={},u=[],c={toc:u};function m(e){var t=e.components,p=(0,n.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v182-20180826-\u4f18\u5316ui\u6837\u5f0f"},"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.2 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,"1\u3001fixed \u5173\u4e8e@ApiModelProperty\u7684value\u4e0d\u652f\u6301\\n ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM7XC",target:"_blank",rel:"noopener"},"issue #IM7XC @GITEE")),(0,o.kt)("p",null,"2\u3001fixed \u5173\u4e8e\u5728\u7ebf\u8c03\u8bd5\u754c\u9762\u663e\u793a\u7684\u4f18\u5316,\u8c03\u8bd5\u680f\u65b0\u589e\u53c2\u6570\u7c7b\u578b\u5217,\u533a\u5206\u6570\u636e\u53c2\u6570\u8bf7\u6c42\u7c7b\u578b ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM7TV",target:"_blank",rel:"noopener"},"issue #IM7TV @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(81262).Z,width:"1919",height:"975"})),(0,o.kt)("p",null,"3\u3001fixed \u5728springcloud\u4e0b \u6574\u5408\u5230zuul\u65f6 \u6d4b\u8bd5\u8def\u5f84\u4e0d\u6b63\u786e",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM69X",target:"_blank",rel:"noopener"},"issue #IM69X @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(40226).Z,width:"1365",height:"630"})),(0,o.kt)("p",null,"4\u3001\u5c5e\u6027\u4ecb\u7ecd\u8bf4\u660e\uff0c\u8868\u683c\u680f\u7edf\u4e00\u4f7f\u7528\u4e2d\u6587"),(0,o.kt)("p",null,"5\u3001fixed \u53d1\u5e03\u5230tomcat\u975eroot\u76ee\u4e0b\u65f6\u8def\u5f84\u88ab\u591a\u5c42\u5d4c\u5957curl\u8def\u5f84\u6b63\u786e ui\u5185\u90e8\u6d4b\u8bd5\u8def\u5f84\u591a\u5c42",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM69H",target:"_blank",rel:"noopener"},"issue #IM69H @GITEE")),(0,o.kt)("p",null,"6\u3001fixed ",(0,o.kt)("inlineCode",{parentName:"p"},"List"),"\u548cString[]\u7c7b\u578b\u89e3\u6790\u4e0d\u6b63\u786e\uff0c\u5e94\u8be5\u4e3aarray\uff0c\u5b9e\u9645\u4e3aString\u5e76\u4e14\u4e0d\u80fd\u589e\u52a0",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM2ZI",target:"_blank",rel:"noopener"},"issue #IM2ZI @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(93346).Z,width:"1917",height:"972"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(42920).Z,width:"1918",height:"974"})),(0,o.kt)("p",null,"7\u3001fixed \u7c7b\u578b\u53ca\u5f15\u7528\u7c7b\u5728\u51fa\u73b0array\u7c7b\u578b\u65f6\u4e0d\u4e00\u81f4\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI/issues/17",target:"_blank",rel:"noopener"},"issue #7 @GitHub")),(0,o.kt)("p",null,"8\u3001fixed DELETE\u8bf7\u6c42\u65e0\u6cd5\u6b63\u786e\u5904\u7406\u8bf7\u6c42\u5934",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI/issues/16",target:"_blank",rel:"noopener"},"issue #16 @GitHub")),(0,o.kt)("p",null,"9\u3001fixed \u5728\u7ebf\u8c03\u8bd5-\u53c2\u6570\u540d\u79f0\u66f4\u6539\u4e0d\u751f\u6548 ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IMBN3",target:"_blank",rel:"noopener"},"issue #IMBN3 @GITEE")),(0,o.kt)("p",null,"10\u3001fixed \u5347\u7ea7\u52301.8.1\u540e,\u706b\u72d0\u6d4f\u89c8\u5668\u65e0\u6cd5\u663e\u793a\u6587\u6863",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM37D",target:"_blank",rel:"noopener"},"issue #IM37D @GITEE")),(0,o.kt)("p",null,"11\u3001fixed \u5173\u4e8e\u8bf7\u6c42\u662fform\u8868\u5355\uff0c\u4f46\u662f\u4e1a\u52a1\u53c2\u6570\u662fbody(json\u4f53\u7684)\u8bf7\u6c42\u5f02\u5e38",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM2YE",target:"_blank",rel:"noopener"},"issue #IM2YE @GITEE")),(0,o.kt)("p",null,"12\u3001fixed \u5165\u53c2\u4e2d\u7684\u5bf9\u8c61\u88ab\u5904\u7406\u6210string",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/ILU3S",target:"_blank",rel:"noopener"},"issue #ILU3S @GITEE")),(0,o.kt)("p",null,"13\u3001fixed UI \u6837\u5f0f\u5efa\u8bae(\u91c7\u7eb3\u5927\u90e8\u5206\u5efa\u8bae\uff0c\u975e\u5e38\u611f\u8c22@\u6c38\u591c \u63d0\u51fa\u7684\u5efa\u8bae)",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IMCET",target:"_blank",rel:"noopener"},"issue #IMCET @GitEE")),(0,o.kt)("p",null,"14\u3001fixed \u5f53\u8bf7\u6c42\uff0c\u51fa\u73b0param\u53c2\u6570\u65f6\uff0c\u4e0ebody\u53c2\u6570\u65f6\uff0c\u4f20\u5230\u670d\u52a1\u5668\u65e0\u6548params\u6ca1\u6709\u4f20,\u540cissue #IM2YE ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM72N",target:"_blank",rel:"noopener"},"issue #IM72N @GITEE")),(0,o.kt)("p",null,"15\u3001\u4f18\u5316\uff0c\u8fd4\u56deraw\u6587\u672c\u6807\u7b7e\u9875\u6dfb\u52a0\u590d\u5236\u6587\u672c\u529f\u80fd,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u7528\uff0c\u590d\u5236\u6309\u94ae\u589e\u52a0icon"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(10410).Z,width:"1918",height:"973"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(17832).Z,width:"1917",height:"953"})),(0,o.kt)("p",null,"16\u3001fixed \u6587\u4ef6\u4e0a\u4f20\u7684bug",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM4RG",target:"_blank",rel:"noopener"},"issue #IM4RG @GITEE")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.8.2\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u5728\u7ebf\u4f53\u9a8c\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,"\u8fd8\u672a\u7ed9swagger-bootstrap-ui\u70b9\u8fc7\u8d5e\u7684\u670b\u53cb\uff0c\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u7ed9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}m.isMDXComponent=!0},17832:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/curlCopy-e186d104c356d5b0faaffc4c0f269ae6.png"},81262:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/param_type-044808b2c33baa75d23e2b7ef4b8119b.png"},10410:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/rawCopy-7ef581674d67e3362a5a42598b3fc3be.png"},93346:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/strarr-264de22610caf60293d85816771aee46.png"},42920:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/strarr1-5f7788db371442cdfe2f6c5ebacfc671.png"},40226:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/zuul-basePath-76c2b85961af02633428993dfadbd446.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4e923243.6492280a.js b/knife4j-doc/gitee/assets/js/4e923243.6492280a.js new file mode 100644 index 000000000..ad44bfcc5 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4e923243.6492280a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1934],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>b});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=a.createContext({}),g=function(e){var t=a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},l=function(e){var t=g(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),u=g(r),m=n,b=u["".concat(i,".").concat(m)]||u[m]||c[m]||o;return r?a.createElement(b,s(s({ref:t},l),{},{components:r})):a.createElement(b,s({ref:t},l))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,s=new Array(o);s[0]=m;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p[u]="string"==typeof e?e:n,s[1]=p;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>b,frontMatter:()=>p,metadata:()=>g,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),s=["components"],p={},i="[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]",g={unversionedId:"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",id:"changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",title:"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]",description:"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",permalink:"/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.8.3-2018/09/17 treetable\u5c55\u793a\u53c2\u6570]",permalink:"/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue"},next:{title:"[v1.8.1-2018/08/14 \u4fee\u590dbasePath\u5bfc\u81f4404]",permalink:"/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue"}},l={},u=[],c={toc:u},m="wrapper";function b(e){var t=e.components,p=(0,n.Z)(e,s);return(0,o.kt)(m,(0,a.Z)({},c,p,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v182-20180826-\u4f18\u5316ui\u6837\u5f0f"},"[v1.8.2-2018/08/26 \u4f18\u5316UI\u6837\u5f0f]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.2 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.8.2 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,"1\u3001fixed \u5173\u4e8e@ApiModelProperty\u7684value\u4e0d\u652f\u6301\\n ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM7XC",target:"_blank",rel:"noopener"},"issue #IM7XC @GITEE")),(0,o.kt)("p",null,"2\u3001fixed \u5173\u4e8e\u5728\u7ebf\u8c03\u8bd5\u754c\u9762\u663e\u793a\u7684\u4f18\u5316,\u8c03\u8bd5\u680f\u65b0\u589e\u53c2\u6570\u7c7b\u578b\u5217,\u533a\u5206\u6570\u636e\u53c2\u6570\u8bf7\u6c42\u7c7b\u578b ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM7TV",target:"_blank",rel:"noopener"},"issue #IM7TV @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(81262).Z,width:"1919",height:"975"})),(0,o.kt)("p",null,"3\u3001fixed \u5728springcloud\u4e0b \u6574\u5408\u5230zuul\u65f6 \u6d4b\u8bd5\u8def\u5f84\u4e0d\u6b63\u786e",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM69X",target:"_blank",rel:"noopener"},"issue #IM69X @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(40226).Z,width:"1365",height:"630"})),(0,o.kt)("p",null,"4\u3001\u5c5e\u6027\u4ecb\u7ecd\u8bf4\u660e\uff0c\u8868\u683c\u680f\u7edf\u4e00\u4f7f\u7528\u4e2d\u6587"),(0,o.kt)("p",null,"5\u3001fixed \u53d1\u5e03\u5230tomcat\u975eroot\u76ee\u4e0b\u65f6\u8def\u5f84\u88ab\u591a\u5c42\u5d4c\u5957curl\u8def\u5f84\u6b63\u786e ui\u5185\u90e8\u6d4b\u8bd5\u8def\u5f84\u591a\u5c42",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM69H",target:"_blank",rel:"noopener"},"issue #IM69H @GITEE")),(0,o.kt)("p",null,"6\u3001fixed ",(0,o.kt)("inlineCode",{parentName:"p"},"List"),"\u548cString[]\u7c7b\u578b\u89e3\u6790\u4e0d\u6b63\u786e\uff0c\u5e94\u8be5\u4e3aarray\uff0c\u5b9e\u9645\u4e3aString\u5e76\u4e14\u4e0d\u80fd\u589e\u52a0",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM2ZI",target:"_blank",rel:"noopener"},"issue #IM2ZI @GITEE")),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(93346).Z,width:"1917",height:"972"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(42920).Z,width:"1918",height:"974"})),(0,o.kt)("p",null,"7\u3001fixed \u7c7b\u578b\u53ca\u5f15\u7528\u7c7b\u5728\u51fa\u73b0array\u7c7b\u578b\u65f6\u4e0d\u4e00\u81f4\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI/issues/17",target:"_blank",rel:"noopener"},"issue #7 @GitHub")),(0,o.kt)("p",null,"8\u3001fixed DELETE\u8bf7\u6c42\u65e0\u6cd5\u6b63\u786e\u5904\u7406\u8bf7\u6c42\u5934",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI/issues/16",target:"_blank",rel:"noopener"},"issue #16 @GitHub")),(0,o.kt)("p",null,"9\u3001fixed \u5728\u7ebf\u8c03\u8bd5-\u53c2\u6570\u540d\u79f0\u66f4\u6539\u4e0d\u751f\u6548 ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IMBN3",target:"_blank",rel:"noopener"},"issue #IMBN3 @GITEE")),(0,o.kt)("p",null,"10\u3001fixed \u5347\u7ea7\u52301.8.1\u540e,\u706b\u72d0\u6d4f\u89c8\u5668\u65e0\u6cd5\u663e\u793a\u6587\u6863",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM37D",target:"_blank",rel:"noopener"},"issue #IM37D @GITEE")),(0,o.kt)("p",null,"11\u3001fixed \u5173\u4e8e\u8bf7\u6c42\u662fform\u8868\u5355\uff0c\u4f46\u662f\u4e1a\u52a1\u53c2\u6570\u662fbody(json\u4f53\u7684)\u8bf7\u6c42\u5f02\u5e38",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM2YE",target:"_blank",rel:"noopener"},"issue #IM2YE @GITEE")),(0,o.kt)("p",null,"12\u3001fixed \u5165\u53c2\u4e2d\u7684\u5bf9\u8c61\u88ab\u5904\u7406\u6210string",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/ILU3S",target:"_blank",rel:"noopener"},"issue #ILU3S @GITEE")),(0,o.kt)("p",null,"13\u3001fixed UI \u6837\u5f0f\u5efa\u8bae(\u91c7\u7eb3\u5927\u90e8\u5206\u5efa\u8bae\uff0c\u975e\u5e38\u611f\u8c22@\u6c38\u591c \u63d0\u51fa\u7684\u5efa\u8bae)",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IMCET",target:"_blank",rel:"noopener"},"issue #IMCET @GitEE")),(0,o.kt)("p",null,"14\u3001fixed \u5f53\u8bf7\u6c42\uff0c\u51fa\u73b0param\u53c2\u6570\u65f6\uff0c\u4e0ebody\u53c2\u6570\u65f6\uff0c\u4f20\u5230\u670d\u52a1\u5668\u65e0\u6548params\u6ca1\u6709\u4f20,\u540cissue #IM2YE ",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM72N",target:"_blank",rel:"noopener"},"issue #IM72N @GITEE")),(0,o.kt)("p",null,"15\u3001\u4f18\u5316\uff0c\u8fd4\u56deraw\u6587\u672c\u6807\u7b7e\u9875\u6dfb\u52a0\u590d\u5236\u6587\u672c\u529f\u80fd,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u7528\uff0c\u590d\u5236\u6309\u94ae\u589e\u52a0icon"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(10410).Z,width:"1918",height:"973"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(17832).Z,width:"1917",height:"953"})),(0,o.kt)("p",null,"16\u3001fixed \u6587\u4ef6\u4e0a\u4f20\u7684bug",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IM4RG",target:"_blank",rel:"noopener"},"issue #IM4RG @GITEE")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.8.2\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u5728\u7ebf\u4f53\u9a8c\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,"\u8fd8\u672a\u7ed9swagger-bootstrap-ui\u70b9\u8fc7\u8d5e\u7684\u670b\u53cb\uff0c\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u7ed9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}b.isMDXComponent=!0},17832:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/curlCopy-e186d104c356d5b0faaffc4c0f269ae6.png"},81262:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/param_type-044808b2c33baa75d23e2b7ef4b8119b.png"},10410:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/rawCopy-7ef581674d67e3362a5a42598b3fc3be.png"},93346:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/strarr-264de22610caf60293d85816771aee46.png"},42920:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/strarr1-5f7788db371442cdfe2f6c5ebacfc671.png"},40226:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/zuul-basePath-76c2b85961af02633428993dfadbd446.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4f00bccd.33e36b29.js b/knife4j-doc/gitee/assets/js/4f00bccd.33e36b29.js deleted file mode 100644 index 5f885b144..000000000 --- a/knife4j-doc/gitee/assets/js/4f00bccd.33e36b29.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1664],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),g=p(n),m=r,k=g["".concat(s,".").concat(m)]||g[m]||c[m]||o;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>m,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var a=n(87462),r=n(63366),o=(n(67294),n(3905)),i=["components"],l={},s="[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]",p={unversionedId:"changelog/x/2020-06-28-knife4j-2.0.4-issue",id:"changelog/x/2020-06-28-knife4j-2.0.4-issue",title:"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2020-06-28-knife4j-2.0.4-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2020-06-28-knife4j-2.0.4-issue",permalink:"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]",permalink:"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"},next:{title:"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]",permalink:"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"}},u={},c=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2}],g={toc:c};function m(e){var t=e.components,l=(0,r.Z)(e,i);return(0,o.kt)("wrapper",(0,a.Z)({},g,l,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v204-20200628-knife4j-204\u53d1\u5e03\u652f\u6301\u81ea\u5b9a\u4e49-host"},"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/",target:null,rel:null},"https://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,o.kt)("p",null,"1\u3001\u652f\u6301UiConfiguration\u4e2d\u65b9\u6cd5\u8c03\u8bd5\u7684\u914d\u7f6e,\u5982\u5e76\u672a\u914d\u7f6e\u4efb\u4f55\u652f\u6301\u7684\u65b9\u6cd5,\u5728ui\u754c\u9762\u4e2d\u4e0d\u4f1a\u51fa\u73b0\u8c03\u8bd5\u680fTab\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@Bean\npublic UiConfiguration uiConfiguration(){\n return UiConfigurationBuilder.builder()\n .supportedSubmitMethods(new String[]{})\n .build();\n}\n")),(0,o.kt)("p",null,"\u754c\u9762\u4e2d\u7684\u663e\u793a\u6548\u679c\u5982\u4e0b(\u4ec5\u663e\u793a\u6587\u6863)\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(39501).Z,width:"1162",height:"435"})),(0,o.kt)("p",null,"2\u3001\u5728\u5f53\u524d\u6587\u6863\u9875\u6dfb\u52a0",(0,o.kt)("inlineCode",{parentName:"p"},"\u590d\u5236\u63a5\u53e3"),"\u529f\u80fd\uff0c\u4fbf\u4e8e\u5f00\u53d1\u4eba\u5458\u5feb\u901f\u590d\u5236\u63a5\u53e3\u5730\u5740",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/238",target:"_blank",rel:"noopener"},"github #238")),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(30221).Z,width:"1044",height:"302"})),(0,o.kt)("p",null,"3\u3001\u4fee\u590dAuthorize\u4fee\u6539\u6216\u6ce8\u9500\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1IJK3",target:"_blank",rel:"noopener"},"gitee #I1IJK3")),(0,o.kt)("p",null,"4\u3001\u4e2a\u6027\u5316\u914d\u7f6e\u65b0\u589eHost\u5c5e\u6027\u7684\u914d\u7f6e,\u5982\u679c\u5f53\u524d\u5bf9\u5916\u63d0\u4f9b\u7684\u63a5\u53e3\u6587\u6863\u548c\u63a5\u53e3\u672c\u8eabHost\u5c5e\u6027\u5b58\u5728\u51b2\u7a81,\u53ef\u4ee5\u81ea\u52a8\u914d\u7f6e\u6b64\u5c5e\u6027\u8fdb\u884c\u63a5\u53e3\u7684\u8054\u8c03\uff0cHost\u5c5e\u6027\u53ef\u4ee5\u914d\u7f6e\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"ip:port"),"\u7684\u5f62\u5f0f\uff0c\u8fd9\u6837\u9ed8\u8ba4\u662fHTTP\u8fdb\u884c\u8bbf\u95ee,\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u914d\u7f6e\u5b8c\u6574\u7684\u57df\u540d\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"HTTPS"),"\u7b49\u914d\u7f6e"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(948).Z,width:"763",height:"317"})),(0,o.kt)("p",null,"\u5176\u5de5\u4f5c\u539f\u7406\u662f\u5728\u8c03\u7528axios\u7ec4\u4ef6\u8fdb\u884c\u63a5\u53e3\u8c03\u8bd5\u65f6,\u914d\u7f6e\u5176",(0,o.kt)("inlineCode",{parentName:"p"},"baseURL"),"\u5c5e\u6027"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"var baseUrl='';//\u9ed8\u8ba4\u662f\u7a7a\n//\u662f\u5426\u542f\u7528Host\nif(this.enableHost){\n baseUrl=this.enableHostText;\n}\nvar requestConfig={\n baseURL:baseUrl,//\u8c03\u7528\u76ee\u6807Host\u670d\u52a1\u7684\u63a5\u53e3\n url: url,\n method: methodType,\n headers: headers,\n params: formParams,\n data: data,\n //Cookie\u6807\u5fd7\n withCredentials:this.debugSendHasCookie(headers),\n timeout: 0\n}\n")),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u8981\u4f7f\u7528\u6b64Host\u7684\u914d\u7f6e\u540e\u7aef\u5fc5\u987b\u5f00\u542f\u8de8\u57df\u7684\u914d\u7f6e\uff0c\u5982\u679c\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@Bean\npublic CorsFilter corsFilter(){\n UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();\n CorsConfiguration corsConfiguration=new CorsConfiguration();\n corsConfiguration.setAllowCredentials(true);\n corsConfiguration.addAllowedOrigin("*");\n corsConfiguration.addAllowedHeader("*");\n corsConfiguration.addAllowedMethod("*");\n corsConfiguration.setMaxAge(10000L);\n source.registerCorsConfiguration("/**",corsConfiguration);\n CorsFilter corsFilter=new CorsFilter(source);\n return corsFilter;\n}\n')),(0,o.kt)("p",null,"5\u3001\u8c03\u8bd5\u63a5\u53e3\u65f6,\u63a5\u53e3\u5728\u65e0\u8fd4\u56de\u6570\u636e\u6216\u8005\u5f02\u5e38\u7684\u60c5\u51b5\u4e0b\u5f39\u6846\u9519\u8bef\u4fe1\u606f,\u63d0\u793a\u5f00\u53d1\u8005"),(0,o.kt)("p",null,"6\u3001\u56fe\u7247\u9884\u89c8\u63a5\u53e3\u65e0\u6cd5\u5728\u54cd\u5e94\u5185\u5bb9\u4e2d\u5728\u7ebf\u9884\u89c8\u56fe\u7247\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1KP0Q",target:"_blank",rel:"noopener"},"gitee #I1KP0Q")),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(59762).Z,width:"948",height:"242"})),(0,o.kt)("p",null,"7\u3001\u4fee\u590d\u9488\u5bf9",(0,o.kt)("inlineCode",{parentName:"p"},"Map"),"\u5b57\u6bb5\u65f6,Value\u6307\u5f15\u662f\u672c\u7c7b\u65f6\u51fa\u73b0\u9012\u5f52\u6b7b\u5faa\u73af\u7684\u95ee\u9898,\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'"SensorTable": {\n "type": "object",\n "properties": {\n "attrib": {\n "type": "integer",\n "format": "int32"\n },\n "sensorMap": {\n "type": "object",\n "additionalProperties": {\n "originalRef": "SensorTable",\n "$ref": "#/definitions/SensorTable"\n }\n }\n //more...\n },\n "title": "SensorTable"\n },\n')),(0,o.kt)("p",null,"8\u3001\u4fee\u590d\u79bb\u7ebf\u6587\u6863\u529f\u80fd\u5bfc\u51fa",(0,o.kt)("inlineCode",{parentName:"p"},"Markdown"),"\u65f6,\u54cd\u5e94\u53c2\u6570\u683c\u5f0f\u5f02\u5e38\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1LMYO",target:"_blank",rel:"noopener"},"gitee #I1LMYO")),(0,o.kt)("p",null,"9\u3001\u4fee\u590d\u5728\u4f7f\u7528\u4e2d\u95f4\u4ef6\u5bf9\u63a5\u53e3\u54cd\u5e94\u5185\u5bb9\u8fdb\u884c\u62e6\u622a\u5904\u7406\u65f6,\u54cd\u5e94\u5185\u5bb9\u4e0d\u663e\u793a\u7684bug\uff0c\u4f8b\u5982\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"sentinel "),"\u8fdb\u884cQPS\u9650\u6d41,\u4e00\u822c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u662f\u7531\u4e8e\u63a5\u53e3\u54cd\u5e94\u7684Content-Type\u662fjson\uff0c\u4f46\u5b9e\u9645\u54cd\u5e94\u5185\u5bb9\u5374\u662ftext\u5bfc\u81f4",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1JO73",target:"_blank",rel:"noopener"},"gitee #I1JO73")),(0,o.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,o.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,o.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,o.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,o.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,o.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,o.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,o.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,o.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,o.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(80961).Z,width:"1920",height:"1061"})),(0,o.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(40754).Z,width:"1920",height:"1080"})),(0,o.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(28024).Z,width:"1918",height:"1059"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(79161).Z,width:"1918",height:"1060"})),(0,o.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(7414).Z,width:"1918",height:"1158"})),(0,o.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(58955).Z,width:"1918",height:"1159"})),(0,o.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,o.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(35684).Z,width:"1797",height:"1758"})),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}m.isMDXComponent=!0},80961:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},7414:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},58955:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},35684:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},28024:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},79161:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},40754:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"},948:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/HostSetting-a731101f2333f32cc2a1c906add79285.png"},30221:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/copyUrl-2502576288b7503008ed311c223d8e2e.png"},39501:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-1-fd0660cef1771fd62bfbbfb66108302e.png"},59762:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-7014735eafeb1123cf79ca9c3e99cc46.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4f00bccd.f5926137.js b/knife4j-doc/gitee/assets/js/4f00bccd.f5926137.js new file mode 100644 index 000000000..1fbbab1cf --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4f00bccd.f5926137.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1664],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(n),m=r,k=c["".concat(s,".").concat(m)]||c[m]||g[m]||o;return n?a.createElement(k,i(i({ref:t},u),{},{components:n})):a.createElement(k,i({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>k,frontMatter:()=>l,metadata:()=>p,toc:()=>c});var a=n(87462),r=n(63366),o=(n(67294),n(3905)),i=["components"],l={},s="[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]",p={unversionedId:"changelog/x/2020-06-28-knife4j-2.0.4-issue",id:"changelog/x/2020-06-28-knife4j-2.0.4-issue",title:"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2020-06-28-knife4j-2.0.4-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2020-06-28-knife4j-2.0.4-issue",permalink:"/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.5-2020/09/14 Knife4j 2.0.5\u53d1\u5e03,\u6027\u80fd\u4f18\u5316]",permalink:"/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue"},next:{title:"[v2.0.3-2020/05/24 Knife4j 2.0.3\u53d1\u5e03,\u652f\u6301springdoc\u548ci18n]",permalink:"/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue"}},u={},c=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2}],g={toc:c},m="wrapper";function k(e){var t=e.components,l=(0,r.Z)(e,i);return(0,o.kt)(m,(0,a.Z)({},g,l,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v204-20200628-knife4j-204\u53d1\u5e03\u652f\u6301\u81ea\u5b9a\u4e49-host"},"[v2.0.4-2020/06/28 Knife4j 2.0.4\u53d1\u5e03,\u652f\u6301\u81ea\u5b9a\u4e49 Host]"),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u7684\u5de5\u5177"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/",target:null,rel:null},"https://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c(2.X\u7248)"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,o.kt)("p",null,"1\u3001\u652f\u6301UiConfiguration\u4e2d\u65b9\u6cd5\u8c03\u8bd5\u7684\u914d\u7f6e,\u5982\u5e76\u672a\u914d\u7f6e\u4efb\u4f55\u652f\u6301\u7684\u65b9\u6cd5,\u5728ui\u754c\u9762\u4e2d\u4e0d\u4f1a\u51fa\u73b0\u8c03\u8bd5\u680fTab\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},"@Bean\npublic UiConfiguration uiConfiguration(){\n return UiConfigurationBuilder.builder()\n .supportedSubmitMethods(new String[]{})\n .build();\n}\n")),(0,o.kt)("p",null,"\u754c\u9762\u4e2d\u7684\u663e\u793a\u6548\u679c\u5982\u4e0b(\u4ec5\u663e\u793a\u6587\u6863)\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(39501).Z,width:"1162",height:"435"})),(0,o.kt)("p",null,"2\u3001\u5728\u5f53\u524d\u6587\u6863\u9875\u6dfb\u52a0",(0,o.kt)("inlineCode",{parentName:"p"},"\u590d\u5236\u63a5\u53e3"),"\u529f\u80fd\uff0c\u4fbf\u4e8e\u5f00\u53d1\u4eba\u5458\u5feb\u901f\u590d\u5236\u63a5\u53e3\u5730\u5740",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/238",target:"_blank",rel:"noopener"},"github #238")),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(30221).Z,width:"1044",height:"302"})),(0,o.kt)("p",null,"3\u3001\u4fee\u590dAuthorize\u4fee\u6539\u6216\u6ce8\u9500\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1IJK3",target:"_blank",rel:"noopener"},"gitee #I1IJK3")),(0,o.kt)("p",null,"4\u3001\u4e2a\u6027\u5316\u914d\u7f6e\u65b0\u589eHost\u5c5e\u6027\u7684\u914d\u7f6e,\u5982\u679c\u5f53\u524d\u5bf9\u5916\u63d0\u4f9b\u7684\u63a5\u53e3\u6587\u6863\u548c\u63a5\u53e3\u672c\u8eabHost\u5c5e\u6027\u5b58\u5728\u51b2\u7a81,\u53ef\u4ee5\u81ea\u52a8\u914d\u7f6e\u6b64\u5c5e\u6027\u8fdb\u884c\u63a5\u53e3\u7684\u8054\u8c03\uff0cHost\u5c5e\u6027\u53ef\u4ee5\u914d\u7f6e\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},"ip:port"),"\u7684\u5f62\u5f0f\uff0c\u8fd9\u6837\u9ed8\u8ba4\u662fHTTP\u8fdb\u884c\u8bbf\u95ee,\u5f00\u53d1\u8005\u4e5f\u53ef\u4ee5\u914d\u7f6e\u5b8c\u6574\u7684\u57df\u540d\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"HTTPS"),"\u7b49\u914d\u7f6e"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(948).Z,width:"763",height:"317"})),(0,o.kt)("p",null,"\u5176\u5de5\u4f5c\u539f\u7406\u662f\u5728\u8c03\u7528axios\u7ec4\u4ef6\u8fdb\u884c\u63a5\u53e3\u8c03\u8bd5\u65f6,\u914d\u7f6e\u5176",(0,o.kt)("inlineCode",{parentName:"p"},"baseURL"),"\u5c5e\u6027"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"var baseUrl='';//\u9ed8\u8ba4\u662f\u7a7a\n//\u662f\u5426\u542f\u7528Host\nif(this.enableHost){\n baseUrl=this.enableHostText;\n}\nvar requestConfig={\n baseURL:baseUrl,//\u8c03\u7528\u76ee\u6807Host\u670d\u52a1\u7684\u63a5\u53e3\n url: url,\n method: methodType,\n headers: headers,\n params: formParams,\n data: data,\n //Cookie\u6807\u5fd7\n withCredentials:this.debugSendHasCookie(headers),\n timeout: 0\n}\n")),(0,o.kt)("p",null,"\u5f00\u53d1\u8005\u8981\u4f7f\u7528\u6b64Host\u7684\u914d\u7f6e\u540e\u7aef\u5fc5\u987b\u5f00\u542f\u8de8\u57df\u7684\u914d\u7f6e\uff0c\u5982\u679c\u662f",(0,o.kt)("inlineCode",{parentName:"p"},"Spring Boot"),"\uff0c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@Bean\npublic CorsFilter corsFilter(){\n UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();\n CorsConfiguration corsConfiguration=new CorsConfiguration();\n corsConfiguration.setAllowCredentials(true);\n corsConfiguration.addAllowedOrigin("*");\n corsConfiguration.addAllowedHeader("*");\n corsConfiguration.addAllowedMethod("*");\n corsConfiguration.setMaxAge(10000L);\n source.registerCorsConfiguration("/**",corsConfiguration);\n CorsFilter corsFilter=new CorsFilter(source);\n return corsFilter;\n}\n')),(0,o.kt)("p",null,"5\u3001\u8c03\u8bd5\u63a5\u53e3\u65f6,\u63a5\u53e3\u5728\u65e0\u8fd4\u56de\u6570\u636e\u6216\u8005\u5f02\u5e38\u7684\u60c5\u51b5\u4e0b\u5f39\u6846\u9519\u8bef\u4fe1\u606f,\u63d0\u793a\u5f00\u53d1\u8005"),(0,o.kt)("p",null,"6\u3001\u56fe\u7247\u9884\u89c8\u63a5\u53e3\u65e0\u6cd5\u5728\u54cd\u5e94\u5185\u5bb9\u4e2d\u5728\u7ebf\u9884\u89c8\u56fe\u7247\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1KP0Q",target:"_blank",rel:"noopener"},"gitee #I1KP0Q")),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(59762).Z,width:"948",height:"242"})),(0,o.kt)("p",null,"7\u3001\u4fee\u590d\u9488\u5bf9",(0,o.kt)("inlineCode",{parentName:"p"},"Map"),"\u5b57\u6bb5\u65f6,Value\u6307\u5f15\u662f\u672c\u7c7b\u65f6\u51fa\u73b0\u9012\u5f52\u6b7b\u5faa\u73af\u7684\u95ee\u9898,\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'"SensorTable": {\n "type": "object",\n "properties": {\n "attrib": {\n "type": "integer",\n "format": "int32"\n },\n "sensorMap": {\n "type": "object",\n "additionalProperties": {\n "originalRef": "SensorTable",\n "$ref": "#/definitions/SensorTable"\n }\n }\n //more...\n },\n "title": "SensorTable"\n },\n')),(0,o.kt)("p",null,"8\u3001\u4fee\u590d\u79bb\u7ebf\u6587\u6863\u529f\u80fd\u5bfc\u51fa",(0,o.kt)("inlineCode",{parentName:"p"},"Markdown"),"\u65f6,\u54cd\u5e94\u53c2\u6570\u683c\u5f0f\u5f02\u5e38\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1LMYO",target:"_blank",rel:"noopener"},"gitee #I1LMYO")),(0,o.kt)("p",null,"9\u3001\u4fee\u590d\u5728\u4f7f\u7528\u4e2d\u95f4\u4ef6\u5bf9\u63a5\u53e3\u54cd\u5e94\u5185\u5bb9\u8fdb\u884c\u62e6\u622a\u5904\u7406\u65f6,\u54cd\u5e94\u5185\u5bb9\u4e0d\u663e\u793a\u7684bug\uff0c\u4f8b\u5982\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"sentinel "),"\u8fdb\u884cQPS\u9650\u6d41,\u4e00\u822c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u662f\u7531\u4e8e\u63a5\u53e3\u54cd\u5e94\u7684Content-Type\u662fjson\uff0c\u4f46\u5b9e\u9645\u54cd\u5e94\u5185\u5bb9\u5374\u662ftext\u5bfc\u81f4",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1JO73",target:"_blank",rel:"noopener"},"gitee #I1JO73")),(0,o.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,o.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,o.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,o.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,o.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,o.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,o.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,o.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,o.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,o.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,o.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,o.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,o.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(80961).Z,width:"1920",height:"1061"})),(0,o.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(40754).Z,width:"1920",height:"1080"})),(0,o.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(28024).Z,width:"1918",height:"1059"})),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(79161).Z,width:"1918",height:"1060"})),(0,o.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784,",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/html/knife4j-export-html.html",target:null,rel:null},"\u70b9\u51fb\u9884\u89c8\u5bfc\u51fa\u79bb\u7ebfHtml\u6548\u679c"),"\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(7414).Z,width:"1918",height:"1158"})),(0,o.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(58955).Z,width:"1918",height:"1159"})),(0,o.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01,",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/Knife4j-Offline-Html.html",target:null,rel:null},"\u70b9\u51fb\u5728\u7ebf\u9884\u89c8\u6548\u679c"),"\uff0c"),(0,o.kt)("p",null,"\u754c\u9762\u6548\u679c\u5982\u4e0b\u56fe\uff1a"),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(35684).Z,width:"1797",height:"1758"})),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"))}k.isMDXComponent=!0},80961:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},7414:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},58955:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},35684:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},28024:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},79161:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},40754:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"},948:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/HostSetting-a731101f2333f32cc2a1c906add79285.png"},30221:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/copyUrl-2502576288b7503008ed311c223d8e2e.png"},39501:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/debug-1-fd0660cef1771fd62bfbbfb66108302e.png"},59762:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/image-7014735eafeb1123cf79ca9c3e99cc46.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4f72683c.31c4262b.js b/knife4j-doc/gitee/assets/js/4f72683c.31c4262b.js deleted file mode 100644 index 2c4348cd0..000000000 --- a/knife4j-doc/gitee/assets/js/4f72683c.31c4262b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7305],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=d(n),m=a,f=c["".concat(p,".").concat(m)]||c[m]||s[m]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=c;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>m,frontMatter:()=>l,metadata:()=>d,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",d={unversionedId:"features/filterRequestParameter",id:"features/filterRequestParameter",title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/filterRequestParameter.md",sourceDirName:"features",slug:"/features/filterRequestParameter",permalink:"/docs/features/filterRequestParameter",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",permalink:"/docs/features/exportDocument"},next:{title:"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/includeRequestParameter"}},u={},s=[{value:"3.11.1 \u8868\u5355\u53c2\u6570",id:"3111-\u8868\u5355\u53c2\u6570",level:2},{value:"3.11.2 JSON\u53c2\u6570",id:"3112-json\u53c2\u6570",level:2}],c={toc:s};function m(e){var t=e.components,l=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},c,l,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"311-\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570"},"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u901a\u5e38\u6211\u4eec\u5728\u5f00\u53d1\u63a5\u53e3\u65f6,\u6bd4\u5982\u4e00\u4e2a\u65b0\u589e\u63a5\u53e3\u548c\u4e00\u4e2a\u4fee\u6539\u63a5\u53e3,\u4fee\u6539\u63a5\u53e3\u9700\u8981\u4f20\u9012\u4e3b\u952eid\u3001\u800c\u65b0\u589e\u63a5\u53e3\u5219\u4e0d\u9700\u8981\u4f20\u9012\u6b64\u5c5e\u6027,\u4f46\u5927\u90e8\u5206\u60c5\u51b5,\u6211\u4eec\u53ea\u5199\u4e00\u4e2aModel\u7c7b,\u6b64\u65f6\u5728\u65b0\u589e\u63a5\u53e3\u65f6\u663e\u793a\u4e3b\u952eid\u4f1a\u663e\u5f97\u5f88\u591a\u4f59."),(0,o.kt)("p",null,"\u4f7f\u7528\u81ea\u5b9a\u4e49\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"ApiOperationSupport"),"\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreParameters"),"\u5c5e\u6027,\u53ef\u4ee5\u5f3a\u5236\u5ffd\u7565\u8981\u663e\u793a\u7684\u53c2\u6570."),(0,o.kt)("p",null,"\u5ffd\u7565\u7684\u89c4\u5219\u5982\u4e0b\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u4f8b\u5982\u65b0\u589e\u63a5\u53e3\u65f6,\u67d0\u5b9e\u4f53\u7c7b\u4e0d\u9700\u8981\u663e\u793aId,\u5373\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u5bf9\u53c2\u6570\u8fdb\u884c\u5ffd\u7565.",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"id"}')),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5c42\u6b21\u7684\u53c2\u6570\u8fc7\u6ee4,\u5219\u4f7f\u7528",(0,o.kt)("strong",{parentName:"li"},"\u540d\u79f0.\u5c5e\u6027"),"\u7684\u65b9\u5f0f,\u4f8b\u5982 ",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"uptModel.id","uptModel.uptPo.id"}'),",\u5176\u4e2duptModel\u662f\u5b9e\u4f53\u5bf9\u8c61\u53c2\u6570\u540d\u79f0,id\u4e3a\u5176\u5c5e\u6027,uptPo\u4e3a\u5b9e\u4f53\u7c7b,\u4f5c\u4e3auptModel\u7c7b\u7684\u5c5e\u6027\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u53c2\u6570\u5c42\u7ea7\u53ea\u662f\u4e00\u7ea7\u7684\u60c5\u51b5\u4e0b,\u5e76\u4e14\u53c2\u6570\u662f\u5b9e\u4f53\u7c7b\u7684\u60c5\u51b5\u4e0b,\u4e0d\u9700\u8981\u8bbe\u7f6e\u53c2\u6570\u540d\u79f0,\u76f4\u63a5\u7ed9\u5b9a\u5c5e\u6027\u503c\u540d\u79f0\u5373\u53ef"),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b9e\u4f53\u7c7b\u5c5e\u6027\u4e2d\u662f\u901a\u8fc7List\u8fd9\u79cd\u6570\u7ec4\u7684\u65b9\u5f0f,\u90a3\u4e48\u8fc7\u6ee4\u89c4\u5219\u4f1a\u6709\u6240\u4e0d\u540c,\u5728\u5c5e\u6027\u540e\u9762\u9700\u8981\u8ffd\u52a0\u4e00\u4e2a\u4e0b\u6807",(0,o.kt)("inlineCode",{parentName:"li"},"[0]"),"\uff0c",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"uptModel.uptPo[0].id"}'))),(0,o.kt)("p",null,"\u5728\u63a5\u53e3\u8fc7\u6ee4\u65f6,\u4e3b\u8981\u6709\u4e24\u79cd\u60c5\u51b5"),(0,o.kt)("h2",{id:"3111-\u8868\u5355\u53c2\u6570"},"3.11.1 \u8868\u5355\u53c2\u6570"),(0,o.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u5b9e\u4f53\u7c7b\u76f4\u63a5\u4f5c\u4e3a\u53c2\u6570\u65f6,\u5728\u6211\u4eec\u7684ui\u754c\u9762\u4e2d\u662f\u4e0d\u4f1a\u663e\u793a\u53c2\u6570\u540d\u79f0\u7684,\u6b64\u65f6\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5b9e\u4f53\u7684\u5c5e\u6027\u540d\u79f0\u8fdb\u884c\u53c2\u6570\u5ffd\u7565\uff0c\u4f8b\u5982\u5982\u4e0b\u4ee3\u7801\uff1a"),(0,o.kt)("p",null,"\u8868\u5355\u7c7b\u578b\u7684\u8bf7\u6c42\u662f\u4e0d\u9700\u8981\u6dfb\u52a0\u53c2\u6570\u540d\u7684"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u65b0\u589eModel\u63a5\u53e31")\n@ApiOperationSupport(ignoreParameters = {"id","orderDate.id"})\n@PostMapping("/insertMode1l")\npublic Rest insertModel1(UptModel uptModel){\n Rest r =new Rest<>();\n r.setData(uptModel);\n return r;\n}\n')),(0,o.kt)("p",null,"\u5b9e\u4f53\u7c7b",(0,o.kt)("inlineCode",{parentName:"p"},"UptModel.java"),"\u6587\u4ef6\u4ee3\u7801"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'public class UptModel {\n\n @ApiModelProperty(value = "\u4e3b\u952eid")\n private String id;\n\n @ApiModelProperty(value = "\u59d3\u540d")\n private String name;\n\n @ApiModelProperty(value = "\u90ae\u7bb1")\n private String email;\n\n @ApiModelProperty(value = "\u8ba2\u5355\u4fe1\u606f")\n private OrderDate orderDate;\n}\n')),(0,o.kt)("p",null,"\u6b64\u65f6\uff0c\u6700\u7ec8\u8fc7\u8fc7\u6ee4\u6389",(0,o.kt)("inlineCode",{parentName:"p"},"UptModel"),"\u7684\u5c5e\u6027id\u548c\u5c5e\u6027",(0,o.kt)("inlineCode",{parentName:"p"},"orderDate"),"\u7c7b\u4e2d\u7684id\u5c5e\u6027,\u4e0d\u5728\u754c\u9762\u663e\u793a."),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(58181).Z,width:"1361",height:"439"})),(0,o.kt)("h2",{id:"3112-json\u53c2\u6570"},"3.11.2 JSON\u53c2\u6570"),(0,o.kt)("p",null,"\u5982\u679c\u8bf7\u6c42\u53c2\u6570\u662f\u4f7f\u7528JSON\u7684\u65b9\u5f0f"),(0,o.kt)("p",null,"\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u65b0\u589eModel\u63a5\u53e3")\n@ApiOperationSupport(ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"})\n@PostMapping("/insertModel")\npublic Rest insertModel(@RequestBody UptModel uptModel){\n Rest r =new Rest<>();\n r.setData(uptModel);\n return r;\n}\n')),(0,o.kt)("p",null,"\u6b64\u65f6\u5982\u679c\u8981\u8fc7\u6ee4id\u7684\u8bdd,\u9700\u8981\u6307\u5b9a\u5e26\u4e0a\u53c2\u6570\u540d\u79f0",(0,o.kt)("inlineCode",{parentName:"p"},"uptModel")),(0,o.kt)("p",null,"\u6700\u7ec8\u5ffd\u7565\u7684\u503c\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},'ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"}')),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(92115).Z,width:"1366",height:"619"})))}m.isMDXComponent=!0},58181:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/ignore1-27da0e50435a9bdacb24657754cc1138.png"},92115:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/ignore2-433d4d5310b796055798df01f96d0a6a.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4f72683c.61513102.js b/knife4j-doc/gitee/assets/js/4f72683c.61513102.js new file mode 100644 index 000000000..2e8ef278b --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4f72683c.61513102.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7305],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=d(n),m=a,f=s["".concat(p,".").concat(m)]||s[m]||c[m]||o;return n?r.createElement(f,i(i({ref:t},u),{},{components:n})):r.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>f,frontMatter:()=>l,metadata:()=>d,toc:()=>s});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],l={},p="3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",d={unversionedId:"features/filterRequestParameter",id:"features/filterRequestParameter",title:"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/filterRequestParameter.md",sourceDirName:"features",slug:"/features/filterRequestParameter",permalink:"/docs/features/filterRequestParameter",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.10 \u5bfc\u51fa\u79bb\u7ebf\u6587\u6863",permalink:"/docs/features/exportDocument"},next:{title:"3.12 \u5305\u542b\u8bf7\u6c42\u53c2\u6570",permalink:"/docs/features/includeRequestParameter"}},u={},s=[{value:"3.11.1 \u8868\u5355\u53c2\u6570",id:"3111-\u8868\u5355\u53c2\u6570",level:2},{value:"3.11.2 JSON\u53c2\u6570",id:"3112-json\u53c2\u6570",level:2}],c={toc:s},m="wrapper";function f(e){var t=e.components,l=(0,a.Z)(e,i);return(0,o.kt)(m,(0,r.Z)({},c,l,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"311-\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570"},"3.11 \u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570"),(0,o.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,o.kt)("pre",{parentName:"admonition"},(0,o.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,o.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,o.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,o.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,o.kt)("p",null,"\u901a\u5e38\u6211\u4eec\u5728\u5f00\u53d1\u63a5\u53e3\u65f6,\u6bd4\u5982\u4e00\u4e2a\u65b0\u589e\u63a5\u53e3\u548c\u4e00\u4e2a\u4fee\u6539\u63a5\u53e3,\u4fee\u6539\u63a5\u53e3\u9700\u8981\u4f20\u9012\u4e3b\u952eid\u3001\u800c\u65b0\u589e\u63a5\u53e3\u5219\u4e0d\u9700\u8981\u4f20\u9012\u6b64\u5c5e\u6027,\u4f46\u5927\u90e8\u5206\u60c5\u51b5,\u6211\u4eec\u53ea\u5199\u4e00\u4e2aModel\u7c7b,\u6b64\u65f6\u5728\u65b0\u589e\u63a5\u53e3\u65f6\u663e\u793a\u4e3b\u952eid\u4f1a\u663e\u5f97\u5f88\u591a\u4f59."),(0,o.kt)("p",null,"\u4f7f\u7528\u81ea\u5b9a\u4e49\u589e\u5f3a\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"ApiOperationSupport"),"\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"ignoreParameters"),"\u5c5e\u6027,\u53ef\u4ee5\u5f3a\u5236\u5ffd\u7565\u8981\u663e\u793a\u7684\u53c2\u6570."),(0,o.kt)("p",null,"\u5ffd\u7565\u7684\u89c4\u5219\u5982\u4e0b\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"\u4f8b\u5982\u65b0\u589e\u63a5\u53e3\u65f6,\u67d0\u5b9e\u4f53\u7c7b\u4e0d\u9700\u8981\u663e\u793aId,\u5373\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u5bf9\u53c2\u6570\u8fdb\u884c\u5ffd\u7565.",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"id"}')),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b58\u5728\u591a\u4e2a\u5c42\u6b21\u7684\u53c2\u6570\u8fc7\u6ee4,\u5219\u4f7f\u7528",(0,o.kt)("strong",{parentName:"li"},"\u540d\u79f0.\u5c5e\u6027"),"\u7684\u65b9\u5f0f,\u4f8b\u5982 ",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"uptModel.id","uptModel.uptPo.id"}'),",\u5176\u4e2duptModel\u662f\u5b9e\u4f53\u5bf9\u8c61\u53c2\u6570\u540d\u79f0,id\u4e3a\u5176\u5c5e\u6027,uptPo\u4e3a\u5b9e\u4f53\u7c7b,\u4f5c\u4e3auptModel\u7c7b\u7684\u5c5e\u6027\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u53c2\u6570\u5c42\u7ea7\u53ea\u662f\u4e00\u7ea7\u7684\u60c5\u51b5\u4e0b,\u5e76\u4e14\u53c2\u6570\u662f\u5b9e\u4f53\u7c7b\u7684\u60c5\u51b5\u4e0b,\u4e0d\u9700\u8981\u8bbe\u7f6e\u53c2\u6570\u540d\u79f0,\u76f4\u63a5\u7ed9\u5b9a\u5c5e\u6027\u503c\u540d\u79f0\u5373\u53ef"),(0,o.kt)("li",{parentName:"ul"},"\u5982\u679c\u5b9e\u4f53\u7c7b\u5c5e\u6027\u4e2d\u662f\u901a\u8fc7List\u8fd9\u79cd\u6570\u7ec4\u7684\u65b9\u5f0f,\u90a3\u4e48\u8fc7\u6ee4\u89c4\u5219\u4f1a\u6709\u6240\u4e0d\u540c,\u5728\u5c5e\u6027\u540e\u9762\u9700\u8981\u8ffd\u52a0\u4e00\u4e2a\u4e0b\u6807",(0,o.kt)("inlineCode",{parentName:"li"},"[0]"),"\uff0c",(0,o.kt)("inlineCode",{parentName:"li"},'ignoreParameters={"uptModel.uptPo[0].id"}'))),(0,o.kt)("p",null,"\u5728\u63a5\u53e3\u8fc7\u6ee4\u65f6,\u4e3b\u8981\u6709\u4e24\u79cd\u60c5\u51b5"),(0,o.kt)("h2",{id:"3111-\u8868\u5355\u53c2\u6570"},"3.11.1 \u8868\u5355\u53c2\u6570"),(0,o.kt)("p",null,"\u6211\u4eec\u5728\u4f7f\u7528\u5b9e\u4f53\u7c7b\u76f4\u63a5\u4f5c\u4e3a\u53c2\u6570\u65f6,\u5728\u6211\u4eec\u7684ui\u754c\u9762\u4e2d\u662f\u4e0d\u4f1a\u663e\u793a\u53c2\u6570\u540d\u79f0\u7684,\u6b64\u65f6\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5b9e\u4f53\u7684\u5c5e\u6027\u540d\u79f0\u8fdb\u884c\u53c2\u6570\u5ffd\u7565\uff0c\u4f8b\u5982\u5982\u4e0b\u4ee3\u7801\uff1a"),(0,o.kt)("p",null,"\u8868\u5355\u7c7b\u578b\u7684\u8bf7\u6c42\u662f\u4e0d\u9700\u8981\u6dfb\u52a0\u53c2\u6570\u540d\u7684"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u65b0\u589eModel\u63a5\u53e31")\n@ApiOperationSupport(ignoreParameters = {"id","orderDate.id"})\n@PostMapping("/insertMode1l")\npublic Rest insertModel1(UptModel uptModel){\n Rest r =new Rest<>();\n r.setData(uptModel);\n return r;\n}\n')),(0,o.kt)("p",null,"\u5b9e\u4f53\u7c7b",(0,o.kt)("inlineCode",{parentName:"p"},"UptModel.java"),"\u6587\u4ef6\u4ee3\u7801"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'public class UptModel {\n\n @ApiModelProperty(value = "\u4e3b\u952eid")\n private String id;\n\n @ApiModelProperty(value = "\u59d3\u540d")\n private String name;\n\n @ApiModelProperty(value = "\u90ae\u7bb1")\n private String email;\n\n @ApiModelProperty(value = "\u8ba2\u5355\u4fe1\u606f")\n private OrderDate orderDate;\n}\n')),(0,o.kt)("p",null,"\u6b64\u65f6\uff0c\u6700\u7ec8\u8fc7\u8fc7\u6ee4\u6389",(0,o.kt)("inlineCode",{parentName:"p"},"UptModel"),"\u7684\u5c5e\u6027id\u548c\u5c5e\u6027",(0,o.kt)("inlineCode",{parentName:"p"},"orderDate"),"\u7c7b\u4e2d\u7684id\u5c5e\u6027,\u4e0d\u5728\u754c\u9762\u663e\u793a."),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(58181).Z,width:"1361",height:"439"})),(0,o.kt)("h2",{id:"3112-json\u53c2\u6570"},"3.11.2 JSON\u53c2\u6570"),(0,o.kt)("p",null,"\u5982\u679c\u8bf7\u6c42\u53c2\u6570\u662f\u4f7f\u7528JSON\u7684\u65b9\u5f0f"),(0,o.kt)("p",null,"\u4ee3\u7801\u5982\u4e0b\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-java"},'@ApiOperation(value = "\u65b0\u589eModel\u63a5\u53e3")\n@ApiOperationSupport(ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"})\n@PostMapping("/insertModel")\npublic Rest insertModel(@RequestBody UptModel uptModel){\n Rest r =new Rest<>();\n r.setData(uptModel);\n return r;\n}\n')),(0,o.kt)("p",null,"\u6b64\u65f6\u5982\u679c\u8981\u8fc7\u6ee4id\u7684\u8bdd,\u9700\u8981\u6307\u5b9a\u5e26\u4e0a\u53c2\u6570\u540d\u79f0",(0,o.kt)("inlineCode",{parentName:"p"},"uptModel")),(0,o.kt)("p",null,"\u6700\u7ec8\u5ffd\u7565\u7684\u503c\u4e3a",(0,o.kt)("inlineCode",{parentName:"p"},'ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"}')),(0,o.kt)("p",null,(0,o.kt)("img",{src:n(92115).Z,width:"1366",height:"619"})))}f.isMDXComponent=!0},58181:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/ignore1-27da0e50435a9bdacb24657754cc1138.png"},92115:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/ignore2-433d4d5310b796055798df01f96d0a6a.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4fa88bde.582946cf.js b/knife4j-doc/gitee/assets/js/4fa88bde.582946cf.js new file mode 100644 index 000000000..6cbd17293 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/4fa88bde.582946cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9319],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,f=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[u]="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>c,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},l="Swagger2\u6ce8\u89e3",c={unversionedId:"oas/openapi2-annotation",id:"oas/openapi2-annotation",title:"Swagger2\u6ce8\u89e3",description:"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a",source:"@site/docs/oas/openapi2-annotation.md",sourceDirName:"oas",slug:"/oas/openapi2-annotation",permalink:"/docs/oas/openapi2-annotation",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"oas",previous:{title:"\u8bf4\u660e",permalink:"/docs/oas/annotation-introduction"},next:{title:"OpenAPI3\u6ce8\u89e3",permalink:"/docs/oas/openapi3-annotation"}},s={},u=[],m={toc:u},d="wrapper";function f(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"swagger2\u6ce8\u89e3"},"Swagger2\u6ce8\u89e3"),(0,o.kt)("p",null,"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@Api"),":\u5b9a\u4e49\u63a5\u53e3\u5206\u7ec4\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiImplicitParam"),": \u5355\u4e2a\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiImplicitParams"),":\u591a\u4e2a\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiModel"),":\u5b9e\u4f53\u7c7b\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiModelProperty"),":\u5b9e\u4f53\u5c5e\u6027\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiOperation"),":\u63a5\u53e3\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiParam"),":\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiResponse"),":\u54cd\u5e94\u7801"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiResponses"),":\u591a\u4e2a\u54cd\u5e94\u7801")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/4fa88bde.b5fd24a4.js b/knife4j-doc/gitee/assets/js/4fa88bde.b5fd24a4.js deleted file mode 100644 index 6aef24ef8..000000000 --- a/knife4j-doc/gitee/assets/js/4fa88bde.b5fd24a4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9319],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(l,".").concat(d)]||m[d]||u[d]||o;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>p,metadata:()=>c,toc:()=>u});var r=n(87462),a=n(63366),o=(n(67294),n(3905)),i=["components"],p={},l="Swagger2\u6ce8\u89e3",c={unversionedId:"oas/openapi2-annotation",id:"oas/openapi2-annotation",title:"Swagger2\u6ce8\u89e3",description:"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a",source:"@site/docs/oas/openapi2-annotation.md",sourceDirName:"oas",slug:"/oas/openapi2-annotation",permalink:"/docs/oas/openapi2-annotation",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"oas",previous:{title:"\u8bf4\u660e",permalink:"/docs/oas/annotation-introduction"},next:{title:"OpenAPI3\u6ce8\u89e3",permalink:"/docs/oas/openapi3-annotation"}},s={},u=[],m={toc:u};function d(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"swagger2\u6ce8\u89e3"},"Swagger2\u6ce8\u89e3"),(0,o.kt)("p",null,"\u4e3b\u8981\u5305\u542b\u6ce8\u89e3\uff1a"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@Api"),":\u5b9a\u4e49\u63a5\u53e3\u5206\u7ec4\u540d\u79f0"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiImplicitParam"),": \u5355\u4e2a\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiImplicitParams"),":\u591a\u4e2a\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiModel"),":\u5b9e\u4f53\u7c7b\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiModelProperty"),":\u5b9e\u4f53\u5c5e\u6027\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiOperation"),":\u63a5\u53e3\u5b9a\u4e49"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiParam"),":\u53c2\u6570\u6ce8\u91ca"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiResponse"),":\u54cd\u5e94\u7801"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"@ApiResponses"),":\u591a\u4e2a\u54cd\u5e94\u7801")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/50507b99.a912708b.js b/knife4j-doc/gitee/assets/js/50507b99.a912708b.js deleted file mode 100644 index 43e294550..000000000 --- a/knife4j-doc/gitee/assets/js/50507b99.a912708b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7682],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),k=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=k(e.components);return a.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),d=k(n),c=r,g=d["".concat(o,".").concat(c)]||d[c]||u[c]||l;return n?a.createElement(g,i(i({ref:t},s),{},{components:n})):a.createElement(g,i({ref:t},s))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=d;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var k=2;k{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>c,frontMatter:()=>p,metadata:()=>k,toc:()=>u});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),i=["components"],p={},o="4.3 Knife4jAggregationDesktop",k={unversionedId:"middleware/knife4jAggregationDesktop",id:"middleware/knife4jAggregationDesktop",title:"4.3 Knife4jAggregationDesktop",description:"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01",source:"@site/docs/middleware/knife4jAggregationDesktop.md",sourceDirName:"middleware",slug:"/middleware/knife4jAggregationDesktop",permalink:"/docs/middleware/knife4jAggregationDesktop",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},s={},u=[{value:"4.3.1 \u8f6f\u4ef6\u67b6\u6784",id:"431-\u8f6f\u4ef6\u67b6\u6784",level:2},{value:"4.3.2 \u914d\u7f6e\u6587\u4ef6",id:"432-\u914d\u7f6e\u6587\u4ef6",level:2},{value:"4.3.3 \u589e\u52a0\u6587\u6863",id:"433-\u589e\u52a0\u6587\u6863",level:2},{value:"4.3.4 \u914d\u7f6e\u6587\u6863",id:"434-\u914d\u7f6e\u6587\u6863",level:2},{value:"4.3.4.1 Disk\u6a21\u5f0f",id:"4341-disk\u6a21\u5f0f",level:3},{value:"4.3.4.1 Cloud\u6a21\u5f0f",id:"4341-cloud\u6a21\u5f0f",level:3},{value:"4.3.4.2 Eureka\u6a21\u5f0f",id:"4342-eureka\u6a21\u5f0f",level:3},{value:"4.3.4.3 Nacos\u6a21\u5f0f",id:"4343-nacos\u6a21\u5f0f",level:3}],d={toc:u};function c(e){var t=e.components,p=(0,r.Z)(e,i);return(0,l.kt)("wrapper",(0,a.Z)({},d,p,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"43-knife4jaggregationdesktop"},"4.3 Knife4jAggregationDesktop"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01"),(0,l.kt)("p",{parentName:"blockquote"},"\u76ee\u524d\u8be5\u60f3\u6cd5\u4f5c\u8005\u6b63\u5728\u5f00\u53d1\u4e2d......")),(0,l.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684",(0,l.kt)("a",{parentName:"p",href:"/docs/middleware-sources/desktop-introduction",target:null,rel:null},"\u6587\u6863\u4ecb\u7ecd"))),(0,l.kt)("p",null,"Knife4jAggregationDesktop\u662f\u4e00\u6b3e\u57fa\u4e8e\u805a\u5408\u7ec4\u4ef6Knife4jAggregation\u7279\u6027\u7684\u72ec\u7acb\u90e8\u7f72\u7684\u805a\u5408OpenAPI\u6587\u6863\u8f6f\u4ef6\uff0c\u8131\u79bbSpring\u3001Spring Boot\u6280\u672f\u67b6\u6784\u4f53\u7cfb\uff0c\u5f00\u53d1\u8005\u4e0b\u8f7d\u540e\u72ec\u7acb\u90e8\u7f72\u542f\u52a8\u3002"),(0,l.kt)("p",null,"\u4e3b\u8981\u529f\u80fd\u4f5c\u7528\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u72ec\u7acb\u90e8\u7f72(\u4f9d\u8d56Java JDK8\u73af\u5883)"),(0,l.kt)("li",{parentName:"ul"},"\u62e5\u6709Knife4jAggregation\u7684\u5168\u90e8\u7279\u6027"),(0,l.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u52a8\u6001\u6587\u4ef6\u914d\u7f6e\u65b9\u5f0f"),(0,l.kt)("li",{parentName:"ul"},"\u652f\u6301\u591a\u4e2a\u9879\u76ee\u52a8\u6001\u914d\u7f6e")),(0,l.kt)("h2",{id:"431-\u8f6f\u4ef6\u67b6\u6784"},"4.3.1 \u8f6f\u4ef6\u67b6\u6784"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6280\u672f\u67b6\u6784\u56fe"),"\u5982\u4e0b\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(56249).Z,width:"1301",height:"641"})),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u8f6f\u4ef6\u76ee\u5f55"),"\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-Knife4jAggregationDesktop\n|------bin \n|------conf\n|------data\n|------lib\n|-----\u2014logs\n|------webapps\n|------LICENSE\n|------readme.txt\n")),(0,l.kt)("p",null,"\u76ee\u5f55\u8bf4\u660e\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"bin"),":\u542f\u52a8\u547d\u4ee4\u76ee\u5f55"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"conf"),":\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\uff0c",(0,l.kt)("inlineCode",{parentName:"li"},"application.properties"),"\u5305\u542b",(0,l.kt)("inlineCode",{parentName:"li"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u7684\u76f8\u5173\u914d\u7f6e\uff0c\u5305\u62ec\u7aef\u53e3\u53f7\uff0c\u4e3a\u6587\u6863\u8bbe\u7f6ebasicAuth\u6743\u9650\u7b49"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data"),":\u6570\u636e\u76ee\u5f55\uff0c\u9ed8\u8ba4\u6839\u76ee\u5f55\u5b58\u653e",(0,l.kt)("inlineCode",{parentName:"li"},"ROOT"),"\u6587\u4ef6\u5939,\u591a\u4e2a\u9879\u76ee\u7684OpenAPI\u805a\u5408\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728\u6b64\u76ee\u5f55\u4e0b\u5efa\u6587\u4ef6\u5939\u5373\u53ef"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"lib"),":\u4f9d\u8d56jar\u5305"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"logs"),":\u65e5\u5fd7"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"webapps"),":Knife4jUi\u7684\u9759\u6001\u8d44\u6e90\u6587\u4ef6")),(0,l.kt)("h2",{id:"432-\u914d\u7f6e\u6587\u4ef6"},"4.3.2 \u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,"\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"conf"),"\u6587\u4ef6\u5939\u4e0b\u6709",(0,l.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u662f",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u7684\u72ec\u7acb\u914d\u7f6e"),(0,l.kt)("p",null,"\u76ee\u524d\u7684\u914d\u7f6e\u5c5e\u6027\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"# Knife4jAggregationDesktop \u542f\u52a8\u7aef\u53e3\u53f7\nknife4j.port=18006\n# \u4e3a\u6240\u6709Knife4jAggregationDesktop\u5f00\u653e\u51fa\u53bb\u7684OpenAPI\u6587\u6863\u52a0\u6743\uff0c\u8bbe\u7f6eBasicAuth\u8bbf\u95ee\u5bc6\u7801\n# enable=true \u4ee3\u8868\u542f\u7528\nknife4j.basic.enable=true\nknife4j.basic.username=zhangsan\nknife4j.basic.password=123456\n\n# \u4f7f\u7528\u8005\u4e5f\u53ef\u4ee5\u4e3a\u5355\u4e2a\u5f00\u653e\u51fa\u53bb\u7684OpenAPI\u6587\u6863\u72ec\u7acb\u8bbe\u7f6eBasic\u9a8c\u8bc1\u6743\u9650\uff0c\u8bbe\u7f6e\u89c4\u5219\u662fknife4j.basic.\u9879\u76eecode.\u5f00\u5934\n# \u4f8b\u5982\u4e00\u4e2a\u9879\u76ee\u6587\u6863\u7684\u8bbf\u95ee\u8def\u5f84\u662f\uff1ahttp://localhost:18006/bigdata/doc.html,\u90a3\u4e48bigdata\u5c31\u662f\u8be5\u9879\u76ee\u7684code\uff0c\u4e3a\u8be5\u6587\u6863\u8bbe\u7f6eBasicAuth\nknife4j.basic.bigdata.enable=true\nknife4j.basic.bigdata.username=zhangsan\nknife4j.basic.bigdata.password=123456\n\n")),(0,l.kt)("h2",{id:"433-\u589e\u52a0\u6587\u6863"},"4.3.3 \u589e\u52a0\u6587\u6863"),(0,l.kt)("p",null,"\u5f53",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u542f\u52a8\u540e,\u5f00\u53d1\u8005\u60f3\u8981\u589e\u52a0OpenAPI\u6587\u6863\u5e94\u8be5\u600e\u4e48\u529e\uff1f"),(0,l.kt)("p",null,"\u4ece\u6280\u672f\u67b6\u6784\u56fe\u53ef\u4ee5\u770b\u5230,",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u63d0\u4f9b\u4e86",(0,l.kt)("inlineCode",{parentName:"p"},"MetaDataMonitor"),"\u7ec4\u4ef6,\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u76d1\u542c\u5668,\u4e3b\u8981\u76d1\u542cdata\u76ee\u5f55\u3002\u5f53\u5f00\u53d1\u8005\u5728data\u76ee\u5f55\u65b0\u5efa\u6587\u4ef6\u5939(\u6587\u6863)\u540e\uff0c\u6dfb\u52a0\u76f8\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u540e\u81ea\u52a8\u52a0\u8f7d\u5143\u6570\u636e\u914d\u7f6e\uff0c\u65e0\u9700\u91cd\u542f\u5373\u53ef\u5728\u7ebf\u8bbf\u95ee\u6587\u6863"),(0,l.kt)("p",null,"\u5728data\u76ee\u5f55\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5efaN\u4e2a\u4e00\u7ea7\u6587\u4ef6\u5939(\u6587\u6863),\u6587\u4ef6\u5939\u540d\u79f0\u5fc5\u987b\u662f\u82f1\u6587\u6216\u82f1\u6587+\u6570\u7ec4\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|------project1\n|------project2\n|------project3\n|-----\u2014project4\n|-----\u2014more...\n")),(0,l.kt)("p",null,"ROOT\u76ee\u5f55\u4ee3\u8868\u7684\u662f\u6839\u76ee\u5f55\uff0c\u6700\u7ec8\u8bbf\u95ee\u6587\u6863\u7684\u5730\u5740\u662f\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u800c\u5f00\u53d1\u8005\u81ea\u5efa\u7684\u6587\u4ef6\u5939\u76ee\u5f55\uff0c\u4f8b\u5982project1\u3001project2\u3001project3\u7b49\u7b49\uff0c\u6240\u4ee3\u8868\u7684\u662f\u4e00\u4e2a\u9879\u76ee\u540d\u79f0\uff0c\u6700\u7ec8\u8bbf\u95ee\u7684\u5730\u5740\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u9879\u76eecode"),(0,l.kt)("th",{parentName:"tr",align:null},"\u6587\u6863\u5730\u5740"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ROOT"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6839\u76ee\u5f55\uff0c\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project1"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project1/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project2"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project2/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project3"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project3/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project4"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project4/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"\u4ee5\u6b64\u7c7b\u63a8"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/${code}/doc.html"))))),(0,l.kt)("h2",{id:"434-\u914d\u7f6e\u6587\u6863"},"4.3.4 \u914d\u7f6e\u6587\u6863"),(0,l.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ecb\u7ecd\u79cd\uff0c\u6211\u4eec\u77e5\u9053\u4e86\u5982\u4f55\u589e\u52a0\u591a\u4e2a\u6587\u6863\uff0c\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728data\u76ee\u5f55\u5efa\u6587\u4ef6\u5939\u5373\u53ef\uff0c\u90a3\u4e48\u5efa\u7acb\u597d\u4e86\u6587\u4ef6\u5939\u540e\uff0c\u5982\u4f55\u914d\u7f6e\u5462\uff1f"),(0,l.kt)("p",null,"\u8fd9\u91cc\u9700\u8981\u6d89\u53ca\u5230Knife4jAggregation\u63d0\u4f9b\u652f\u6301\u76844\u79cd\u6a21\u5f0f\u4e86\uff1aDisk\u3001Cloud\u3001Eureka\u3001Nacos"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\u53ea\u652f\u6301\u4e00\u79cd\u6a21\u5f0f")),(0,l.kt)("p",null,"\u62ffROOT\u6839\u76ee\u5f55\u6765\u505a\u793a\u4f8b\u8bf4\u660e\uff0c\u5f00\u53d1\u8005\u5982\u4f55\u914d\u7f6e\u3002"),(0,l.kt)("h3",{id:"4341-disk\u6a21\u5f0f"},"4.3.4.1 Disk\u6a21\u5f0f"),(0,l.kt)("p",null,"Disk\u6a21\u5f0f\u5728Knife4jAggregationDesktop\u4e2d\u662f\u6700\u7b80\u5355\u7684\uff0c\u5982\u679c\u5f00\u53d1\u8005\u62e5\u6709OpenAPI\u6587\u6863\u7684\u9759\u6001JSON\u6587\u4ef6\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u76f4\u63a5\u653e\u5728\u5efa\u597d\u7684\u6587\u4ef6\u5939\u4e2d\uff0c\u4e0d\u7528\u4efb\u4f55\u914d\u7f6e\uff0c\u5373\u53ef\u6e32\u67d3\u3002"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------userOpenApi.json\n|--------orderOpenApi.json\n\n")),(0,l.kt)("p",null,"\u5728ROOT\u76ee\u5f55\u4e0b\uff0c\u6211\u4eec\u653e\u7f6e\u4e86\u4e24\u4e2aOpenAPI\u6587\u6863\u7684\u9759\u6001JSON\u6587\u4ef6\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"userOpenAPI"),"\u4ee5\u53ca",(0,l.kt)("inlineCode",{parentName:"p"},"orderOpenApi"),",\u6b64\u65f6\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u5f00\u53d1\u8005\u5c31\u80fd\u5728\u6587\u6863\u754c\u9762\u4e2d\u770b\u5230\u4f1a\u5b58\u5728\u4e24\u4e2a\u5206\u7ec4\u4e0b\u7684OpenAPI\u6587\u6863\u4e86\u3002"),(0,l.kt)("p",null,"\u90a3\u4e48\u968f\u4e4b\u95ee\u9898\u4e5f\u6765\u4e86\uff0c\u5728\u6587\u6863\u4e2d\uff0c\u4e0b\u62c9\u6846\u7684\u9009\u9879\u540d\u79f0\u662f\u4ee5\u6587\u4ef6\u7684\u540d\u79f0\u6765\u547d\u540d\u663e\u793a\u7684\uff0c\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u663e\u793a\u5e94\u8be5\u600e\u4e48\u529e\uff1f\uff0c\u6b64\u65f6\u5c31\u9700\u8981\u7ee7\u7eed\u5728ROOT\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8fdb\u884c\u91cd\u547d\u540d\u914d\u7f6e"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684disk\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.disk.routes[0].name=\u7528\u6237\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[0].location=userOpenApi.json\n\nknife4j.disk.routes[1].name=\u8ba2\u5355\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[1].location=orderOpenApi.json\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d"),(0,l.kt)("h3",{id:"4341-cloud\u6a21\u5f0f"},"4.3.4.1 Cloud\u6a21\u5f0f"),(0,l.kt)("p",null,"Cloud\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eCloud\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------cloud.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684cloud\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.cloud.routes[0].name=\u7528\u6237\nknife4j.cloud.routes[0].uri=192.168.0.152:8999\nknife4j.cloud.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eCloud\u6a21\u5f0f\n\n")),(0,l.kt)("h3",{id:"4342-eureka\u6a21\u5f0f"},"4.3.4.2 Eureka\u6a21\u5f0f"),(0,l.kt)("p",null,"Eureka\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eeureka\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------eureka.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684cloud\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.eureka.serviceUrl=http://localhost:10000/eureka/\nknife4j.eureka.routes[0].name=\u7528\u6237\nknife4j.eureka.routes[0].serviceName=userService\nknife4j.eureka.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eEureka\u6a21\u5f0f\n")),(0,l.kt)("h3",{id:"4343-nacos\u6a21\u5f0f"},"4.3.4.3 Nacos\u6a21\u5f0f"),(0,l.kt)("p",null,"Nacos\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6enacos\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------nacos.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684nacos\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.nacos.serviceUrl=http://localhost:10000/nacos/\nknife4j.nacos.routes[0].name=\u7528\u6237\nknife4j.nacos.routes[0].serviceName=userService\nknife4j.nacos.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eNacos\u6a21\u5f0f\n")))}c.isMDXComponent=!0},56249:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/Knife4jAggregationDesktop-a2afeddfbddf5704818abf6bf746a3b3.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/50507b99.d3e1ec54.js b/knife4j-doc/gitee/assets/js/50507b99.d3e1ec54.js new file mode 100644 index 000000000..b1624937e --- /dev/null +++ b/knife4j-doc/gitee/assets/js/50507b99.d3e1ec54.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7682],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),k=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=k(e.components);return a.createElement(o.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=k(n),c=r,g=u["".concat(o,".").concat(c)]||u[c]||d[c]||l;return n?a.createElement(g,i(i({ref:t},s),{},{components:n})):a.createElement(g,i({ref:t},s))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=c;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p[u]="string"==typeof e?e:r,i[1]=p;for(var k=2;k{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>p,metadata:()=>k,toc:()=>u});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),i=["components"],p={},o="4.3 Knife4jAggregationDesktop",k={unversionedId:"middleware/knife4jAggregationDesktop",id:"middleware/knife4jAggregationDesktop",title:"4.3 Knife4jAggregationDesktop",description:"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01",source:"@site/docs/middleware/knife4jAggregationDesktop.md",sourceDirName:"middleware",slug:"/middleware/knife4jAggregationDesktop",permalink:"/docs/middleware/knife4jAggregationDesktop",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{}},s={},u=[{value:"4.3.1 \u8f6f\u4ef6\u67b6\u6784",id:"431-\u8f6f\u4ef6\u67b6\u6784",level:2},{value:"4.3.2 \u914d\u7f6e\u6587\u4ef6",id:"432-\u914d\u7f6e\u6587\u4ef6",level:2},{value:"4.3.3 \u589e\u52a0\u6587\u6863",id:"433-\u589e\u52a0\u6587\u6863",level:2},{value:"4.3.4 \u914d\u7f6e\u6587\u6863",id:"434-\u914d\u7f6e\u6587\u6863",level:2},{value:"4.3.4.1 Disk\u6a21\u5f0f",id:"4341-disk\u6a21\u5f0f",level:3},{value:"4.3.4.1 Cloud\u6a21\u5f0f",id:"4341-cloud\u6a21\u5f0f",level:3},{value:"4.3.4.2 Eureka\u6a21\u5f0f",id:"4342-eureka\u6a21\u5f0f",level:3},{value:"4.3.4.3 Nacos\u6a21\u5f0f",id:"4343-nacos\u6a21\u5f0f",level:3}],d={toc:u},c="wrapper";function g(e){var t=e.components,p=(0,r.Z)(e,i);return(0,l.kt)(c,(0,a.Z)({},d,p,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"43-knife4jaggregationdesktop"},"4.3 Knife4jAggregationDesktop"),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"\u6709\u4e86\u65b0\u7684\u60f3\u6cd5\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u6298\u817e\u5427~~\uff01"),(0,l.kt)("p",{parentName:"blockquote"},"\u76ee\u524d\u8be5\u60f3\u6cd5\u4f5c\u8005\u6b63\u5728\u5f00\u53d1\u4e2d......")),(0,l.kt)("admonition",{title:"\u53cb\u60c5\u63d0\u793a",type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"\u8be5\u6587\u6863\u9875\u4ecb\u7ecd\u5df2\u4f5c\u5e9f,\u8bf7\u79fb\u6b65\u65b0\u7684",(0,l.kt)("a",{parentName:"p",href:"/docs/middleware-sources/desktop-introduction",target:null,rel:null},"\u6587\u6863\u4ecb\u7ecd"))),(0,l.kt)("p",null,"Knife4jAggregationDesktop\u662f\u4e00\u6b3e\u57fa\u4e8e\u805a\u5408\u7ec4\u4ef6Knife4jAggregation\u7279\u6027\u7684\u72ec\u7acb\u90e8\u7f72\u7684\u805a\u5408OpenAPI\u6587\u6863\u8f6f\u4ef6\uff0c\u8131\u79bbSpring\u3001Spring Boot\u6280\u672f\u67b6\u6784\u4f53\u7cfb\uff0c\u5f00\u53d1\u8005\u4e0b\u8f7d\u540e\u72ec\u7acb\u90e8\u7f72\u542f\u52a8\u3002"),(0,l.kt)("p",null,"\u4e3b\u8981\u529f\u80fd\u4f5c\u7528\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u72ec\u7acb\u90e8\u7f72(\u4f9d\u8d56Java JDK8\u73af\u5883)"),(0,l.kt)("li",{parentName:"ul"},"\u62e5\u6709Knife4jAggregation\u7684\u5168\u90e8\u7279\u6027"),(0,l.kt)("li",{parentName:"ul"},"\u57fa\u4e8e\u52a8\u6001\u6587\u4ef6\u914d\u7f6e\u65b9\u5f0f"),(0,l.kt)("li",{parentName:"ul"},"\u652f\u6301\u591a\u4e2a\u9879\u76ee\u52a8\u6001\u914d\u7f6e")),(0,l.kt)("h2",{id:"431-\u8f6f\u4ef6\u67b6\u6784"},"4.3.1 \u8f6f\u4ef6\u67b6\u6784"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6280\u672f\u67b6\u6784\u56fe"),"\u5982\u4e0b\uff1a"),(0,l.kt)("p",null,(0,l.kt)("img",{src:n(56249).Z,width:"1301",height:"641"})),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u8f6f\u4ef6\u76ee\u5f55"),"\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-Knife4jAggregationDesktop\n|------bin \n|------conf\n|------data\n|------lib\n|-----\u2014logs\n|------webapps\n|------LICENSE\n|------readme.txt\n")),(0,l.kt)("p",null,"\u76ee\u5f55\u8bf4\u660e\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"bin"),":\u542f\u52a8\u547d\u4ee4\u76ee\u5f55"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"conf"),":\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\uff0c",(0,l.kt)("inlineCode",{parentName:"li"},"application.properties"),"\u5305\u542b",(0,l.kt)("inlineCode",{parentName:"li"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u7684\u76f8\u5173\u914d\u7f6e\uff0c\u5305\u62ec\u7aef\u53e3\u53f7\uff0c\u4e3a\u6587\u6863\u8bbe\u7f6ebasicAuth\u6743\u9650\u7b49"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"data"),":\u6570\u636e\u76ee\u5f55\uff0c\u9ed8\u8ba4\u6839\u76ee\u5f55\u5b58\u653e",(0,l.kt)("inlineCode",{parentName:"li"},"ROOT"),"\u6587\u4ef6\u5939,\u591a\u4e2a\u9879\u76ee\u7684OpenAPI\u805a\u5408\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u5728\u6b64\u76ee\u5f55\u4e0b\u5efa\u6587\u4ef6\u5939\u5373\u53ef"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"lib"),":\u4f9d\u8d56jar\u5305"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"logs"),":\u65e5\u5fd7"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"webapps"),":Knife4jUi\u7684\u9759\u6001\u8d44\u6e90\u6587\u4ef6")),(0,l.kt)("h2",{id:"432-\u914d\u7f6e\u6587\u4ef6"},"4.3.2 \u914d\u7f6e\u6587\u4ef6"),(0,l.kt)("p",null,"\u5728",(0,l.kt)("inlineCode",{parentName:"p"},"conf"),"\u6587\u4ef6\u5939\u4e0b\u6709",(0,l.kt)("inlineCode",{parentName:"p"},"application.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u662f",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u7684\u72ec\u7acb\u914d\u7f6e"),(0,l.kt)("p",null,"\u76ee\u524d\u7684\u914d\u7f6e\u5c5e\u6027\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"# Knife4jAggregationDesktop \u542f\u52a8\u7aef\u53e3\u53f7\nknife4j.port=18006\n# \u4e3a\u6240\u6709Knife4jAggregationDesktop\u5f00\u653e\u51fa\u53bb\u7684OpenAPI\u6587\u6863\u52a0\u6743\uff0c\u8bbe\u7f6eBasicAuth\u8bbf\u95ee\u5bc6\u7801\n# enable=true \u4ee3\u8868\u542f\u7528\nknife4j.basic.enable=true\nknife4j.basic.username=zhangsan\nknife4j.basic.password=123456\n\n# \u4f7f\u7528\u8005\u4e5f\u53ef\u4ee5\u4e3a\u5355\u4e2a\u5f00\u653e\u51fa\u53bb\u7684OpenAPI\u6587\u6863\u72ec\u7acb\u8bbe\u7f6eBasic\u9a8c\u8bc1\u6743\u9650\uff0c\u8bbe\u7f6e\u89c4\u5219\u662fknife4j.basic.\u9879\u76eecode.\u5f00\u5934\n# \u4f8b\u5982\u4e00\u4e2a\u9879\u76ee\u6587\u6863\u7684\u8bbf\u95ee\u8def\u5f84\u662f\uff1ahttp://localhost:18006/bigdata/doc.html,\u90a3\u4e48bigdata\u5c31\u662f\u8be5\u9879\u76ee\u7684code\uff0c\u4e3a\u8be5\u6587\u6863\u8bbe\u7f6eBasicAuth\nknife4j.basic.bigdata.enable=true\nknife4j.basic.bigdata.username=zhangsan\nknife4j.basic.bigdata.password=123456\n\n")),(0,l.kt)("h2",{id:"433-\u589e\u52a0\u6587\u6863"},"4.3.3 \u589e\u52a0\u6587\u6863"),(0,l.kt)("p",null,"\u5f53",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u8f6f\u4ef6\u542f\u52a8\u540e,\u5f00\u53d1\u8005\u60f3\u8981\u589e\u52a0OpenAPI\u6587\u6863\u5e94\u8be5\u600e\u4e48\u529e\uff1f"),(0,l.kt)("p",null,"\u4ece\u6280\u672f\u67b6\u6784\u56fe\u53ef\u4ee5\u770b\u5230,",(0,l.kt)("inlineCode",{parentName:"p"},"Knife4jAggregationDesktop"),"\u63d0\u4f9b\u4e86",(0,l.kt)("inlineCode",{parentName:"p"},"MetaDataMonitor"),"\u7ec4\u4ef6,\u8be5\u7ec4\u4ef6\u662f\u4e00\u4e2a\u76d1\u542c\u5668,\u4e3b\u8981\u76d1\u542cdata\u76ee\u5f55\u3002\u5f53\u5f00\u53d1\u8005\u5728data\u76ee\u5f55\u65b0\u5efa\u6587\u4ef6\u5939(\u6587\u6863)\u540e\uff0c\u6dfb\u52a0\u76f8\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u540e\u81ea\u52a8\u52a0\u8f7d\u5143\u6570\u636e\u914d\u7f6e\uff0c\u65e0\u9700\u91cd\u542f\u5373\u53ef\u5728\u7ebf\u8bbf\u95ee\u6587\u6863"),(0,l.kt)("p",null,"\u5728data\u76ee\u5f55\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5efaN\u4e2a\u4e00\u7ea7\u6587\u4ef6\u5939(\u6587\u6863),\u6587\u4ef6\u5939\u540d\u79f0\u5fc5\u987b\u662f\u82f1\u6587\u6216\u82f1\u6587+\u6570\u7ec4\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|------project1\n|------project2\n|------project3\n|-----\u2014project4\n|-----\u2014more...\n")),(0,l.kt)("p",null,"ROOT\u76ee\u5f55\u4ee3\u8868\u7684\u662f\u6839\u76ee\u5f55\uff0c\u6700\u7ec8\u8bbf\u95ee\u6587\u6863\u7684\u5730\u5740\u662f\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u800c\u5f00\u53d1\u8005\u81ea\u5efa\u7684\u6587\u4ef6\u5939\u76ee\u5f55\uff0c\u4f8b\u5982project1\u3001project2\u3001project3\u7b49\u7b49\uff0c\u6240\u4ee3\u8868\u7684\u662f\u4e00\u4e2a\u9879\u76ee\u540d\u79f0\uff0c\u6700\u7ec8\u8bbf\u95ee\u7684\u5730\u5740\u5982\u4e0b\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u9879\u76eecode"),(0,l.kt)("th",{parentName:"tr",align:null},"\u6587\u6863\u5730\u5740"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ROOT"),(0,l.kt)("td",{parentName:"tr",align:null},"\u6839\u76ee\u5f55\uff0c\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project1"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project1/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project2"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project2/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project3"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project3/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"project4"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/project4/doc.html"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"\u4ee5\u6b64\u7c7b\u63a8"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"td"},"http://ip:port/${code}/doc.html"))))),(0,l.kt)("h2",{id:"434-\u914d\u7f6e\u6587\u6863"},"4.3.4 \u914d\u7f6e\u6587\u6863"),(0,l.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u4ecb\u7ecd\u79cd\uff0c\u6211\u4eec\u77e5\u9053\u4e86\u5982\u4f55\u589e\u52a0\u591a\u4e2a\u6587\u6863\uff0c\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728data\u76ee\u5f55\u5efa\u6587\u4ef6\u5939\u5373\u53ef\uff0c\u90a3\u4e48\u5efa\u7acb\u597d\u4e86\u6587\u4ef6\u5939\u540e\uff0c\u5982\u4f55\u914d\u7f6e\u5462\uff1f"),(0,l.kt)("p",null,"\u8fd9\u91cc\u9700\u8981\u6d89\u53ca\u5230Knife4jAggregation\u63d0\u4f9b\u652f\u6301\u76844\u79cd\u6a21\u5f0f\u4e86\uff1aDisk\u3001Cloud\u3001Eureka\u3001Nacos"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\u53ea\u652f\u6301\u4e00\u79cd\u6a21\u5f0f")),(0,l.kt)("p",null,"\u62ffROOT\u6839\u76ee\u5f55\u6765\u505a\u793a\u4f8b\u8bf4\u660e\uff0c\u5f00\u53d1\u8005\u5982\u4f55\u914d\u7f6e\u3002"),(0,l.kt)("h3",{id:"4341-disk\u6a21\u5f0f"},"4.3.4.1 Disk\u6a21\u5f0f"),(0,l.kt)("p",null,"Disk\u6a21\u5f0f\u5728Knife4jAggregationDesktop\u4e2d\u662f\u6700\u7b80\u5355\u7684\uff0c\u5982\u679c\u5f00\u53d1\u8005\u62e5\u6709OpenAPI\u6587\u6863\u7684\u9759\u6001JSON\u6587\u4ef6\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u76f4\u63a5\u653e\u5728\u5efa\u597d\u7684\u6587\u4ef6\u5939\u4e2d\uff0c\u4e0d\u7528\u4efb\u4f55\u914d\u7f6e\uff0c\u5373\u53ef\u6e32\u67d3\u3002"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------userOpenApi.json\n|--------orderOpenApi.json\n\n")),(0,l.kt)("p",null,"\u5728ROOT\u76ee\u5f55\u4e0b\uff0c\u6211\u4eec\u653e\u7f6e\u4e86\u4e24\u4e2aOpenAPI\u6587\u6863\u7684\u9759\u6001JSON\u6587\u4ef6\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"userOpenAPI"),"\u4ee5\u53ca",(0,l.kt)("inlineCode",{parentName:"p"},"orderOpenApi"),",\u6b64\u65f6\u8bbf\u95ee\u5730\u5740\uff1a",(0,l.kt)("inlineCode",{parentName:"p"},"http://ip:port/doc.html")),(0,l.kt)("p",null,"\u5f00\u53d1\u8005\u5c31\u80fd\u5728\u6587\u6863\u754c\u9762\u4e2d\u770b\u5230\u4f1a\u5b58\u5728\u4e24\u4e2a\u5206\u7ec4\u4e0b\u7684OpenAPI\u6587\u6863\u4e86\u3002"),(0,l.kt)("p",null,"\u90a3\u4e48\u968f\u4e4b\u95ee\u9898\u4e5f\u6765\u4e86\uff0c\u5728\u6587\u6863\u4e2d\uff0c\u4e0b\u62c9\u6846\u7684\u9009\u9879\u540d\u79f0\u662f\u4ee5\u6587\u4ef6\u7684\u540d\u79f0\u6765\u547d\u540d\u663e\u793a\u7684\uff0c\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u663e\u793a\u5e94\u8be5\u600e\u4e48\u529e\uff1f\uff0c\u6b64\u65f6\u5c31\u9700\u8981\u7ee7\u7eed\u5728ROOT\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3a",(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8fdb\u884c\u91cd\u547d\u540d\u914d\u7f6e"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"disk.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684disk\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.disk.routes[0].name=\u7528\u6237\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[0].location=userOpenApi.json\n\nknife4j.disk.routes[1].name=\u8ba2\u5355\u670d\u52a1\n# \u6b64\u5904location\u9700\u8981\u6ce8\u610f\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u540c\u7ea7\u7684\u6587\u4ef6\u540d\u79f0\u5373\u53ef\nknife4j.disk.routes[1].location=orderOpenApi.json\n\n")),(0,l.kt)("p",null,"\u914d\u7f6e\u597d\u540e\uff0c\u65e0\u9700\u91cd\u542f\uff0c\u5e94\u7528\u4f1a\u81ea\u52a8\u52a0\u8f7d"),(0,l.kt)("h3",{id:"4341-cloud\u6a21\u5f0f"},"4.3.4.1 Cloud\u6a21\u5f0f"),(0,l.kt)("p",null,"Cloud\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eCloud\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------cloud.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"cloud.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684cloud\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.cloud.routes[0].name=\u7528\u6237\nknife4j.cloud.routes[0].uri=192.168.0.152:8999\nknife4j.cloud.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eCloud\u6a21\u5f0f\n\n")),(0,l.kt)("h3",{id:"4342-eureka\u6a21\u5f0f"},"4.3.4.2 Eureka\u6a21\u5f0f"),(0,l.kt)("p",null,"Eureka\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6eeureka\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------eureka.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"eureka.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684cloud\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.eureka.serviceUrl=http://localhost:10000/eureka/\nknife4j.eureka.routes[0].name=\u7528\u6237\nknife4j.eureka.routes[0].serviceName=userService\nknife4j.eureka.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eEureka\u6a21\u5f0f\n")),(0,l.kt)("h3",{id:"4343-nacos\u6a21\u5f0f"},"4.3.4.3 Nacos\u6a21\u5f0f"),(0,l.kt)("p",null,"Nacos\u6a21\u5f0f\u5219\u662f\u9700\u8981\u5728\u521b\u5efa\u597d\u7684\u6587\u4ef6\u5939\u76ee\u5f55\u4e0b\u65b0\u5efa",(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u914d\u7f6enacos\u6a21\u5f0f\u7684\u8282\u70b9\u5c5e\u6027"),(0,l.kt)("p",null,"\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"|-data\n|------ROOT \n|--------nacos.properties\n")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"nacos.properties"),"\u914d\u7f6e\u6587\u4ef6(\u8be5\u914d\u7f6e\u548c",(0,l.kt)("a",{parentName:"p",href:"knife4jAggregation",target:null,rel:null},"Knife4jAggregation\u805a\u5408\u7ec4\u4ef6"),"\u4e2d\u58f0\u660e\u7684nacos\u6a21\u5f0f\u7684route\u8282\u70b9\u914d\u7f6e\u5b8c\u5168\u4e00\u6837)\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-properties"},"knife4j.nacos.serviceUrl=http://localhost:10000/nacos/\nknife4j.nacos.routes[0].name=\u7528\u6237\nknife4j.nacos.routes[0].serviceName=userService\nknife4j.nacos.routes[0].location=/v2/api-docs?group=2.X\u7248\u672c\n# more...\u5177\u4f53\u53c2\u8003Knife4jAggregation\u805a\u5408\u7ec4\u4ef6\u914d\u7f6eNacos\u6a21\u5f0f\n")))}g.isMDXComponent=!0},56249:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/Knife4jAggregationDesktop-a2afeddfbddf5704818abf6bf746a3b3.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/53828dfc.297bedad.js b/knife4j-doc/gitee/assets/js/53828dfc.297bedad.js deleted file mode 100644 index 29bd1eb7c..000000000 --- a/knife4j-doc/gitee/assets/js/53828dfc.297bedad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1072],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),c=l(r),d=n,m=c["".concat(s,".").concat(d)]||c[d]||u[d]||o;return r?a.createElement(m,p(p({ref:t},g),{},{components:r})):a.createElement(m,p({ref:t},g))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,p=new Array(o);p[0]=c;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:n,p[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),p=["components"],i={},s="[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",l={unversionedId:"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",id:"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",title:"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",description:"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",permalink:"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},next:{title:"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]",permalink:"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"}},g={},u=[],c={toc:u};function d(e){var t=e.components,i=(0,n.Z)(e,p);return(0,o.kt)("wrapper",(0,a.Z)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v178-20180803-\u6587\u4ef6\u4e0a\u4f20\u652f\u6301"},"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.8 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u9488\u5bf9@RequestBody\u6ce8\u89e3\u5b9e\u4f53\u7c7b\u5c5e\u6027required\u7684\u503c\u4e00\u76f4\u663e\u793a\u9ed8\u8ba4false\u95ee\u9898"),(0,o.kt)("p",null,'2\u3001fixed \u9488\u5bf9\u6587\u4ef6\u4e0a\u4f20,\u4f7f\u7528allowMultiple = true,\u4e0a\u4f20\u6309\u94ae\u4e0d\u663e\u793abug,\u63a8\u8350\u4f7f\u7528@ApiImplicitParam\u6ce8\u89e3,\u5e76\u4e14\u6307\u5b9adataType = "MultipartFile"'),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(2762).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,"3\u3001\u5206\u7ec4\u63a5\u53e3\u79fb\u52a8\u81f3\u9876\u90e8,\u83dc\u5355\u5217\u8868\u6dfb\u52a0icon\u56fe\u6807,\u79fb\u9664\u7b80\u4ecb\u9875\u7684\u8f6f\u4ef6\u4ecb\u7ecd\u4fe1\u606f,\u4e30\u5bcc\u7b80\u4ecb\u9875\u4fe1\u606f,\u65b0\u589e\u5404\u7c7b\u578b\u63a5\u53e3\u7edf\u8ba1\u4fe1\u606f,\u83dc\u5355\u7b80\u4ecb\u540d\u79f0\u66f4\u540d\u4e3a\u4e3b\u9875"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(58266).Z,width:"1918",height:"1068"})),(0,o.kt)("p",null,"4\u3001\u589e\u52a0\u8c03\u8bd5\u53c2\u6570\u8bb0\u5fc6\u529f\u80fd,\u4e0b\u6b21\u70b9\u51fb\u8be5\u63a5\u53e3\u65f6,\u4e0a\u6b21\u8f93\u5165\u7684\u53c2\u6570\u4f1a\u4fdd\u5b58\u7ee7\u7eed\u53ef\u4f7f\u7528"),(0,o.kt)("p",null,"5\u3001\u4f18\u5316 \u9488\u5bf9@RequestBody\u6ce8\u89e3,\u53c2\u6570\u4f7f\u7528\u9ed8\u8ba4description\u7684\u95ee\u9898,\u5c06\u4f7f\u7528@ApiModel\u6ce8\u89e3\u5b9e\u4f53\u7c7b\u4e0a\u7684description\u5c5e\u6027"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(28789).Z,width:"1918",height:"1063"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.7.8\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}d.isMDXComponent=!0},28789:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/des-9074d6bdc9e4a602ff8ca446eb6039d9.png"},58266:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/main-f4dad3b00f9d2b8b81f45b571b01a9b4.png"},2762:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/upload-881e84648d589253980127c71736783e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/53828dfc.d1a626f6.js b/knife4j-doc/gitee/assets/js/53828dfc.d1a626f6.js new file mode 100644 index 000000000..6065805d1 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/53828dfc.d1a626f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1072],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=l(r),d=n,m=u["".concat(s,".").concat(d)]||u[d]||c[d]||o;return r?a.createElement(m,p(p({ref:t},g),{},{components:r})):a.createElement(m,p({ref:t},g))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,p=new Array(o);p[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:n,p[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),p=["components"],i={},s="[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",l={unversionedId:"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",id:"changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",title:"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]",description:"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",permalink:"/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.7.9-2018/08/06 Authorize\u6388\u6743\u652f\u6301]",permalink:"/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue"},next:{title:"[v1.7.7-2018/07/25 \u4fee\u590dJS\u5185\u5b58\u6ea2\u51fa]",permalink:"/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue"}},g={},u=[],c={toc:u},d="wrapper";function m(e){var t=e.components,i=(0,n.Z)(e,p);return(0,o.kt)(d,(0,a.Z)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v178-20180803-\u6587\u4ef6\u4e0a\u4f20\u652f\u6301"},"[v1.7.8-2018/08/03 \u6587\u4ef6\u4e0a\u4f20\u652f\u6301]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.8 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f "),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.7.8 \u4e3b\u8981\u66f4\u65b0\u5982\u4e0b\uff1a "),(0,o.kt)("p",null,"1\u3001fixed \u9488\u5bf9@RequestBody\u6ce8\u89e3\u5b9e\u4f53\u7c7b\u5c5e\u6027required\u7684\u503c\u4e00\u76f4\u663e\u793a\u9ed8\u8ba4false\u95ee\u9898"),(0,o.kt)("p",null,'2\u3001fixed \u9488\u5bf9\u6587\u4ef6\u4e0a\u4f20,\u4f7f\u7528allowMultiple = true,\u4e0a\u4f20\u6309\u94ae\u4e0d\u663e\u793abug,\u63a8\u8350\u4f7f\u7528@ApiImplicitParam\u6ce8\u89e3,\u5e76\u4e14\u6307\u5b9adataType = "MultipartFile"'),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(2762).Z,width:"1920",height:"1063"})),(0,o.kt)("p",null,"3\u3001\u5206\u7ec4\u63a5\u53e3\u79fb\u52a8\u81f3\u9876\u90e8,\u83dc\u5355\u5217\u8868\u6dfb\u52a0icon\u56fe\u6807,\u79fb\u9664\u7b80\u4ecb\u9875\u7684\u8f6f\u4ef6\u4ecb\u7ecd\u4fe1\u606f,\u4e30\u5bcc\u7b80\u4ecb\u9875\u4fe1\u606f,\u65b0\u589e\u5404\u7c7b\u578b\u63a5\u53e3\u7edf\u8ba1\u4fe1\u606f,\u83dc\u5355\u7b80\u4ecb\u540d\u79f0\u66f4\u540d\u4e3a\u4e3b\u9875"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(58266).Z,width:"1918",height:"1068"})),(0,o.kt)("p",null,"4\u3001\u589e\u52a0\u8c03\u8bd5\u53c2\u6570\u8bb0\u5fc6\u529f\u80fd,\u4e0b\u6b21\u70b9\u51fb\u8be5\u63a5\u53e3\u65f6,\u4e0a\u6b21\u8f93\u5165\u7684\u53c2\u6570\u4f1a\u4fdd\u5b58\u7ee7\u7eed\u53ef\u4f7f\u7528"),(0,o.kt)("p",null,"5\u3001\u4f18\u5316 \u9488\u5bf9@RequestBody\u6ce8\u89e3,\u53c2\u6570\u4f7f\u7528\u9ed8\u8ba4description\u7684\u95ee\u9898,\u5c06\u4f7f\u7528@ApiModel\u6ce8\u89e3\u5b9e\u4f53\u7c7b\u4e0a\u7684description\u5c5e\u6027"),(0,o.kt)("p",null,(0,o.kt)("img",{src:r(28789).Z,width:"1918",height:"1063"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.7.8\n\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u7801\u4e91"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GITHUB"),":",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,"\u6b22\u8fce\u63d0BUG\u3001Pull Request\u7ed9\u6211\uff0c\u5171\u540c\u6765\u5b8c\u5584\u8fd9\u4e2a\u5c0f\u5de5\u5177",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}m.isMDXComponent=!0},28789:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/des-9074d6bdc9e4a602ff8ca446eb6039d9.png"},58266:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/main-f4dad3b00f9d2b8b81f45b571b01a9b4.png"},2762:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/upload-881e84648d589253980127c71736783e.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/55853e02.4dcf78a3.js b/knife4j-doc/gitee/assets/js/55853e02.4dcf78a3.js deleted file mode 100644 index 3eb6b78eb..000000000 --- a/knife4j-doc/gitee/assets/js/55853e02.4dcf78a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9179],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>c});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||g[c]||i;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=["components"],o={},p="[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",s={unversionedId:"changelog/x/2019-12-23-knife4j-2.0.1-issue",id:"changelog/x/2019-12-23-knife4j-2.0.1-issue",title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2019-12-23-knife4j-2.0.1-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2019-12-23-knife4j-2.0.1-issue",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",permalink:"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"},next:{title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"}},u={},g=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6700\u540e",id:"\u6700\u540e",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:g};function c(e){var t=e.components,o=(0,r.Z)(e,l);return(0,i.kt)("wrapper",(0,a.Z)({},m,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v201-20191223-knife4j-201\u53d1\u5e03\u7ec6\u8282\u5904\u7406"},"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"http://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.0\u7248):"),(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"x-www-form-urlencoded"),"\u7c7b\u578b\u7684\u8868\u5355\u8bf7\u6c42\uff0c\u53c2\u6570\u52fe\u9009\u590d\u9009\u6846\u65e0\u6cd5\u53d6\u6d88\u7684\u60c5\u51b5",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16S14",target:"_blank",rel:"noopener"},"gitee #I16S14")),(0,i.kt)("p",null,"2\u3001\u4e2a\u6027\u5316\u914d\u7f6e\u4e2d\u65b0\u589e\u662f\u5426\u5f00\u542f\u52a8\u6001\u53c2\u6570\u9009\u9879,\u9ed8\u8ba4\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"false"),"\uff0c\u4e0d\u5f00\u542f,\u5982\u679c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u52fe\u9009\u6b64\u9009\u9879,\u53ef\u4ee5\u65e0\u9650\u52a8\u6001\u6dfb\u52a0\u53c2\u6570\u8fdb\u884c\u63a5\u53e3\u8c03\u8bd5"),(0,i.kt)("p",null,"3\u3001\u5b9e\u73b0\u5168\u5c40\u641c\u7d22\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16ZW4",target:"_blank",rel:"noopener"},"gitee #I16ZW4")),(0,i.kt)("p",null,"4\u3001@Deprecated \u6807\u8bb0\u7684\u63a5\u53e3\u7f6e\u4e3a\u8fc7\u65f6",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1736T",target:"_blank",rel:"noopener"},"gitee #I1736T")),(0,i.kt)("p",null,"5\u3001\u9488\u5bf9\u8fd4\u56de\u7684\u6570\u636e\u592a\u5927,\u5bfc\u81f4\u9875\u9762\u5361\u6b7b\u7684\u60c5\u51b5\u4e0b,\u754c\u9762\u505a\u9650\u5236\u5904\u7406\uff0c\u5982\u679c\u8fd4\u56de\u7684\u6570\u636e\u5927\u4e8e2M\uff0c\u4e0d\u8fdb\u884c\u683c\u5f0f\u5316\u5904\u7406\uff0c\u5f39\u51fa\u63d0\u793a,\u63d0\u9192\u5f00\u53d1\u8005\u5728raw\u8fdb\u884c\u54cd\u5e94\u5185\u5bb9\u7684\u67e5\u770b,\u53ea\u663e\u793a\u7eaf\u6587\u672c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16ZV4",target:"_blank",rel:"noopener"},"gitee #I16ZV4")),(0,i.kt)("p",null,"6\u3001\u4f18\u5316\u54cd\u5e94\u6570\u636e\u5927\u5c0f\u7684\u683c\u5f0f\u5316\u663e\u793a,BYTE\\KB\\MB"),(0,i.kt)("p",null,"7\u3001\u5b9e\u73b0\u56fe\u7247\u9884\u89c8\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I173AN",target:"_blank",rel:"noopener"},"gitee #I173AN")),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.1\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"\u4f7f\u7528Spring Boot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.1\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.1\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54951).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(38863).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79328).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(95350).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49364).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(75208).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49882).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,i.kt)("h2",{id:"\u6700\u540e"},"\u6700\u540e"),(0,i.kt)("p",null,"\u8fd9\u6b21\u7248\u672c\u662f\u57fa\u4e8eVue\u91cd\u5199\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u95ee\u9898\u6709\u6781\u5927\u7684\u53ef\u80fd\u96be\u514d\u8003\u8651\u4e0d\u5468,\u5927\u5bb6\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2d\u5982\u679c\u6709\u95ee\u9898\u4e5f\u6b22\u8fce\u53ca\u65f6\u901a\u8fc7issues\u548c\u6211\u6c9f\u901a,\u4f1a\u5c3d\u5feb\u4fee\u6b63\uff0c\u8c22\u8c22\u5927\u5bb6~\uff01\uff01"),(0,i.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,i.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,i.kt)("del",{parentName:"p"})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}c.isMDXComponent=!0},54951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},49364:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},75208:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},49882:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},79328:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},95350:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},38863:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/55853e02.8a36c410.js b/knife4j-doc/gitee/assets/js/55853e02.8a36c410.js new file mode 100644 index 000000000..5e7deb823 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/55853e02.8a36c410.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9179],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},g="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),g=s(n),c=r,k=g["".concat(p,".").concat(c)]||g[c]||m[c]||i;return n?a.createElement(k,l(l({ref:t},u),{},{components:n})):a.createElement(k,l({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[g]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>k,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var a=n(87462),r=n(63366),i=(n(67294),n(3905)),l=["components"],o={},p="[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",s={unversionedId:"changelog/x/2019-12-23-knife4j-2.0.1-issue",id:"changelog/x/2019-12-23-knife4j-2.0.1-issue",title:"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]",description:"Knife4j\u524d\u8eab\u662fswagger-bootstrap-ui,\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177",source:"@site/docs/changelog/2.x/2019-12-23-knife4j-2.0.1-issue.md",sourceDirName:"changelog/2.x",slug:"/changelog/x/2019-12-23-knife4j-2.0.1-issue",permalink:"/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v2.0.2-2020/03/08 Knife4j 2.0.2\u53d1\u5e03,Swagger\u63a5\u53e3\u6587\u6863\u8d4b\u80fd\u5de5\u5177]",permalink:"/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue"},next:{title:"[v2.0.0-2019/12/16 Knife4j 2.0\u53d1\u5e03,\u6d85\u69c3\u91cd\u751f~\uff01]",permalink:"/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue"}},u={},g=[{value:"\u7279\u6027 & \u4f18\u5316",id:"\u7279\u6027--\u4f18\u5316",level:2},{value:"knife4j-spring-ui",id:"knife4j-spring-ui",level:3},{value:"Knife4j-Spring",id:"knife4j-spring",level:3},{value:"\u7279\u70b9",id:"\u7279\u70b9",level:2},{value:"\u754c\u9762",id:"\u754c\u9762",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6700\u540e",id:"\u6700\u540e",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:g},c="wrapper";function k(e){var t=e.components,o=(0,r.Z)(e,l);return(0,i.kt)(c,(0,a.Z)({},m,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"v201-20191223-knife4j-201\u53d1\u5e03\u7ec6\u8282\u5904\u7406"},"[v2.0.1-2019/12/23 Knife4j 2.0.1\u53d1\u5e03,\u7ec6\u8282\u5904\u7406\uff01]"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u524d\u8eab\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),",\u662f\u4e00\u4e2a\u4e3aSwagger\u63a5\u53e3\u6587\u6863\u670d\u52a1\u7684\u5de5\u5177"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6587\u6863\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com/",target:null,rel:null},"http://doc.xiaominfo.com")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(\u65e7\u7248)\uff1a"),(0,i.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u6548\u679c(2.0\u7248):"),(0,i.kt)("a",{parentName:"p",href:"http://knife4j.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://knife4j.xiaominfo.com/doc.html")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Gitee\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"GitHub\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/swagger-bootstrap-ui")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"\u793a\u4f8b\uff1a"),(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,i.kt)("h2",{id:"\u7279\u6027--\u4f18\u5316"},"\u7279\u6027 & \u4f18\u5316"),(0,i.kt)("h3",{id:"knife4j-spring-ui"},"knife4j-spring-ui"),(0,i.kt)("p",null,"1\u3001\u89e3\u51b3",(0,i.kt)("inlineCode",{parentName:"p"},"x-www-form-urlencoded"),"\u7c7b\u578b\u7684\u8868\u5355\u8bf7\u6c42\uff0c\u53c2\u6570\u52fe\u9009\u590d\u9009\u6846\u65e0\u6cd5\u53d6\u6d88\u7684\u60c5\u51b5",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16S14",target:"_blank",rel:"noopener"},"gitee #I16S14")),(0,i.kt)("p",null,"2\u3001\u4e2a\u6027\u5316\u914d\u7f6e\u4e2d\u65b0\u589e\u662f\u5426\u5f00\u542f\u52a8\u6001\u53c2\u6570\u9009\u9879,\u9ed8\u8ba4\u4e3a",(0,i.kt)("inlineCode",{parentName:"p"},"false"),"\uff0c\u4e0d\u5f00\u542f,\u5982\u679c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u52fe\u9009\u6b64\u9009\u9879,\u53ef\u4ee5\u65e0\u9650\u52a8\u6001\u6dfb\u52a0\u53c2\u6570\u8fdb\u884c\u63a5\u53e3\u8c03\u8bd5"),(0,i.kt)("p",null,"3\u3001\u5b9e\u73b0\u5168\u5c40\u641c\u7d22\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16ZW4",target:"_blank",rel:"noopener"},"gitee #I16ZW4")),(0,i.kt)("p",null,"4\u3001@Deprecated \u6807\u8bb0\u7684\u63a5\u53e3\u7f6e\u4e3a\u8fc7\u65f6",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I1736T",target:"_blank",rel:"noopener"},"gitee #I1736T")),(0,i.kt)("p",null,"5\u3001\u9488\u5bf9\u8fd4\u56de\u7684\u6570\u636e\u592a\u5927,\u5bfc\u81f4\u9875\u9762\u5361\u6b7b\u7684\u60c5\u51b5\u4e0b,\u754c\u9762\u505a\u9650\u5236\u5904\u7406\uff0c\u5982\u679c\u8fd4\u56de\u7684\u6570\u636e\u5927\u4e8e2M\uff0c\u4e0d\u8fdb\u884c\u683c\u5f0f\u5316\u5904\u7406\uff0c\u5f39\u51fa\u63d0\u793a,\u63d0\u9192\u5f00\u53d1\u8005\u5728raw\u8fdb\u884c\u54cd\u5e94\u5185\u5bb9\u7684\u67e5\u770b,\u53ea\u663e\u793a\u7eaf\u6587\u672c",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I16ZV4",target:"_blank",rel:"noopener"},"gitee #I16ZV4")),(0,i.kt)("p",null,"6\u3001\u4f18\u5316\u54cd\u5e94\u6570\u636e\u5927\u5c0f\u7684\u683c\u5f0f\u5316\u663e\u793a,BYTE\\KB\\MB"),(0,i.kt)("p",null,"7\u3001\u5b9e\u73b0\u56fe\u7247\u9884\u89c8\u529f\u80fd",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j/issues/I173AN",target:"_blank",rel:"noopener"},"gitee #I173AN")),(0,i.kt)("p",null,"\u5982\u679c\u4f60\u540e\u7aef\u662fJava+Spring\u7684\u6280\u672f\u6808\uff0c\u5728\u4f7f\u7528springfox\u7684\u540c\u65f6\uff0c\u60f3\u6362\u4e00\u4e2aSwagger\u7684Ui\u76ae\u80a4\uff0c\u901a\u8fc7\u5728pom.xml\u4e2d\u76f4\u63a5\u5f15\u5165\u5373\u53ef,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-ui\n 2.0.1\n\n")),(0,i.kt)("h3",{id:"knife4j-spring"},"Knife4j-Spring"),(0,i.kt)("p",null,"\u4f7f\u7528Spring Boot\u7684\u6280\u672f\u6808\u53ef\u4ee5\u901a\u8fc7\u5f15\u7528starter\u7684\u65b9\u5f0f\u5feb\u901f\u5f15\u5165\u4f7f\u7528,\u6ce8\u610f\u8be5starter\u7ec4\u4ef6\u662f\u5305\u542bUi\u7684,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-spring-boot-starter\n 2.0.1\n\n")),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5fae\u670d\u52a1\u7684\u60c5\u51b5\u4e0b,\u5fae\u670d\u52a1\u5176\u5b9e\u4e0d\u9700\u8981\u5f15\u7528Ui\u7684jar\u5305\uff0c\u53ea\u9700\u8981\u5728\u7f51\u5173\u5f15\u7528Ui\u7684jar\u5305\u4f9d\u8d56,\u6240\u4ee5\u5728\u5fae\u670d\u52a1\u60c5\u51b5\u4e0b,\u4f7f\u7528\u589e\u5f3a\u5c5e\u6027\u53ea\u9700\u8981\u5f15\u7528\u5fae\u670d\u52a1\u7248\u672c\u7684starter\u4f9d\u8d56,\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-xml"},"\n com.github.xiaoymin\n knife4j-micro-spring-boot-starter\n 2.0.1\n\n\n")),(0,i.kt)("h2",{id:"\u7279\u70b9"},"\u7279\u70b9"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u57fa\u4e8eVue+Ant Design\u6784\u5efa\u7684\u6587\u6863\uff0c\u66f4\u5f3a\u5927\u3001\u6e05\u6670\u7684\u63a5\u53e3\u6587\u6863\u8bf4\u660e\u80fd\u529b\u4ee5\u53ca\u63a5\u53e3\u8c03\u8bd5\u80fd\u529b"),(0,i.kt)("li",{parentName:"ul"},"\u5de6\u53f3\u5e03\u5c40,\u57fa\u4e8eTabs\u7ec4\u4ef6\u7684\u591a\u6587\u6863\u67e5\u9605\u98ce\u683c"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u5728\u7ebf\u5bfc\u51faHtml\u3001Markdown\u3001Word\u3001PDF\u7b49\u591a\u79cd\u683c\u5f0f\u7684\u79bb\u7ebf\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u6392\u5e8f,\u652f\u6301\u5206\u7ec4\u53ca\u63a5\u53e3\u7684\u6392\u5e8f\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u63a5\u53e3\u5168\u5c40\u5728\u7ebf\u641c\u7d22\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u63d0\u4f9bSwagger\u8d44\u6e90\u4fdd\u62a4\u7b56\u7565,\u4fdd\u62a4\u6587\u6863\u5b89\u5168"),(0,i.kt)("li",{parentName:"ul"},"\u63a5\u53e3\u8c03\u8bd5\u652f\u6301\u65e0\u9650\u53c2\u6570,\u5f00\u53d1\u8005\u8c03\u8bd5\u975e\u5e38\u7075\u6d3b\uff0c\u52a8\u6001\u589e\u52a0\u3001\u5220\u9664\u53c2\u6570"),(0,i.kt)("li",{parentName:"ul"},"\u5168\u5c40\u7f13\u5b58\u8c03\u8bd5\u4fe1\u606f,\u9875\u9762\u5237\u65b0\u540e\u4f9d\u7136\u5b58\u5728,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5"),(0,i.kt)("li",{parentName:"ul"},"\u4ee5\u66f4\u4eba\u6027\u5316\u7684table\u6811\u7ec4\u4ef6\u5c55\u793aSwagger Models\u529f\u80fd"),(0,i.kt)("li",{parentName:"ul"},"\u6587\u6863\u4ee5\u591atab\u65b9\u5f0f\u53ef\u663e\u793a\u591a\u4e2a\u63a5\u53e3\u6587\u6863"),(0,i.kt)("li",{parentName:"ul"},"\u8bf7\u6c42\u53c2\u6570\u680f\u8bf7\u6c42\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u7740\u989c\u8272\u533a\u5206"),(0,i.kt)("li",{parentName:"ul"},"\u4e3b\u9875\u4e2d\u7c97\u7565\u7edf\u8ba1\u63a5\u53e3\u4e0d\u540c\u7c7b\u578b\u6570\u91cf"),(0,i.kt)("li",{parentName:"ul"},"\u652f\u6301\u81ea\u5b9a\u4e49\u5168\u5c40\u53c2\u6570\u529f\u80fd\uff0c\u4e3b\u9875\u5305\u62echeader\u53caquery\u4e24\u79cd\u7c7b\u578b"),(0,i.kt)("li",{parentName:"ul"},"JSR-303 annotations \u6ce8\u89e3\u7684\u652f\u6301"),(0,i.kt)("li",{parentName:"ul"},"\u66f4\u591a\u4e2a\u6027\u5316\u8bbe\u7f6e\u529f\u80fd")),(0,i.kt)("h2",{id:"\u754c\u9762"},"\u754c\u9762"),(0,i.kt)("p",null,"\u63a5\u53e3\u6587\u6863\u663e\u793a\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(54951).Z,width:"1920",height:"1061"})),(0,i.kt)("p",null,"\u63a5\u53e3\u8c03\u8bd5\u754c\u9762\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(38863).Z,width:"1920",height:"1080"})),(0,i.kt)("p",null,"Swagger Models\u529f\u80fd"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(79328).Z,width:"1918",height:"1059"})),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(95350).Z,width:"1918",height:"1060"})),(0,i.kt)("p",null,"\u652f\u6301\u5bfc\u51fa\u79bb\u7ebfMarkdown\u3001Html\u529f\u80fd\uff0cmarkdown\u7684\u8868\u683c\u8f83\u539f\u5148\u7248\u672c\u901a\u8fc7\u7f29\u51cf\u663e\u793a\u4e3a\u6811\u5f62\u7ed3\u6784\uff0c\u6548\u679c\u56fe\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49364).Z,width:"1918",height:"1158"})),(0,i.kt)("p",null,"\u901a\u8fc7\u7b2c\u4e09\u65b9Markdown\u8f6f\u4ef6\u5bfc\u51fa\u7684PDF\u6548\u679c\u5982\u4e0b\u56fe:"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(75208).Z,width:"1918",height:"1159"})),(0,i.kt)("p",null,"\u540c\u65f6\u63d0\u4f9b\u4e86\u5bfc\u51fa\u79bb\u7ebfHtml\u529f\u80fd,Html\u529f\u80fd\u754c\u9762\u98ce\u683c\u548c\u5728\u7ebf\u51e0\u4e4e\u6ca1\u6709\u533a\u522b,\u7f8e\u89c2\u3001\u5927\u65b9\u3001\u7b80\u6d01\uff0c\u5982\u4e0b\u56fe\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{src:n(49882).Z,width:"1797",height:"1758"})),(0,i.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,i.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,i.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/knife4j",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/knife4j"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,i.kt)("h2",{id:"\u6700\u540e"},"\u6700\u540e"),(0,i.kt)("p",null,"\u8fd9\u6b21\u7248\u672c\u662f\u57fa\u4e8eVue\u91cd\u5199\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u95ee\u9898\u6709\u6781\u5927\u7684\u53ef\u80fd\u96be\u514d\u8003\u8651\u4e0d\u5468,\u5927\u5bb6\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2d\u5982\u679c\u6709\u95ee\u9898\u4e5f\u6b22\u8fce\u53ca\u65f6\u901a\u8fc7issues\u548c\u6211\u6c9f\u901a,\u4f1a\u5c3d\u5feb\u4fee\u6b63\uff0c\u8c22\u8c22\u5927\u5bb6~\uff01\uff01"),(0,i.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,i.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,i.kt)("del",{parentName:"p"})),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}k.isMDXComponent=!0},54951:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/1-074d8bb212380d9065219d6e3a0801be.png"},49364:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/3-201367bf5982bf05daa8c61cd1c946c7.png"},75208:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/4-2beb782e72cc3100b7cacbff6ca610a2.png"},49882:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/5-07059c7b0f18a5f4df3323b8bf920fe2.png"},79328:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/6-81f2d941f7ad0a0c1eea5394c5719750.png"},95350:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/7-a2a33a3f5bef48dbb1ba4f1cf1a7baeb.png"},38863:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/8-6d39045b1d60a91c34eeb0864be10271.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/55f0f81a.16181e5a.js b/knife4j-doc/gitee/assets/js/55f0f81a.16181e5a.js new file mode 100644 index 000000000..a60933160 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/55f0f81a.16181e5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[994],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),u=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},g=function(e){var t=u(e.components);return n.createElement(p.Provider,{value:t},e.children)},l="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),l=u(r),b=a,f=l["".concat(p,".").concat(b)]||l[b]||c[b]||o;return r?n.createElement(f,s(s({ref:t},g),{},{components:r})):n.createElement(f,s({ref:t},g))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=b;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[l]="string"==typeof e?e:a,s[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>p,default:()=>f,frontMatter:()=>i,metadata:()=>u,toc:()=>l});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",u={unversionedId:"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",id:"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",title:"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",description:"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-07-11-swagger-bootstrap-ui-1.4-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",permalink:"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.5-2017/09/01 \u4fee\u6539groupId]",permalink:"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},next:{title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"}},g={},l=[],c={toc:l},b="wrapper";function f(e){var t=e.components,r=(0,a.Z)(e,s);return(0,o.kt)(b,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v14-20170711-\u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug"},"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/55f0f81a.1b17a00a.js b/knife4j-doc/gitee/assets/js/55f0f81a.1b17a00a.js deleted file mode 100644 index 4bc6e4c40..000000000 --- a/knife4j-doc/gitee/assets/js/55f0f81a.1b17a00a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[994],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),u=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},g=function(e){var t=u(e.components);return n.createElement(p.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),c=u(r),b=a,f=c["".concat(p,".").concat(b)]||c[b]||l[b]||o;return r?n.createElement(f,s(s({ref:t},g),{},{components:r})):n.createElement(f,s({ref:t},g))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=c;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeof e?e:a,s[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>p,default:()=>b,frontMatter:()=>i,metadata:()=>u,toc:()=>l});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),s=["components"],i={},p="[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",u={unversionedId:"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",id:"changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",title:"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]",description:"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-07-11-swagger-bootstrap-ui-1.4-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",permalink:"/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.5-2017/09/01 \u4fee\u6539groupId]",permalink:"/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue"},next:{title:"[v1.3-2017/07/05 \u4fee\u6539\u683c\u5f0f\u53d1\u9001\u53c2\u6570bug]",permalink:"/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue"}},g={},l=[],c={toc:l};function b(e){var t=e.components,r=(0,a.Z)(e,s);return(0,o.kt)("wrapper",(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v14-20170711-\u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug"},"[v1.4-2017/07/11 \u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"1\u3001\u4fee\u6539\u8bf7\u6c42\u53c2\u6570\u5f02\u5e38bug\n")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,o.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/575.e5e48e59.js b/knife4j-doc/gitee/assets/js/575.e5e48e59.js new file mode 100644 index 000000000..39c3fafba --- /dev/null +++ b/knife4j-doc/gitee/assets/js/575.e5e48e59.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[575],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>p});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},v=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),m=s(n),v=r,p=m["".concat(c,".").concat(v)]||m[v]||u[v]||l;return n?a.createElement(p,i(i({ref:t},d),{},{components:n})):a.createElement(p,i({ref:t},d))}));function p(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=v;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[m]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{n.d(t,{Z:()=>b});var a=n(87462),r=n(67294),l=n(86010),i=n(35281),o=n(53791),c=n(48596),s=n(39960),d=n(44996),m=n(95999);function u(e){return r.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl",breadcrumbHomeIcon:"breadcrumbHomeIcon_OVgt"};function p(e){var t=e.children,n=e.href,a="breadcrumbs__link";return e.isLast?r.createElement("span",{className:a,itemProp:"name"},t):n?r.createElement(s.Z,{className:a,href:n,itemProp:"item"},r.createElement("span",{itemProp:"name"},t)):r.createElement("span",{className:a},t)}function f(e){var t=e.children,n=e.active,i=e.index,o=e.addMicrodata;return r.createElement("li",(0,a.Z)({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,l.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,r.createElement("meta",{itemProp:"position",content:String(i+1)}))}function h(){var e=(0,d.Z)("/");return r.createElement("li",{className:"breadcrumbs__item"},r.createElement(s.Z,{"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:(0,l.Z)("breadcrumbs__link",v.breadcrumbsItemLink),href:e},r.createElement(u,{className:v.breadcrumbHomeIcon})))}function b(){var e=(0,o.s1)(),t=(0,c.Ns)();return e?r.createElement("nav",{className:(0,l.Z)(i.k.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},r.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&r.createElement(h,null),e.map((function(t,n){var a=n===e.length-1;return r.createElement(f,{key:n,active:a,index:n,addMicrodata:!!t.href},r.createElement(p,{href:t.href,isLast:a},t.label))})))):null}},8377:(e,t,n)=>{n.d(t,{Z:()=>P});var a=n(67294),r=n(86010),l=n(35281),i=n(65130),o=n(92503),c=n(3905),s=n(87462),d=n(63366),m=n(35742),u=["mdxType","originalType"];var v=n(90814);var p=n(39960);var f=n(72389),h=n(86043);const b={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var g=["summary","children"];function E(e){return!!e&&("SUMMARY"===e.tagName||E(e.parentElement))}function N(e,t){return!!e&&(e===t||N(e.parentElement,t))}function y(e){var t=e.summary,n=e.children,l=(0,d.Z)(e,g),i=(0,f.Z)(),o=(0,a.useRef)(null),c=(0,h.u)({initialState:!l.open}),m=c.collapsed,u=c.setCollapsed,v=(0,a.useState)(l.open),p=v[0],y=v[1];return a.createElement("details",(0,s.Z)({},l,{ref:o,open:p,"data-collapsed":m,className:(0,r.Z)(b.details,i&&b.isBrowser,l.className),onMouseDown:function(e){E(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;E(t)&&N(t,o.current)&&(e.preventDefault(),m?(u(!1),y(!0)):u(!0))}}),null!=t?t:a.createElement("summary",null,"Details"),a.createElement(h.z,{lazy:!1,collapsed:m,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){u(e),y(!e)}},a.createElement("div",{className:b.collapsibleContent},n)))}const Z={details:"details_b_Ee"};var C="alert alert--info";function L(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return a.createElement(y,(0,s.Z)({},t,{className:(0,r.Z)(C,Z.details,t.className)}))}function k(e){return a.createElement(o.Z,e)}const T={containsTaskList:"containsTaskList_mC6p"};const _={img:"img_ev3q"};var x=n(95999);const w="admonition_LlT9",H="admonitionHeading_tbUL",O="admonitionIcon_kALy",A="admonitionContent_S0QG";var M={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(x.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(x.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(x.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(x.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(x.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},U={secondary:"note",important:"info",success:"tip",warning:"danger"};function B(e){var t,n=function(e){var t=a.Children.toArray(e),n=t.find((function(e){var t;return a.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:r}}(e.children),r=n.mdxAdmonitionTitle,l=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:r,children:l})}const S={head:function(e){var t=a.Children.map(e.children,(function(e){return a.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,r=(n.mdxType,n.originalType,(0,d.Z)(n,u));return a.createElement(e.props.originalType,r)}return e}(e):e}));return a.createElement(m.Z,e,t)},code:function(e){var t=["a","b","big","i","span","em","strong","sup","sub","small"];return a.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?a.createElement("code",e):a.createElement(v.Z,e)},a:function(e){return a.createElement(p.Z,e)},pre:function(e){var t;return a.createElement(v.Z,(0,a.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=a.Children.toArray(e.children),n=t.find((function(e){var t;return a.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return a.createElement(L,(0,s.Z)({},e,{summary:n}),r)},ul:function(e){return a.createElement("ul",(0,s.Z)({},e,{className:(t=e.className,(0,r.Z)(t,(null==t?void 0:t.includes("contains-task-list"))&&T.containsTaskList))}));var t},img:function(e){return a.createElement("img",(0,s.Z)({loading:"lazy"},e,{className:(t=e.className,(0,r.Z)(t,_.img))}));var t},h1:function(e){return a.createElement(k,(0,s.Z)({as:"h1"},e))},h2:function(e){return a.createElement(k,(0,s.Z)({as:"h2"},e))},h3:function(e){return a.createElement(k,(0,s.Z)({as:"h3"},e))},h4:function(e){return a.createElement(k,(0,s.Z)({as:"h4"},e))},h5:function(e){return a.createElement(k,(0,s.Z)({as:"h5"},e))},h6:function(e){return a.createElement(k,(0,s.Z)({as:"h6"},e))},admonition:function(e){var t=B(e),n=t.children,i=t.type,o=t.title,c=t.icon,s=function(e){var t,n=null!=(t=U[e])?t:e,a=M[n];return a||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),M.info)}(i),d=null!=o?o:s.label,m=s.iconComponent,u=null!=c?c:a.createElement(m,null);return a.createElement("div",{className:(0,r.Z)(l.k.common.admonition,l.k.common.admonitionType(e.type),"alert","alert--"+s.infimaClassName,w)},a.createElement("div",{className:H},a.createElement("span",{className:O},u),d),a.createElement("div",{className:A},n))}};function I(e){var t=e.children;return a.createElement(c.Zo,{components:S},t)}function P(e){var t,n,c,s,d=e.children,m=(t=(0,i.k)(),n=t.metadata,c=t.frontMatter,s=t.contentTitle,c.hide_title||void 0!==s?null:n.title);return a.createElement("div",{className:(0,r.Z)(l.k.docs.docMarkdown,"markdown")},m&&a.createElement("header",null,a.createElement(o.Z,{as:"h1"},m)),a.createElement(I,null,d))}},97887:(e,t,n)=>{n.d(t,{Z:()=>k});var a=n(67294),r=n(86010),l=n(35281),i=n(65130),o=n(95999);function c(e){var t=e.lastUpdatedAt,n=e.formattedLastUpdatedAt;return a.createElement(o.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:a.createElement("b",null,a.createElement("time",{dateTime:new Date(1e3*t).toISOString()},n))}}," on {date}")}function s(e){var t=e.lastUpdatedBy;return a.createElement(o.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:a.createElement("b",null,t)}}," by {user}")}function d(e){var t=e.lastUpdatedAt,n=e.formattedLastUpdatedAt,r=e.lastUpdatedBy;return a.createElement("span",{className:l.k.common.lastUpdated},a.createElement(o.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?a.createElement(c,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:r?a.createElement(s,{lastUpdatedBy:r}):""}},"Last updated{atDate}{byUser}"),!1)}var m=n(87462),u=n(63366);const v={iconEdit:"iconEdit_Z9Sw"};var p=["className"];function f(e){var t=e.className,n=(0,u.Z)(e,p);return a.createElement("svg",(0,m.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,r.Z)(v.iconEdit,t),"aria-hidden":"true"},n),a.createElement("g",null,a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function h(e){var t=e.editUrl;return a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:l.k.common.editThisPage},a.createElement(f,null),a.createElement(o.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}var b=n(39960);const g={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function E(e){var t=e.permalink,n=e.label,l=e.count;return a.createElement(b.Z,{href:t,className:(0,r.Z)(g.tag,l?g.tagWithCount:g.tagRegular)},n,l&&a.createElement("span",null,l))}const N={tags:"tags_jXut",tag:"tag_QGVx"};function y(e){var t=e.tags;return a.createElement(a.Fragment,null,a.createElement("b",null,a.createElement(o.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),a.createElement("ul",{className:(0,r.Z)(N.tags,"padding--none","margin-left--sm")},t.map((function(e){var t=e.label,n=e.permalink;return a.createElement("li",{key:n,className:N.tag},a.createElement(E,{label:t,permalink:n}))}))))}const Z={lastUpdated:"lastUpdated_vwxv"};function C(e){return a.createElement("div",{className:(0,r.Z)(l.k.docs.docFooterTagsRow,"row margin-bottom--sm")},a.createElement("div",{className:"col"},a.createElement(y,e)))}function L(e){var t=e.editUrl,n=e.lastUpdatedAt,i=e.lastUpdatedBy,o=e.formattedLastUpdatedAt;return a.createElement("div",{className:(0,r.Z)(l.k.docs.docFooterEditMetaRow,"row")},a.createElement("div",{className:"col"},t&&a.createElement(h,{editUrl:t})),a.createElement("div",{className:(0,r.Z)("col",Z.lastUpdated)},(n||i)&&a.createElement(d,{lastUpdatedAt:n,formattedLastUpdatedAt:o,lastUpdatedBy:i})))}function k(){var e=(0,i.k)().metadata,t=e.editUrl,n=e.lastUpdatedAt,o=e.formattedLastUpdatedAt,c=e.lastUpdatedBy,s=e.tags,d=s.length>0,m=!!(t||n||c);return d||m?a.createElement("footer",{className:(0,r.Z)(l.k.docs.docFooter,"docusaurus-mt-lg")},d&&a.createElement(C,{tags:s}),m&&a.createElement(L,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:c,formattedLastUpdatedAt:o})):null}},92894:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(67294),r=n(65130),l=n(4966);function i(){var e=(0,r.k)().metadata;return a.createElement(l.Z,{previous:e.previous,next:e.next})}},28832:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(67294),r=n(35281),l=n(65130),i=n(87462),o=n(63366),c=n(86010),s=n(93743);const d={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"};var m=["className"],u="table-of-contents__link toc-highlight",v="table-of-contents__link--active";function p(e){var t=e.className,n=(0,o.Z)(e,m);return a.createElement("div",{className:(0,c.Z)(d.tableOfContents,"thin-scrollbar",t)},a.createElement(s.Z,(0,i.Z)({},n,{linkClassName:u,linkActiveClassName:v})))}function f(){var e=(0,l.k)(),t=e.toc,n=e.frontMatter;return a.createElement(p,{toc:t,minHeadingLevel:n.toc_min_heading_level,maxHeadingLevel:n.toc_max_heading_level,className:r.k.docs.docTocDesktop})}},6781:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(67294),r=n(86010),l=n(35281),i=n(65130),o=n(86043),c=n(93743),s=n(87462),d=n(63366),m=n(95999);const u={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};var v=["collapsed"];function p(e){var t=e.collapsed,n=(0,d.Z)(e,v);return a.createElement("button",(0,s.Z)({type:"button"},n,{className:(0,r.Z)("clean-btn",u.tocCollapsibleButton,!t&&u.tocCollapsibleButtonExpanded,n.className)}),a.createElement(m.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const f={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function h(e){var t=e.toc,n=e.className,l=e.minHeadingLevel,i=e.maxHeadingLevel,s=(0,o.u)({initialState:!0}),d=s.collapsed,m=s.toggleCollapsed;return a.createElement("div",{className:(0,r.Z)(f.tocCollapsible,!d&&f.tocCollapsibleExpanded,n)},a.createElement(p,{collapsed:d,onClick:m}),a.createElement(o.z,{lazy:!0,className:f.tocCollapsibleContent,collapsed:d},a.createElement(c.Z,{toc:t,minHeadingLevel:l,maxHeadingLevel:i})))}const b={tocMobile:"tocMobile_ITEo"};function g(){var e=(0,i.k)(),t=e.toc,n=e.frontMatter;return a.createElement(h,{toc:t,minHeadingLevel:n.toc_min_heading_level,maxHeadingLevel:n.toc_max_heading_level,className:(0,r.Z)(l.k.docs.docTocMobile,b.tocMobile)})}},86176:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(67294),r=n(10833),l=n(65130);function i(){var e,t=(0,l.k)(),n=t.metadata,i=t.frontMatter,o=t.assets;return a.createElement(r.d,{title:n.title,description:n.description,keywords:i.keywords,image:null!=(e=o.image)?e:i.image})}var o=n(99200);function c(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,n=e.content;return a.createElement(l.b,{content:e.content},a.createElement(r.FG,{className:t},a.createElement(i,null),a.createElement(o.Z,null,a.createElement(n,null))))}},4966:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(87462),r=n(67294),l=n(95999),i=n(86010),o=n(39960);function c(e){var t=e.permalink,n=e.title,a=e.subLabel,l=e.isNext;return r.createElement(o.Z,{className:(0,i.Z)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},a&&r.createElement("div",{className:"pagination-nav__sublabel"},a),r.createElement("div",{className:"pagination-nav__label"},n))}function s(e){var t=e.previous,n=e.next;return r.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,l.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages navigation",description:"The ARIA label for the docs pagination"})},t&&r.createElement(c,(0,a.Z)({},t,{subLabel:r.createElement(l.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&r.createElement(c,(0,a.Z)({},n,{subLabel:r.createElement(l.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},44364:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(67294),r=n(86010),l=n(95999),i=n(35281),o=n(74477);function c(e){var t=e.className,n=(0,o.E)();return n.badge?a.createElement("span",{className:(0,r.Z)(t,i.k.docs.docVersionBadge,"badge badge--secondary")},a.createElement(l.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},23120:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(67294),r=n(86010),l=n(52263),i=n(39960),o=n(95999),c=n(94104),s=n(35281),d=n(60373),m=n(74477);var u={unreleased:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){var t=e.siteTitle,n=e.versionMetadata;return a.createElement(o.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function v(e){var t=u[e.versionMetadata.banner];return a.createElement(t,e)}function p(e){var t=e.versionLabel,n=e.to,r=e.onClick;return a.createElement(o.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(i.Z,{to:n,onClick:r},a.createElement(o.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function f(e){var t,n=e.className,i=e.versionMetadata,o=(0,l.Z)().siteConfig.title,m=(0,c.gA)({failfast:!0}).pluginId,u=(0,d.J)(m).savePreferredVersionName,f=(0,c.Jo)(m),h=f.latestDocSuggestion,b=f.latestVersionSuggestion,g=null!=h?h:(t=b).docs.find((function(e){return e.id===t.mainDocId}));return a.createElement("div",{className:(0,r.Z)(n,s.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(v,{siteTitle:o,versionMetadata:i})),a.createElement("div",{className:"margin-top--md"},a.createElement(p,{versionLabel:b.label,to:g.path,onClick:function(){return u(b.name)}})))}function h(e){var t=e.className,n=(0,m.E)();return n.banner?a.createElement(f,{className:t,versionMetadata:n}):null}},92503:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(87462),r=n(63366),l=n(67294),i=n(86010),o=n(95999),c=n(86668);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var d=["as","id"];function m(e){var t=e.as,n=e.id,m=(0,r.Z)(e,d),u=(0,c.L)().navbar.hideOnScroll;return"h1"!==t&&n?l.createElement(t,(0,a.Z)({},m,{className:(0,i.Z)("anchor",u?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar),id:n}),m.children,l.createElement("a",{className:"hash-link",href:"#"+n,title:(0,o.I)({id:"theme.common.headingLinkTitle",message:"Direct link to heading",description:"Title for link to heading"})},"\u200b")):l.createElement(t,(0,a.Z)({},m,{id:void 0}))}},93743:(e,t,n)=>{n.d(t,{Z:()=>b});var a=n(87462),r=n(63366),l=n(67294),i=n(86668),o=["parentIndex"];function c(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),n=Array(7).fill(-1);t.forEach((function(e,t){var a=n.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),n[e.level]=t}));var a=[];return t.forEach((function(e){var n=e.parentIndex,l=(0,r.Z)(e,o);n>=0?t[n].children.push(l):a.push(l)})),a}function s(e){var t=e.toc,n=e.minHeadingLevel,a=e.maxHeadingLevel;return t.flatMap((function(e){var t=s({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[Object.assign({},e,{children:t})]:t}))}function d(e){var t=e.getBoundingClientRect();return t.top===t.bottom?d(e.parentNode):t}function m(e,t){var n,a,r=t.anchorTopOffset,l=e.find((function(e){return d(e).top>=r}));return l?function(e){return e.top>0&&e.bottom{n.d(t,{b:()=>i,k:()=>o});var a=n(67294),r=n(69688),l=a.createContext(null);function i(e){var t=e.children,n=function(e){return(0,a.useMemo)((function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}}),[e])}(e.content);return a.createElement(l.Provider,{value:n},t)}function o(){var e=(0,a.useContext)(l);if(null===e)throw new r.i6("DocProvider");return e}}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/59caeefc.35b7ed60.js b/knife4j-doc/gitee/assets/js/59caeefc.35b7ed60.js new file mode 100644 index 000000000..c6056e8fd --- /dev/null +++ b/knife4j-doc/gitee/assets/js/59caeefc.35b7ed60.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2896],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=c(r),f=o,m=u["".concat(s,".").concat(f)]||u[f]||g[f]||a;return r?n.createElement(m,p(p({ref:t},l),{},{components:r})):n.createElement(m,p({ref:t},l))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,p=new Array(a);p[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:o,p[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),p=["components"],i={},s="[v1.0-2017/04/19 \u5f00\u6e90]",c={unversionedId:"changelog/x/2017-04-19-swagger-bootstrap-ui-open",id:"changelog/x/2017-04-19-swagger-bootstrap-ui-open",title:"[v1.0-2017/04/19 \u5f00\u6e90]",description:"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90",source:"@site/docs/changelog/1.x/2017-04-19-swagger-bootstrap-ui-open.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-04-19-swagger-bootstrap-ui-open",permalink:"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},l={},u=[],g={toc:u},f="wrapper";function m(e){var t=e.components,r=(0,o.Z)(e,p);return(0,a.kt)(f,(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"v10-20170419-\u5f00\u6e90"},"[v1.0-2017/04/19 \u5f00\u6e90]"),(0,a.kt)("p",null,"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,a.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/59caeefc.66368cf7.js b/knife4j-doc/gitee/assets/js/59caeefc.66368cf7.js deleted file mode 100644 index f05e26cae..000000000 --- a/knife4j-doc/gitee/assets/js/59caeefc.66368cf7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2896],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),g=c(r),f=o,m=g["".concat(s,".").concat(f)]||g[f]||u[f]||a;return r?n.createElement(m,p(p({ref:t},l),{},{components:r})):n.createElement(m,p({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,p=new Array(a);p[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,p[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),p=["components"],i={},s="[v1.0-2017/04/19 \u5f00\u6e90]",c={unversionedId:"changelog/x/2017-04-19-swagger-bootstrap-ui-open",id:"changelog/x/2017-04-19-swagger-bootstrap-ui-open",title:"[v1.0-2017/04/19 \u5f00\u6e90]",description:"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90",source:"@site/docs/changelog/1.x/2017-04-19-swagger-bootstrap-ui-open.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-04-19-swagger-bootstrap-ui-open",permalink:"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue"}},l={},u=[],g={toc:u};function f(e){var t=e.components,r=(0,o.Z)(e,p);return(0,a.kt)("wrapper",(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"v10-20170419-\u5f00\u6e90"},"[v1.0-2017/04/19 \u5f00\u6e90]"),(0,a.kt)("p",null,"swagger-bootstrap-ui 1.0\u53d1\u5e03,\u5f00\u6e90"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b")),(0,a.kt)("li",{parentName:"ul"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,a.kt)("a",{parentName:"li",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5b58e623.79873c58.js b/knife4j-doc/gitee/assets/js/5b58e623.79873c58.js new file mode 100644 index 000000000..c2c32c200 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/5b58e623.79873c58.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3205],{3905:(t,e,n)=>{n.d(e,{Zo:()=>d,kt:()=>k});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),u=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},d=function(t){var e=u(t.components);return a.createElement(p.Provider,{value:e},t.children)},g="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},c=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,d=i(t,["components","mdxType","originalType","parentName"]),g=u(n),c=r,k=g["".concat(p,".").concat(c)]||g[c]||m[c]||l;return n?a.createElement(k,o(o({ref:e},d),{},{components:n})):a.createElement(k,o({ref:e},d))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=n.length,o=new Array(l);o[0]=c;var i={};for(var p in e)hasOwnProperty.call(e,p)&&(i[p]=e[p]);i.originalType=t,i[g]="string"==typeof t?t:r,o[1]=i;for(var u=2;u{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>p,default:()=>k,frontMatter:()=>i,metadata:()=>u,toc:()=>g});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),o=["components"],i={id:"action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f"},p=void 0,u={unversionedId:"action/action-simple",id:"action/action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/action/simple.mdx",sourceDirName:"action",slug:"/action/action-simple",permalink:"/docs/action/action-simple",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"action",previous:{title:"\u5b9e\u6218\u6307\u5357",permalink:"/docs/action/"},next:{title:"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528",permalink:"/docs/action/mavenbom"}},d={},g=[],m={toc:g},c="wrapper";function k(t){var e=t.components,n=(0,r.Z)(t,o);return(0,l.kt)(c,(0,a.Z)({},m,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u76ee\u524dKnife4j\u4ee5\u53ca\u524d\u8eab",(0,l.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u4e5f\u63d0\u4f9b\u4e86\u4e00\u4e9b\u4ee3\u7801\u793a\u4f8b\uff0c\u53ef\u4ee5\u524d\u5f80Gitee\u4ed3\u5e93\u5730\u5740\u76f4\u63a5\u83b7\u53d6\u3002"),(0,l.kt)("p",null,"Demo\u793a\u4f8b\u5730\u5740\uff1a",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,l.kt)("p",null,"\u4e3b\u8981\u6a21\u5757\u8bf4\u660e\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u6a21\u5757"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-disk-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cDisk\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-disk",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-cloud-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cCloud\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-cloud",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-eureka-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cEureka\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-nacos-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cDisk\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-nacos",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-springdoc-openapi-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210Knife4j\uff0c\u57fa\u4e8espringdoc-openapi\u4ee5\u53caOpenAPIV3")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-springfox-boot-v3-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210Knife4j,\u57fa\u4e8eSpringfox3\u4ee5\u53caOpenAPIv3")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u67b6\u6784\u4e0b\u96c6\u6210knife4j\u7684\u9879\u76ee\u793a\u4f8b,\u4e3b\u8981\u662f\u57fa\u4e8eOpenAPIV2")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-lower-spring-boot-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot\u4f4e\u7248\u672c\u6d4b\u8bd5\u96c6\u6210Knife4j\uff0c\u4e3b\u8981\u590d\u6d4bBug\u4f7f\u7528\u3002\u5f00\u53d1\u8005\u53ef\u4e0d\u7528\u7406\u4f1a")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-single-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210knife4j\u7684\u9879\u76ee\u793a\u4f8b")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-fast-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot\u5355\u4f53\u6846\u67b6\u5feb\u901f\u96c6\u6210Knife4j\u793a\u4f8b\uff0c\u53ef\u53c2\u8003\u6587\u6863",(0,l.kt)("a",{parentName:"td",href:"/docs/quick-start",target:null,rel:null},"\u5feb\u901f\u5f00\u59cb"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-authorization_code"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u6388\u6743\u7801\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-authorization_code",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-implicit"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u7b80\u5316\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-implicit",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-client_credentials"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u5ba2\u6237\u7aef\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-client_credentials",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-password"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u5bc6\u7801\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-password",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-cloud-gateway"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7gateway\u7f51\u96c6\u6210knife4j\u7684\u793a\u4f8b")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot2-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot 2.x\u7cfb\u5217\u7248\u672c\u96c6\u6210Knife4j")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-jfinal-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728JFinal\u6846\u67b6\u4e2d\u96c6\u6210Knife4j\uff0c\u76ee\u524d\u6b63\u5728\u5f00\u53d1\u4e2d\uff0c\u8be5\u793a\u4f8b\u65e0\u6548\uff0c\u5f00\u53d1\u8005\u53ef\u4e0d\u7528\u7406\u4f1a")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-demo-mvc"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring MVC\u6a21\u5f0f\u4e0b\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-gateway"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7gateway\u7f51\u5173\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-zuul"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7zuul\u7f51\u5173\u96c6\u6210swagger-bootstrap-ui")))))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5b58e623.bb8c294a.js b/knife4j-doc/gitee/assets/js/5b58e623.bb8c294a.js deleted file mode 100644 index dd5e8e7bb..000000000 --- a/knife4j-doc/gitee/assets/js/5b58e623.bb8c294a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3205],{3905:(t,e,n)=>{n.d(e,{Zo:()=>d,kt:()=>c});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),u=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},d=function(t){var e=u(t.components);return a.createElement(p.Provider,{value:e},t.children)},g={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,d=i(t,["components","mdxType","originalType","parentName"]),m=u(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||g[c]||l;return n?a.createElement(k,o(o({ref:e},d),{},{components:n})):a.createElement(k,o({ref:e},d))}));function c(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var p in e)hasOwnProperty.call(e,p)&&(i[p]=e[p]);i.originalType=t,i.mdxType="string"==typeof t?t:r,o[1]=i;for(var u=2;u{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>p,default:()=>c,frontMatter:()=>i,metadata:()=>u,toc:()=>g});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),o=["components"],i={id:"action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f"},p=void 0,u={unversionedId:"action/action-simple",id:"action/action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f",source:"@site/docs/action/simple.mdx",sourceDirName:"action",slug:"/action/action-simple",permalink:"/docs/action/action-simple",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{id:"action-simple",title:"\u793a\u4f8b\u4ee3\u7801",description:"Knife4j\u793e\u533a\u4fe1\u606f"},sidebar:"action",previous:{title:"\u5b9e\u6218\u6307\u5357",permalink:"/docs/action/"},next:{title:"1.1 \u57fa\u4e8eMaven Bom\u65b9\u5f0f\u4f7f\u7528",permalink:"/docs/action/mavenbom"}},d={},g=[],m={toc:g};function c(t){var e=t.components,n=(0,r.Z)(t,o);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:e,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"\u76ee\u524dKnife4j\u4ee5\u53ca\u524d\u8eab",(0,l.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u4e5f\u63d0\u4f9b\u4e86\u4e00\u4e9b\u4ee3\u7801\u793a\u4f8b\uff0c\u53ef\u4ee5\u524d\u5f80Gitee\u4ed3\u5e93\u5730\u5740\u76f4\u63a5\u83b7\u53d6\u3002"),(0,l.kt)("p",null,"Demo\u793a\u4f8b\u5730\u5740\uff1a",(0,l.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,l.kt)("p",null,"\u4e3b\u8981\u6a21\u5757\u8bf4\u660e\uff1a"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"\u6a21\u5757"),(0,l.kt)("th",{parentName:"tr",align:null},"\u8bf4\u660e"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-disk-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cDisk\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-disk",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-cloud-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cCloud\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-cloud",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-eureka-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cEureka\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-eureka",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-aggregation-nacos-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u63d0\u4f9b\u7684\u5fae\u670d\u52a1\u805a\u5408\u7ec4\u4ef6\uff0cDisk\u6a21\u5f0f\u4e0b\u805a\u5408\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/aggregation-nacos",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-springdoc-openapi-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210Knife4j\uff0c\u57fa\u4e8espringdoc-openapi\u4ee5\u53caOpenAPIV3")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-springfox-boot-v3-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210Knife4j,\u57fa\u4e8eSpringfox3\u4ee5\u53caOpenAPIv3")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u67b6\u6784\u4e0b\u96c6\u6210knife4j\u7684\u9879\u76ee\u793a\u4f8b,\u4e3b\u8981\u662f\u57fa\u4e8eOpenAPIV2")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-lower-spring-boot-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot\u4f4e\u7248\u672c\u6d4b\u8bd5\u96c6\u6210Knife4j\uff0c\u4e3b\u8981\u590d\u6d4bBug\u4f7f\u7528\u3002\u5f00\u53d1\u8005\u53ef\u4e0d\u7528\u7406\u4f1a")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-single-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210knife4j\u7684\u9879\u76ee\u793a\u4f8b")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot-fast-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot\u5355\u4f53\u6846\u67b6\u5feb\u901f\u96c6\u6210Knife4j\u793a\u4f8b\uff0c\u53ef\u53c2\u8003\u6587\u6863",(0,l.kt)("a",{parentName:"td",href:"/docs/quick-start",target:null,rel:null},"\u5feb\u901f\u5f00\u59cb"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-authorization_code"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u6388\u6743\u7801\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-authorization_code",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-implicit"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u7b80\u5316\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-implicit",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-client_credentials"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u5ba2\u6237\u7aef\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-client_credentials",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-oauth2-password"),(0,l.kt)("td",{parentName:"tr",align:null},"Knife4j\u96c6\u6210OAuth2.0\u7684\u5bc6\u7801\u6a21\u5f0f\uff0c\u53ef\u53c2\u8003",(0,l.kt)("a",{parentName:"td",href:"/docs/action/oauth2-password",target:null,rel:null},"\u5b9e\u6218\u6587\u6863"))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-cloud-gateway"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7gateway\u7f51\u96c6\u6210knife4j\u7684\u793a\u4f8b")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-spring-boot2-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"Spring Boot 2.x\u7cfb\u5217\u7248\u672c\u96c6\u6210Knife4j")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"knife4j-jfinal-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728JFinal\u6846\u67b6\u4e2d\u96c6\u6210Knife4j\uff0c\u76ee\u524d\u6b63\u5728\u5f00\u53d1\u4e2d\uff0c\u8be5\u793a\u4f8b\u65e0\u6548\uff0c\u5f00\u53d1\u8005\u53ef\u4e0d\u7528\u7406\u4f1a")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-demo-mvc"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring MVC\u6a21\u5f0f\u4e0b\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-demo"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Boot\u5355\u4f53\u67b6\u6784\u4e0b\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-gateway"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7gateway\u7f51\u5173\u96c6\u6210swagger-bootstrap-ui")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"swagger-bootstrap-ui-zuul"),(0,l.kt)("td",{parentName:"tr",align:null},"\u5728Spring Cloud\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u901a\u8fc7zuul\u7f51\u5173\u96c6\u6210swagger-bootstrap-ui")))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5ca390e5.2ef512ce.js b/knife4j-doc/gitee/assets/js/5ca390e5.2ef512ce.js deleted file mode 100644 index ee7ad4cdd..000000000 --- a/knife4j-doc/gitee/assets/js/5ca390e5.2ef512ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1351],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),g=l(r),f=a,m=g["".concat(i,".").concat(f)]||g[f]||c[f]||o;return r?n.createElement(m,p(p({ref:t},u),{},{components:r})):n.createElement(m,p({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=g;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,p[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],s={},i="[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",l={unversionedId:"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",id:"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",description:"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-04-27-swagger-bootstrap-ui-1.1-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},next:{title:"[v1.0-2017/04/19 \u5f00\u6e90]",permalink:"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open"}},u={},c=[],g={toc:c};function f(e){var t=e.components,r=(0,a.Z)(e,p);return(0,o.kt)("wrapper",(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v11-20170427-\u5728\u7ebf\u8c03\u8bd5bug"},"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("p",null,"1\u3001PathVariable\u7c7b\u578b\u7684\u53c2\u6570,\u5728\u7ebf\u8c03\u8bd5bug"),(0,o.kt)("p",null,"2\u3001\u7edd\u5bf9\u8def\u5f84\u6539\u6210\u76f8\u5bf9\u8def\u5f84,\u9002\u914d\u5e26\u9879\u76ee\u540d\u79f0"),(0,o.kt)("p",null,"3\u3001\u63a5\u53e3\u8fd4\u56de\u6570\u636eModel\u89e3\u6790,\u6587\u6863\u8bf4\u660e\u4e2d\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d")),(0,o.kt)("icp",null),"comment/>")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5ca390e5.b472d942.js b/knife4j-doc/gitee/assets/js/5ca390e5.b472d942.js new file mode 100644 index 000000000..914edd33f --- /dev/null +++ b/knife4j-doc/gitee/assets/js/5ca390e5.b472d942.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1351],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=l(r),f=a,m=c["".concat(i,".").concat(f)]||c[f]||g[f]||o;return r?n.createElement(m,p(p({ref:t},u),{},{components:r})):n.createElement(m,p({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[c]="string"==typeof e?e:a,p[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var n=r(87462),a=r(63366),o=(r(67294),r(3905)),p=["components"],s={},i="[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",l={unversionedId:"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",id:"changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",title:"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]",description:"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2017-04-27-swagger-bootstrap-ui-1.1-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",permalink:"/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.2-2017/05/14 \u6dfb\u52a0PUT\u3001DELETE\u65b9\u6cd5\u652f\u6301]",permalink:"/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue"},next:{title:"[v1.0-2017/04/19 \u5f00\u6e90]",permalink:"/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open"}},u={},c=[],g={toc:c},f="wrapper";function m(e){var t=e.components,r=(0,a.Z)(e,p);return(0,o.kt)(f,(0,n.Z)({},g,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v11-20170427-\u5728\u7ebf\u8c03\u8bd5bug"},"[v1.1-2017/04/27 \u5728\u7ebf\u8c03\u8bd5BUG]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.1 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui \u662f Swagger \u7684\u524d\u7aef UI \u5b9e\u73b0\uff0c\u76ee\u7684\u662f\u66ff\u6362 Swagger \u9ed8\u8ba4\u7684 UI \u5b9e\u73b0 Swagger-UI\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,"\u672c\u6b21\u66f4\u65b0\uff1a"),(0,o.kt)("p",null,"1\u3001PathVariable\u7c7b\u578b\u7684\u53c2\u6570,\u5728\u7ebf\u8c03\u8bd5bug"),(0,o.kt)("p",null,"2\u3001\u7edd\u5bf9\u8def\u5f84\u6539\u6210\u76f8\u5bf9\u8def\u5f84,\u9002\u914d\u5e26\u9879\u76ee\u540d\u79f0"),(0,o.kt)("p",null,"3\u3001\u63a5\u53e3\u8fd4\u56de\u6570\u636eModel\u89e3\u6790,\u6587\u6863\u8bf4\u660e\u4e2d\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u76f8\u5173\u94fe\u63a5")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://www.oschina.net/p/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u67e5\u770b"))),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"swagger-bootstrap-ui \u7684\u4e0b\u8f7d\u5730\u5740\uff1a",(0,o.kt)("a",{parentName:"p",href:"https://git.oschina.net/xiaoym/swagger-bootstrap-ui/releases",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u4e0b\u8f7d")),(0,o.kt)("icp",null),"comment/>")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5d9b9772.5bfa2bb2.js b/knife4j-doc/gitee/assets/js/5d9b9772.5bfa2bb2.js new file mode 100644 index 000000000..e27391ccc --- /dev/null +++ b/knife4j-doc/gitee/assets/js/5d9b9772.5bfa2bb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[633],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),s=u(r),m=o,f=s["".concat(l,".").concat(m)]||s[m]||y[m]||a;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[s]="string"==typeof e?e:o,i[1]=p;for(var u=2;u{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>f,frontMatter:()=>p,metadata:()=>u,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],p={},l="3.30 Spring Security\u6ce8\u89e3",u={unversionedId:"features/springSecurity",id:"features/springSecurity",title:"3.30 Spring Security\u6ce8\u89e3",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb",source:"@site/docs/features/springSecurity.md",sourceDirName:"features",slug:"/features/springSecurity",permalink:"/docs/features/springSecurity",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u5c0f\u9b4f,\u5c0f\u9b4f,\u6211\u4eec\u8981\u53bb\u54ea\u91cc\u5440",lastUpdatedAt:1672196438,formattedLastUpdatedAt:"2022\u5e7412\u670828\u65e5",frontMatter:{}},c={},s=[],y={toc:s},m="wrapper";function f(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)(m,(0,n.Z)({},y,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"330-spring-security\u6ce8\u89e3"},"3.30 Spring Security\u6ce8\u89e3"),(0,a.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb"),(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e3a\u4e86\u6ee1\u8db3",(0,a.kt)("inlineCode",{parentName:"p"},"\u6743\u9650\u9a8c\u8bc1"),"\u5c06Spring Security\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"PostAuthorize"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PostFilter"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PreAuthorize"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PreFilter"),"\u7684\u6ce8\u89e3\u4fe1\u606f\u8ffd\u52a0\u5230\u63a5\u53e3\u63cf\u8ff0\u4e2d"),(0,a.kt)("p",null,"\u4ee3\u7801\u5c55\u793a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@RestController\n@RequestMapping("/hello")\n@PostAuthorize("hasAuthority(\'class\')")\n@PostFilter("hasAuthority(\'class\')")\n@PreAuthorize("hasAuthority(\'class\')")\n@PreFilter("hasAuthority(\'class\')")\npublic class HelloController {\n\n @GetMapping("/security")\n @PostAuthorize("hasAuthority(\'method\')")\n @PostFilter("hasAuthority(\'method\')")\n @PreAuthorize("hasAuthority(\'method\')")\n @PreFilter("hasAuthority(\'method\')")\n @ApiOperation(value = "", notes = "Spring Security\u6ce8\u89e3\u8ffd\u52a0\u5230\u63a5\u53e3\u63cf\u8ff0")\n public String security() {\n return "hello security";\n }\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5d9b9772.afe8222b.js b/knife4j-doc/gitee/assets/js/5d9b9772.afe8222b.js deleted file mode 100644 index 2da4f114d..000000000 --- a/knife4j-doc/gitee/assets/js/5d9b9772.afe8222b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[633],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),y=u(r),m=o,f=y["".concat(l,".").concat(m)]||y[m]||s[m]||a;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=y;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:o,i[1]=p;for(var u=2;u{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>p,metadata:()=>u,toc:()=>s});var n=r(87462),o=r(63366),a=(r(67294),r(3905)),i=["components"],p={},l="3.30 Spring Security\u6ce8\u89e3",u={unversionedId:"features/springSecurity",id:"features/springSecurity",title:"3.30 Spring Security\u6ce8\u89e3",description:"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb",source:"@site/docs/features/springSecurity.md",sourceDirName:"features",slug:"/features/springSecurity",permalink:"/docs/features/springSecurity",draft:!1,tags:[],version:"current",lastUpdatedBy:"\u5c0f\u9b4f,\u5c0f\u9b4f,\u6211\u4eec\u8981\u53bb\u54ea\u91cc\u5440",lastUpdatedAt:1672196438,formattedLastUpdatedAt:"2022\u5e7412\u670828\u65e5",frontMatter:{}},c={},s=[],y={toc:s};function m(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},y,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"330-spring-security\u6ce8\u89e3"},"3.30 Spring Security\u6ce8\u89e3"),(0,a.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea4.0.0\u5f00\u59cb"),(0,a.kt)("pre",{parentName:"admonition"},(0,a.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n"))),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u4e3a\u4e86\u6ee1\u8db3",(0,a.kt)("inlineCode",{parentName:"p"},"\u6743\u9650\u9a8c\u8bc1"),"\u5c06Spring Security\u7684",(0,a.kt)("inlineCode",{parentName:"p"},"PostAuthorize"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PostFilter"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PreAuthorize"),"\u3001",(0,a.kt)("inlineCode",{parentName:"p"},"PreFilter"),"\u7684\u6ce8\u89e3\u4fe1\u606f\u8ffd\u52a0\u5230\u63a5\u53e3\u63cf\u8ff0\u4e2d"),(0,a.kt)("p",null,"\u4ee3\u7801\u5c55\u793a"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'@RestController\n@RequestMapping("/hello")\n@PostAuthorize("hasAuthority(\'class\')")\n@PostFilter("hasAuthority(\'class\')")\n@PreAuthorize("hasAuthority(\'class\')")\n@PreFilter("hasAuthority(\'class\')")\npublic class HelloController {\n\n @GetMapping("/security")\n @PostAuthorize("hasAuthority(\'method\')")\n @PostFilter("hasAuthority(\'method\')")\n @PreAuthorize("hasAuthority(\'method\')")\n @PreFilter("hasAuthority(\'method\')")\n @ApiOperation(value = "", notes = "Spring Security\u6ce8\u89e3\u8ffd\u52a0\u5230\u63a5\u53e3\u63cf\u8ff0")\n public String security() {\n return "hello security";\n }\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5e69c27e.340e0b0a.js b/knife4j-doc/gitee/assets/js/5e69c27e.340e0b0a.js new file mode 100644 index 000000000..318d0e697 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/5e69c27e.340e0b0a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[254],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),m=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=m(e.components);return r.createElement(c.Provider,{value:t},e.children)},l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),l=m(n),d=a,f=l["".concat(c,".").concat(d)]||l[d]||u[d]||i;return n?r.createElement(f,o(o({ref:t},s),{},{components:n})):r.createElement(f,o({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[l]="string"==typeof e?e:a,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>p,metadata:()=>m,toc:()=>l});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),o=["components"],p={},c="3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",m={unversionedId:"features/dynamicRequestDescription",id:"features/dynamicRequestDescription",title:"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/dynamicRequestDescription.md",sourceDirName:"features",slug:"/features/dynamicRequestDescription",permalink:"/docs/features/dynamicRequestDescription",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.14 \u6e05\u9664\u7f13\u5b58",permalink:"/docs/features/clearCache"},next:{title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicResponseDescription"}},s={},l=[],u={toc:l},d="wrapper";function f(e){var t=e.components,n=(0,a.Z)(e,o);return(0,i.kt)(d,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"315-\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"},"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"),(0,i.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,i.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,i.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,i.kt)("p",null,"\u5728\u5f00\u53d1",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u7684\u8fc7\u7a0b\u4e2d,\u5f88\u591a\u4eba\u8be2\u95ee\u80fd\u5426\u63d0\u4f9b\u52a8\u6001\u7684\u53c2\u6570\u6587\u6863\u6ce8\u91ca,\u56e0\u4e3a\u5927\u591a\u6570\u4eba\u5728\u5f00\u53d1\u63a5\u53e3\u7684\u65f6\u5019\u4f7f\u7528\u7684\u4f20\u9012\u53c2\u6570\u90fd\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"Map"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"JSONObject"),"\u8fd9\u7c7b\u53c2\u6570"),(0,i.kt)("p",null,"\u8fd9\u7c7b\u53c2\u6570\u5bf9\u4e8eSwagger\u8fd9\u79cd\u9884\u5148\u5b9a\u4e49\u518d\u6e32\u67d3\u7684\u6846\u67b6\u6765\u8bf4\u662f\u65e0\u6cd5\u6ee1\u8db3\u8981\u6c42\u7684,\u5373\u63a5\u53e3\u6587\u6863\u4e2d\u662f\u65e0\u4efb\u4f55\u53c2\u6570\u6ce8\u91ca\u7684,\u8fd9\u5bf9\u4e8e\u63a5\u53e3\u5bf9\u63a5\u7684\u4eba\u6765\u8bf4\u5f88\u75db\u82e6,\u56e0\u4e3a\u5bf9\u63a5\u63a5\u53e3\u7684\u4eba\u5e76\u4e0d\u77e5\u9053\u9700\u8981\u4f20\u9012\u90a3\u4e9b\u53c2\u6570"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u4e86\u7684\u5bf9\u4e8e\u52a8\u6001\u53c2\u6570\u7684\u6ce8\u91ca,\u4f7f\u7528\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u8fdb\u884c\u8bf4\u660e,\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOrder426")\n@ApiOperation(value = "jdk-HashMap-\u52a8\u6001\u521b\u5efa\u663e\u793a\u53c2\u6570-\u65e0@RequestBody")\n@DynamicParameters(name = "CreateOrderHashMapModel",properties = {\n @DynamicParameter(name = "",value = "\u6ce8\u89e3id",example = "X000111",required = true,dataTypeClass = Integer.class),\n @DynamicParameter(name = "name3",value = "\u8ba2\u5355\u7f16\u53f7-gson"),\n @DynamicParameter(name = "name1",value = "\u8ba2\u5355\u7f16\u53f71-gson"),\n})\npublic Rest createOrder1235332(@RequestBody HashMap map){\n Rest r=new Rest<>();\n r.setData(map);\n return r;\n}\n')),(0,i.kt)("p",null,"\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u4e2d\u6709\u4e00\u4e2aname\u5c5e\u6027,\u8be5\u503c\u5f00\u53d1\u8005\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7c7b\u540d,\u5982\u679c\u4f60\u8d4b\u4e88name\u5c5e\u6027\u503c,\u90a3\u4e48\u8bf7\u4fdd\u8bc1\u5168\u5c40\u552f\u4e00,\u6216\u8005\u5e72\u8106\u4e0d\u8d4b\u503c,\u4ea4\u7ed9",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5168\u5c40\u552f\u4e00\u7684name\u503c"),(0,i.kt)("p",null,"\u76ee\u524d\u9488\u5bf9\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u53ea\u80fd\u505a\u5230\u7b80\u5355\u7684\u53c2\u6570\u8bf4\u660e,\u5bf9\u4e8e\u6570\u7ec4\u3001\u6cdb\u578b\u7b49\u590d\u6742\u7684\u7c7b\u578b\u6682\u4e0d\u63d0\u4f9b\u652f\u6301\u3002"),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"\u867d\u7136",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u4e86\u8fd9\u79cd\u529f\u80fd,\u4f46\u4f5c\u4e3a\u4f5c\u8005\u6211\u6765\u8bf4\u5e76\u4e0d\u63a8\u8350\u4f7f\u7528\u8be5\u529f\u80fd,\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a"),(0,i.kt)("p",{parentName:"admonition"},"1\u3001\u63a5\u53e3\u5c42\u63d0\u4f9bMap\u8fd9\u7c7b\u52a8\u6001\u53c2\u6570,\u4f20\u9012\u7ed9Service\u5c42,\u4ee3\u7801\u53ef\u8bfb\u6027\u5927\u5927\u964d\u4f4e,\u65f6\u95f4\u957f\u4e86\u540e,\u4f5c\u4e3a\u5199\u63a5\u53e3\u7684\u4f60,\u518d\u56de\u5934\u6765\u770b\u8fd9\u6bb5\u4ee3\u7801,\u4f60\u53ef\u80fd\u90fd\u60f3\u4e0d\u8d77\u6765\u9700\u8981\u4f20\u9012\u90a3\u4e9b\u5b57\u6bb5\u5c5e\u6027,\u5bf9\u4e8e\u4f60\u7684\u4ee3\u7801\u7ef4\u62a4\u8005\u6765\u8bf4,\u90a3\u5c31\u662f\u66f4\u52a0\u75db\u82e6\u4e86\u3002"),(0,i.kt)("p",{parentName:"admonition"},"2\u3001\u5bf9\u4e8e\u5f88\u591a\u9119\u89c6Swagger\u6ce8\u89e3\u7684\u4eba\u6765\u8bf4,\u8fd9\u65e0\u7591\u662f\u7ed9\u4eba\u4e88\u53e3\u5b9e,\u52a8\u6001\u53c2\u6570\u6ce8\u89e3\u5199\u4e86\u4e00\u5927\u5806,\u4ece\u4ee3\u7801\u7b80\u6d01\u7a0b\u5ea6\u6765\u8bf4\u4e0d\u5982\u4e00\u4e2a\u5b9e\u4f53\u7c7b\u6765\u7684\u75db\u5feb"),(0,i.kt)("p",{parentName:"admonition"},"3\u3001\u5efa\u8bae\u5927\u5bb6\u591a\u591a\u4f7f\u7528Java\u7684\u4e00\u4e9b\u7279\u6027,\u5c01\u88c5\u3001\u7ee7\u627f\u7b49"),(0,i.kt)("p",{parentName:"admonition"},"\u4ee5\u4e0a\u4ec5\u4ec5\u662f\u6211\u7684\u4e2a\u4eba\u5efa\u8bae,\u4ec5\u4f9b\u53c2\u8003")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5e69c27e.eccf3366.js b/knife4j-doc/gitee/assets/js/5e69c27e.eccf3366.js deleted file mode 100644 index 88fb45075..000000000 --- a/knife4j-doc/gitee/assets/js/5e69c27e.eccf3366.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[254],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),m=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=m(e.components);return r.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),u=m(n),d=a,f=u["".concat(c,".").concat(d)]||u[d]||l[d]||i;return n?r.createElement(f,o(o({ref:t},s),{},{components:n})):r.createElement(f,o({ref:t},s))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p.mdxType="string"==typeof e?e:a,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>d,frontMatter:()=>p,metadata:()=>m,toc:()=>l});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),o=["components"],p={},c="3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",m={unversionedId:"features/dynamicRequestDescription",id:"features/dynamicRequestDescription",title:"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",description:"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb",source:"@site/docs/features/dynamicRequestDescription.md",sourceDirName:"features",slug:"/features/dynamicRequestDescription",permalink:"/docs/features/dynamicRequestDescription",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1672317292,formattedLastUpdatedAt:"2022\u5e7412\u670829\u65e5",frontMatter:{},sidebar:"docs",previous:{title:"3.14 \u6e05\u9664\u7f13\u5b58",permalink:"/docs/features/clearCache"},next:{title:"3.16 \u52a8\u6001\u54cd\u5e94\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca",permalink:"/docs/features/dynamicResponseDescription"}},s={},l=[],u={toc:l};function d(e){var t=e.components,n=(0,a.Z)(e,o);return(0,i.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"315-\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"},"3.15 \u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u6dfb\u52a0\u6587\u6863\u6ce8\u91ca"),(0,i.kt)("admonition",{title:"\u6e29\u99a8\u63d0\u9192",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"1\u3001\u589e\u5f3a\u529f\u80fd\u9700\u8981\u901a\u8fc7\u914d\u7f6eyml\u914d\u7f6e\u6587\u4ef6\u5f00\u542f\u589e\u5f3a,\u81ea2.0.6\u5f00\u59cb"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-yml"},"knife4j:\n enable: true\n")),(0,i.kt)("p",{parentName:"admonition"},"2\u3001\u81eaKnife4j 4.0\u7248\u672c\uff0c\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528",(0,i.kt)("inlineCode",{parentName:"p"},"knife4j-openapi2-spring-boot-starter"),"\u7ec4\u4ef6\u624d\u751f\u6548"),(0,i.kt)("p",{parentName:"admonition"},"3\u3001\u8be5\u7279\u6027\u81ea4.0\u7248\u672c\u540e\u540e\u7eed\u7248\u672c\u4e0d\u5728\u63d0\u4f9b\u652f\u6301")),(0,i.kt)("p",null,"\u5728\u5f00\u53d1",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u7684\u8fc7\u7a0b\u4e2d,\u5f88\u591a\u4eba\u8be2\u95ee\u80fd\u5426\u63d0\u4f9b\u52a8\u6001\u7684\u53c2\u6570\u6587\u6863\u6ce8\u91ca,\u56e0\u4e3a\u5927\u591a\u6570\u4eba\u5728\u5f00\u53d1\u63a5\u53e3\u7684\u65f6\u5019\u4f7f\u7528\u7684\u4f20\u9012\u53c2\u6570\u90fd\u662f",(0,i.kt)("inlineCode",{parentName:"p"},"Map"),"\u6216\u8005",(0,i.kt)("inlineCode",{parentName:"p"},"JSONObject"),"\u8fd9\u7c7b\u53c2\u6570"),(0,i.kt)("p",null,"\u8fd9\u7c7b\u53c2\u6570\u5bf9\u4e8eSwagger\u8fd9\u79cd\u9884\u5148\u5b9a\u4e49\u518d\u6e32\u67d3\u7684\u6846\u67b6\u6765\u8bf4\u662f\u65e0\u6cd5\u6ee1\u8db3\u8981\u6c42\u7684,\u5373\u63a5\u53e3\u6587\u6863\u4e2d\u662f\u65e0\u4efb\u4f55\u53c2\u6570\u6ce8\u91ca\u7684,\u8fd9\u5bf9\u4e8e\u63a5\u53e3\u5bf9\u63a5\u7684\u4eba\u6765\u8bf4\u5f88\u75db\u82e6,\u56e0\u4e3a\u5bf9\u63a5\u63a5\u53e3\u7684\u4eba\u5e76\u4e0d\u77e5\u9053\u9700\u8981\u4f20\u9012\u90a3\u4e9b\u53c2\u6570"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u4e86\u7684\u5bf9\u4e8e\u52a8\u6001\u53c2\u6570\u7684\u6ce8\u91ca,\u4f7f\u7528\u589e\u5f3a\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u8fdb\u884c\u8bf4\u660e,\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'@PostMapping("/createOrder426")\n@ApiOperation(value = "jdk-HashMap-\u52a8\u6001\u521b\u5efa\u663e\u793a\u53c2\u6570-\u65e0@RequestBody")\n@DynamicParameters(name = "CreateOrderHashMapModel",properties = {\n @DynamicParameter(name = "",value = "\u6ce8\u89e3id",example = "X000111",required = true,dataTypeClass = Integer.class),\n @DynamicParameter(name = "name3",value = "\u8ba2\u5355\u7f16\u53f7-gson"),\n @DynamicParameter(name = "name1",value = "\u8ba2\u5355\u7f16\u53f71-gson"),\n})\npublic Rest createOrder1235332(@RequestBody HashMap map){\n Rest r=new Rest<>();\n r.setData(map);\n return r;\n}\n')),(0,i.kt)("p",null,"\u6ce8\u89e3",(0,i.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u4e2d\u6709\u4e00\u4e2aname\u5c5e\u6027,\u8be5\u503c\u5f00\u53d1\u8005\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7c7b\u540d,\u5982\u679c\u4f60\u8d4b\u4e88name\u5c5e\u6027\u503c,\u90a3\u4e48\u8bf7\u4fdd\u8bc1\u5168\u5c40\u552f\u4e00,\u6216\u8005\u5e72\u8106\u4e0d\u8d4b\u503c,\u4ea4\u7ed9",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u5168\u5c40\u552f\u4e00\u7684name\u503c"),(0,i.kt)("p",null,"\u76ee\u524d\u9488\u5bf9\u52a8\u6001\u8bf7\u6c42\u53c2\u6570\u53ea\u80fd\u505a\u5230\u7b80\u5355\u7684\u53c2\u6570\u8bf4\u660e,\u5bf9\u4e8e\u6570\u7ec4\u3001\u6cdb\u578b\u7b49\u590d\u6742\u7684\u7c7b\u578b\u6682\u4e0d\u63d0\u4f9b\u652f\u6301\u3002"),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"\u867d\u7136",(0,i.kt)("inlineCode",{parentName:"p"},"Knife4j"),"\u63d0\u4f9b\u4e86\u8fd9\u79cd\u529f\u80fd,\u4f46\u4f5c\u4e3a\u4f5c\u8005\u6211\u6765\u8bf4\u5e76\u4e0d\u63a8\u8350\u4f7f\u7528\u8be5\u529f\u80fd,\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a"),(0,i.kt)("p",{parentName:"admonition"},"1\u3001\u63a5\u53e3\u5c42\u63d0\u4f9bMap\u8fd9\u7c7b\u52a8\u6001\u53c2\u6570,\u4f20\u9012\u7ed9Service\u5c42,\u4ee3\u7801\u53ef\u8bfb\u6027\u5927\u5927\u964d\u4f4e,\u65f6\u95f4\u957f\u4e86\u540e,\u4f5c\u4e3a\u5199\u63a5\u53e3\u7684\u4f60,\u518d\u56de\u5934\u6765\u770b\u8fd9\u6bb5\u4ee3\u7801,\u4f60\u53ef\u80fd\u90fd\u60f3\u4e0d\u8d77\u6765\u9700\u8981\u4f20\u9012\u90a3\u4e9b\u5b57\u6bb5\u5c5e\u6027,\u5bf9\u4e8e\u4f60\u7684\u4ee3\u7801\u7ef4\u62a4\u8005\u6765\u8bf4,\u90a3\u5c31\u662f\u66f4\u52a0\u75db\u82e6\u4e86\u3002"),(0,i.kt)("p",{parentName:"admonition"},"2\u3001\u5bf9\u4e8e\u5f88\u591a\u9119\u89c6Swagger\u6ce8\u89e3\u7684\u4eba\u6765\u8bf4,\u8fd9\u65e0\u7591\u662f\u7ed9\u4eba\u4e88\u53e3\u5b9e,\u52a8\u6001\u53c2\u6570\u6ce8\u89e3\u5199\u4e86\u4e00\u5927\u5806,\u4ece\u4ee3\u7801\u7b80\u6d01\u7a0b\u5ea6\u6765\u8bf4\u4e0d\u5982\u4e00\u4e2a\u5b9e\u4f53\u7c7b\u6765\u7684\u75db\u5feb"),(0,i.kt)("p",{parentName:"admonition"},"3\u3001\u5efa\u8bae\u5927\u5bb6\u591a\u591a\u4f7f\u7528Java\u7684\u4e00\u4e9b\u7279\u6027,\u5c01\u88c5\u3001\u7ee7\u627f\u7b49"),(0,i.kt)("p",{parentName:"admonition"},"\u4ee5\u4e0a\u4ec5\u4ec5\u662f\u6211\u7684\u4e2a\u4eba\u5efa\u8bae,\u4ec5\u4f9b\u53c2\u8003")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5fe27361.0a81566a.js b/knife4j-doc/gitee/assets/js/5fe27361.0a81566a.js deleted file mode 100644 index b00a7bd50..000000000 --- a/knife4j-doc/gitee/assets/js/5fe27361.0a81566a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6741],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>c});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),m=l(r),c=n,d=m["".concat(s,".").concat(c)]||m[c]||u[c]||o;return r?a.createElement(d,p(p({ref:t},g),{},{components:r})):a.createElement(d,p({ref:t},g))}));function c(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,p=new Array(o);p[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:n,p[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),p=["components"],i={},s="[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]",l={unversionedId:"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",id:"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",title:"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]",description:"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",permalink:"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]",permalink:"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},next:{title:"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]",permalink:"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"}},g={},u=[{value:"\u7279\u6027&\u4f18\u5316",id:"\u7279\u6027\u4f18\u5316",level:2},{value:"UI\u6548\u679c\u5c55\u793a",id:"ui\u6548\u679c\u5c55\u793a",level:2},{value:"\u9879\u76ee\u5730\u5740",id:"\u9879\u76ee\u5730\u5740",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6e90\u7801\u5206\u6790",id:"\u6e90\u7801\u5206\u6790",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:u};function c(e){var t=e.components,i=(0,n.Z)(e,p);return(0,o.kt)("wrapper",(0,a.Z)({},m,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v194-20190610-\u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca"},"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com",target:null,rel:null},"http://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub:"),(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u7279\u6027\u4f18\u5316"},"\u7279\u6027&\u4f18\u5316"),(0,o.kt)("p",null,"1\u3001",(0,o.kt)("strong",{parentName:"p"},"\u6700\u4f4e\u9700\u8981JDK 1.8\u652f\u6301")),(0,o.kt)("p",null,"2\u3001\u5355\u72ec\u63a5\u53e3\u901a\u8fc7hash\u5730\u5740\u8bbf\u95ee,\u65b9\u4fbf\u5f00\u53d1\u4eba\u5458\u4e4b\u95f4\u5feb\u901f\u590d\u5236\u4f20\u9012\u63a5\u53e3\u4fe1\u606f,\u80fd\u51c6\u786e\u5b9a\u4f4d\u5230\u63a5\u53e3"),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u4e0b\u8f7d\u53c2\u6570\u540d\u79f0\u95ee\u9898,\u5ffd\u7565filename\u5927\u5c0f\u5199\u654f\u611f",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IXA5C",target:"_blank",rel:"noopener"},"#IXA5C @Gitee")),(0,o.kt)("p",null,"4\u3001\u4f18\u5316BasicFilter\u8fc7\u6ee4\u5668\u6b63\u5219\u5339\u914d\u9891\u7387\u95ee\u9898,decode\u51fd\u6570\u8c03\u7528\u66ff\u6362\u4e3aJDK 1.8\u7248\u672c\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"java.util.Base64")),(0,o.kt)("p",null,"5\u3001tab\u64cd\u4f5c\u9879\u4fee\u6539\u4e3a\u70b9\u51fb\u4e8b\u4ef6\u663e\u793a,\u907f\u514d\u540c\u8c03\u8bd5\u6309\u94ae\u51b2\u7a81\u5bfc\u81f4\u8bef\u5173\u9009\u9879\u5361",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IXA5I",target:"_blank",rel:"noopener"},"#IXA5I @Gitee")),(0,o.kt)("p",null,"6\u3001\u589e\u52a0\u8c03\u8bd5\u63a5\u53e3\u54cd\u5e94\u7c7b\u578b\u4e3aXml\u3001Html\u3001Text\u7684\u652f\u6301",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IWP49",target:"_blank",rel:"noopener"},"#IWP49 @Gitee")),(0,o.kt)("p",null,"7\u3001\u4f18\u5316\u8c03\u8bd5\u540eheader\u3001raw\u3001curl\u7b49\u9009\u9879\u5361\u9ad8\u5ea6\u592a\u4f4e\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IWLSU",target:"_blank",rel:"noopener"},"#IWLSU @Gitee")),(0,o.kt)("p",null,"8\u3001\u4e3b\u9875\u7b80\u4ecbdescription\u5b57\u6bb5\u652f\u6301markdown\u683c\u5f0f",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IVVRX",target:"_blank",rel:"noopener"},"#IVVRX @Gitee")),(0,o.kt)("p",null,"9\u3001\u9488\u5bf9\u679a\u4e3e\u7c7b\u578b\u7684\u96c6\u5408\u7c7b\u578b(List),\u5728\u5b57\u6bb5\u63cf\u8ff0\u4e2d\u663e\u793a\u679a\u4e3e\u53ef\u7528\u5217\u8868\u503c",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/100",target:"_blank",rel:"noopener"},"#100 @GitHub")),(0,o.kt)("p",null,"10\u3001\u91cd\u6784\u539f\u63a5\u53e3\u6392\u5e8f\u3001tag\u6392\u5e8f\u89c4\u5219,\u65b0\u589e\u63a5\u53e3\u4f5c\u8005\u5c5e\u6027,\u53ef\u5199\u6bcf\u4e2a\u63a5\u53e3\u7684\u4f5c\u8005,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5.",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/guide/dynamic-parameter.html",target:null,rel:null},"\u53c2\u8003\u6587\u6863")),(0,o.kt)("p",null,"11\u3001\u9488\u5bf9Authorize\u6388\u6743\u7684\u76f8\u5173\u5c5e\u6027,\u4e0d\u540c\u5206\u7ec4\u76f8\u540c\u7684\u8bf7\u6c42\u53c2\u6570\u53ea\u9700\u6388\u6743\u4e00\u6b21\u5373\u53ef\u5219\u5168\u5c40\u901a\u7528",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/issues/IXHBL",target:"_blank",rel:"noopener"},"#IXHBL @Gitee")),(0,o.kt)("p",null,"12\u3001\u9488\u5bf9Map\u3001JSONObject\u7b49\u52a8\u6001\u7c7b\u578b\u53ef\u901a\u8fc7\u81ea\u5b9a\u4e49\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u6765\u589e\u52a0\u53c2\u6570\u7684\u5b57\u6bb5\u8bf4\u660e,\u89e3\u51b3\u4e0d\u60f3\u5199\u5b9e\u4f53\u7c7b\u7684\u70e6\u607c,\u4f46\u662f\u53c8\u65e0\u6587\u6863\u7684\u56f0\u6270.",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/guide/dynamic-parameter.html",target:null,rel:null},"\u53c2\u8003\u6587\u6863")),(0,o.kt)("p",null,"13\u3001\u4f18\u5316\u81ea\u5b9a\u4e49\u6587\u6863(markdown)\u754c\u9762\u6548\u679c,\u589e\u52a0\u76f8\u5173markdown\u8bed\u6cd5\u6837\u5f0f(\u5f15\u7528editormd.css)"),(0,o.kt)("h2",{id:"ui\u6548\u679c\u5c55\u793a"},"UI\u6548\u679c\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"header-json.png",src:r(98595).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(17328).Z,width:"1919",height:"1059"}),"\n",(0,o.kt)("img",{src:r(35234).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(25274).Z,width:"1918",height:"1005"}),"\n",(0,o.kt)("img",{src:r(99886).Z,width:"1920",height:"1011"})),(0,o.kt)("h2",{id:"\u9879\u76ee\u5730\u5740"},"\u9879\u76ee\u5730\u5740"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.9.4\n\n")),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("h2",{id:"\u6e90\u7801\u5206\u6790"},"\u6e90\u7801\u5206\u6790"),(0,o.kt)("p",null,"\u8ddd\u79bb\u4e0a\u4e00\u4e2a\u7248\u672c\u4e5f\u6709\u633a\u957f\u65f6\u95f4\u4e86,\u8fd9\u6bb5\u65f6\u95f4\u4e3b\u8981\u662f\u5bf9springfox\u7684\u6e90\u7801\u8fdb\u884c\u4e86\u4e00\u4e9b\u7814\u7a76\u548c\u5b66\u4e60\uff0c\u5e76\u4e14\u8bb0\u5f55\u4e86\u4e00\u4e9b\u535a\u5ba2,\u8be5\u7248\u672c(",(0,o.kt)("inlineCode",{parentName:"p"},"1.9.4"),")\u7684\u4e00\u4e9b\u529f\u80fd\u4e5f\u5728\u770b\u6e90\u7801\u7684\u8fc7\u7a0b\u4e2d\u5bf9\u6211\u6709\u4e00\u4e9b\u542f\u53d1,\u5bf9\u4e8eSwagger\u7684\u89c4\u8303\u4e5f\u591a\u4e86\u4e00\u4e9b\u4e86\u89e3"),(0,o.kt)("p",null,"\u5bf9springfox\u6e90\u7801\u6709\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u53bb\u6211\u7684\u535a\u5ba2\u67e5\u770b,",(0,o.kt)("a",{parentName:"p",href:"https://www.xiaominfo.com/2019/05/20/springfox-0/",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u524d\u5f80")),(0,o.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,o.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}c.isMDXComponent=!0},98595:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/1-229925cc38ec4542fe1c88545e329fb9.png"},17328:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/2-312a37b9a6131710be8bed1c5c5e5b15.png"},35234:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/3-84ad6fbc82d84760895dd1be11816a17.png"},25274:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/4-b324bedccf50ddbce275f6f58d3fec4d.png"},99886:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/5-855a1d6f94bed54f7b64afc831f67706.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/5fe27361.e4cd25a4.js b/knife4j-doc/gitee/assets/js/5fe27361.e4cd25a4.js new file mode 100644 index 000000000..af0d61046 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/5fe27361.e4cd25a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6741],{3905:(e,t,r)=>{r.d(t,{Zo:()=>g,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),l=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},g=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=l(r),c=n,d=u["".concat(s,".").concat(c)]||u[c]||m[c]||o;return r?a.createElement(d,p(p({ref:t},g),{},{components:r})):a.createElement(d,p({ref:t},g))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,p=new Array(o);p[0]=c;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:n,p[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var a=r(87462),n=r(63366),o=(r(67294),r(3905)),p=["components"],i={},s="[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]",l={unversionedId:"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",id:"changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",title:"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]",description:"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f",source:"@site/docs/changelog/1.x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.md",sourceDirName:"changelog/1.x",slug:"/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",permalink:"/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1660471539,formattedLastUpdatedAt:"2022\u5e748\u670814\u65e5",frontMatter:{},sidebar:"changelog",previous:{title:"[v1.9.5-2019/07/31 \u652f\u6301\u8fc7\u6ee4\u8bf7\u6c42\u53c2\u6570]",permalink:"/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue"},next:{title:"[v1.0-2020/05/20 Knife4j-Admin 1.0\u53d1\u5e03,\u4efb\u610f\u805a\u5408 Swagger \u6587\u6863]",permalink:"/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue"}},g={},u=[{value:"\u7279\u6027&\u4f18\u5316",id:"\u7279\u6027\u4f18\u5316",level:2},{value:"UI\u6548\u679c\u5c55\u793a",id:"ui\u6548\u679c\u5c55\u793a",level:2},{value:"\u9879\u76ee\u5730\u5740",id:"\u9879\u76ee\u5730\u5740",level:2},{value:"Star & Issue",id:"star--issue",level:2},{value:"\u6e90\u7801\u5206\u6790",id:"\u6e90\u7801\u5206\u6790",level:2},{value:"\u5173\u6ce8",id:"\u5173\u6ce8",level:2}],m={toc:u},c="wrapper";function d(e){var t=e.components,i=(0,n.Z)(e,p);return(0,o.kt)(c,(0,a.Z)({},m,i,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"v194-20190610-\u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca"},"[v1.9.4-2019/06/10 \u6269\u5c55\u652f\u6301\u52a8\u6001\u5b57\u6bb5\u6ce8\u91ca]"),(0,o.kt)("p",null,"swagger-bootstrap-ui 1.9.4 \u53d1\u5e03\u4e86\u3002swagger-bootstrap-ui\u662f Swagger \u7684\u589e\u5f3aUI \u5b9e\u73b0\uff0c\u4f7f\u6587\u6863\u66f4\u53cb\u597d\u4e00\u70b9\u513f"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6587\u6863"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://doc.xiaominfo.com",target:null,rel:null},"http://doc.xiaominfo.com")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u6548\u679c"),"\uff1a",(0,o.kt)("a",{parentName:"p",href:"http://swagger-bootstrap-ui.xiaominfo.com/doc.html",target:"_blank",rel:"noopener"},"http://swagger-bootstrap-ui.xiaominfo.com/doc.html")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Gitee:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"GitHub:"),(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/Swagger-Bootstrap-UI",target:"_blank",rel:"noopener"},"https://github.com/xiaoymin/Swagger-Bootstrap-UI")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"\u793a\u4f8b:"),(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo")),(0,o.kt)("h2",{id:"\u7279\u6027\u4f18\u5316"},"\u7279\u6027&\u4f18\u5316"),(0,o.kt)("p",null,"1\u3001",(0,o.kt)("strong",{parentName:"p"},"\u6700\u4f4e\u9700\u8981JDK 1.8\u652f\u6301")),(0,o.kt)("p",null,"2\u3001\u5355\u72ec\u63a5\u53e3\u901a\u8fc7hash\u5730\u5740\u8bbf\u95ee,\u65b9\u4fbf\u5f00\u53d1\u4eba\u5458\u4e4b\u95f4\u5feb\u901f\u590d\u5236\u4f20\u9012\u63a5\u53e3\u4fe1\u606f,\u80fd\u51c6\u786e\u5b9a\u4f4d\u5230\u63a5\u53e3"),(0,o.kt)("p",null,"3\u3001\u4f18\u5316\u4e0b\u8f7d\u53c2\u6570\u540d\u79f0\u95ee\u9898,\u5ffd\u7565filename\u5927\u5c0f\u5199\u654f\u611f",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IXA5C",target:"_blank",rel:"noopener"},"#IXA5C @Gitee")),(0,o.kt)("p",null,"4\u3001\u4f18\u5316BasicFilter\u8fc7\u6ee4\u5668\u6b63\u5219\u5339\u914d\u9891\u7387\u95ee\u9898,decode\u51fd\u6570\u8c03\u7528\u66ff\u6362\u4e3aJDK 1.8\u7248\u672c\u4e2d\u7684",(0,o.kt)("inlineCode",{parentName:"p"},"java.util.Base64")),(0,o.kt)("p",null,"5\u3001tab\u64cd\u4f5c\u9879\u4fee\u6539\u4e3a\u70b9\u51fb\u4e8b\u4ef6\u663e\u793a,\u907f\u514d\u540c\u8c03\u8bd5\u6309\u94ae\u51b2\u7a81\u5bfc\u81f4\u8bef\u5173\u9009\u9879\u5361",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IXA5I",target:"_blank",rel:"noopener"},"#IXA5I @Gitee")),(0,o.kt)("p",null,"6\u3001\u589e\u52a0\u8c03\u8bd5\u63a5\u53e3\u54cd\u5e94\u7c7b\u578b\u4e3aXml\u3001Html\u3001Text\u7684\u652f\u6301",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IWP49",target:"_blank",rel:"noopener"},"#IWP49 @Gitee")),(0,o.kt)("p",null,"7\u3001\u4f18\u5316\u8c03\u8bd5\u540eheader\u3001raw\u3001curl\u7b49\u9009\u9879\u5361\u9ad8\u5ea6\u592a\u4f4e\u7684\u95ee\u9898",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IWLSU",target:"_blank",rel:"noopener"},"#IWLSU @Gitee")),(0,o.kt)("p",null,"8\u3001\u4e3b\u9875\u7b80\u4ecbdescription\u5b57\u6bb5\u652f\u6301markdown\u683c\u5f0f",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui/issues/IVVRX",target:"_blank",rel:"noopener"},"#IVVRX @Gitee")),(0,o.kt)("p",null,"9\u3001\u9488\u5bf9\u679a\u4e3e\u7c7b\u578b\u7684\u96c6\u5408\u7c7b\u578b(List),\u5728\u5b57\u6bb5\u63cf\u8ff0\u4e2d\u663e\u793a\u679a\u4e3e\u53ef\u7528\u5217\u8868\u503c",(0,o.kt)("a",{parentName:"p",href:"https://github.com/xiaoymin/swagger-bootstrap-ui/issues/100",target:"_blank",rel:"noopener"},"#100 @GitHub")),(0,o.kt)("p",null,"10\u3001\u91cd\u6784\u539f\u63a5\u53e3\u6392\u5e8f\u3001tag\u6392\u5e8f\u89c4\u5219,\u65b0\u589e\u63a5\u53e3\u4f5c\u8005\u5c5e\u6027,\u53ef\u5199\u6bcf\u4e2a\u63a5\u53e3\u7684\u4f5c\u8005,\u65b9\u4fbf\u5f00\u53d1\u8005\u8c03\u8bd5.",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/guide/dynamic-parameter.html",target:null,rel:null},"\u53c2\u8003\u6587\u6863")),(0,o.kt)("p",null,"11\u3001\u9488\u5bf9Authorize\u6388\u6743\u7684\u76f8\u5173\u5c5e\u6027,\u4e0d\u540c\u5206\u7ec4\u76f8\u540c\u7684\u8bf7\u6c42\u53c2\u6570\u53ea\u9700\u6388\u6743\u4e00\u6b21\u5373\u53ef\u5219\u5168\u5c40\u901a\u7528",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/issues/IXHBL",target:"_blank",rel:"noopener"},"#IXHBL @Gitee")),(0,o.kt)("p",null,"12\u3001\u9488\u5bf9Map\u3001JSONObject\u7b49\u52a8\u6001\u7c7b\u578b\u53ef\u901a\u8fc7\u81ea\u5b9a\u4e49\u6ce8\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"@ApiOperationSupport"),"\u6216\u8005",(0,o.kt)("inlineCode",{parentName:"p"},"@DynamicParameters"),"\u6765\u589e\u52a0\u53c2\u6570\u7684\u5b57\u6bb5\u8bf4\u660e,\u89e3\u51b3\u4e0d\u60f3\u5199\u5b9e\u4f53\u7c7b\u7684\u70e6\u607c,\u4f46\u662f\u53c8\u65e0\u6587\u6863\u7684\u56f0\u6270.",(0,o.kt)("a",{parentName:"p",href:"https://doc.xiaominfo.com/guide/dynamic-parameter.html",target:null,rel:null},"\u53c2\u8003\u6587\u6863")),(0,o.kt)("p",null,"13\u3001\u4f18\u5316\u81ea\u5b9a\u4e49\u6587\u6863(markdown)\u754c\u9762\u6548\u679c,\u589e\u52a0\u76f8\u5173markdown\u8bed\u6cd5\u6837\u5f0f(\u5f15\u7528editormd.css)"),(0,o.kt)("h2",{id:"ui\u6548\u679c\u5c55\u793a"},"UI\u6548\u679c\u5c55\u793a"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"header-json.png",src:r(98595).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(17328).Z,width:"1919",height:"1059"}),"\n",(0,o.kt)("img",{src:r(35234).Z,width:"1919",height:"1054"}),"\n",(0,o.kt)("img",{src:r(25274).Z,width:"1918",height:"1005"}),"\n",(0,o.kt)("img",{src:r(99886).Z,width:"1920",height:"1011"})),(0,o.kt)("h2",{id:"\u9879\u76ee\u5730\u5740"},"\u9879\u76ee\u5730\u5740"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Maven\u5750\u6807")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"\n com.github.xiaoymin\n swagger-bootstrap-ui\n 1.9.4\n\n")),(0,o.kt)("h2",{id:"star--issue"},"Star & Issue"),(0,o.kt)("p",null,"\u611f\u8c22\u5404\u4f4d\u670b\u53cb\u7684\u652f\u6301,\u524d\u5f80",(0,o.kt)("a",{parentName:"p",href:"https://gitee.com/xiaoym/swagger-bootstrap-ui",target:"_blank",rel:"noopener"},"https://gitee.com/xiaoym/swagger-bootstrap-ui"),"\u70b9\u4e2aStar\u5427~~ \uff1a\uff09"),(0,o.kt)("h2",{id:"\u6e90\u7801\u5206\u6790"},"\u6e90\u7801\u5206\u6790"),(0,o.kt)("p",null,"\u8ddd\u79bb\u4e0a\u4e00\u4e2a\u7248\u672c\u4e5f\u6709\u633a\u957f\u65f6\u95f4\u4e86,\u8fd9\u6bb5\u65f6\u95f4\u4e3b\u8981\u662f\u5bf9springfox\u7684\u6e90\u7801\u8fdb\u884c\u4e86\u4e00\u4e9b\u7814\u7a76\u548c\u5b66\u4e60\uff0c\u5e76\u4e14\u8bb0\u5f55\u4e86\u4e00\u4e9b\u535a\u5ba2,\u8be5\u7248\u672c(",(0,o.kt)("inlineCode",{parentName:"p"},"1.9.4"),")\u7684\u4e00\u4e9b\u529f\u80fd\u4e5f\u5728\u770b\u6e90\u7801\u7684\u8fc7\u7a0b\u4e2d\u5bf9\u6211\u6709\u4e00\u4e9b\u542f\u53d1,\u5bf9\u4e8eSwagger\u7684\u89c4\u8303\u4e5f\u591a\u4e86\u4e00\u4e9b\u4e86\u89e3"),(0,o.kt)("p",null,"\u5bf9springfox\u6e90\u7801\u6709\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u53bb\u6211\u7684\u535a\u5ba2\u67e5\u770b,",(0,o.kt)("a",{parentName:"p",href:"https://www.xiaominfo.com/2019/05/20/springfox-0/",target:"_blank",rel:"noopener"},"\u70b9\u51fb\u524d\u5f80")),(0,o.kt)("h2",{id:"\u5173\u6ce8"},"\u5173\u6ce8"),(0,o.kt)("p",null,"\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7,\u5b9e\u65f6\u4e86\u89e3",(0,o.kt)("inlineCode",{parentName:"p"},"swagger-bootstrap-ui"),"\u7684\u6700\u65b0\u8d44\u8baf",(0,o.kt)("del",{parentName:"p"})),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://foruda.gitee.com/images/1660437790142497676/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE.png",alt:null})))}d.isMDXComponent=!0},98595:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/1-229925cc38ec4542fe1c88545e329fb9.png"},17328:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/2-312a37b9a6131710be8bed1c5c5e5b15.png"},35234:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/3-84ad6fbc82d84760895dd1be11816a17.png"},25274:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/4-b324bedccf50ddbce275f6f58d3fec4d.png"},99886:(e,t,r)=>{r.d(t,{Z:()=>a});const a=r.p+"assets/images/5-855a1d6f94bed54f7b64afc831f67706.png"}}]); \ No newline at end of file diff --git a/knife4j-doc/gitee/assets/js/618d1c80.ff42d1d5.js b/knife4j-doc/gitee/assets/js/618d1c80.ff42d1d5.js new file mode 100644 index 000000000..140fb1567 --- /dev/null +++ b/knife4j-doc/gitee/assets/js/618d1c80.ff42d1d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7332],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var n=a(67294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=c(a),u=l,m=d["".concat(s,".").concat(u)]||d[u]||g[u]||i;return a?n.createElement(m,r(r({ref:t},p),{},{components:a})):n.createElement(m,r({ref:t},p))}));function m(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=u;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[d]="string"==typeof e?e:l,r[1]=o;for(var c=2;c{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var n=a(87462),l=a(63366),i=(a(67294),a(3905)),r=["components"],o={},s="Final.\u6fc0\u6d3bKnife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd",c={unversionedId:"action/others/doc-search",id:"action/others/doc-search",title:"Final.\u6fc0\u6d3bKnife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd",description:"1.\u524d\u8a00",source:"@site/docs/action/others/doc-search.md",sourceDirName:"action/others",slug:"/action/others/doc-search",permalink:"/docs/action/others/doc-search",draft:!1,tags:[],version:"current",lastUpdatedBy:"xiaoyumin",lastUpdatedAt:1685499627,formattedLastUpdatedAt:"2023\u5e745\u670831\u65e5",frontMatter:{},sidebar:"action",previous:{title:"springfox \u6e90\u7801\u5206\u6790(\u4e8c\u5341\u4e00) \u5ffd\u7565\u53c2\u6570Class\u7c7b\u578b",permalink:"/docs/action/springfox/springfox21"}},p={},d=[{value:"1.\u524d\u8a00",id:"1\u524d\u8a00",level:2},{value:"2.Algolia",id:"2algolia",level:2},{value:"2.1 \u81ea\u52a8\u722c\u866b\u7d22\u5f15\u6570\u636e",id:"21-\u81ea\u52a8\u722c\u866b\u7d22\u5f15\u6570\u636e",level:3},{value:"2.2 \u81ea\u5df1\u901a\u8fc7Algolia\u7684\u722c\u866b\u9001\u6570\u636e",id:"22-\u81ea\u5df1\u901a\u8fc7algolia\u7684\u722c\u866b\u9001\u6570\u636e",level:3},{value:"3.\u7b80\u5355\u9a8c\u8bc1Algolia\u7684\u6570\u636e\u7ed3\u679c&\u641c\u7d22",id:"3\u7b80\u5355\u9a8c\u8bc1algolia\u7684\u6570\u636e\u7ed3\u679c\u641c\u7d22",level:2},{value:"4.Docusaurus\u96c6\u6210",id:"4docusaurus\u96c6\u6210",level:2},{value:"5.\u6700\u540e",id:"5\u6700\u540e",level:2}],g={toc:d},u="wrapper";function m(e){var t=e.components,o=(0,l.Z)(e,r);return(0,i.kt)(u,(0,n.Z)({},g,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"final\u6fc0\u6d3bknife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd"},"Final.\u6fc0\u6d3bKnife4j\u5b98\u7f51\u7684\u6587\u6863\u641c\u7d22\u529f\u80fd"),(0,i.kt)("h2",{id:"1\u524d\u8a00"},"1.\u524d\u8a00"),(0,i.kt)("p",null,"\u5728\u5f88\u65e9\u4e4b\u524d,Knife4j\u7684\u5b98\u7f51\u6587\u6863\u5c31\u901a\u8fc7",(0,i.kt)("a",{parentName:"p",href:"https://docusaurus.io/",target:"_blank",rel:"noopener"},"docusaurus"),"\u8fdb\u884c\u4e86\u91cd\u6784\uff0c\u5728\u7f51\u4e0a\u627e\u4e86\u4e00\u4e2a\u81ea\u5df1\u8fd8\u7b97\u6ee1\u610f\u7684\u6a21\u677f\uff0c\u5c06\u6240\u6709\u7684Knife4j\u7684Markdown\u6587\u6863\u8fdb\u884c\u4e86\u91cd\u65b0\u68b3\u7406\u6539\u9020\u3002"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531084614527",src:a(69411).Z,width:"3024",height:"1500"})),(0,i.kt)("p",null,"\u4f46\u662f\u540e\u9762\u6709\u4e00\u6bb5\u65f6\u95f4\uff0c\u4e5f\u662f\u81ea\u5df1\u61d2\u7684\u539f\u56e0\uff0c\u6587\u6863\u4e2d\u7684\u641c\u7d22\u529f\u80fd\u4e00\u76f4\u4e0d\u53ef\u7528\u3002\u6bcf\u5929\u90fd\u4f1a\u6536\u5230\u641c\u7d22\u7684\u7edf\u8ba1\u7ed3\u679c\u62a5\u544a\uff0c\u63d0\u793a\u7684\u90fd\u662f\u5728\u641c\u7d22\u7684\u8bf7\u6c42\u4e2d\uff0c\u672a\u5339\u914d\u7ed3\u679c\u7684\u6982\u7387\u59cb\u7ec8",(0,i.kt)("strong",{parentName:"p"},"100%")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531084806837",src:a(1195).Z,width:"1270",height:"746"})),(0,i.kt)("p",null,"\u770b\u7684\u4e5f\u662f\u76f8\u5f53\u96be\u53d7\uff0c\u8fd9\u4e24\u5929\u7ec8\u4e8e\u6295\u5165\u4e86\u65f6\u95f4\uff0c\u51b3\u5fc3\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002"),(0,i.kt)("h2",{id:"2algolia"},"2.Algolia"),(0,i.kt)("p",null,"Knife4j\u7684\u5b98\u7f51\u641c\u7d22\u4e3b\u8981\u96c6\u6210\u4e86",(0,i.kt)("a",{parentName:"p",href:"https://www.algolia.com/",target:"_blank",rel:"noopener"},"Algolia"),"\u6765\u63d0\u4f9b\u641c\u7d22\u670d\u52a1\uff0c\u56e0\u4e3a",(0,i.kt)("a",{parentName:"p",href:"https://docusaurus.io/",target:"_blank",rel:"noopener"},"docusaurus"),"\u7eaf\u5929\u7136\u652f\u6301Algolia\u6765\u96c6\u6210\u6587\u6863\u641c\u7d22\u670d\u52a1\uff0c\u5982\u679c\u7528\u8fc7Algolia\u7684\u670d\u52a1\u7684\u670b\u53cb\u53ef\u80fd\u77e5\u9053\uff0c\u5982\u679c\u4f60\u7684\u7f51\u7ad9\u6587\u6863\u662f\u5f00\u6e90\u9879\u76ee\uff0c\u90a3\u4e48\u662f\u53ef\u4ee5\u63d0\u4ea4\u7533\u8bf7\u6765\u83b7\u53d6\u514d\u8d39\u670d\u52a1\u7684\uff0c\u4e3b\u8981\u6761\u4ef6\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u5fc5\u987b\u662f\u6587\u6863\u7f51\u7ad9\u7684 ",(0,i.kt)("strong",{parentName:"li"},"\u6240\u6709\u8005"),"\uff0c\u7f51\u7ad9\u5fc5\u987b\u662f ",(0,i.kt)("strong",{parentName:"li"},"\u516c\u5f00\u7684"),"\u3002"),(0,i.kt)("li",{parentName:"ul"},"\u7f51\u7ad9\u5185\u5bb9\u5fc5\u987b\u662f ",(0,i.kt)("strong",{parentName:"li"},"\u5f00\u6e90\u9879\u76ee\u7684\u6280\u672f\u6587\u6863")," \u6216 ",(0,i.kt)("strong",{parentName:"li"},"\u6280\u672f\u535a\u5ba2"),"\u3002"),(0,i.kt)("li",{parentName:"ul"},"\u7f51\u7ad9\u7533\u8bf7\u670d\u52a1\u65f6\u5fc5\u987b\u6709 ",(0,i.kt)("strong",{parentName:"li"},"\u5b8c\u6574\u7a33\u5b9a\u7684\u8bbe\u8ba1\u548c\u5185\u5bb9"),"\uff0c\u5373\u786e\u8ba4\u7f51\u7ad9\u505a\u597d\u751f\u4ea7\u51c6\u5907\u3002")),(0,i.kt)("h3",{id:"21-\u81ea\u52a8\u722c\u866b\u7d22\u5f15\u6570\u636e"},"2.1 \u81ea\u52a8\u722c\u866b\u7d22\u5f15\u6570\u636e"),(0,i.kt)("p",null,"\u7533\u8bf7\u94fe\u63a5\u5730\u5740\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://docsearch.algolia.com/apply/",target:"_blank",rel:"noopener"},"https://docsearch.algolia.com/apply/")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531085415798",src:a(62777).Z,width:"729",height:"1020"})),(0,i.kt)("p",null,"\u4f46\u4f60\u63d0\u4ea4\u4e86\u7533\u8bf7\uff0c\u5e76\u4e14\u5b98\u65b9\u793e\u533a\u5ba1\u6838\u901a\u8fc7\u540e\uff0c\u4f60\u4f1a\u6536\u5230\u90ae\u4ef6\uff0c\u6309\u90ae\u4ef6\u7684\u5185\u5bb9\u8fdb\u884c\u56de\u590d\u5c31\u53ef\u4ee5\u4e86\u3002"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531085636057",src:a(60194).Z,width:"1292",height:"659"})),(0,i.kt)("p",null,"\u4f46\u6211\u4eec\u628a\u6240\u6709\u7684\u5de5\u4f5c\u6d41\u7a0b\u51c6\u5907\u5c31\u7eea\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u524d\u5f80Algolia\u7ba1\u7406\u81ea\u5df1\u7684\u540e\u53f0\u6570\u636e\u4e86\uff0c\u4e3b\u8981\u6b65\u9aa4\uff1a"),(0,i.kt)("p",null,"\u6b65\u9aa4\u4e00\u3001\u767b\u5f55\u5230Algolia\u91cc\u9762\u7684\u63a7\u5236\u53f0"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531085907655",src:a(53760).Z,width:"1061",height:"712"})),(0,i.kt)("p",null,"\u6b65\u9aa4\u4e8c\u3001\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u81ea\u5df1\u7684Application\u5e94\u7528\u7684Plan\u7c7b\u522b\uff0c\u5982\u4e0b\uff1a"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Plan\u7c7b\u522b\u662fDOCSEARCH\u7c7b\u578b\u7684\u5e94\u7528\uff0c\u4ee3\u8868\u6211\u4eec\u53ef\u4ee5\u514d\u8d39\u4f7f\u7528Algolia\u7684\u722c\u866b\u670d\u52a1\uff0c\u4f1a\u81ea\u52a8\u722c\u53d6\u6211\u4eec\u7684\u7f51\u7ad9\u6587\u6863\u8fdb\u884c\u7d22\u5f15"),(0,i.kt)("p",{parentName:"blockquote"},"\u5982\u679c\u662fFREE\u7c7b\u522b\uff0c\u5219\u6ca1\u6709\u8fd9\u79cd\u670d\u52a1\uff0c\u4f60\u4e5f\u767b\u5f55\u4e0d\u4e86Algolia\u7684\u722c\u866b\u540e\u53f0")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531090727879",src:a(15049).Z,width:"1703",height:"348"})),(0,i.kt)("p",null,"\u6b65\u9aa4\u4e09\u3001\u70b9\u51fbSearch\u540e\uff0c\u5373\u53ef\u67e5\u770b\u8be5\u6587\u6863\u9875\u9762\u7684Index\u6570\u636e\u96c6"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531090016683",src:a(20596).Z,width:"1211",height:"807"})),(0,i.kt)("p",null,"\u8fd9\u91ccIndex\u6709\u6570\u636e\u662f\u6838\u5fc3\u548c\u5173\u952e\uff0c\u5982\u679c\u4f60\u7684\u641c\u7d22\u670d\u52a1\u4e0d\u53ef\u7528\uff0c\u9996\u5148\u8981\u786e\u8ba4\u4e00\u4e0b\u8be5Index\u4e2d\u662f\u5426\u6709\u6570\u636e\uff0c\u6216\u8005\u4f60\u6587\u6863\u4e2d\u914d\u7f6e\u7684\u641c\u7d22\u914d\u7f6e\u4fe1\u606f\u662f\u5426\u6b63\u786e\u3002"),(0,i.kt)("p",null,"\u7b2c\u4e09\uff0c\u786e\u8ba4\u81ea\u5df1\u7684\u722c\u866b\u540e\u53f0\u662f\u5426\u6709\u95ee\u9898\uff0c\u767b\u5f55\u5230Algolia\u7684\u722c\u866b\u540e\u53f0\uff0c\u5730\u5740\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://crawler.algolia.com/admin/crawlers",target:"_blank",rel:"noopener"},"https://crawler.algolia.com/admin/crawlers")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"\u786e\u8ba4\u53f3\u4fa7Indices\u4e2d\u6709\u6570\u636e\u624d\u6b63\u5e38")),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531090327502",src:a(14204).Z,width:"1902",height:"897"})),(0,i.kt)("p",null,"\u56e0\u4e3aKnife4j\u7684DocSearch\u7533\u8bf7\u7684\u5df2\u7ecf\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u53ea\u662f\u5728\u641c\u7d22\u7684\u65f6\u5019\u4e00\u76f4\u65e0\u6cd5\u5c55\u793a\u7ed3\u679c(\u8fd9\u8ba9\u6211\u4e5f\u4e00\u76f4\u5f88\u56f0\u60d1)\uff0c\u6240\u4ee5\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528docusaurus\u63d0\u4f9b\u7684\u5b98\u65b9algolia\u63d2\u4ef6\u8fdb\u884c\u96c6\u6210\u641c\u7d22"),(0,i.kt)("h3",{id:"22-\u81ea\u5df1\u901a\u8fc7algolia\u7684\u722c\u866b\u9001\u6570\u636e"},"2.2 \u81ea\u5df1\u901a\u8fc7Algolia\u7684\u722c\u866b\u9001\u6570\u636e"),(0,i.kt)("p",null,"Algolia\u9664\u4e86\u901a\u8fc7DocSearch\u7684\u65b9\u5f0f\u8fdb\u884c\u7533\u8bf7\uff0c\u514d\u8d39\u4f7f\u7528Algolia\u7684\u722c\u866b\u670d\u52a1\uff0c\u5982\u679c\u6709\u4e00\u4e9b\u7279\u6b8a\u539f\u56e0\uff0c\u6216\u8005\u6700\u7ec8\u6ca1\u6709\u88abAlgolia\u7684\u5b98\u65b9\u793e\u533a\u5ba1\u6838\u901a\u8fc7\uff0c\u90a3\u4e48\u4e5f\u662f\u53ef\u4ee5\u4f7f\u7528Algolia\u7684\u641c\u7d22\u670d\u52a1\u7684\uff0c\u53ef\u4ee5\u81ea\u5df1\u6ce8\u518cAlgolia\u7684\u540e\u53f0\uff0c\u7136\u540e\u521b\u5efaApplication(\u5e94\u7528)"),(0,i.kt)("p",null,"\u521b\u5efa\u5e94\u7528\u540e\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7Algolia\u63d0\u4f9b\u7684\u722c\u866b\u7a0b\u5e8f(\u79bb\u7ebf\u5de5\u5177)\u81ea\u5df1\u8bbe\u7f6e\u722c\u866b\u89c4\u5219\uff0c\u5c06\u722c\u53d6\u7684\u6570\u636e\u9001\u5230Algolia\u63a7\u5236\u53f0\u3002"),(0,i.kt)("p",null,"\u672c\u6587\u53ea\u4ecb\u7ecd\u901a\u8fc7Docker\u955c\u50cf\u6765\u8fd0\u884c\u722c\u866b\u7684\u5de5\u5177\uff0c\u5176\u4ed6\u65b9\u5f0f\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\uff1a",(0,i.kt)("a",{parentName:"p",href:"https://docsearch.algolia.com/docs/legacy/run-your-own",target:"_blank",rel:"noopener"},"https://docsearch.algolia.com/docs/legacy/run-your-own")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"docker"),"\u547d\u4ee4"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell"},"docker run -it --env-file=.env algolia/docsearch-scraper\n")),(0,i.kt)("p",null,"\u7136\u540e\u914d\u7f6e",(0,i.kt)("inlineCode",{parentName:"p"},".env"),"\u73af\u5883\u53d8\u91cf\uff0c\u4e3b\u8981\u6709\u4e09\u4e2a\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"APPLICATION_ID"),"\uff1a\u5e94\u7528APPID\uff0c\u8fd9\u4e2a\u53ef\u4ee5\u5728Algolia\u7684\u540e\u53f0\u8fdb\u884c\u521b\u5efa\u7136\u540e\u83b7\u53d6\u5f97\u5230"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"API_KEY"),":\u5bc6\u94a5key\uff0c\u5728Algolia\u7684\u540e\u53f0\uff0c\u53ef\u4ee5\u521b\u5efaAPI_KEY\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5f53\u524d\u5e94\u7528\u7684AdminKey(",(0,i.kt)("inlineCode",{parentName:"li"},"ps:"),"\u56e0\u4e3a\u722c\u866b\u7a0b\u5e8f\u5728\u4f60\u672c\u673a\u4f7f\u7528\uff0c\u6ca1\u6709\u4eba\u77e5\u9053\uff0c\u6240\u4ee5\u7528admin\u7684key\u53ef\u4ee5\u4e00\u6b65\u5230\u4f4d,\u907f\u514d\u4e00\u4e9b\u6743\u9650\u95ee\u9898\u4f1a\u63d0\u793akey\u65e0\u6548\u6216\u8005\u65e0\u6743\u9650\u7b49\u95ee\u9898\u7684\u53d1\u751f)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"CONFIG"),": \u76ee\u6807\u7f51\u7ad9\u7684\u722c\u866b\u89c4\u5219\uff0c\u8be6\u7ec6\u89c4\u5219\u53c2\u8003\u6587\u6863\uff1a",(0,i.kt)("a",{parentName:"li",href:"https://docsearch.algolia.com/docs/legacy/config-file",target:"_blank",rel:"noopener"},"https://docsearch.algolia.com/docs/legacy/config-file"))),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531093722644",src:a(64546).Z,width:"1260",height:"262"})),(0,i.kt)("p",null,"Config\u793a\u4f8b\u5982\u4e0b:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "index_name": "knife4j",\n "start_urls": [\n "https://doc.xiaominfo.com/docs/middleware-sources",\n "https://doc.xiaominfo.com/docs/oas",\n "https://doc.xiaominfo.com/docs/action",\n "https://doc.xiaominfo.com/docs/changelog",\n "https://doc.xiaominfo.com/docs/faq",\n "https://doc.xiaominfo.com/v2/"\n ],\n "selectors": {\n "lvl0": ".docMainContainer_gTbr header h1",\n "lvl1": ".docMainContainer_gTbr article h1",\n "lvl2": ".docMainContainer_gTbr article h2",\n "lvl3": ".docMainContainer_gTbr article h3",\n "lvl4": ".docMainContainer_gTbr article h4",\n "lvl5": ".docMainContainer_gTbr article h5",\n "text": ".docMainContainer_gTbr header p,.docMainContainer_gTbr section p,.docMainContainer_gTbr section ol"\n }\n}\n')),(0,i.kt)("p",null,"\u51e0\u4e2a\u91cd\u8981\u7684\u53c2\u6570\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"index_name:\u7d22\u5f15\u540d\u79f0\uff0c\u8fd9\u4e2a\u662f\u5728algolia\u540e\u53f0\u521b\u5efa\u7684"),(0,i.kt)("li",{parentName:"ul"},"start_urls:\u76ee\u6807\u6587\u6863\u7f51\u7ad9\u7684\u76ee\u6807\u9875"),(0,i.kt)("li",{parentName:"ul"},"selectors\uff1a\u9009\u62e9\u5668\u89c4\u5219\uff0c\u4e5f\u5c31\u662f\u544a\u8bc9\u722c\u866b\uff0c\u4f60\u9700\u8981\u722c\u53d6\u7684\u7f51\u9875\uff0c\u6700\u7ec8\u901a\u8fc7\u9009\u62e9\u5668\u83b7\u53d6\u7684\u7c7b\u5bb9\u89c4\u5219\uff0c\u5305\u62ecid\u9009\u62e9\u5668\u3001\u7c7b\u9009\u62e9\u3001\u6807\u7b7e\u9009\u62e9\u5668\u7b49\u7b49\uff0c\u5982\u679c\u4f60\u7528\u8fc7",(0,i.kt)("inlineCode",{parentName:"li"},"jQuery"),",\u770b\u5230\u8fd9\u4e2a\u89c4\u5219\u5e94\u8be5\u4f1a\u975e\u5e38\u719f\u6089")),(0,i.kt)("p",null,"\u5f53\u7136\u8fd8\u6709\u66f4\u8be6\u7ec6\u7684\u89c4\u5219\uff0c\u5177\u4f53\u7684\u53ef\u4ee5\u53c2\u8003\u6587\u6863\u8fdb\u884c\u914d\u7f6e\u5373\u53ef\u3002"),(0,i.kt)("p",null,"\u6700\u7ec8\u8fd0\u884cdocker\u547d\u4ee4\u722c\u866b\u6548\u679c\u5982\u4e0b\uff1a"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531093833450",src:a(19313).Z,width:"1620",height:"776"})),(0,i.kt)("p",null,"\u7b49\u6211\u4eec\u7684\u722c\u866b\u5728\u672c\u5730\u8fd0\u884c\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u767b\u5f55\u540e\u53f0\u67e5\u770b\u6211\u4eec\u7684\u8bb0\u5f55\u662f\u5426\u6210\u529f\uff0c\u73b0\u5728\u7684",(0,i.kt)("inlineCode",{parentName:"p"},"records"),"\u5c31\u662f\u6700\u7ec8\u7684\u6587\u6863\u8bb0\u5f55\u6570"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"image-20230531094244587",src:a(80776).Z,width:"2644",height:"1312"})),(0,i.kt)("h2",{id:"3\u7b80\u5355\u9a8c\u8bc1algolia\u7684\u6570\u636e\u7ed3\u679c\u641c\u7d22"},"3.\u7b80\u5355\u9a8c\u8bc1Algolia\u7684\u6570\u636e\u7ed3\u679c&\u641c\u7d22"),(0,i.kt)("p",null,"\u5728\u4e0a\u9762\u7684\u7ae0\u8282\u4e2d\u6211\u4eec\u4ecb\u7ecd\u4e86\u600e\u4e48\u5728Algolia\u8fdb\u884c\u7d22\u5f15\u6570\u636e\uff0c\u4e3b\u8981\u5305\u62ec\u4e24\u79cd\u65b9\u5f0f\uff1a"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"\u5b98\u65b9\u63d0\u4ea4DocSearch\u7533\u8bf7\uff0c\u901a\u8fc7Algolia\u63d0\u4f9b\u7684\u722c\u866b\u81ea\u52a8\u722c\u53d6\u6211\u4eec\u7684\u516c\u5f00\u7f51\u7ad9\uff0c\u9700\u8981\u5ba1\u6838"),(0,i.kt)("li",{parentName:"ul"},"\u81ea\u5df1\u8fd0\u884cAlgolia\u7684\u722c\u866b\u7a0b\u5e8f\uff0c\u79bb\u7ebf\u5c06\u81ea\u5df1\u7684\u7f51\u7ad9\u7d22\u5f15\u6570\u636e\u9001\u5230Algolia\u4e2d")),(0,i.kt)("p",null,"\u8fd9\u4e24\u79cd\u65b9\u5f0f\u4efb\u4f55\u4e00\u79cd\u4f60\u90fd\u53ef\u4ee5\u6210\u529f\u7d22\u5f15\u6587\u6863\u6570\u636e\uff0c\u5982\u679c\u5728Algolia\u7684\u63a7\u5236\u53f0\u80fd\u770b\u5230\u6570\u636e\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u4e00\u4e2a\u5c0fdemo\u6765\u9a8c\u8bc1\u641c\u7d22\u7ed3\u679c\u4e86\uff0c\u5e9f\u8bdd\u4e0d\u591a\u8bf4\uff0c\u76f4\u63a5\u4e0ahtml\u6d4b\u8bd5\u4ee3\u7801\uff1a"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-html"},'\n\n\n \n Title\n \n\n\n\n
\n\n - -实战指南 | Knife4j - - +实战指南 | Knife4j + +
-

实战指南

Knife4j实战项目列表,所有实战demo源码都在https://gitee.com/xiaoym/swagger-bootstrap-ui-demo, +每个项目的介绍请参考文档

微服务聚合组件Knife4jAggregation强势发布

聚合Swagger文档从来没有这么简单过,请参考以下实战篇章

Spring单体架构

SpringCloud微服务架构

基于Spring Securty OAuth2.0认证集成Knife4j

Springfox 源码系列

+ + diff --git a/knife4j-doc/gitee/docs/action/action-simple.html b/knife4j-doc/gitee/docs/action/action-simple.html index d73b107f7..c75cbd9a3 100644 --- a/knife4j-doc/gitee/docs/action/action-simple.html +++ b/knife4j-doc/gitee/docs/action/action-simple.html @@ -10,26 +10,26 @@ - -示例代码 | Knife4j - - +示例代码 | Knife4j + +
-

示例代码

目前Knife4j以及前身swagger-bootstrap-ui也提供了一些代码示例,可以前往Gitee仓库地址直接获取。

Demo示例地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

主要模块说明:

模块说明
knife4j-aggregation-disk-demoKnife4j提供的微服务聚合组件,Disk模式下聚合,可参考实战文档
knife4j-aggregation-cloud-demoKnife4j提供的微服务聚合组件,Cloud模式下聚合,可参考实战文档
knife4j-aggregation-eureka-demoKnife4j提供的微服务聚合组件,Eureka模式下聚合,可参考实战文档
knife4j-aggregation-nacos-demoKnife4j提供的微服务聚合组件,Disk模式下聚合,可参考实战文档
knife4j-springdoc-openapi-demo在Spring Boot单体架构下集成Knife4j,基于springdoc-openapi以及OpenAPIV3
knife4j-springfox-boot-v3-demo在Spring Boot单体架构下集成Knife4j,基于Springfox3以及OpenAPIv3
knife4j-spring-boot-demo在Spring Boot架构下集成knife4j的项目示例,主要是基于OpenAPIV2
knife4j-lower-spring-boot-demoSpring Boot低版本测试集成Knife4j,主要复测Bug使用。开发者可不用理会
knife4j-spring-boot-single-demo在Spring Boot单体架构下集成knife4j的项目示例
knife4j-spring-boot-fast-demoSpring Boot单体框架快速集成Knife4j示例,可参考文档快速开始
knife4j-spring-oauth2-authorization_codeKnife4j集成OAuth2.0的授权码模式,可参考实战文档
knife4j-spring-oauth2-implicitKnife4j集成OAuth2.0的简化模式,可参考实战文档
knife4j-spring-oauth2-client_credentialsKnife4j集成OAuth2.0的客户端模式,可参考实战文档
knife4j-spring-oauth2-passwordKnife4j集成OAuth2.0的密码模式,可参考实战文档
knife4j-spring-cloud-gateway在Spring Cloud微服务架构下通过gateway网集成knife4j的示例
knife4j-spring-boot2-demoSpring Boot 2.x系列版本集成Knife4j
knife4j-jfinal-demo在JFinal框架中集成Knife4j,目前正在开发中,该示例无效,开发者可不用理会
swagger-bootstrap-ui-demo-mvc在Spring MVC模式下集成swagger-bootstrap-ui
swagger-bootstrap-ui-demo在Spring Boot单体架构下集成swagger-bootstrap-ui
swagger-bootstrap-ui-gateway在Spring Cloud微服务架构下通过gateway网关集成swagger-bootstrap-ui
swagger-bootstrap-ui-zuul在Spring Cloud微服务架构下通过zuul网关集成swagger-bootstrap-ui
+ + diff --git a/knife4j-doc/gitee/docs/action/aggregation-cloud.html b/knife4j-doc/gitee/docs/action/aggregation-cloud.html index d31130ca1..9fbd4404f 100644 --- a/knife4j-doc/gitee/docs/action/aggregation-cloud.html +++ b/knife4j-doc/gitee/docs/action/aggregation-cloud.html @@ -10,28 +10,28 @@ - -4.2 Cloud模式聚合OpenAPI文档 | Knife4j - - +4.2 Cloud模式聚合OpenAPI文档 | Knife4j + +
-

4.2 Cloud模式聚合OpenAPI文档

Cloud(云端)模式和Disk模式大同小异,主要的区别是获取OpenAPI规范的方式换成了基于HTTP接口而已

完整代码请参考knife4j-aggregation-cloud-demo

本次Cloud聚合以Knife4j目前部署的线上demo为例,本地聚合在线的OpenAPI,并且可以本地调试,Knife4jAggregation组件会自动帮助我们转发

任意取目前Knife4j的线上demo两个OpenAPI规范接口地址:

主要步骤如下:

1、创建Spring Boot项目,引入Knife4jAggregation的依赖包,完整pom文件如下:

点击查看完整代码
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-disk-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>knife4j-aggregation-disk-demo</name>
<description>通过基于Spring Boot的工程聚合任意微服务接口文档</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<version>2.0.8</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

2、配置yml配置文件,如下:

server:
port: 19081
knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 测试分组1
uri: knife4j.xiaominfo.com
location: /v2/api-docs?group=2.X版本
- name: 测试分组2
uri: knife4j.xiaominfo.com
location: /v2/api-docs?group=3.默认接口

3、启动项目,访问doc.html进行查看,效果图如下:

聚合效果:

在线调试: -

- - +

+ + diff --git a/knife4j-doc/gitee/docs/action/aggregation-disk.html b/knife4j-doc/gitee/docs/action/aggregation-disk.html index 4010025e5..975ceb92a 100644 --- a/knife4j-doc/gitee/docs/action/aggregation-disk.html +++ b/knife4j-doc/gitee/docs/action/aggregation-disk.html @@ -10,26 +10,26 @@ - -4.1 Disk本地模式聚合OpenAPI文档 | Knife4j - - +4.1 Disk本地模式聚合OpenAPI文档 | Knife4j + +
-

4.1 Disk本地模式聚合OpenAPI文档

基于Disk模式聚合是最简单的,开发者只需要在Spring Boot的项目中存在OpenAPI规范的JSON文件即可进行聚合

完整代码请参考knife4j-aggregation-disk-demo

主要步骤如下:

1、创建Spring Boot项目,引入Knife4jAggregation的依赖包,完整pom文件如下:

点击查看完整代码
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-disk-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>knife4j-aggregation-disk-demo</name>
<description>通过基于Spring Boot的工程聚合任意微服务接口文档</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<version>2.0.8</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

2、配置yml配置文件,如下:

server:
port: 19081
knife4j:
enableAggregation: true
disk:
enable: true
routes:
- name: 用户
location: classpath:openapi/user.json

工程目录如下图:

3、启动项目,访问doc.html进行查看,效果图如下

+ + diff --git a/knife4j-doc/gitee/docs/action/aggregation-docker.html b/knife4j-doc/gitee/docs/action/aggregation-docker.html index 9b34b6806..93cfe2f48 100644 --- a/knife4j-doc/gitee/docs/action/aggregation-docker.html +++ b/knife4j-doc/gitee/docs/action/aggregation-docker.html @@ -10,26 +10,26 @@ - -4.5 基于Knife4j的Docker镜像快速聚合OpenAPI | Knife4j - - +4.5 基于Knife4j的Docker镜像快速聚合OpenAPI | Knife4j + +
-

4.5 基于Knife4j的Docker镜像快速聚合OpenAPI

在前面的实战文章中,更多的是面向Java开发者,通过Spring Boot框架,快速聚合OpenAPI文档。

那么其他语言能否也能这么方便的使用Knife4j呢?

答案是肯定的,Knife4j为了让其他语言非常方便的使用Knife4j来渲染聚合OpenAPI文档,在DockerHub中推送了Knife4j的镜像

镜像地址:https://hub.docker.com/repository/docker/xiaoymin/knife4j

如果你的本机或者服务器安装了Docker,那么利用Knife4j的镜像来聚合OpenAPI将会非常方便

首先需要将镜像从DockerHub拉到本地,命令如下:

docker pull xiaoymin/knife4j:latest

如果pull速度比较慢的话,开发者可以配置镜像源

/etc/docker/daemon.json
{
"registry-mirrors": [
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://3laho3y3.mirror.aliyuncs.com",
"https://mirror.ccs.tencentyun.com"
]
}

镜像下载到本地机器后,下面将详细介绍如何通过Knife4j的镜像实现上面文章介绍的4中不同方式的聚合OpenAPI文档

镜像说明

Knife4j的镜像是一个基于Spring Boot框架开发的Web项目,对外默认端口8888

源码地址:https://gitee.com/xiaoym/knife4j/tree/v2/knife4j-aggregation-docker

:::details Dockerfile文件

FROM openjdk:8-jdk-alpine
LABEL version="2.0"
LABEL released-date=2020/11/25
LABEL author="xiaoymin@foxmail.com"
LABEL description="Knife4jAggregation OpenAPI,RunAnyWhere!!!"
MAINTAINER xiaoymin
RUN mkdir /app
# Disk模式数据挂载目录
RUN mkdir /app/data
ADD src/main/resources/application.yml /app/app.yml
ADD target/knife4j-aggregation-docker-1.0.jar /app/app.jar
ENTRYPOINT ["java","-jar","-Djava.security.egd=file:/dev/./urandom","-Duser.timezone=Asia/Shanghai","/app/app.jar","--spring.config.location=/app/app.yml"]
#EXPOSE 8888:

:::

从Knife4j的Dockerfile文件中,我们可以看到为Knife4j的应用创建了一个/app目录和/app/data目录,用来存放jar文件和yml配置文件,该目录是通过外部文件与Docker容器进行挂载关联的关键。

Disk模式

Disk模式主要是从本地聚合OpenAPI规范,那么如何利用Knife4j的容器进行渲染呢?这里就要用到我们刚刚上面说的文件挂载

第一步:在服务器(宿主机)上创建相关目录,例如:/home/openapi

我们在该目录下主要存放两种类型的文件目录,1种是Knife4j镜像文件需要的yml配置文件,第二种是存放OpenAPI的规范JSON,目录结构如下:

[root@izbpc3 openapi]# pwd
/home/openapi
[root@izbpc3 openapi]# ll
total 8
-rw-r--r-- 1 root root 241 Nov 25 19:42 app.yml
drwxr-xr-x 2 root root 4096 Nov 25 19:41 data
[root@izbpc3 openapi]# cd data
[root@izbpc3 data]# ll
total 256
-rw-r--r-- 1 root root 21448 Nov 25 19:41 open-api.json
-rw-r--r-- 1 root root 237303 Nov 25 19:41 openapi.json

Disk模式我们主要需要做的是修改app.yml配置文件中的配置,指定Knife4j的镜像从本地加载指定的openapi.json,通过界面显示

app.yml配置修改如下:

server:
port: 8888
knife4j:
enableAggregation: true
disk:
enable: true
routes:
- name: 用户AAAAAAAAAAA
location: /app/data/open-api.json
- name: 用户BBBBBBBBBBBB
location: /app/data/openapi.json

这里需要注意的是

1、location我们使用的是容器的目录/app,我们最终创建容器的时候会将宿主机的目录(/home/openapi/data)挂载给容器,达到文件共享的目的

2、在app.yml配置中指定的端口是容器的端口,Knife4j默认端口8888,如果开发者使用该配置并且修改了端口,那么需要在端口映射的时候也相应的进行修改

第二步:启动Knife4j容器查看效果

通过Docker命令创建容器,命令如下:

[root@izbx23 app]# docker run -itd --name myopenapi -p 18002:8888 -v /home/openapi/app.yml:/app/app.yml -v /home/openapi/data:/app/data xiaoymin/knife4j
3f0ed4cde46dd8a625e0338bc8cb1688059c7169447bda5681a34d93e2ba7c3e
[root@izbx23 app]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e678bccd4d66 xiaoymin/knife4j "java -jar -Djava.se…" 3 seconds ago Up 2 seconds 0.0.0.0:18002->8888/tcp myopenapi
  • --name命令是指定一个别名
  • -p代表端口映射 18002是宿主机端口号,8888是容器的端口号,
  • -v参数则是将本地目录挂载和容器共享,此处主要挂载两个文件,一个是app.yml配置文件,一个是openapi.json文件

此时,我们通过端口号进行访问:http://localhost:18002/doc.html

效果图如下:

容器创建成功后,我们可以访问容器的文件系统,通过命令如下:

[root@izbx23 conf.d]# docker exec -it myopenapi sh
/ # ls
app bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
/ # cd app
/app # ls
app.jar app.yml data
/app # cd data
/app/data # ls
open-api.json openapi.json
/app/data #

我们在容器中的文件系统中/app/data目录中,其实可以看到,这个目录中的文件和我们通过创建容器时-v参数挂载的目录文件是一致的。

Cloud模式

Cloud模式就相对简单多了,我们只需要修改当前的app.yml配置文件即可,然后创建容器时进行覆盖即可

任意取目前Knife4j的线上demo两个OpenAPI规范接口地址:

配置yml配置文件,如下:

server:
port: 8888
knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: cloud1
uri: knife4j.xiaominfo.com
location: /v2/api-docs?group=2.X版本
- name: cloud2
uri: knife4j.xiaominfo.com
location: /v2/api-docs?group=3.默认接口

通过Docker命令创建容器,命令如下:

[root@izbx23 openapi]# docker run -itd --name cloudapi -p 18002:8888 -v /home/openapi/app.yml:/app/app.yml xiaoymin/knife4j
6b81844e0c605704eef3ffcb207e090a1139a9fbc8dcf0a43efdcb60f41d327c
[root@izbx23 openapi]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6b81844e0c60 xiaoymin/knife4j "java -jar -Djava.se…" 4 seconds ago Up 3 seconds 0.0.0.0:18002->8888/tcp cloudapi
  • --name命令是指定一个别名(cloudapi)
  • -p代表端口映射 18002是宿主机端口号,8888是容器的端口号,
  • -v参数则是将本地目录挂载和容器共享,此处只需要覆盖app.yml配置文件即可,因为我们的OpenAPI数据来源于HTTP接口

此时,我们通过端口号进行访问:http://localhost:18002/doc.html

效果图如下:

注册中心(Eureka && Nacos)

至于从注册中心(Eureka && Nacos)进行OpenAPI的聚合和Cloud模式下一样,开发者只需要修改app.yml配置文件,然后通过-v参数进行挂载覆盖文件即可。更多的配置需要参考聚合组件的文档参数详细介绍文档

+ + diff --git a/knife4j-doc/gitee/docs/action/aggregation-eureka.html b/knife4j-doc/gitee/docs/action/aggregation-eureka.html index b46cefa11..285cc884f 100644 --- a/knife4j-doc/gitee/docs/action/aggregation-eureka.html +++ b/knife4j-doc/gitee/docs/action/aggregation-eureka.html @@ -10,24 +10,24 @@ - -4.3 Eureka注册中心聚合OpenAPI文档 | Knife4j - - +4.3 Eureka注册中心聚合OpenAPI文档 | Knife4j + +
-

4.3 Eureka注册中心聚合OpenAPI文档

从Eureka注册中心进行聚合的模式和Cloud模式大同小异,主要的区别是通过serviceName来替代了真实的目标服务地址,而是从Eureka注册中心进行动态获取

完整代码请参考knife4j-aggregation-eureka-demo

先来看整个工程的目录:

工程目录说明如下: |工程|说明| |--|---| |service-server|Eureka注册中心| @@ -35,9 +35,9 @@ |service-order|一个非常简单的订单服务,包含订单接口| |service-doc|聚合文档工程,也是一个Spring Boot工程,不过需要注意的是基于web的,而非webflux|

Eureka注册中心以及service-user、order等都非常简单,按照注册中心、用户服务、订单服务依次进行启动即可

此时,我们访问Eureka的主页,最终能看到我们的注册中心存在两个服务,如下图:

那么,我们的目标是什么呢?从Eureka注册中心直接进行聚合,也就是将用户服务、订单服务的OpenAPI文档聚合在一起进行展示

主要步骤如下:

1、在service-doc工程引入knife4j-aggregation-spring-boot-starter依赖

点击查看完整代码
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.xiaominfo.swagger</groupId>
<artifactId>knife4j-aggregation-eureka-demo</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>
<groupId>com.xiaominfo.swagger</groupId>
<artifactId>service-doc</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>service-doc</name>
<description>Eureka聚合</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<version>2.0.8</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

2、配置yml配置文件,如下:

server:
port: 10909
knife4j:
enableAggregation: true
eureka:
enable: true
serviceUrl: http://localhost:10000/eureka/
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
servicePath: /order
- name: 用户体系
serviceName: service-user
location: /aub/v2/api-docs?group=default
servicePath: /

3、启动项目,访问doc.html进行查看,效果图如下:

聚合效果:

在线调试: -

只需要简单的配置,就轻松的将Eureka注册中心的各个服务进行了聚合,是不是比Spring Cloud Gateway、Zuul更加简单和轻量呢?

关于Eureka的更多配置需要开发者参考文档

- - +

只需要简单的配置,就轻松的将Eureka注册中心的各个服务进行了聚合,是不是比Spring Cloud Gateway、Zuul更加简单和轻量呢?

关于Eureka的更多配置需要开发者参考文档

+ + diff --git a/knife4j-doc/gitee/docs/action/aggregation-nacos.html b/knife4j-doc/gitee/docs/action/aggregation-nacos.html index 98171b252..86a9535e1 100644 --- a/knife4j-doc/gitee/docs/action/aggregation-nacos.html +++ b/knife4j-doc/gitee/docs/action/aggregation-nacos.html @@ -10,26 +10,26 @@ - -4.4 Nacos注册中心聚合OpenAPI文档 | Knife4j - - +4.4 Nacos注册中心聚合OpenAPI文档 | Knife4j + +
-

4.4 Nacos注册中心聚合OpenAPI文档

Nacos的配置和Eureka几乎一模一样,唯一不同的区别是在yml进行配置的时候,使用的是knife4j.nacos开头,其他基本都是一样

关于Nacos的更多配置需要开发者参考文档

+ + diff --git a/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-guid.html b/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-guid.html index a2524afe8..db95a2ad0 100644 --- a/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-guid.html +++ b/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-guid.html @@ -10,26 +10,26 @@ - -5.2 .NET Core直接集成Knife4j | Knife4j - - +5.2 .NET Core直接集成Knife4j | Knife4j + +
-

5.2 .NET Core直接集成Knife4j

IGeekFan.AspNetCore.Knife4jUI

一个swagger ui 库:knife4j UI,支持 .NET Core3.0+或.NET Standard2.0。

nuget stats GitHub license

相关依赖项

knife4j

  • knife4j-vue-v3(不是vue3,而是swagger-ui-v3版本)

Swashbuckle.AspNetCore

  • Swashbuckle.AspNetCore.Swagger
  • Swashbuckle.AspNetCore.SwaggerGen

Demo

📚 快速开始

🚀安装包

以下为使用Swashbuckle.AspNetCore.Swagger底层组件

1.Install the standard Nuget package into your ASP.NET Core application.

Package Manager : 

Install-Package Swashbuckle.AspNetCore.Swagger
Install-Package Swashbuckle.AspNetCore.SwaggerGen
Install-Package IGeekFan.AspNetCore.Knife4jUI

OR

CLI :

dotnet add package Swashbuckle.AspNetCore.Swagger
dotnet add package Swashbuckle.AspNetCore.SwaggerGen
dotnet add package IGeekFan.AspNetCore.Knife4jUI

2.In the ConfigureServices method of Startup.cs, register the Swagger generator, defining one or more Swagger documents.

using Microsoft.AspNetCore.Mvc.Controllers
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using IGeekFan.AspNetCore.Knife4jUI;

🚁 ConfigureServices

3.服务配置,CustomOperationIds和AddServer是必须的。

   services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1",new OpenApiInfo{Title = "API V1",Version = "v1"});
c.AddServer(new OpenApiServer()
{
Url = "",
Description = "vvv"
});
c.CustomOperationIds(apiDesc =>
{
var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor;
return controllerAction.ControllerName+"-"+controllerAction.ActionName;
});
});

💪 Configure

  1. 中间件配置
app.UseSwagger();

app.UseKnife4UI(c =>
{
c.RoutePrefix = ""; // serve the UI at root
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
});

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapSwagger("{documentName}/api-docs");
});

5.更多功能

为文档添加注释 在项目上右键--属性--生成

在AddSwaggerGen方法中添加如下代码

c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "SwaggerDemo.xml"),true);

最后一个参数设置为true,代表启用控制器上的注释

运行后如看不到控制器上注释显示,请点开文档管理->个性化设置,开启分组tag显示description说明属性

NSwag.AspNetCore

(请参考目录test/WebSites/NSwag.Swagger.Knife4jUI)

public void ConfigureServices(IServiceCollection services)
{
// 其它Service
services.AddOpenApiDocument();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// 其它 Use
app.UseOpenApi();
app.UseKnife4UI(c =>
{
c.RoutePrefix = "";
c.SwaggerEndpoint("/swagger/v1/swagger.json");
});
}

即可使用 Knife4jUI

🔎 效果图

运行项目,打开 https://localhost:5001/index.html#/home

https://pic.downk.cc/item/5f2fa77b14195aa594ccbedc.jpg

更多配置请参考

更多项目

+ + diff --git a/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-how.html b/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-how.html index e4de11910..def8db273 100644 --- a/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-how.html +++ b/knife4j-doc/gitee/docs/action/dotnetcore-knife4j-how.html @@ -10,28 +10,28 @@ - -5.1 Knife4j+.NET Core封装过程 | Knife4j - - +5.1 Knife4j+.NET Core封装过程 | Knife4j + +
-

5.1 Knife4j+.NET Core封装过程

支持 .NET Core3.0+或.NET Standard2.0。

knife4j UI ,实现swagger的规范,本文介绍如何将他集成到.NET Core中。

概念对应关系如下

功能c#java
实现swagger规范Swashbuckle.AspNetCorespring-fox
封装成nuget包/maven包的UI库Swashbuckle.AspNetCore.SwaggerUIknife4j-v3-spring-ui
UI库swagger-ui-distknife4j-vue-v3(swagger v3版本)

注意

swagger v2和v3版本不一样,我只实现了swagger v3版本的封装。

源码下载

Swashbuckle.AspNetCore.SwaggerUI。

通过中间件SwaggerUI中间件Middleware,Invoke方法中,替换了Index.html中的%(DocumentTitle) %(HeadContent),%(ConfigObject)等等 。

private readonly SwaggerUIOptions _options;
//xxx

public async Task Invoke(HttpContext httpContext)
{
//xxx
if (httpMethod == "GET" && Regex.IsMatch(path, $"^/{Regex.Escape(_options.RoutePrefix)}/?index.html$"))
{
await RespondWithIndexHtml(httpContext.Response);
return;
}
//xxx
}

private async Task RespondWithIndexHtml(HttpResponse response)
{
response.StatusCode = 200;
response.ContentType = "text/html;charset=utf-8";

using (var stream = _options.IndexStream())
{
// Inject arguments before writing to response
var htmlBuilder = new StringBuilder(new StreamReader(stream).ReadToEnd());
foreach (var entry in GetIndexArguments())
{
htmlBuilder.Replace(entry.Key, entry.Value);
}

await response.WriteAsync(htmlBuilder.ToString(), Encoding.UTF8);
}
}

private IDictionary<string, string> GetIndexArguments()
{
return new Dictionary<string, string>()
{
{ "%(DocumentTitle)", _options.DocumentTitle },
{ "%(HeadContent)", _options.HeadContent },
{ "%(ConfigObject)", JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions) },
{ "%(OAuthConfigObject)", JsonSerializer.Serialize(_options.OAuthConfigObject, _jsonSerializerOptions) }
};
}

在index.html中。

<title>%(DocumentTitle)</title>
var configObject = JSON.parse('%(ConfigObject)');
var oauthConfigObject = JSON.parse('%(OAuthConfigObject)');

当我们写的aspnetcore项目集成swagger组件后,只会有一个ajax的异步请求

knife4j-v3-spring-ui

效果(2.X版):http://knife4j.xiaominfo.com/doc.html

由于官方也没有v3的demo,我们可以暂时通过v2分析,发现他有3个异步请求,有一个请求返回相似的。另一个则是swagger的配置项,可以发现,返回值与SwaggerUIOptions一致。

功能c# (swagger v3)java(swagger v2)
获取分组配置/swagger-resources
swagger配置项/swagger-resources/configuration/ui
api文档https://api.igeekfan.cn/swagger/v1/swagger.json/v2/api-docs?group=2.X版本

结构如下。

[
{
"name":"2.X版本",
"url":"/v2/api-docs?group=2.X版本",
"swaggerVersion":"2.0",
"location":"/v2/api-docs?group=2.X版本"
},
{
"name":"分组接口",
"url":"/v2/api-docs?group=分组接口",
"swaggerVersion":"2.0",
"location":"/v2/api-docs?group=分组接口"
},
{
"name":"默认接口",
"url":"/v2/api-docs?group=默认接口",
"swaggerVersion":"2.0",
"location":"/v2/api-docs?group=默认接口"
}
]
{
"deepLinking":true,
"displayOperationId":false,
"defaultModelsExpandDepth":1,
"defaultModelExpandDepth":1,
"defaultModelRendering":"example",
"displayRequestDuration":false,
"docExpansion":"none",
"filter":false,
"operationsSorter":"alpha",
"showExtensions":false,
"tagsSorter":"alpha",
"validatorUrl":"",
"apisSorter":"alpha",
"jsonEditor":false,
"showRequestHeaders":false,
"supportedSubmitMethods":[
"get",
"put",
"post",
"delete",
"options",
"head",
"patch",
"trace"
]
}

接下来我们看下knife4j,可以看到,他有knife4j-vue-v3项目,这个是swagger v3版本的vue实现。

我们打开knife4j-vue-v3项目,修改配置项vue.config.js,devServer 反向代理的地址(后台地址)

proxy: {
"/": {
target: 'http://localhost:5000/',
ws: true,
changeOrigin: true
}
}

安装依赖,并运行他

yarn install
yarn serve

我们会看到一个请求错误。Knife4j文档请求异常,因为后台并没有:'/v3/api-docs/swagger-config'。

也就是上文中的/swagger-resources/configuration/ui,我们可以在SwaggerUIMiddleware中间件获取这些参数,原本是通过替换字符串,现在,我们可以写一个api。怎么写呢。

下载Swashbuckle.AspNetCore的源码,打开Swashbuckle.AspNetCore.sln。

我们尝试修改Swashbuckle.AspNetCore.SwaggerUI项目中,SwaggerUIMiddleware中的源码。

Invoke方法增加如下处理,将配置项直接返回json串。

if (httpMethod == "GET" && Regex.IsMatch(path, $"^/v3/api-docs/swagger-config$"))
{
await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));
return;
}

在swagger v3 版本中,/v3/api-docs/swagger-config,返回了分组信息,urls字段。 -image

效果如下

image

设置test/WebSites/Basic项目为启动项目,运行后,打开了http://localhost:5000/index.html,这个还是原本的swagger ui,我们打开http://localhost:8080/#/home,前台依旧提示有问题。

AddSwaggerGen 需要增加Server,前台判断有BUG,非空。

image

servers.length得到的是0,问号表达式就会执行后面的servers[0].url,

临时方案

services.AddSwaggerGen(c =>
{

c.AddServer(new OpenApiServer()
{
Url = "",
Description = "v1"
});
});

但还有一个问题,前台根据operationId生成的路由, [HttpPost(Name = "CreateProduct")]比如CreateProduct。有些没有设置 Name的,点击后就会出现空白界面。

增加CustomOperationIds的配置,通过反射获取方法名。

services.AddSwaggerGen(c =>
{
//xx
c.CustomOperationIds(apiDesc =>
{
return apiDesc.TryGetMethodInfo(out MethodInfo methodInfo) ? methodInfo.Name : null;
});
});

解决了这些问题。

我们创建一个新类库,起名IGeekFan.AspNetCore.Knife4jUI

将前端打包。修改打包文件配置,vue.config.js

assetsDir: "knife4j",
indexPath: "index.html"

打包

yarn run build

复制到根目录,设置为嵌入文件,删除不需要的images和txt文本。

<ItemGroup>
<EmbeddedResource Include="knife4j/**/*" />
<EmbeddedResource Include="favicon.ico" />
<EmbeddedResource Include="index.html" />
</ItemGroup>

将后台Swashbuckle.AspNetCore.SwaggerUI的代码复制过来,全部重命名。比如中间件名字为

SwaggerUIMiddleware -> Knife4jUIMiddleware。即SwaggerUI都改成Knife4jUI。

Knife4jUIMiddleware修改位置

private const string EmbeddedFileNamespace = "IGeekFan.AspNetCore.Knife4jUI";

删除无用的替换变量,增加

Knife4UIOptions 修改

public Func<Stream> IndexStream { get; set; } = () => typeof(Knife4UIOptions).GetTypeInfo().Assembly
.GetManifestResourceStream("IGeekFan.AspNetCore.Knife4jUI.index.html");

Startup 中的Configure中间件

将UseSwaggerUI()改成UseKnife4UI()

app.UseKnife4UI(c =>
{
c.RoutePrefix = ""; // serve the UI at root
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
c.SwaggerEndpoint("/gp/api-docs", "登录模块");
});

不用IGeekFan.AspNetCore.Knife4jUI也能实现?

当然,可以。可以看这个demohttps://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo

我们也能通过其他方式,在SwaggerUI的基础上,替换比如替换Index.html页面,自己打包前端UI,复制到项目中等。

将knife4j-vue-v3项目打包,放到wwwwroot目录中。

需要配置静态文件。

    app.UseStaticFiles();
app.UseSwaggerUI(c =>
{
c.RoutePrefix = ""; // serve the UI at root
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");//这个配置无效。
c.IndexStream = () => new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")).GetFileInfo("index.html").CreateReadStream();
});

重写/v3/api-docs/swagger-config路由

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapSwagger("{documentName}/api-docs");
endpoints.MapGet("/v3/api-docs/swagger-config", async (httpContext) =>
{

JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions();
_jsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
_jsonSerializerOptions.IgnoreNullValues = true;
_jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false));

SwaggerUIOptions _options = new SwaggerUIOptions()
{
ConfigObject = new ConfigObject()
{
Urls = new List<UrlDescriptor>
{
new UrlDescriptor()
{
Url="/v1/api-docs",
Name="V1 Docs"
}
}
}
};

await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));
});
});
- - +image

效果如下

image

设置test/WebSites/Basic项目为启动项目,运行后,打开了http://localhost:5000/index.html,这个还是原本的swagger ui,我们打开http://localhost:8080/#/home,前台依旧提示有问题。

AddSwaggerGen 需要增加Server,前台判断有BUG,非空。

image

servers.length得到的是0,问号表达式就会执行后面的servers[0].url,

临时方案

services.AddSwaggerGen(c =>
{

c.AddServer(new OpenApiServer()
{
Url = "",
Description = "v1"
});
});

但还有一个问题,前台根据operationId生成的路由, [HttpPost(Name = "CreateProduct")]比如CreateProduct。有些没有设置 Name的,点击后就会出现空白界面。

增加CustomOperationIds的配置,通过反射获取方法名。

services.AddSwaggerGen(c =>
{
//xx
c.CustomOperationIds(apiDesc =>
{
return apiDesc.TryGetMethodInfo(out MethodInfo methodInfo) ? methodInfo.Name : null;
});
});

解决了这些问题。

我们创建一个新类库,起名IGeekFan.AspNetCore.Knife4jUI

将前端打包。修改打包文件配置,vue.config.js

assetsDir: "knife4j",
indexPath: "index.html"

打包

yarn run build

复制到根目录,设置为嵌入文件,删除不需要的images和txt文本。

<ItemGroup>
<EmbeddedResource Include="knife4j/**/*" />
<EmbeddedResource Include="favicon.ico" />
<EmbeddedResource Include="index.html" />
</ItemGroup>

将后台Swashbuckle.AspNetCore.SwaggerUI的代码复制过来,全部重命名。比如中间件名字为

SwaggerUIMiddleware -> Knife4jUIMiddleware。即SwaggerUI都改成Knife4jUI。

Knife4jUIMiddleware修改位置

private const string EmbeddedFileNamespace = "IGeekFan.AspNetCore.Knife4jUI";

删除无用的替换变量,增加

Knife4UIOptions 修改

public Func<Stream> IndexStream { get; set; } = () => typeof(Knife4UIOptions).GetTypeInfo().Assembly
.GetManifestResourceStream("IGeekFan.AspNetCore.Knife4jUI.index.html");

Startup 中的Configure中间件

将UseSwaggerUI()改成UseKnife4UI()

app.UseKnife4UI(c =>
{
c.RoutePrefix = ""; // serve the UI at root
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
c.SwaggerEndpoint("/gp/api-docs", "登录模块");
});

不用IGeekFan.AspNetCore.Knife4jUI也能实现?

当然,可以。可以看这个demohttps://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI/tree/master/samples/SwaggerUI_IndexStream_Knife4jUI_Demo

我们也能通过其他方式,在SwaggerUI的基础上,替换比如替换Index.html页面,自己打包前端UI,复制到项目中等。

将knife4j-vue-v3项目打包,放到wwwwroot目录中。

需要配置静态文件。

    app.UseStaticFiles();
app.UseSwaggerUI(c =>
{
c.RoutePrefix = ""; // serve the UI at root
c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");//这个配置无效。
c.IndexStream = () => new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")).GetFileInfo("index.html").CreateReadStream();
});

重写/v3/api-docs/swagger-config路由

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapSwagger("{documentName}/api-docs");
endpoints.MapGet("/v3/api-docs/swagger-config", async (httpContext) =>
{

JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions();
_jsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
_jsonSerializerOptions.IgnoreNullValues = true;
_jsonSerializerOptions.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false));

SwaggerUIOptions _options = new SwaggerUIOptions()
{
ConfigObject = new ConfigObject()
{
Urls = new List<UrlDescriptor>
{
new UrlDescriptor()
{
Url="/v1/api-docs",
Name="V1 Docs"
}
}
}
};

await httpContext.Response.WriteAsync(JsonSerializer.Serialize(_options.ConfigObject, _jsonSerializerOptions));
});
});
+ + diff --git a/knife4j-doc/gitee/docs/action/mavenbom.html b/knife4j-doc/gitee/docs/action/mavenbom.html index e493c6c7c..4c03c9f4d 100644 --- a/knife4j-doc/gitee/docs/action/mavenbom.html +++ b/knife4j-doc/gitee/docs/action/mavenbom.html @@ -10,26 +10,26 @@ - -1.1 基于Maven Bom方式使用 | Knife4j - - +1.1 基于Maven Bom方式使用 | Knife4j + +
-

1.1 基于Maven Bom方式使用

温馨提醒

该方式自2.0.2版本才提供,在knife4j以前的版本中没有knife4j-dependencies模块,开发者在使用的时候需要注意

knife4j2.0.2版本中提供了knife4j-dependencies模块,该模块是对knife4j所使用的jar包进行管理,开发者如果想以maven bom的方式使用knife4j,可以引用该jar包,避免版本冲突

在Maven项目的pom.xml文件中引入该依赖,如下:

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-dependencies</artifactId>
<!--在引用时请在maven中央仓库搜索2.X最新版本号-->
<version>2.0.9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

导入以上配置后,在maven的dependencies节点中就可以直接引用knife4j提供的模块,无需指定版本号,如下:

在Spring Boot项目中引入knife4j-spring-boot-starter模块

<dependencies>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
</dependencies>
+ + diff --git a/knife4j-doc/gitee/docs/action/oauth2-authorization_code.html b/knife4j-doc/gitee/docs/action/oauth2-authorization_code.html index ec206c4ce..871c334b2 100644 --- a/knife4j-doc/gitee/docs/action/oauth2-authorization_code.html +++ b/knife4j-doc/gitee/docs/action/oauth2-authorization_code.html @@ -10,26 +10,26 @@ - -3.2 授权码模式(authorization_code) | Knife4j - - +3.2 授权码模式(authorization_code) | Knife4j + +
-

3.2 授权码模式(authorization_code)

以Spring Security为例,为了达到快速演示效果,授权服务器和资源服务器都在同一个工程中

完整代码示例请参考knife4j-spring-oauth2-authorization_code

授权码模式需要服务端配置Knife4j的回调地址webjars/oauth/oauth2.html

部分示例代码:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//授权码模式(authorization code)
clients.inMemory()
.withClient("app1").secret(noOpPasswordEncoder.encode("123"))
.authorizedGrantTypes("authorization_code")
.redirectUris(
"http://localhost:18010/webjars/oauth/oauth2.html")
.scopes("read","write","reads","writes");
}

创建Docket对象时,设置OAuth2的授权类型,示例代码如下:

查看详细代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {

@Bean
public Docket productApi() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//授权码模式AuthorizationCodeGrant
TokenRequestEndpoint tokenRequestEndpoint=new TokenRequestEndpoint("http://localhost:18010/oauth/authorize","app1","123");
TokenEndpoint tokenEndpoint=new TokenEndpoint("http://localhost:18010/oauth/token","access_token");
AuthorizationCodeGrant authorizationCodeGrant=new AuthorizationCodeGrant(tokenRequestEndpoint,tokenEndpoint);
grantTypes.add(authorizationCodeGrant);
OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read resources"));
scopes.add(new AuthorizationScope("write","write resources"));
scopes.add(new AuthorizationScope("reads","read all resources"));
scopes.add(new AuthorizationScope("writes","write all resources"));

SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=Lists.newArrayList(securityContext);
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts)
.securitySchemes(securitySchemes)
.apiInfo(apiInfo());


}



private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")
.termsOfServiceUrl("https://doc.xiaominfo.com")
.contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))
.license("Open Source")
.licenseUrl("\"https://www.apache.org/licenses/LICENSE-2.0")
.version("1.0.0")
.build();

}


}

最终呈现界面如下:

输入我们在配置文件中定义的clientId及clientSecret,然后点击Authorize按钮,最终跳转授权界面,如下图:

此时,选择进行授权即可

授权完成后,测试我们再我们的接口中,就会看到我们的参数Authorization值已经更新了,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/action/oauth2-client_credentials.html b/knife4j-doc/gitee/docs/action/oauth2-client_credentials.html index a018e830f..c6922f174 100644 --- a/knife4j-doc/gitee/docs/action/oauth2-client_credentials.html +++ b/knife4j-doc/gitee/docs/action/oauth2-client_credentials.html @@ -10,26 +10,26 @@ - -3.3 客户端模式(client_credentials) | Knife4j - - +3.3 客户端模式(client_credentials) | Knife4j + +
-

3.3 客户端模式(client_credentials)

以Spring Security为例,为了达到快速演示效果,授权服务器和资源服务器都在同一个工程中

完整代码示例请参考knife4j-spring-oauth2-client_credentials

部分示例代码:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//客户端模式(client credentials)
clients.inMemory()
.withClient("app1").secret(noOpPasswordEncoder.encode("123"))
.authorizedGrantTypes("client_credentials")
.scopes("read","write","reads","writes");
}

创建Docket对象时,设置OAuth2的授权类型,示例代码如下:

查看详细代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {

@Bean
public Docket productApi() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//客户端模式(client credentials)
String clientTokenUrl="http://localhost:18010/oauth/token";
ClientCredentialsGrant clientCredentialsGrant=new ClientCredentialsGrant(clientTokenUrl);
grantTypes.add(clientCredentialsGrant);
OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read resources"));
scopes.add(new AuthorizationScope("write","write resources"));
scopes.add(new AuthorizationScope("reads","read all resources"));
scopes.add(new AuthorizationScope("writes","write all resources"));

SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=Lists.newArrayList(securityContext);
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts)
.securitySchemes(securitySchemes)
.apiInfo(apiInfo());


}



private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")
.termsOfServiceUrl("https://doc.xiaominfo.com")
.contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))
.license("Open Source")
.licenseUrl("\"https://www.apache.org/licenses/LICENSE-2.0")
.version("1.0.0")
.build();

}


}

最终呈现界面如下:

输入clientId以及clientSecret,然后点击Authorize按钮进行授权即可

授权完成后,测试我们再我们的接口中,就会看到我们的参数Authorization值已经更新了,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/action/oauth2-implicit.html b/knife4j-doc/gitee/docs/action/oauth2-implicit.html index 79d9ce3f2..546cf1a23 100644 --- a/knife4j-doc/gitee/docs/action/oauth2-implicit.html +++ b/knife4j-doc/gitee/docs/action/oauth2-implicit.html @@ -10,26 +10,26 @@ - -3.1 简化模式(implicit) | Knife4j - - +3.1 简化模式(implicit) | Knife4j + +
-

3.1 简化模式(implicit)

以Spring Security为例,为了达到快速演示效果,授权服务器和资源服务器都在同一个工程中

完整代码示例请参考knife4j-spring-oauth2-implicit

简化模式需要服务端配置Knife4j的回调地址webjars/oauth/oauth2.html

部分示例代码:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//简化模式(implicit)
clients.inMemory()
.withClient("app1").secret(noOpPasswordEncoder.encode("123"))
.authorizedGrantTypes("implicit")
.redirectUris(
"http://localhost:18010/webjars/oauth/oauth2.html")
.scopes("read","write","reads","writes");
}

创建Docket对象时,设置OAuth2的授权类型,示例代码如下:

查看详细代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {

@Bean
public Docket productApi() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//简单模式implicit
ImplicitGrant implicitGrant=new ImplicitGrant(new LoginEndpoint("http://localhost:18010/oauth/authorize"),"access_token");
grantTypes.add(implicitGrant);
OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read resources"));
scopes.add(new AuthorizationScope("write","write resources"));
scopes.add(new AuthorizationScope("reads","read all resources"));
scopes.add(new AuthorizationScope("writes","write all resources"));

SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=Lists.newArrayList(securityContext);
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts)
.securitySchemes(securitySchemes)
.apiInfo(apiInfo());


}



private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")
.termsOfServiceUrl("https://doc.xiaominfo.com")
.contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))
.license("Open Source")
.licenseUrl("\"https://www.apache.org/licenses/LICENSE-2.0")
.version("1.0.0")
.build();

}


}

最终呈现界面如下:

输入clientId,然后点击Authorize按钮,最终跳转授权界面,如下图:

此时,选择进行授权即可

授权完成后,测试我们再我们的接口中,就会看到我们的参数Authorization值已经更新了,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/action/oauth2-password.html b/knife4j-doc/gitee/docs/action/oauth2-password.html index a9bb3e15e..b483ed64c 100644 --- a/knife4j-doc/gitee/docs/action/oauth2-password.html +++ b/knife4j-doc/gitee/docs/action/oauth2-password.html @@ -10,26 +10,26 @@ - -3.4 密码模式(password) | Knife4j - - +3.4 密码模式(password) | Knife4j + +
-

3.4 密码模式(password)

以Spring Security为例,为了达到快速演示效果,授权服务器和资源服务器都在同一个工程中

完整代码示例请参考knife4j-spring-oauth2-password

部分示例代码:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//密码模式(resource owner password credentials)
clients.inMemory()
.withClient("app1").secret(noOpPasswordEncoder.encode("123"))
.authorizedGrantTypes("password")
.scopes("read","write","reads","writes");
}

创建Docket对象时,设置OAuth2的授权类型,示例代码如下:

查看详细代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {

@Bean
public Docket productApi() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//密码模式
String passwordTokenUrl="http://localhost:18010/oauth/token";
ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl);
grantTypes.add(resourceOwnerPasswordCredentialsGrant);
OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read resources"));
scopes.add(new AuthorizationScope("write","write resources"));
scopes.add(new AuthorizationScope("reads","read all resources"));
scopes.add(new AuthorizationScope("writes","write all resources"));

SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(Lists.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=Lists.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=Lists.newArrayList(securityContext);
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.oauth2.web"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts)
.securitySchemes(securitySchemes)
.apiInfo(apiInfo());


}



private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("knife4j-oauth2-demo").description("")
.termsOfServiceUrl("https://doc.xiaominfo.com")
.contact(new Contact("Developers", "https://gitee.com/xiaoym/knife4j", ""))
.license("Open Source")
.licenseUrl("\"https://www.apache.org/licenses/LICENSE-2.0")
.version("1.0.0")
.build();

}


}

最终呈现界面如下:

输入username,password,clientId以及clientSecret,然后点击Authorize按钮进行授权即可

授权完成后,测试我们再我们的接口中,就会看到我们的参数Authorization值已经更新了,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/action/others/doc-search.html b/knife4j-doc/gitee/docs/action/others/doc-search.html new file mode 100644 index 000000000..ecb2b5830 --- /dev/null +++ b/knife4j-doc/gitee/docs/action/others/doc-search.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + +Final.激活Knife4j官网的文档搜索功能 | Knife4j + + + + +
+

Final.激活Knife4j官网的文档搜索功能

1.前言

在很早之前,Knife4j的官网文档就通过docusaurus进行了重构,在网上找了一个自己还算满意的模板,将所有的Knife4j的Markdown文档进行了重新梳理改造。

image-20230531084614527

但是后面有一段时间,也是自己懒的原因,文档中的搜索功能一直不可用。每天都会收到搜索的统计结果报告,提示的都是在搜索的请求中,未匹配结果的概率始终100%

image-20230531084806837

看的也是相当难受,这两天终于投入了时间,决心解决这个问题。

2.Algolia

Knife4j的官网搜索主要集成了Algolia来提供搜索服务,因为docusaurus纯天然支持Algolia来集成文档搜索服务,如果用过Algolia的服务的朋友可能知道,如果你的网站文档是开源项目,那么是可以提交申请来获取免费服务的,主要条件:

  • 必须是文档网站的 所有者,网站必须是 公开的
  • 网站内容必须是 开源项目的技术文档技术博客
  • 网站申请服务时必须有 完整稳定的设计和内容,即确认网站做好生产准备。

2.1 自动爬虫索引数据

申请链接地址:https://docsearch.algolia.com/apply/

image-20230531085415798

但你提交了申请,并且官方社区审核通过后,你会收到邮件,按邮件的内容进行回复就可以了。

image-20230531085636057

但我们把所有的工作流程准备就绪后,我们就可以前往Algolia管理自己的后台数据了,主要步骤:

步骤一、登录到Algolia里面的控制台

image-20230531085907655

步骤二、可以查看当前自己的Application应用的Plan类别,如下:

Plan类别是DOCSEARCH类型的应用,代表我们可以免费使用Algolia的爬虫服务,会自动爬取我们的网站文档进行索引

如果是FREE类别,则没有这种服务,你也登录不了Algolia的爬虫后台

image-20230531090727879

步骤三、点击Search后,即可查看该文档页面的Index数据集

image-20230531090016683

这里Index有数据是核心和关键,如果你的搜索服务不可用,首先要确认一下该Index中是否有数据,或者你文档中配置的搜索配置信息是否正确。

第三,确认自己的爬虫后台是否有问题,登录到Algolia的爬虫后台,地址:https://crawler.algolia.com/admin/crawlers

确认右侧Indices中有数据才正常

image-20230531090327502

因为Knife4j的DocSearch申请的已经有一段时间了,只是在搜索的时候一直无法展示结果(这让我也一直很困惑),所以,我们就可以使用docusaurus提供的官方algolia插件进行集成搜索

2.2 自己通过Algolia的爬虫送数据

Algolia除了通过DocSearch的方式进行申请,免费使用Algolia的爬虫服务,如果有一些特殊原因,或者最终没有被Algolia的官方社区审核通过,那么也是可以使用Algolia的搜索服务的,可以自己注册Algolia的后台,然后创建Application(应用)

创建应用后,就可以通过Algolia提供的爬虫程序(离线工具)自己设置爬虫规则,将爬取的数据送到Algolia控制台。

本文只介绍通过Docker镜像来运行爬虫的工具,其他方式可以参考官方文档:https://docsearch.algolia.com/docs/legacy/run-your-own

docker命令

docker run -it --env-file=.env algolia/docsearch-scraper

然后配置.env环境变量,主要有三个:

  • APPLICATION_ID:应用APPID,这个可以在Algolia的后台进行创建然后获取得到
  • API_KEY:密钥key,在Algolia的后台,可以创建API_KEY,也可以使用当前应用的AdminKey(ps:因为爬虫程序在你本机使用,没有人知道,所以用admin的key可以一步到位,避免一些权限问题会提示key无效或者无权限等问题的发生)
  • CONFIG: 目标网站的爬虫规则,详细规则参考文档:https://docsearch.algolia.com/docs/legacy/config-file

image-20230531093722644

Config示例如下:

{
"index_name": "knife4j",
"start_urls": [
"https://doc.xiaominfo.com/docs/middleware-sources",
"https://doc.xiaominfo.com/docs/oas",
"https://doc.xiaominfo.com/docs/action",
"https://doc.xiaominfo.com/docs/changelog",
"https://doc.xiaominfo.com/docs/faq",
"https://doc.xiaominfo.com/v2/"
],
"selectors": {
"lvl0": ".docMainContainer_gTbr header h1",
"lvl1": ".docMainContainer_gTbr article h1",
"lvl2": ".docMainContainer_gTbr article h2",
"lvl3": ".docMainContainer_gTbr article h3",
"lvl4": ".docMainContainer_gTbr article h4",
"lvl5": ".docMainContainer_gTbr article h5",
"text": ".docMainContainer_gTbr header p,.docMainContainer_gTbr section p,.docMainContainer_gTbr section ol"
}
}

几个重要的参数:

  • index_name:索引名称,这个是在algolia后台创建的
  • start_urls:目标文档网站的目标页
  • selectors:选择器规则,也就是告诉爬虫,你需要爬取的网页,最终通过选择器获取的类容规则,包括id选择器、类选择、标签选择器等等,如果你用过jQuery,看到这个规则应该会非常熟悉

当然还有更详细的规则,具体的可以参考文档进行配置即可。

最终运行docker命令爬虫效果如下:

image-20230531093833450

等我们的爬虫在本地运行完成后,我们就可以登录后台查看我们的记录是否成功,现在的records就是最终的文档记录数

image-20230531094244587

3.简单验证Algolia的数据结果&搜索

在上面的章节中我们介绍了怎么在Algolia进行索引数据,主要包括两种方式:

  • 官方提交DocSearch申请,通过Algolia提供的爬虫自动爬取我们的公开网站,需要审核
  • 自己运行Algolia的爬虫程序,离线将自己的网站索引数据送到Algolia中

这两种方式任何一种你都可以成功索引文档数据,如果在Algolia的控制台能看到数据,那么你可以通过下面一个小demo来验证搜索结果了,废话不多说,直接上html测试代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"/></pre></li>
</head>
<body>

<div id="test"></div>

<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script type="text/javascript">

docsearch({

appId:"替换为你自己的appid",


apiKey: "替换为你自己的apikey",

indexName: "替换为你自己的indexName",

container: '#test',

debug: false // Set debug to true if you want to inspect the modal

});

</script>
</body>
</html>

界面效果如下:

image-20230531095255948

代码中的appid、key需要替换为自己的,可以在Algolia后台获取:

image-20230531095409479

4.Docusaurus集成

前面已经提过,由于docusaurus官方提供了对Algolia的支持,所以万事俱备,只需要配置即可,在docusaurus.config.js配置文件中,直接配置appid、key就可以了

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({
// others....
algolia: {
appId: '3CRIMRK623',
apiKey: 'ae4f57f208e3c7749017e09582f0b8a4', // search only (public) API key
indexName: 'xiaominfo',
contextualSearch: false,
debug: true
},
}),

效果如下:

image-20230531095906380

docusaurus的搜索插件可以查看文档:https://docusaurus.io/zh-CN/docs/next/search

image-20230531091127138介绍的都是比较详细的,但是最值得注意的来了(这也是Knife4j在Algolia后台数据有了,就是死活搜索不出来)

最坑的就是这个上下文搜索参数:contextualSearch

由于该参数在Docusaurus的插件中默认开启,导致他会和上下文约束面过滤器 (contextual facet filters) 会和 algolia.searchParameters.facetFilters 合并配合使用,增加了一些不必要的过滤器,最终就会搜索没有结果

如果你没有该需求或者场景,那么需要给他关闭,配置修改contextualSearch参数为false

我也是对比了步骤3中通过一个简单的html集成查看Algolia请求参数的差异才发现这个区别,为啥Knife4j明明数据有了,就是搜索不出来。。。。。累了。。。。

5.最后

目前Knife4j的官网文档终于开启了搜索功能,希望能够帮助到使用Knife4j的同学更好的检索文档。

如果有对Algolia不明白的,可以加Knife4j的微信讨论群(关注微信公众号点击菜单获取群二维码)与作者沟通交流。

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/action/springboot.html b/knife4j-doc/gitee/docs/action/springboot.html index 16ebf8295..9d2681ca6 100644 --- a/knife4j-doc/gitee/docs/action/springboot.html +++ b/knife4j-doc/gitee/docs/action/springboot.html @@ -10,26 +10,26 @@ - -1.3 Spring Boot 框架集成Knife4j | Knife4j - - +1.3 Spring Boot 框架集成Knife4j | Knife4j + +
-

1.3 Spring Boot 框架集成Knife4j

本次示例使用Spring Boot作为脚手架来快速集成Knife4j,Spring Boot版本2.3.5.RELEASE,Knife4j版本2.0.7,完整代码可以去参考knife4j-spring-boot-fast-demo

pom.xml完整文件代码如下
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-fast-demo</artifactId>
<version>1.0</version>
<name>knife4j-spring-boot-fast-demo</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.9</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

第一步:在maven项目的pom.xml中引入Knife4j的依赖包,代码如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.9</version>
</dependency>

第二步:创建Swagger配置依赖,代码如下:

@Configuration
@EnableSwagger2WebMvc
public class Knife4jConfiguration {

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build())
//分组名称
.groupName("2.X版本")
.select()
//这里指定Controller扫描包路径
.apis(RequestHandlerSelectors.basePackage("com.github.xiaoymin.knife4j.controller"))
.paths(PathSelectors.any())
.build();
return docket;
}
}

最終整个工程目录结构如下图:

IndexController.java包含一个简单的RESTful接口,代码示例如下:

@Api(tags = "首页模块")
@RestController
public class IndexController {

@ApiImplicitParam(name = "name",value = "姓名",required = true)
@ApiOperation(value = "向客人问好")
@GetMapping("/sayHi")
public ResponseEntity<String> sayHi(@RequestParam(value = "name")String name){
return ResponseEntity.ok("Hi:"+name);
}
}

此时,启动Spring Boot工程,在浏览器中访问:http://localhost:17790/doc.html

界面效果图如下:

+ + diff --git a/knife4j-doc/gitee/docs/action/springcloud-gateway.html b/knife4j-doc/gitee/docs/action/springcloud-gateway.html index e4a6b1cf2..a9d9dad2a 100644 --- a/knife4j-doc/gitee/docs/action/springcloud-gateway.html +++ b/knife4j-doc/gitee/docs/action/springcloud-gateway.html @@ -10,26 +10,26 @@ - -2.1 Spring Cloud Gateway集成Knife4j | Knife4j - - +2.1 Spring Cloud Gateway集成Knife4j | Knife4j + +
-

2.1 Spring Cloud Gateway集成Knife4j

本篇博客主要讲解通过knife4j项目如何集成Spring Cloud Gateway网关,通过网关聚合所有的Swagger微服务文档

源码地址请参考:knife4j-spring-cloud-gateway

整体项目结构如下:

|-knife4j-spring-cloud-gateway
|-----service-doc //文档聚合中心,是所有微服务文档的出口
|-----service-order //订单服务,包含所有与订单业务模块相关的接口
|-----service-server //eureka 注册中心
|-----service-user //用户服务,包含所有的用户接口

2.1.1 eureka注册中心

注册中心几乎没有代码,只是在pom.xml文件中引入了eureka服务的jar包

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>

项目的application.yml配置文件如下:

server:
port: 10000
eureka:
instance:
hostname: localhost
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
spring:
application:
name: knife4j-gateway-server

定义注册中心访问地址,端口号等属性

最后通过注解@EnableEurekaServer来启用注册中心

@EnableEurekaServer
@SpringBootApplication
public class ServiceServerApplication {


}

2.1.2 服务接口(订单order & 用户User)

由于服务接口订单和用户两个模块其实属性是差不多,只是接口不一样,因此就随便挑一个服务的配置来说吧

service-user:用户服务的接口

每个微服务只需要引入和swagger相关的后端jar包即可,不需要引入swagger的前端Ui包,knife4j为我们提供了微服务项的starter,供开发者使用

当然,作为子服务,还需要引入eureka-client的jar包,所以,pom.xml文件相关配置如下:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
</dependency>

项目的jar包引入完成后,接下来是配置swagger的相关配置,SwaggerConfiguration.java配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUi
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build();
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}


}

配置扫描目录包

通过@EnableSwagger2@EnableSwaggerBootstrapUi来开启swagger和增强特性

配置项目的application.yml文件,如下:

server:
port: 10001
spring:
application:
name: service-user
eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

指定注册中心地址即可

最后,启用eureka客户端

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {
}

当然,在服务的模块中还有和自己服务相关的业务接口(Controller代码),在这里就不列举了

订单模块(service-order)的代码配置和用户是类似的

2.1.3 文档聚合

有了eureka注册中心,服务模块的接口也已完成,最后一步是把我们所有的微服务都聚合到一个文档,统一输出到前端,供开发者调用了

2.1.3.1 pom引入相关jar包

service-doc也是一个eureka客户端,首先引入相关的jar包,pom.xml配置文件如下:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
  • spring-cloud-starter-netflix-eureka-client:eureka客户端
  • spring-cloud-starter-gateway:gateway网关
  • knife4j-spring-boot-starter:knife4j提供的前端ui和后端代码

另外,其实在文档这里,如果没有后端代码编写的话,仅仅引入一个swagger的前端ui模块也是可以的

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
</dependency>

2.1.3.2 application文件配置

配置我们的网关属性,路由规则等,application.yml配置文件如下:

server:
port: 10003
spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1


eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

logging:
level:
org.springframework:cloud.gateway: debug

2.1.3.3 文档聚合业务编码

在我们使用Spring Boot等单体架构集成swagger项目时,是通过对包路径进行业务分组,然后在前端进行不同模块的展示,而在微服务架构下,我们的一个服务就类似于原来我们写的一个业务组

springfox-swagger提供的分组接口是swagger-resource,返回的是分组接口名称、地址等信息

在Spring Cloud微服务架构下,我们需要重写该接口,主要是通过网关的注册中心动态发现所有的微服务文档,代码如下:

@Slf4j
@Component
@Primary
@AllArgsConstructor
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

private final RouteLocator routeLocator;
private final GatewayProperties gatewayProperties;


@Override
public List<SwaggerResource> get() {
List<SwaggerResource> resources = new ArrayList<>();
List<String> routes = new ArrayList<>();
routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {
route.getPredicates().stream()
.filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
.forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
.replace("**", "v2/api-docs"))));
});

return resources;
}

private SwaggerResource swaggerResource(String name, String location) {
log.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

接口:

@RestController
public class SwaggerHandler {

@Autowired(required = false)
private SecurityConfiguration securityConfiguration;

@Autowired(required = false)
private UiConfiguration uiConfiguration;

private final SwaggerResourcesProvider swaggerResources;

@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
this.swaggerResources = swaggerResources;
}


@GetMapping("/swagger-resources/configuration/security")
public Mono<ResponseEntity<SecurityConfiguration>> securityConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources/configuration/ui")
public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources")
public Mono<ResponseEntity> swaggerResources() {
return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));
}
}

2.1.3.4 启动配置

最后,项目启动类添加相关注解,代码如下:

@EnableDiscoveryClient
@EnableEurekaClient
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

2.1.4 文档展示

最后分别依次启动项目:

  • service-server
  • service-user
  • service-order
  • service-doc

打开文档地址:http://localhost:10003/doc.html

查看文档效果如下:

2.1.5 注意点

在集成Spring Cloud Gateway网关的时候,会出现没有basePath的情况(即定义的例如/user、/order等微服务的前缀),这个情况在使用zuul网关的时候不会出现此问题,因此,在Gateway网关需要添加一个Filter实体Bean,代码如下:

@Component
public class SwaggerHeaderFilter extends AbstractGatewayFilterFactory {
private static final String HEADER_NAME = "X-Forwarded-Prefix";

private static final String URI = "/v2/api-docs";

@Override
public GatewayFilter apply(Object config) {
return (exchange, chain) -> {
ServerHttpRequest request = exchange.getRequest();
String path = request.getURI().getPath();
if (!StringUtils.endsWithIgnoreCase(path,URI )) {
return chain.filter(exchange);
}
String basePath = path.substring(0, path.lastIndexOf(URI));
ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, basePath).build();
ServerWebExchange newExchange = exchange.mutate().request(newRequest).build();
return chain.filter(newExchange);
};
}
}

然后在配置文件指定这个filter

spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter //指定filter
- StripPrefix=1

特别注意:如果是高版本的Spring Cloud Gateway,那么yml配置文件中的SwaggerHeaderFilter配置应该去掉

+ + diff --git a/knife4j-doc/gitee/docs/action/springcloud-zuul.html b/knife4j-doc/gitee/docs/action/springcloud-zuul.html index e77d421a6..a291640ba 100644 --- a/knife4j-doc/gitee/docs/action/springcloud-zuul.html +++ b/knife4j-doc/gitee/docs/action/springcloud-zuul.html @@ -10,26 +10,26 @@ - -2.2 Spring Cloud Zuul集成Knife4j | Knife4j - - +2.2 Spring Cloud Zuul集成Knife4j | Knife4j + +
-

2.2 Spring Cloud Zuul集成Knife4j

在基于nginx配置的环节,其实我们已经可以利用nginx的配置,帮助我们聚合文档服务了,而通过代码的方式该如何实现?

在Spring Cloud微服务架构中,各个子服务都是分散的,每个服务集成了Swagger文档,但是接口对接时需要单独分别访问,很麻烦,效率低下,

而Zuul可以帮助我们解决此难题,将多个微服务的Swagger接口聚合到一个文档中,这样整个微服务架构下只会存在一个文档出口,统一文档口径

本文档只涉及如何整合Swagger及Zuul,其他相关知识点请自行搜索解决.

2.2.1 项目结构

整个项目结构如下:

swagger-bootstrap-ui-zuul
├── service-server -- eureka服务中心
├── service-order -- 微服务之一订单服务模块
├── service-user -- 微服务之一用户服务模块
├── service-doc -- 文档中心,整合微服务Swagger文档

eureka注册服务中心以及微服务模块Swagger的配置集成使用这里不过多骜述,和常规无异.

我们在eureka服务中心可以看到整个微服务模块,如下图:

2.2.2 微服务模块

订单、用户两个微服务模块配置没有什么区别,都是将自己的服务注册到eureka中,并且每个微服务都集成Swagger的配置

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {

static Logger logger= LoggerFactory.getLogger(ServiceUserApplication.class);
//...

}

此处需要注意的是Swagger的配置中,不需要设置groupName属性

Swagger配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build().securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}



private ApiKey apiKey() {
return new ApiKey("BearerToken", "Authorization", "header");
}
private ApiKey apiKey1() {
return new ApiKey("BearerToken1", "Authorization-x", "header");
}

private SecurityContext securityContext() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("/.*"))
.build();
}
private SecurityContext securityContext1() {
return SecurityContext.builder()
.securityReferences(defaultAuth1())
.forPaths(PathSelectors.regex("/.*"))
.build();
}

List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));
}
List<SecurityReference> defaultAuth1() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));
}

}

2.2.3 文档整合

service-doc模块是最终整合user、order两个微服务文档的统一文档出口,而本身也注册到eureka服务中心中.

@EnableDiscoveryClient
@EnableEurekaClient
@EnableZuulProxy
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

最后重写SwaggerResource,代码如下:

@Component
@Primary
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

Logger logger= LoggerFactory.getLogger(SwaggerResourceConfig.class);


@Autowired
RouteLocator routeLocator;

@Override
public List<SwaggerResource> get() {
//获取所有router
List<SwaggerResource> resources = new ArrayList<>();
List<Route> routes = routeLocator.getRoutes();
logger.info("Route Size:{}",routes.size());
for (Route route:routes) {
resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs")));
}
return resources;
}
private SwaggerResource swaggerResource(String name, String location) {
logger.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

最终效果如下:

2.2.4 示例源码

以上源码可参考swagger-bootstrap-ui-demo中的子项目swagger-bootstrap-ui-zuul

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox.html b/knife4j-doc/gitee/docs/action/springfox.html index 5f9a175a5..d5e175e0b 100644 --- a/knife4j-doc/gitee/docs/action/springfox.html +++ b/knife4j-doc/gitee/docs/action/springfox.html @@ -10,26 +10,26 @@ - -Springfox源码系列 | Knife4j - - +Springfox源码系列 | Knife4j + +
-

Springfox源码系列

最近闲来无事,之前在开发过程中一直在用到springfox来生成swagger的文档,但一直对springfox的源码尚未研究,所以决定对源码进行探究一番.

在这个浮躁的社会中,我们唯一能做到的就是做好自己。

springfox-swagger版本号:2.9.2

Github:https://github.com/springfox/springfox

官方文档:http://springfox.github.io/springfox/

目前的章节:

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox1.html b/knife4j-doc/gitee/docs/action/springfox/springfox1.html index df8540c46..57e873b6b 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox1.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox1.html @@ -10,26 +10,26 @@ - -springfox 源码分析(一) 程序入口 | Knife4j - - +springfox 源码分析(一) 程序入口 | Knife4j + +
-

springfox 源码分析(一) 程序入口

日期:2019-5-21 21:05:15

地点:家中

前言

最近也是闲来无事,加上对swagger-bootstrap-ui也已经发布了将近26个稳定版本了,想到很多以后更有趣的功能,从Java底层扩展插件的方式开发出让国人拥有更棒的文档体验,所以决定研究一下springfox的源码,看能否对自己有一些启发.开发一些有趣的功能呢.

关于springfox的使用这里不做过多的说明,可以自行搜索查看帮助文档,或者可以参考我提供的swagger-bootstrap-ui-demo进行swagger的集成示例.

在读springfox的源码之前,我们需要知道他具体的作用是什么?

我觉得有以下几点:

  • 对Spring的RestController、Controller接口进行包装,封装输出为Swagger规范中的path
  • 针对Rest接口涉及到的model进行解析,包括model的属性等
  • 满足文档分组的要求,解析tags

总结一句话就是:输出符合Swagger API规范的JSON格式

Swagger 规范

OpenAPI 2.0 规范可以参考官网地址:https://swagger.io/specification/v2/

先来看我们的Swagger规范文件包含哪些元素

{
"swagger": "2.0",
"info": {
"description": "<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>",
"version": "1.0",
"title": "swagger-bootstrap-ui很棒~~~!!!",
"termsOfService": "http://www.group.com/",
"contact": {
"name": "group@qq.com"
}
},
"host": "127.0.0.1:8999",
"basePath": "/",
"tags": [
{
"name": "1.8.2版本",
"description": "Api 182 Controller"
}
],
"paths": {
"/2/api/new187/postRequest": {
"post": {
"tags": [
"api-1871-controller"
],
"summary": "版本2-post请求参数Hidden属性是否生效",
"operationId": "postRequestUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "model187",
"description": "model187",
"required": true,
"schema": {
"originalRef": "Model187",
"$ref": "#/definitions/Model187"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "Rest«Model187»",
"$ref": "#/definitions/Rest«Model187»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"security": [
{
"BearerToken": [
"global"
]
},
{
"BearerToken1": [
"global"
]
}
],
"deprecated": false
}
}
},
"securityDefinitions": {
"BearerToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"definitions": {
"AInfoVo": {
"type": "object",
"required": [
"aId",
"bList"
],
"properties": {
"aId": {
"type": "string",
"description": "A记录主键"
},
"bList": {
"type": "object",
"description": "B信息Map, key为BInfoVo的主键pkId",
"additionalProperties": {
"originalRef": "BInfoVo",
"$ref": "#/definitions/BInfoVo"
}
}
},
"title": "AInfoVo",
"description": "A信息"
},
"ActInteger": {
"type": "object",
"properties": {
"doub1": {
"type": "number",
"format": "double",
"description": "double类型属性"
},
"float1": {
"type": "number",
"format": "float",
"description": "float类型属性"
},
"name": {
"type": "string"
},
"number": {
"type": "integer",
"format": "int64",
"description": "Long类型"
},
"price": {
"type": "number",
"description": "BigDecimal类型属性"
},
"sort": {
"type": "integer",
"format": "int32",
"description": "int类型"
}
},
"title": "ActInteger"
},
"Actor": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"deepOne": {
"originalRef": "DeepOne",
"$ref": "#/definitions/DeepOne"
},
"recipt": {
"originalRef": "Recipt",
"$ref": "#/definitions/Recipt"
},
"sort": {
"type": "integer",
"format": "int32"
}
},
"title": "Actor"
}
}
}

一个标准的Swagger接口规范可能类似上面的JSON文件,主要有以下属性:

  • swagger:当前swagger的版本号
  • info:文档的基础信息,包括描述信息,标题、作者、host等
  • tags:分组tag标志
  • paths:接口明细集合
  • securityDefinitions:权限信息
  • definitions:接口涉及到的Model类型定义

使用

我们对Swagger的规范定义有了一个初步的了解,所以,接下来,我们来查看springfox是如何来实现的

我们在使用springfox-swagger的时候主要有两步:

  • 创建Docket实例对象,并使用@Bean注解注入到Spring容器中
  • 在Swagger的配置类上添加@EnableSwagger2注解

开始

我们从springfox的使用文档上来看,也仅仅知道告诉我们开发人员,需要从@EnableSwagger2这个注解入手,来跟踪springfox的创建流程

但是我在看了该注解后,发现其实并不是这样,springfox源码中使用了大量的Spring的@Component注解进行实体bean的注入,所以要想找到各个类的依赖关系可以说是相当复杂,加上使用了Spring项目中并不怎么流行的spring-plugin组件,这更加增加了的阅读源码的难度,说实话,看过之后,已经留下了眼泪(这乱七八糟的什么玩意儿:( ).....

@EnableSwagger2

先来看EnableSwagger2注解的代码

package springfox.documentation.swagger2.annotations;

import org.springframework.context.annotation.Import;
import springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
* 配合Java配置注解@Configuration使用,启用Swagger的配置注解,使用@Import注解导入Swagger文档的Configuration配置初始化类
* @see springfox.documentation.spring.web.plugins.Docket
*/
@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
@Target(value = { java.lang.annotation.ElementType.TYPE })
@Documented
@Import({Swagger2DocumentationConfiguration.class})
public @interface EnableSwagger2 {
}

@EnableSwagger2注解只干一件事,导入Swagger2DocumentationConfiguration配置类

Swagger2DocumentationConfiguration

继续看Swagger2DocumentationConfiguration的代码

@Configuration
@Import({ SpringfoxWebMvcConfiguration.class, SwaggerCommonConfiguration.class })
@ComponentScan(basePackages = {
"springfox.documentation.swagger2.mappers"
})
@ConditionalOnWebApplication
public class Swagger2DocumentationConfiguration {
@Bean
public JacksonModuleRegistrar swagger2Module() {
return new Swagger2JacksonModule();
}

@Bean
public HandlerMapping swagger2ControllerMapping(
Environment environment,
DocumentationCache documentationCache,
ServiceModelToSwagger2Mapper mapper,
JsonSerializer jsonSerializer) {
return new PropertySourcedRequestMappingHandlerMapping(
environment,
new Swagger2Controller(environment, documentationCache, mapper, jsonSerializer));
}
}

从代码中,我们可以得知:

  • 注入JacksonModuleRegistrar实体bean到Spring容器中
  • 注入一个HandlerMapping实体Bean到Spring容器中,该接口就是我们经常所见的/v2/api-docs接口
  • 扫描springfox.documentation.swagger2.mappers包路径,进行实体bean的注入工作
  • 导入SpringfoxWebMvcConfigurationSwaggerCommonConfiguration配置类

既然知道了swagger提供接口代码所在,那么我就先来看看Swagger2Controller的风采


@Controller
@ApiIgnore
public class Swagger2Controller {

public static final String DEFAULT_URL = "/v2/api-docs";
private static final Logger LOGGER = LoggerFactory.getLogger(Swagger2Controller.class);
private static final String HAL_MEDIA_TYPE = "application/hal+json";

private final String hostNameOverride;
private final DocumentationCache documentationCache;
private final ServiceModelToSwagger2Mapper mapper;
private final JsonSerializer jsonSerializer;

@Autowired
public Swagger2Controller(
Environment environment,
DocumentationCache documentationCache,
ServiceModelToSwagger2Mapper mapper,
JsonSerializer jsonSerializer) {

this.hostNameOverride =
environment.getProperty(
"springfox.documentation.swagger.v2.host",
"DEFAULT");
this.documentationCache = documentationCache;
this.mapper = mapper;
this.jsonSerializer = jsonSerializer;
}

@RequestMapping(
value = DEFAULT_URL,
method = RequestMethod.GET,
produces = { APPLICATION_JSON_VALUE, HAL_MEDIA_TYPE })
@PropertySourcedMapping(
value = "${springfox.documentation.swagger.v2.path}",
propertyKey = "springfox.documentation.swagger.v2.path")
@ResponseBody
public ResponseEntity<Json> getDocumentation(
@RequestParam(value = "group", required = false) String swaggerGroup,
HttpServletRequest servletRequest) {

String groupName = Optional.fromNullable(swaggerGroup).or(Docket.DEFAULT_GROUP_NAME);
Documentation documentation = documentationCache.documentationByGroup(groupName);
if (documentation == null) {
LOGGER.warn("Unable to find specification for group {}", groupName);
return new ResponseEntity<Json>(HttpStatus.NOT_FOUND);
}
Swagger swagger = mapper.mapDocumentation(documentation);
UriComponents uriComponents = componentsFrom(servletRequest, swagger.getBasePath());
swagger.basePath(Strings.isNullOrEmpty(uriComponents.getPath()) ? "/" : uriComponents.getPath());
if (isNullOrEmpty(swagger.getHost())) {
swagger.host(hostName(uriComponents));
}
return new ResponseEntity<Json>(jsonSerializer.toJson(swagger), HttpStatus.OK);
}

private String hostName(UriComponents uriComponents) {
if ("DEFAULT".equals(hostNameOverride)) {
String host = uriComponents.getHost();
int port = uriComponents.getPort();
if (port > -1) {
return String.format("%s:%d", host, port);
}
return host;
}
return hostNameOverride;
}

从接口代码中,我们得知:

  • springfox为我们提供了一个默认的接口/v2/api-docs
  • 同时我们也应该知道,springfox的初始化工作不在这里,springfox在应用启动时已经初始化好相应的文档对象Documentation,而接口此处仅仅只是从缓存对象中获取而已

SpringfoxWebMvcConfiguration

通过名称,我们可能也猜到了一部分内容,这是和Spring的webmvc相关的配置类,来看具体代码:


@Configuration
@Import({ ModelsConfiguration.class })
@ComponentScan(basePackages = {
"springfox.documentation.spring.web.scanners",
"springfox.documentation.spring.web.readers.operation",
"springfox.documentation.spring.web.readers.parameter",
"springfox.documentation.spring.web.plugins",
"springfox.documentation.spring.web.paths"
})
@EnablePluginRegistries({ DocumentationPlugin.class,
ApiListingBuilderPlugin.class,
OperationBuilderPlugin.class,
ParameterBuilderPlugin.class,
ExpandedParameterBuilderPlugin.class,
ResourceGroupingStrategy.class,
OperationModelsProviderPlugin.class,
DefaultsProviderPlugin.class,
PathDecorator.class,
ApiListingScannerPlugin.class
})
public class SpringfoxWebMvcConfiguration {

@Bean
public Defaults defaults() {
return new Defaults();
}

@Bean
public DocumentationCache resourceGroupCache() {
return new DocumentationCache();
}

@Bean
public static ObjectMapperConfigurer objectMapperConfigurer() {
return new ObjectMapperConfigurer();
}

@Bean
public JsonSerializer jsonSerializer(List<JacksonModuleRegistrar> moduleRegistrars) {
return new JsonSerializer(moduleRegistrars);
}

@Bean
public DescriptionResolver descriptionResolver(Environment environment) {
return new DescriptionResolver(environment);
}

@Bean
public HandlerMethodResolver methodResolver(TypeResolver resolver) {
return new HandlerMethodResolver(resolver);
}

}

从代码中能知道:

  • 注入了文档缓存DocumentationCache实体bean
  • 注入了JSON序列化实体bean
  • 通过EnablePluginRegistries注解,开启Spring-Plugin组件的相关插件类,关于Spring-Plugin我们后面会说明
  • 扫描相关package路径
  • 导入ModelsConfiguration配置文件

来看ModelsConfiguration配置类有做了那些操作呢

@Configuration
@ComponentScan(basePackages = {
"springfox.documentation.schema"
})
@EnablePluginRegistries({
ModelBuilderPlugin.class,
ModelPropertyBuilderPlugin.class,
TypeNameProviderPlugin.class,
SyntheticModelProviderPlugin.class
})
public class ModelsConfiguration {
@Bean
public TypeResolver typeResolver() {
return new TypeResolver();
}
}

SpringfoxWebMvcConfiguration配置类行为相似,主要是:

  • 扫描springfox.documentation.schema进行实体bean的注入或者初始化工作
  • 通过EnablePluginRegistries插件开启注入相关插件的实体bean
  • 注入TypeResolver实体bean到Spring容器中

SwaggerCommonConfiguration

Swagger的公共配置类

@Configuration
@ComponentScan(basePackages = {
"springfox.documentation.swagger.schema",
"springfox.documentation.swagger.readers",
"springfox.documentation.swagger.web"
})
public class SwaggerCommonConfiguration {

}

主要是进行backpage包的扫描,注入到Spring的容器中初始化相关的操作

思维导图

或许通过一张思维导图,我们能对本小结有一个初步的印象,对@EnableSwagger2注解的做作用有一个初步的了解

总结就是两点:

  • 扫描package
  • 注入bean

总结

整个springfox的初始化工作如果我们从上面来看,那绝对是灾难.心中肯定会有诸多疑问:

  • 我们通过在外部创建Docket对象,提供诸如扫描接口包路径的方式进行文档分组,springfox何时初始化?
  • 分组的接口代码在哪儿?
  • 初始化的入口在哪儿?

这主要是因为Springfox使用Spring的@Component注解和ComponentScan扫描包导致的,让我们无从下手啊(累觉不爱)

带着这些疑问,我们继续往下看~~!

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox10.html b/knife4j-doc/gitee/docs/action/springfox/springfox10.html index 3ef2a9bb1..9f2994122 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox10.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox10.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十) 遍历接口获取Model对象 | Knife4j - - +springfox 源码分析(十) 遍历接口获取Model对象 | Knife4j + +
-

springfox 源码分析(十) 遍历接口获取Model对象

在上一篇中,我们了解到了springfox通过groupName的过滤,拿到了所有的接口,并且通过guava库的ArrayListMultimap对接口的Controller进一步进行了分组,接下来就是解析每个接口的操作了

这篇主要介绍springfox解析每个接口中涉及的Model类操作,这其中包含:

  • 参数中是Java Bean的参数类型
  • 接口返回非void、基础类型的类型
  • @ApiResponse注解中标注返回的class类型

目前主要有以上这三种类型,通过解析拿到接口涉及的Model类型,然后添加到一个Set集合中,该Set集合就对应了Swagger标准属性的definitions属性

先来看遍历接口的代码:

for (final ResourceGroup resourceGroup : sortedByName(allResourceGroups)) {
DocumentationContext documentationContext = context.getDocumentationContext();
Set<String> produces = new LinkedHashSet<String>(documentationContext.getProduces());
Set<String> consumes = new LinkedHashSet<String>(documentationContext.getConsumes());
String host = documentationContext.getHost();
Set<String> protocols = new LinkedHashSet<String>(documentationContext.getProtocols());
Set<ApiDescription> apiDescriptions = newHashSet();

Map<String, Model> models = new LinkedHashMap<String, Model>();
//得到该Controller下的所有接口
List<RequestMappingContext> requestMappings = nullToEmptyList(requestMappingsByResourceGroup.get(resourceGroup));
for (RequestMappingContext each : sortedByMethods(requestMappings)) {
//拿到该接口的所有Model
models.putAll(apiModelReader.read(each.withKnownModels(models)));
apiDescriptions.addAll(apiDescriptionReader.read(each));
}

遍历RequestMappingContext对象,在前面我也已经介绍过,该对象其实就是每个接口实例对象

最主要的是来看apiModelReader.read方法

each.withKnownModels方法是通过new关键字复制了一个新的RequestMappingContext

public RequestMappingContext withKnownModels(Map<String, Model> knownModels) {
return new RequestMappingContext(documentationContext, handler,
operationModelContextsBuilder, requestMappingPattern, knownModels);
}

来看读取接口Models的源码:

/***
* 读取该接口Model信息
* @param context
* @return
*/
public Map<String, Model> read(RequestMappingContext context) {
//忽略的class集合,如果没有额外设置,则得到的是Defaults类中的默认忽略类Class集合
Set<Class> ignorableTypes = newHashSet(context.getIgnorableParameterTypes());
Set<ModelContext> modelContexts = pluginsManager.modelContexts(context);
Map<String, Model> modelMap = newHashMap(context.getModelMap());
for (ModelContext each : modelContexts) {
markIgnorablesAsHasSeen(typeResolver, ignorableTypes, each);
Optional<Model> pModel = modelProvider.modelFor(each);
if (pModel.isPresent()) {
LOG.debug("Generated parameter model id: {}, name: {}, schema: {} models",
pModel.get().getId(),
pModel.get().getName());
mergeModelMap(modelMap, pModel.get());
} else {
LOG.debug("Did not find any parameter models for {}", each.getType());
}
populateDependencies(each, modelMap);
}
return modelMap;
}

初步通过源码得知,要想先得到Model,则需要先构造得到ModelContext

  • 初始化外部涉及到的忽略类型Set集合
  • 读取RequestMappingContext,拿到ModelContext的Set集合
  • context中的ModelMap在此处其实是空对象,对应的modelMap也是空对象,这个在上面的withKnownModels方法中我们可以观察到
  • 遍历ModelContext的Set集合,通过modelProvider.modelFor的方法由ModelContext转换构造成目标Model对象

ModelContext

在初始化ModelContext集合之前,我们先来看看ModelContext的属性


public class ModelContext {
//类型
private final Type type;
//是否返回类型
private final boolean returnType;
//分组名称
private final String groupName;
//文档类型
private final DocumentationType documentationType;
//父级
private final ModelContext parentContext;
//ResolvedType
private final Set<ResolvedType> seenTypes = newHashSet();
//model构造器
private final ModelBuilder modelBuilder;
private final AlternateTypeProvider alternateTypeProvider;
//名称策略
private final GenericTypeNamingStrategy genericNamingStrategy;
//忽略类型
private final ImmutableSet<Class> ignorableTypes;

private ModelContext(
String groupName,
Type type,
boolean returnType,
DocumentationType documentationType,
AlternateTypeProvider alternateTypeProvider,
GenericTypeNamingStrategy genericNamingStrategy,
ImmutableSet<Class> ignorableTypes) {
this.groupName = groupName;
this.documentationType = documentationType;
this.alternateTypeProvider = alternateTypeProvider;
this.genericNamingStrategy = genericNamingStrategy;
this.ignorableTypes = ignorableTypes;
this.parentContext = null;
this.type = type;
this.returnType = returnType;
this.modelBuilder = new ModelBuilder();
}
//...
}

参数对象全部是final关键字修饰

初始化ModelContext Set集合

先来看pluginsManager.modelContexts方法中的初始化操作

public Set<ModelContext> modelContexts(RequestMappingContext context) {
DocumentationType documentationType = context.getDocumentationContext().getDocumentationType();
//构建该接口的ModelContext集合
for (OperationModelsProviderPlugin each : operationModelsProviders.getPluginsFor(documentationType)) {
each.apply(context);
}
return context.operationModelsBuilder().build();
}

通过文档类型,获取Model的OperationModelsProviderPlugin插件实现类,然后调用apply方法初始化

OperationModelsProviderPlugin主要有两个实现类,分别是:

  • OperationModelsProviderPlugin:处理返回类型、参数类型等
  • SwaggerOperationModelsProvider:处理swagger注解提供的值类型,主要包括@ApiResponse@ApiOperation

OperationModelsProviderPlugin

先来看常规类型

@Component
@Order(Ordered.HIGHEST_PRECEDENCE)
public class OperationModelsProvider implements OperationModelsProviderPlugin {

private static final Logger LOG = LoggerFactory.getLogger(OperationModelsProvider.class);
private final TypeResolver typeResolver;

@Autowired
public OperationModelsProvider(TypeResolver typeResolver) {
this.typeResolver = typeResolver;
}

@Override
public void apply(RequestMappingContext context) {
collectFromReturnType(context);
collectParameters(context);
collectGlobalModels(context);
}

}

常规Model插件的apply方法主要有三个方法

collectFromReturnType

收集接口返回类型,跟踪源码;

private void collectFromReturnType(RequestMappingContext context) {
ResolvedType modelType = context.getReturnType();
modelType = context.alternateFor(modelType);
LOG.debug("Adding return parameter of type {}", resolvedTypeSignature(modelType).or("<null>"));
context.operationModelsBuilder().addReturn(modelType);
}

直接拿到接口的返回类型,这个返回类型在前面接口初始化时,已经初始化,getReturnType方法实际调用的是RequestHandler的方法

public ResolvedType getReturnType() {
return handler.getReturnType();
}

我们在前面也介绍过,RequestHander因为是接口,在springfox中的实现类是WebMvcRequestHandler

拿到返回类型,最终用addReturn方法添加到context对象中的全局Set<ModelContext>对象中

collectParameters

收集接口中的参数类型.

private void collectParameters(RequestMappingContext context) {


LOG.debug("Reading parameters models for handlerMethod |{}|", context.getName());

List<ResolvedMethodParameter> parameterTypes = context.getParameters();
for (ResolvedMethodParameter parameterType : parameterTypes) {
if (parameterType.hasParameterAnnotation(RequestBody.class)
|| parameterType.hasParameterAnnotation(RequestPart.class)) {
ResolvedType modelType = context.alternateFor(parameterType.getParameterType());
LOG.debug("Adding input parameter of type {}", resolvedTypeSignature(modelType).or("<null>"));
context.operationModelsBuilder().addInputParam(modelType);
}
}
LOG.debug("Finished reading parameters models for handlerMethod |{}|", context.getName());
}

接口参数类型中,springfox目前只解析两种

  • 一种是实体类通过Spring的@RequestBody注解标注的,我们在使用Spring开发的时候如果使用该注解通常是使用的JSON作为接口的交互格式
  • 通过Spring的@ReuqestPart注解标注的参数类型,@RequestPart注解是配合文件上传时附属参数类型使用的注解

collectGlobalModels

收集接口的全局Model

private void collectGlobalModels(RequestMappingContext context) {
for (ResolvedType each : context.getAdditionalModels()) {
context.operationModelsBuilder().addInputParam(each);
context.operationModelsBuilder().addReturn(each);
}
}

收集外部全局添加的Model,添加进入集合中

SwaggerOperationModelsProvider

基于Swagger相关注解赋值的类型Class解析

@Component
@Order(SwaggerPluginSupport.SWAGGER_PLUGIN_ORDER)
public class SwaggerOperationModelsProvider implements OperationModelsProviderPlugin {

private static final Logger LOG = LoggerFactory.getLogger(SwaggerOperationModelsProvider.class);
private final TypeResolver typeResolver;

@Autowired
public SwaggerOperationModelsProvider(TypeResolver typeResolver) {
this.typeResolver = typeResolver;
}

@Override
public void apply(RequestMappingContext context) {
collectFromApiOperation(context);
collectApiResponses(context);
}
}

主要有两种类型:

收集使用@ApiOperation注解时,使用主句的属性值

收集@ApiResponse响应状态码涉及到的Model

collectFromApiOperation

private void collectFromApiOperation(RequestMappingContext context) {
ResolvedType returnType = context.getReturnType();
returnType = context.alternateFor(returnType);
Optional<ResolvedType> returnParameter = context.findAnnotation(ApiOperation.class)
.transform(resolvedTypeFromOperation(typeResolver, returnType));
if (returnParameter.isPresent() && returnParameter.get() != returnType) {
LOG.debug("Adding return parameter of type {}", resolvedTypeSignature(returnParameter.get()).or("<null>"));
context.operationModelsBuilder().addReturn(returnParameter.get());
}
}

查找注解,获取ResolvedType的值

核心是拿到ApiOeration注解的response-class属性值

@VisibleForTesting
static ResolvedType getResolvedType(
ApiOperation annotation,
TypeResolver resolver,
ResolvedType defaultType) {

if (null != annotation) {
Class<?> response = annotation.response();
String responseContainer = annotation.responseContainer();
if (resolvedType(resolver, response, responseContainer).isPresent()) {
return resolvedType(resolver, response, responseContainer).get();
}
}
return defaultType;
}

collectApiResponses

收集在接口上标注状态码涉及的Class类,ApiResponses是集合,最终遍历得到ApiResponse

private void collectApiResponses(RequestMappingContext context) {
List<ApiResponses> allApiResponses = context.findAnnotations(ApiResponses.class);
LOG.debug("Reading parameters models for handlerMethod |{}|", context.getName());
Set<ResolvedType> seenTypes = newHashSet();
for (ApiResponses apiResponses : allApiResponses) {
List<ResolvedType> modelTypes = toResolvedTypes(context).apply(apiResponses);
for (ResolvedType modelType : modelTypes) {
if (!seenTypes.contains(modelType)) {
seenTypes.add(modelType);
context.operationModelsBuilder().addReturn(modelType);
}
}
}
}

ModelContext初始化

我们通过TypeResolved方法将基础的Class转换为ResolvedType

此时ModelContext提供了几个方法将ResolvedType转换为ModelContext类型

  • returnValue:提供返回的class
  • inputParam:参数类的方法

通过OperationModelContextsBuilder提供的默认参数,构造函数默认构造出ModelContext对象

/**
* Convenience method to provide an new context for an input parameter
*
* @param group - group name of the docket
* @param type - type
* @param documentationType - for documentation type
* @param alternateTypeProvider - alternate type provider
* @param genericNamingStrategy - how generic types should be named
* @param ignorableTypes - types that can be ignored
* @return new context
*/
public static ModelContext inputParam(
String group,
Type type,
DocumentationType documentationType,
AlternateTypeProvider alternateTypeProvider,
GenericTypeNamingStrategy genericNamingStrategy,
ImmutableSet<Class> ignorableTypes) {

return new ModelContext(
group,
type,
false,
documentationType,
alternateTypeProvider,
genericNamingStrategy,
ignorableTypes);
}

ModelContext转化为Model

Set<ModelContext> modelContexts = pluginsManager.modelContexts(context);
Map<String, Model> modelMap = newHashMap(context.getModelMap());
for (ModelContext each : modelContexts) {
//添加基础忽略类型的ResolvedType类型
markIgnorablesAsHasSeen(typeResolver, ignorableTypes, each);
//通过modelProvider获取到Model类型,modelProvider是接口,有两个实现类
//DefaultModelProvider:默认装换
//CachingModelProvider:缓存
Optional<Model> pModel = modelProvider.modelFor(each);
if (pModel.isPresent()) {
LOG.debug("Generated parameter model id: {}, name: {}, schema: {} models",
pModel.get().getId(),
pModel.get().getName());
mergeModelMap(modelMap, pModel.get());
} else {
LOG.debug("Did not find any parameter models for {}", each.getType());
}
populateDependencies(each, modelMap);
}

通过modelProvider将ModelContext转换为Model类型

modelProvider是接口,有两个实现类:

  • DefaultModelProvider:默认装换,每次都会将modelContext转换为model
  • CachingModelProvider:声明了一个guava的缓存池,先从缓存池获取,如果没有,则调用默认的处理器,转换为model,然后放入缓存池中

此处modelProvider使用的是caching缓存配置

初次通过modelFor获取是为空的,所以接下来看populateDependencies方法

private void populateDependencies(ModelContext modelContext, Map<String, Model> modelMap) {
Map<String, Model> dependencies = modelProvider.dependencies(modelContext);
for (Model each : dependencies.values()) {
mergeModelMap(modelMap, each);
}
}

caching默认是依赖default的,此处dependencies实际是调用的default的

@Override
public Map<String, Model> dependencies(ModelContext modelContext) {
Map<String, Model> models = newHashMap();
for (ResolvedType resolvedType : dependencyProvider.dependentModels(modelContext)) {
ModelContext parentContext = ModelContext.fromParent(modelContext, resolvedType);
Optional<Model> model = modelFor(parentContext).or(mapModel(parentContext, resolvedType));
if (model.isPresent()) {
models.put(model.get().getName(), model.get());
}
}
return models;
}

dependencyProvider和modelProvider是同一个策略,默认接口,有两个实现类,一个是cache,一个是default

所以我们默认来看default的即可

@Override
public Set<ResolvedType> dependentModels(ModelContext modelContext) {
return concat(from(resolvedDependencies(modelContext))
.filter(ignorableTypes(modelContext))
.filter(not(baseTypes(modelContext))),
schemaPluginsManager.dependencies(modelContext))
.toSet();
}

在默认配置中,最终是通过schemaPluginsManager的方法来解决ModelContext的转换

最终是通过SyntheticModelProviderPlugin来转换,但是springfox中他没有实现类,所以此处的Plugin是空的,不存在

所以此处的dependentModels返回的Set集合是空的

再来看resolvedDependencies的方法

private List<ResolvedType> resolvedDependencies(ModelContext modelContext) {
ResolvedType resolvedType = modelContext.alternateFor(modelContext.resolvedType(typeResolver));
if (isBaseType(ModelContext.fromParent(modelContext, resolvedType))) {
LOG.debug("Marking base type {} as seen", resolvedType.getSignature());
modelContext.seen(resolvedType);
return newArrayList();
}
List<ResolvedType> dependencies = newArrayList(resolvedTypeParameters(modelContext, resolvedType));
dependencies.addAll(resolvedArrayElementType(modelContext, resolvedType));
dependencies.addAll(resolvedMapType(modelContext, resolvedType));
dependencies.addAll(resolvedPropertiesAndFields(modelContext, resolvedType));
dependencies.addAll(resolvedSubclasses(resolvedType));
return dependencies;
}

从代码中我们能看到:

  • 首先因为ModelContext中属性是包含type的,所以默认拿到ResolvedType
  • 通过拿到参数类型得到ResolvedType集合,如果有父类则递归调用.

最终通过反射的方式拿到Model类型

private Optional<Model> reflectionBasedModel(ModelContext modelContext, ResolvedType propertiesHost) {
ImmutableMap<String, ModelProperty> propertiesIndex
= uniqueIndex(properties(modelContext, propertiesHost), byPropertyName());
LOG.debug("Inferred {} properties. Properties found {}", propertiesIndex.size(),
Joiner.on(", ").join(propertiesIndex.keySet()));
Map<String, ModelProperty> properties = newTreeMap();
properties.putAll(propertiesIndex);
return Optional.of(modelBuilder(propertiesHost, properties, modelContext));
}

private Model modelBuilder(ResolvedType propertiesHost,
Map<String, ModelProperty> properties,
ModelContext modelContext) {
String typeName = typeNameExtractor.typeName(ModelContext.fromParent(modelContext, propertiesHost));
modelContext.getBuilder()
.id(typeName)
.type(propertiesHost)
.name(typeName)
.qualifiedType(simpleQualifiedTypeName(propertiesHost))
.properties(properties)
.description("")
.baseModel("")
.discriminator("")
.subTypes(new ArrayList<ModelReference>());
return schemaPluginsManager.model(modelContext);
}

构造Model的基础属性,包括类型,名称、描述、属性等信息

private List<ModelProperty> propertiesFor(ResolvedType type, ModelContext givenContext, String namePrefix) {
List<ModelProperty> properties = newArrayList();
BeanDescription beanDescription = beanDescription(type, givenContext);
Map<String, BeanPropertyDefinition> propertyLookup = uniqueIndex(beanDescription.findProperties(),
BeanPropertyDefinitions.beanPropertyByInternalName());
for (Map.Entry<String, BeanPropertyDefinition> each : propertyLookup.entrySet()) {
LOG.debug("Reading property {}", each.getKey());
BeanPropertyDefinition jacksonProperty = each.getValue();
Optional<AnnotatedMember> annotatedMember
= Optional.fromNullable(safeGetPrimaryMember(jacksonProperty));
if (annotatedMember.isPresent()) {
properties.addAll(candidateProperties(type, annotatedMember.get(), jacksonProperty, givenContext, namePrefix));
}
}
return FluentIterable.from(properties).toSortedSet(byPropertyName()).asList();
}

获取属性集合配置的代码

总结

通过源码的一些研究,springfox主要的处理流程:

  • 收集该接口的参数类型Model
  • 收集@ApiOperation注解的response类型Model
  • 收集全局Model
  • 收集接口返回类型Model
  • 收集接口主键@ApiResponses状态码涉及的类型Model
  • 在收集过程中使用了缓存策略,这样能提高解析效率
+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox11.html b/knife4j-doc/gitee/docs/action/springfox/springfox11.html index 23042f326..0fddab896 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox11.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox11.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十一) 自定义添加Swagger Models功能实现 | Knife4j - - +springfox 源码分析(十一) 自定义添加Swagger Models功能实现 | Knife4j + +
-

springfox 源码分析(十一) 自定义添加Swagger Models功能实现

springfox 源码分析(十) 遍历接口获取Model对象这一篇中,我们其实已经大致了解了Springfox针对接口中涉及到的Model类进行解析初始化的过程

在默认OperationModelsProviderPlugin插件中,collectGlobalModels收集全局Models的方法会将我们外部传入的Model添加到Springfox的集合中去,并且最终我们会在Swagger的标准属性定义definitions中发现她

那么我们既然知道了springfox的原理,我们知道springfox默认只会把接口中涉及的参数类、返回类、注解中定义的类这三类model添加到框架中

有时,如果我们在程序框架中定义了一些公共的属性Models,但是并没有在接口中使用,此时springfox默认是不会加入的,那么我们应该通过何种方式,才能再swagger的ui界面中看到后端自定义的Model呢

我们通过源码环节知道OperationModelsProviderPlugin最终获取全局参数Models是通过DocumentationContext对象来获取的,而在springfox 源码分析(七) 文档初始化-DocumentationContext这一节时,我们已经介绍了DocumentationContext的初始化过程

我们只需要使用springfox为我们提供的Docket对象的方法就可以实现我们的自定义Models

目前Docket对象提供了添加Model的方法,源码如下:

/**
* Method to add additional models that are not part of any annotation or are perhaps implicit
*
* @param first - at least one is required
* @param remaining - possible collection of more
* @return on-going docket
* @since 2.4.0
*/
public Docket additionalModels(ResolvedType first, ResolvedType... remaining) {
additionalModels.add(first);
additionalModels.addAll(newHashSet(remaining));
return this;
}

这是唯一的方法入口,ResolvedType是springfox默认使用的jackson提供的类,他是一个静态类

那么,我们如何将Type类型转化为ResolvedType类型

jackson也提供了一个类来进行转换,那就是com.fasterxml.classmate.TypeResolver

并且该类springfox已经帮助我们注入到了Spring的容器中,具体代码如下:

@Configuration
@ComponentScan(basePackages = {
"springfox.documentation.schema"
})
@EnablePluginRegistries({
ModelBuilderPlugin.class,
ModelPropertyBuilderPlugin.class,
TypeNameProviderPlugin.class,
SyntheticModelProviderPlugin.class
})
public class ModelsConfiguration {
@Bean
public TypeResolver typeResolver() {
return new TypeResolver();
}
}

所以,在我们的SwaggerConfiguration配置文件中,只需要将TypeResolver通过注解注入即可使用了

第一种方式

在SwaggerConfiguration中引入TypeResolver

@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {


private final TypeResolver typeResolver;

@Autowired
public SwaggerConfiguration(TypeResolver typeResolver) {
this.typeResolver = typeResolver;
}


在创建Docket对象时,调用additionalModels的方法,代码如下:

@Bean(value = "groupRestApi")
@Order(value = 1)
public Docket groupRestApi() {
List<ResolvedType> list=Lists.newArrayList();

SpringAddtionalModel springAddtionalModel= springAddtionalModelService.scan("com.swagger.bootstrap.ui.demo.extend");
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.groupName("分组接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.group"))
.paths(PathSelectors.any())
.build()
//添加自定义Model类型
.additionalModels(typeResolver.resolve(DeveloperApiInfo.class))
.ignoredParameterTypes(HttpSession.class).extensions(Lists.newArrayList(new OrderExtensions(2))).securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

这样我们在界面上就可以看见我们默认添加的Model了,效果:

如果我们只是需要添加一个类的情况下,使用这种方式是最简洁的,假如我们有很多类的情况下,我们希望能够提供根据路径包扫描的方式来获取ResolvedType,那该如何做呢?

此时,你可以使用第二种方式

第二种方式

swagger-bootstrap-ui的1.9.4版本中,为Java开发者提供了公共api方法

在SwaggerConfiguration配置文件中,可以引入swagger-bootstrap-ui提供的工具类

@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Autowired
SpringAddtionalModelService springAddtionalModelService;

}

注意@EnableSwaggerBootstrapUI注解必须在配置类上引入,否则可能引起错误.

然后使用springAddtionalModelService提供的scan方法进行包路径扫描,包路径可以是多个,以逗号分隔

@Bean(value = "groupRestApi")
@Order(value = 1)
public Docket groupRestApi() {
List<ResolvedType> list=Lists.newArrayList();
//扫描
SpringAddtionalModel springAddtionalModel= springAddtionalModelService.scan("com.swagger.bootstrap.ui.demo.extend");
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.groupName("分组接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.group"))
.paths(PathSelectors.any())
.build()
.additionalModels(springAddtionalModel.getFirst(),springAddtionalModel.getRemaining())
.ignoredParameterTypes(HttpSession.class).extensions(Lists.newArrayList(new OrderExtensions(2))).securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

springAddtionalModelService最终扫描包路径生成SpringAddtionalModel对象,该对象源码:

public class SpringAddtionalModel {

/***
* 第一个Type
*/
private ResolvedType first;

/***
* 剩余
*/
private List<ResolvedType> remaining=new ArrayList<>();


public ResolvedType[] getRemaining() {
if (!remaining.isEmpty()){
return remaining.toArray(new ResolvedType[]{});
}
return new ResolvedType[]{};
}

public ResolvedType getFirst() {
return first;
}

public void setFirst(ResolvedType first) {
this.first = first;
}

public void add(ResolvedType type){
remaining.add(type);
}
}

注意有两个属性,first和remaining的集合

这也是配合Docket对象提供的additionalModels方法进行的简单封装,开发者扫描包路径后,会得到first以及remaining的集合

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox12.html b/knife4j-doc/gitee/docs/action/springfox/springfox12.html index a391afb4b..c9dbc38e0 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox12.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox12.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十二) 遍历接口获取ApiDescription集合 | Knife4j - - +springfox 源码分析(十二) 遍历接口获取ApiDescription集合 | Knife4j + +
-

springfox 源码分析(十二) 遍历接口获取ApiDescription集合

ApiDescription是springfox提供的接口描述信息类,在springfox 源码分析(十) 遍历接口获取Model对象中我们拿到了接口的类型Model集合信息,但除了Model信息,接口还有更多的信息

基础信息

主要包括:接口路径、consumes、produces、参数、请求类型、描述、说明、响应状态码、是否过时、扩展信息、分组

因为我们的接口可以运行多个请求类型的存在,所以以上信息在springfox是通过Operation来声明的

先来看ApiDescription的源码

public class ApiDescription {
//分组名称
private final String groupName;
//路径
private final String path;
//描述
private final String description;
//操作信息集合
//一个接口有可能存在多个请求方法类型,即:GET、POST、PUT、DELETE等,所以这里也是1:N的映射关系
private final List<Operation> operations;
//是否隐藏
private final Boolean hidden;
//getter and setters....
}

在代码注释中,我也做了说明

因为一个接口有可能存在多个请求方法类型,即:GET、POST、PUT、DELETE等,所以这里也是1:N的映射关系,即存在多个Operation集合

Operation的属性

public class Operation {
//请求接口
private final HttpMethod method;
//接口名称
private final String summary;
//接口描述信息
private final String notes;
private final ModelReference responseModel;
//唯一id
private final String uniqueId;
private final int position;
//tags
private final Set<String> tags;
private final Set<String> produces;
private final Set<String> consumes;
private final Set<String> protocol;
//是否隐藏
private final boolean isHidden;
private final Map<String, List<AuthorizationScope>> securityReferences;
//参数
private final List<Parameter> parameters;
//状态码
private final Set<ResponseMessage> responseMessages;
//是否过时
private final String deprecated;
//扩展信息
private final List<VendorExtension> vendorExtensions;

//setter and getter..
}

在Operation中声明的属性中就是我们上面介绍的接口相关信息.

初始化

我们知道了接口的介绍信息,此时,来看springfox如何处理,将接口的上下文信息最终初始化转换为ApiDescription

ApiDescriptionReader.read方法

/***
* 获取ApiDescription接口集合信息
* @param outerContext
* @return
*/
public List<ApiDescription> read(RequestMappingContext outerContext) {
PatternsRequestCondition patternsCondition = outerContext.getPatternsCondition();
ApiSelector selector = outerContext.getDocumentationContext().getApiSelector();

List<ApiDescription> apiDescriptionList = newArrayList();
for (String path : matchingPaths(selector, patternsCondition)) {
String methodName = outerContext.getName();
try {
RequestMappingContext operationContext = outerContext.copyPatternUsing(path);
//根据接口上下文获取Operation集合
List<Operation> operations = operationReader.read(operationContext);
if (operations.size() > 0) {
operationContext.apiDescriptionBuilder()
.groupName(outerContext.getGroupName())
.operations(operations)
.pathDecorator(pluginsManager.decorator(new PathContext(outerContext, from(operations).first())))
.path(path)
.description(methodName)
.hidden(false);
ApiDescription apiDescription = operationContext.apiDescriptionBuilder().build();
lookup.add(outerContext.key(), apiDescription);
apiDescriptionList.add(apiDescription);
}
} catch (Error e) {
String contentMsg = "Skipping process path[" + path + "], method[" + methodName + "] as it has an error.";
log.error(contentMsg, e);
}
}
return apiDescriptionList;
}

核心操作是通过operationReader.read操作,获取Operation集合

public List<Operation> read(RequestMappingContext outerContext) {

List<Operation> operations = newArrayList();

Set<RequestMethod> requestMethods = outerContext.getMethodsCondition();
Set<RequestMethod> supportedMethods = supportedMethods(requestMethods);

//Setup response message list
Integer currentCount = 0;
//遍历获取当前支持的接口类型
for (RequestMethod httpRequestMethod : supportedMethods) {
OperationContext operationContext = new OperationContext(new OperationBuilder(nameGenerator),
httpRequestMethod,
outerContext,
currentCount);
//调用OperationPlugin插件,构造Operation对象
Operation operation = pluginsManager.operation(operationContext);
//添加
if (!operation.isHidden()) {
operations.add(operation);
currentCount++;
}
}
Collections.sort(operations, outerContext.operationOrdering());

return operations;
}

主要的逻辑如下:

  • 获取当前支持的接口类型,包括GET|POST、PUT、DELETE等
  • 通过调用OperationPlugin的插件对Operation中的每个属性进行赋值操作,包括参数类型、描述、响应状态码等等信息

OperationPlugin插件包含了多个实现类型,这个可以参考前面介绍的springfox 源码分析(五) web配置类Plugin插件的使用

既然Operation提供了扩展参数,那么我们后面是可以进行添加自定义扩展的

下一篇会介绍如何添加springfox的接口扩展字段.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox13.html b/knife4j-doc/gitee/docs/action/springfox/springfox13.html index b045a9e1c..a56505d59 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox13.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox13.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十三) 自定义扩展实现接口的排序 | Knife4j - - +springfox 源码分析(十三) 自定义扩展实现接口的排序 | Knife4j + +
-

springfox 源码分析(十三) 自定义扩展实现接口的排序

很多时候,Swagger定义的标准并不能满足我们实际的需求,比如拿分组后的接口来说,有适合我们希望我们的接口能够排序,假如我们当前有一个注册的需求实现,那么他的接口可能是这样的:

1.获取验证码 -> 2.校验用户名是否有效 -> 3.注册验证 -> 4.登录

如果我们没有排序的情况下,上面的接口对于开发人员来说可能是杂乱无章的,对于初级的接口对接人员来说,排序更能让开发者把当前的需求清晰明了的用代码来实现掉,为此,接口文档的作用也能最大化.

那么,在swagger的标准中,那些允许我们自定义扩展,在Springfox中我们又如何来实现我们的自定义扩展呢?

Swagger标准

先来看Swagger定义的几个标准属性,可参考官方文档

swaggerstringRequired. Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be "2.0".
infoInfo ObjectRequired. Provides metadata about the API. The metadata can be used by the clients if needed.
hoststringThe host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating.
basePathstringThe base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating.
schemes[string]The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
consumes[string]A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.
produces[string]A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types.
pathsPaths ObjectRequired. The available paths and operations for the API.
definitionsDefinitions ObjectAn object to hold data types produced and consumed by operations.
parametersParameters Definitions ObjectAn object to hold parameters that can be used across operations. This property does not define global parameters for all operations.
responsesResponses Definitions ObjectAn object to hold responses that can be used across operations. This property does not define global responses for all operations.
securityDefinitionsSecurity Definitions ObjectSecurity scheme definitions that can be used across the specification.
security[Security Requirement Object]A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.
tags[Tag Object]A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Objectmust be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
externalDocsExternal Documentation ObjectAdditional external documentation.

在上面定义的标准字段中,最后一个是扩展对象,我们在Java对象中io.swagger.models.Swagger中可以看到他的定义


public class Swagger {
protected String swagger = "2.0";
protected Info info;
protected String host;
protected String basePath;
protected List<Tag> tags;
protected List<Scheme> schemes;
protected List<String> consumes;
protected List<String> produces;
protected List<SecurityRequirement> security;
protected Map<String, Path> paths;
protected Map<String, SecuritySchemeDefinition> securityDefinitions;
protected Map<String, Model> definitions;
protected Map<String, Parameter> parameters;
protected Map<String, Response> responses;
protected ExternalDocs externalDocs;
//扩展属性
protected Map<String, Object> vendorExtensions;
//setter and getter
}

所以从上面的接口定义来看,我们最终可以来一一查看Swagger支持哪些对象进行自定义扩展属性

Swagger根对象扩展

在Swagger的根对象中,我们看到他是有vendorExtensions扩展属性的支持的,是一个散列的数据结构类型,这意味着我们可以在Swagger的根对象中添加多个扩展属性

扩展属性名称的规则必须是以x-来开头,所有的都是这个规则

Field PatternTypeDescription
^x-AnyAllows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.

看到此处,以前在swagger-bootstrap-ui的1.8.5版本中添加的扩展属性都是不规范的,因为没有应用swagger的标准规则,在后期的版本中要重写该规则实现

所以,我们在Swagger根路径扩展的规则最终生成的JSON格式可能是这样:

{
"swagger": "2.0",
"info": {
"description": "<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>",
"version": "1.0",
"title": "swagger-bootstrap-ui很棒~~~!!!",
"termsOfService": "http://www.group.com/",
"contact": {
"name": "group@qq.com"
}
},
"host": "127.0.0.1:8999",
"basePath": "/",
"tags": [
{
"name": "1.8.2版本",
"description": "Api 182 Controller"
}
],
"paths": {
"/2/api/new187/postRequest": {
"post": {
"tags": [
"api-1871-controller"
],
"summary": "版本2-post请求参数Hidden属性是否生效",
"operationId": "postRequestUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "model187",
"description": "model187",
"required": true,
"schema": {
"originalRef": "Model187",
"$ref": "#/definitions/Model187"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "Rest«Model187»",
"$ref": "#/definitions/Rest«Model187»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"security": [
{
"BearerToken": [
"global"
]
},
{
"BearerToken1": [
"global"
]
}
],
"deprecated": false
}
}
},
"securityDefinitions": {
"BearerToken": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
},
"definitions": {
"AInfoVo": {
"type": "object",
"required": [
"aId",
"bList"
],
"properties": {
"aId": {
"type": "string",
"description": "A记录主键"
},
"bList": {
"type": "object",
"description": "B信息Map, key为BInfoVo的主键pkId",
"additionalProperties": {
"originalRef": "BInfoVo",
"$ref": "#/definitions/BInfoVo"
}
}
},
"title": "AInfoVo",
"description": "A信息"
},
"ActInteger": {
"type": "object",
"properties": {
"doub1": {
"type": "number",
"format": "double",
"description": "double类型属性"
},
"float1": {
"type": "number",
"format": "float",
"description": "float类型属性"
},
"name": {
"type": "string"
},
"number": {
"type": "integer",
"format": "int64",
"description": "Long类型"
},
"price": {
"type": "number",
"description": "BigDecimal类型属性"
},
"sort": {
"type": "integer",
"format": "int32",
"description": "int类型"
}
},
"title": "ActInteger"
},
"Actor": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"deepOne": {
"originalRef": "DeepOne",
"$ref": "#/definitions/DeepOne"
},
"recipt": {
"originalRef": "Recipt",
"$ref": "#/definitions/Recipt"
},
"sort": {
"type": "integer",
"format": "int32"
}
},
"title": "Actor"
}
},
"x-description":"Swagger扩展属性之一Description"
}

x-description属性就是我们扩展的标准的扩展属性,我们在Java代码中也可以这么来实现:

Swagger swagger = mapper.mapDocumentation(documentation);
swagger.setVendorExtension("x-description","Swagger扩展属性之一Description");

path接口扩展

同上面的规则,path中定义的属性,我们同样可以扩展我们的规则,此时我们的需求,根据接口来排序就可以通过path增加扩展属性来实现,比如我们给path添加一个扩展属性x-order

path的JSON结构就可能如下:

"/2/api/new187/postRequest": {
"post": {
"tags": [
"api-1871-controller"
],
"summary": "版本2-post请求参数Hidden属性是否生效",
"operationId": "postRequestUsingPOST_1",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "model187",
"description": "model187",
"required": true,
"schema": {
"originalRef": "Model187",
"$ref": "#/definitions/Model187"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "Rest«Model187»",
"$ref": "#/definitions/Rest«Model187»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"security": [
{
"BearerToken": [
"global"
]
},
{
"BearerToken1": [
"global"
]
}
],
"deprecated": false,
"x-order":"1"
}
}

more

swagger在Open API的规范文档中声明的是任意对象都可以有对象扩展,只要符合扩展规则即可(即扩展属性名称以x-开头)

Springfox实现

我们知道了扩展规则的定义,那么在Springfox中我们如何自定义实现呢?

在前面的文章中,我们介绍了springfox使用了Spring Plugin系统来增强整个框架的可扩展性,我想此时的你应该能明白了,如果要扩展path接口的属性,那么,其实我们只需要找到Springfox提供的Plugin接口,然后增加一个Plugin的接口实现,把我们的扩展属性增加进去即可

接下来,我们实现上面path接口的自定义x-order的属性扩展实现.

我们先来看Springfox将自己的Documentation对象转换为Swagger标准对象的代码

@Override
public Swagger mapDocumentation(Documentation from) {
if ( from == null ) {
return null;
}

Swagger swagger = new Swagger();

swagger.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );
swagger.setSchemes( mapSchemes( from.getSchemes() ) );
//path转换
swagger.setPaths( mapApiListings( from.getApiListings() ) );
swagger.setHost( from.getHost() );
swagger.setDefinitions( modelMapper.modelsFromApiListings( from.getApiListings() ) );
swagger.setSecurityDefinitions( securityMapper.toSecuritySchemeDefinitions( from.getResourceListing() ) );
ApiInfo info = fromResourceListingInfo( from );
if ( info != null ) {
swagger.setInfo( mapApiInfo( info ) );
}
swagger.setBasePath( from.getBasePath() );
swagger.setTags( tagSetToTagList( from.getTags() ) );
List<String> list2 = from.getConsumes();
if ( list2 != null ) {
swagger.setConsumes( new ArrayList<String>( list2 ) );
}
else {
swagger.setConsumes( null );
}
List<String> list3 = from.getProduces();
if ( list3 != null ) {
swagger.setProduces( new ArrayList<String>( list3 ) );
}
else {
swagger.setProduces( null );
}

return swagger;
}

既然我们的目标是path,那么来看mapApiListings方法

protected Map<String, Path> mapApiListings(Multimap<String, ApiListing> apiListings) {
Map<String, Path> paths = newTreeMap();
for (ApiListing each : apiListings.values()) {
for (ApiDescription api : each.getApis()) {
paths.put(api.getPath(), mapOperations(api, Optional.fromNullable(paths.get(api.getPath()))));
}
}
return paths;
}

程序的逻辑是:

  • 声明一个map数组,key是接口路径,value是path对象
  • 遍历springfox中的ApiListing集合对象(类似于controller)
  • 遍历ApiDescription结合对象(类似于接口method)
  • 最终拿到apiDescription的接口地址,将operation对象转换为path

继续来看mapOperations方法

private Path mapOperations(ApiDescription api, Optional<Path> existingPath) {
Path path = existingPath.or(new Path());
for (springfox.documentation.service.Operation each : nullToEmptyList(api.getOperations())) {
Operation operation = mapOperation(each);
path.set(each.getMethod().toString().toLowerCase(), operation);
}
return path;
}

循环遍历所有的Operation,此处为什么有循环,因为我们同一个接口允许存在不同的请求方式(GET|POST|PUT|DELETE...),但是请求体可以相同

@Override
protected io.swagger.models.Operation mapOperation(Operation from) {
if ( from == null ) {
return null;
}

io.swagger.models.Operation operation = new io.swagger.models.Operation();

operation.setSecurity( mapAuthorizations( from.getSecurityReferences() ) );
operation.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );

看到mapOperation方法时,我们终于看到了setVendorExtensions的操作,即赋值扩展属性

那么来看扩展属性是如何来实现的

@Mapper
public class VendorExtensionsMapper {

public Map<String, Object> mapExtensions(List<VendorExtension> from) {
Map<String, Object> extensions = newTreeMap();
Iterable<ListVendorExtension> listExtensions = from(from)
.filter(ListVendorExtension.class);
for (ListVendorExtension each : listExtensions) {
extensions.put(each.getName(), each.getValue());
}
Iterable<Map<String, Object>> objectExtensions = from(from)
.filter(ObjectVendorExtension.class)
.transform(toExtensionMap());
for (Map<String, Object> each : objectExtensions) {
extensions.putAll(each);
}
Iterable<StringVendorExtension> propertyExtensions = from(from)
.filter(StringVendorExtension.class);
for (StringVendorExtension each : propertyExtensions) {
extensions.put(each.getName(), each.getValue());
}
return extensions;
}

通过VendorExtensionsMapper中的扩展属性方法,我们看到,springfox目前做了限制,因为VendorExtension是接口,我们可以有我们自己的定义实现,但是springfox最终会对扩展接口进行filter过滤,从代码中我们看到,springfox目前只允许三种扩展实现

分别是:

  • ListVendorExtension:列表的形式,该对象支持泛型,最终形式:"x-field":[{field:value}]
  • ObjectVendorExtension:对象的扩展形式,最终的扩展形式是:"x-field":[{field:value}]
  • StringVendorExtension:string类型的扩展实现,最终的扩展形式是"x-field":"value"

既然springfox给我们提供了默认的三种扩展实现,那么针对上面的我们需要扩展path的扩展属性,我们使用StringVendorExtension:string这种类型即可

针对path的operation操作,我们在前面也介绍过,springfox最终使用的是OperationBuilderPlugin接口

那么我们只需要写一个OperationBuilderPluginPlugin接口的实现即可

@Component
@Order(Ordered.HIGHEST_PRECEDENCE+100)
public class OperationPositionBulderPlugin implements OperationBuilderPlugin {
@Override
public void apply(OperationContext context) {
context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order","1")));
}

@Override
public boolean supports(DocumentationType delimiter) {
return true;
}
}

目前假设我们给所有的接口都赋予扩展属性x-order,默认值为"1"

此时,我们来看/v2/api-docs接口响应的JSON示例

上图中,我们其实可以看到我们的自定义扩展属性实现了

然后我们在结合我们自定义的swagger-bootstrap-ui前端UI渲染程序,把order字段作为path接口的排序字段,在页面进行排序显示,这样我们就实现了我们的接口自定义排序规则了

有可能细心的朋友会问,我们给的order值都是1,如果给与开发者在代码中给接口自定义的值呢

此时,有两种方式

  • 基于swagger-bootstrap-ui提供的注解@ApiOperationSort进行获取
  • 基于swagger的默认注解@ApiOperation中的postion属性进行二次利用

此时,我们的接口代码可能会如下:

@PostMapping("/createOr33der")
@ApiOperation(value = "创建订单",position = 2)
public Rest<Order> createOrdetr(@RequestBody Order order,HttpSession httpSession){
Rest<Order> r=new Rest<>();
r.setData(order);
return r;
}

@PostMapping("/createOrder")
@ApiOperationSort(3)
@ApiOperation(value = "hash测试",nickname = "test")
public Rest<Order> createOrder(@RequestBody Order order){
Rest<Order> r=new Rest<>();
r.setData(order);
return r;
}

两种方式,取第一种即可

这时,我们更改一下上面我们的Plugin接口实现

@Override
public void apply(OperationContext context) {
int position=Integer.MAX_VALUE;
//首先查找ApiOperation注解
Optional<ApiOperation> api=context.findAnnotation(ApiOperation.class);
if (api.isPresent()){
//判断postion是否有值
int posit=api.get().position();
if (posit!=0){
position=posit;
}else{
Optional<ApiOperationSort> apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);
if (apiOperationSortOptional.isPresent()){
position=apiOperationSortOptional.get().value();
}
}
}else{
Optional<ApiOperationSort> apiOperationSortOptional=context.findAnnotation(ApiOperationSort.class);
if (apiOperationSortOptional.isPresent()){
position=apiOperationSortOptional.get().value();
}
}

context.operationBuilder().extensions(Lists.newArrayList(new StringVendorExtension("x-order",String.valueOf(position))));
}

此时,我们再来看JSON效果

此时,我们看到,我们的自定义属性已经出现了,而且是根据开发者自定义的实现,此时我们的目的也达到了.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox14.html b/knife4j-doc/gitee/docs/action/springfox/springfox14.html index 929d44a08..60263f895 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox14.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox14.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十四) 归档得到ApiListing接口集合 | Knife4j - - +springfox 源码分析(十四) 归档得到ApiListing接口集合 | Knife4j + +
-

springfox 源码分析(十四) 归档得到ApiListing接口集合

在前面我们拿到了接口的Model类型集合,然后还获取到了该接口的ApiDescription描述信息

此时针对这些信息,进行接口的资源整合,最终构造ApiListing类

/***
* 通过已经筛选过滤的接口集合以及context上下文对象来得到接口列表
* @param context
* @return
*/
public Multimap<String, ApiListing> scan(ApiListingScanningContext context) {
final Multimap<String, ApiListing> apiListingMap = LinkedListMultimap.create();
int position = 0;
// 从外部拿到已经筛选过滤后的接口信息
//controler:methods 1:N
Map<ResourceGroup, List<RequestMappingContext>> requestMappingsByResourceGroup
= context.getRequestMappingsByResourceGroup();
//收集接口详细信息
//由于ApiListingScannerPlugin在springfox中没有实现类,所以此处返回additional集合对象是空的
//additionalListings在此处是空集合,一个元素都没有
Collection<ApiDescription> additionalListings = pluginsManager.additionalListings(context);
//拿到所有的Controller分组信息

Set<ResourceGroup> allResourceGroups = FluentIterable.from(collectResourceGroups(additionalListings))
.append(requestMappingsByResourceGroup.keySet())
.toSet();
List<SecurityReference> securityReferences = newArrayList();
for (final ResourceGroup resourceGroup : sortedByName(allResourceGroups)) {

DocumentationContext documentationContext = context.getDocumentationContext();
Set<String> produces = new LinkedHashSet<String>(documentationContext.getProduces());
Set<String> consumes = new LinkedHashSet<String>(documentationContext.getConsumes());
String host = documentationContext.getHost();
Set<String> protocols = new LinkedHashSet<String>(documentationContext.getProtocols());
Set<ApiDescription> apiDescriptions = newHashSet();

Map<String, Model> models = new LinkedHashMap<String, Model>();
//得到该Controller下的所有接口
List<RequestMappingContext> requestMappings = nullToEmptyList(requestMappingsByResourceGroup.get(resourceGroup));
for (RequestMappingContext each : sortedByMethods(requestMappings)) {
//拿到该接口的所有Model
models.putAll(apiModelReader.read(each.withKnownModels(models)));
apiDescriptions.addAll(apiDescriptionReader.read(each));
}
//根据分组名称进行分组
List<ApiDescription> additional = from(additionalListings)
.filter(
and(
belongsTo(resourceGroup.getGroupName()),
onlySelectedApis(documentationContext)))
.toList();
apiDescriptions.addAll(additional);

List<ApiDescription> sortedApis = FluentIterable.from(apiDescriptions)
.toSortedList(documentationContext.getApiDescriptionOrdering());

String resourcePath = new ResourcePathProvider(resourceGroup)
.resourcePath()
.or(longestCommonPath(sortedApis))
.orNull();

PathProvider pathProvider = documentationContext.getPathProvider();
String basePath = pathProvider.getApplicationBasePath();
PathAdjuster adjuster = new PathMappingAdjuster(documentationContext);
ApiListingBuilder apiListingBuilder = new ApiListingBuilder(context.apiDescriptionOrdering())
.apiVersion(documentationContext.getApiInfo().getVersion())
.basePath(adjuster.adjustedPath(basePath))
.resourcePath(resourcePath)
.produces(produces)
.consumes(consumes)
.host(host)
.protocols(protocols)
.securityReferences(securityReferences)
.apis(sortedApis)
.models(models)
.position(position++)
.availableTags(documentationContext.getTags());

ApiListingContext apiListingContext = new ApiListingContext(
context.getDocumentationType(),
resourceGroup,
apiListingBuilder);
apiListingMap.put(resourceGroup.getGroupName(), pluginsManager.apiListing(apiListingContext));
}
return apiListingMap;
}

代码逻辑:

  • 首先根据Controller分类获取得到所有接口上下文信息(RequestMappingContext)
  • 遍历每个接口上下文信息,获取得到该接口的Models类型集合
  • 遍历获取得到ApiDescription接口描述信息,接口描述信息包括:接口名称、路径、是否过时、参数、响应状态码、请求类型等等信息
  • 通过以上这些信息构造ApiListingBuilder对象
  • 调用ApiListingBuilderPlugin插件,构造赋值ApiListingBuilder对象的相关属性信息
  • 添加到apiListingMap集合对象中

ApiListingBuilderPlugin的 实现类目前有三个:

  • ApiListingReader:分组信息、描述信息
  • MediaTypeReader:赋值consumes、produces信息
  • SwaggerApiListingReader@Api注解,分组tags信息赋值
+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox15.html b/knife4j-doc/gitee/docs/action/springfox/springfox15.html index 399981716..3584d53a9 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox15.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox15.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十五) 归档得到Documentation文档对象 | Knife4j - - +springfox 源码分析(十五) 归档得到Documentation文档对象 | Knife4j + +
-

springfox 源码分析(十五) 归档得到Documentation文档对象

通过上篇的分析,我们已经得到了ApiListing的map集合,接下来最终做文档归档,得到Documentation对象

/***
* 最终生成Documentation文档对象
* @param context
* @return
*/
public Documentation scan(DocumentationContext context) {
//得到分组接口
ApiListingReferenceScanResult result = apiListingReferenceScanner.scan(context);
//拿到所有接口请求
//controller:methods-- 1:N的关系
ApiListingScanningContext listingContext = new ApiListingScanningContext(context,
result.getResourceGroupRequestMappings());
//核心操作,springfox的关键操作都在下面这个scan方法中,构造接口函数
Multimap<String, ApiListing> apiListings = apiListingScanner.scan(listingContext);
Set<Tag> tags = toTags(apiListings);
tags.addAll(context.getTags());
DocumentationBuilder group = new DocumentationBuilder()
.name(context.getGroupName())
.apiListingsByResourceGroupName(apiListings)
.produces(context.getProduces())
.consumes(context.getConsumes())
.host(context.getHost())
.schemes(context.getProtocols())
.basePath(context.getPathProvider().getApplicationBasePath())
.extensions(context.getVendorExtentions())
.tags(tags);

Set<ApiListingReference> apiReferenceSet = newTreeSet(listingReferencePathComparator());
apiReferenceSet.addAll(apiListingReferences(apiListings, context));

ResourceListing resourceListing = new ResourceListingBuilder()
.apiVersion(context.getApiInfo().getVersion())
.apis(from(apiReferenceSet).toSortedList(context.getListingReferenceOrdering()))
.securitySchemes(context.getSecuritySchemes())
.info(context.getApiInfo())
.build();
group.resourceListing(resourceListing);
return group.build();
}

Documentation主要包含的信息

  • 分组名称
  • 接口列表
  • produces
  • consumes
  • 基础路径
  • host
  • 分组tags
  • 扩展
  • schema-Models
+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox16.html b/knife4j-doc/gitee/docs/action/springfox/springfox16.html index 7ae672fd5..8a387a3af 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox16.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox16.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十六) 分组接口swagger-resouces | Knife4j - - +springfox 源码分析(十六) 分组接口swagger-resouces | Knife4j + +
-

springfox 源码分析(十六) 分组接口swagger-resouces

通过前面的分析,我们最终得到了springfox的Documentation文档对象,将我们的RESTful接口最终转换为了文档对象,文档对象是包含了接口列表、分组信息等属性的

在springfox中,为我们提供了springfox-swagger-ui来呈现最终的接口信息.在ui界面中有两个核心接口:

  • swagger-resources:swagger分组接口,创建多少Docket,就会有多少分组信息
  • /v2/api-docs:Swagger接口示例信息,通过Documentation对象最终输出为Swagger标准信息

先来看接口源码:


@Controller
@ApiIgnore
@RequestMapping("/swagger-resources")
public class ApiResourceController {


@Autowired(required = false)
private SecurityConfiguration securityConfiguration;
@Autowired(required = false)
private UiConfiguration uiConfiguration;

private final SwaggerResourcesProvider swaggerResources;

@Autowired
public ApiResourceController(SwaggerResourcesProvider swaggerResources) {
this.swaggerResources = swaggerResources;
}

@RequestMapping(value = "/configuration/security")
@ResponseBody
public ResponseEntity<SecurityConfiguration> securityConfiguration() {
return new ResponseEntity<SecurityConfiguration>(
Optional.fromNullable(securityConfiguration).or(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK);
}

@RequestMapping(value = "/configuration/ui")
@ResponseBody
public ResponseEntity<UiConfiguration> uiConfiguration() {
return new ResponseEntity<UiConfiguration>(
Optional.fromNullable(uiConfiguration).or(UiConfigurationBuilder.builder().build()), HttpStatus.OK);
}

@RequestMapping
@ResponseBody
public ResponseEntity<List<SwaggerResource>> swaggerResources() {
return new ResponseEntity<List<SwaggerResource>>(swaggerResources.get(), HttpStatus.OK);
}
}

通过swaggerResources.get()方法获取最终的信息

SwaggerResourcesProvider是接口,在springfox中只有一个实现类InMemorySwaggerResourcesProvider


@Component
public class InMemorySwaggerResourcesProvider implements SwaggerResourcesProvider {
private final String swagger1Url;
private final String swagger2Url;

@VisibleForTesting
boolean swagger1Available;
@VisibleForTesting
boolean swagger2Available;

private final DocumentationCache documentationCache;

@Autowired
public InMemorySwaggerResourcesProvider(
Environment environment,
DocumentationCache documentationCache) {
swagger1Url = environment.getProperty("springfox.documentation.swagger.v1.path", "/api-docs");
swagger2Url = environment.getProperty("springfox.documentation.swagger.v2.path", "/v2/api-docs");
swagger1Available = classByName("springfox.documentation.swagger1.web.Swagger1Controller").isPresent();
swagger2Available = classByName("springfox.documentation.swagger2.web.Swagger2Controller").isPresent();
this.documentationCache = documentationCache;
}

@Override
public List<SwaggerResource> get() {
List<SwaggerResource> resources = new ArrayList<SwaggerResource>();

for (Map.Entry<String, Documentation> entry : documentationCache.all().entrySet()) {
String swaggerGroup = entry.getKey();
if (swagger1Available) {
SwaggerResource swaggerResource = resource(swaggerGroup, swagger1Url);
swaggerResource.setSwaggerVersion("1.2");
resources.add(swaggerResource);
}

if (swagger2Available) {
SwaggerResource swaggerResource = resource(swaggerGroup, swagger2Url);
swaggerResource.setSwaggerVersion("2.0");
resources.add(swaggerResource);
}
}
Collections.sort(resources);
return resources;
}

private SwaggerResource resource(String swaggerGroup, String baseUrl) {
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(swaggerGroup);
swaggerResource.setUrl(swaggerLocation(baseUrl, swaggerGroup));
return swaggerResource;
}

private String swaggerLocation(String swaggerUrl, String swaggerGroup) {
String base = Optional.of(swaggerUrl).get();
if (Docket.DEFAULT_GROUP_NAME.equals(swaggerGroup)) {
return base;
}
return base + "?group=" + swaggerGroup;
}
}

通过遍历DocumentationCache中缓存的Documentation对象,得到接口文档信息的分组信息,响应SwaggerResource的集合信息

SwaggerResource信息主要包含的字段信息:名称,url、swagger版本


@JsonInclude(JsonInclude.Include.NON_NULL)
public class SwaggerResource implements Comparable<SwaggerResource> {
private String name;
private String url;
private String swaggerVersion;
@Override
public int compareTo(SwaggerResource other) {
return ComparisonChain.start()
.compare(this.swaggerVersion, other.swaggerVersion)
.compare(this.name, other.name)
.result();
}

}

在开发swagger-bootstrap-ui的过程中,经常会碰到很多朋友提问,有什么方式能对文档的分组信息进行排序的吗?

我们通过上面的源码可以看到,其实SwaggerResource实现了Comparable接口,但是他的排序规则是先根据swagger的版本进行排序,然后对名称进行排序,asc顺序排序

那么我们如何实现我们自定义的排序方式呢?后面我会详细介绍.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox17.html b/knife4j-doc/gitee/docs/action/springfox/springfox17.html index 90eca44a4..b0340e31b 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox17.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox17.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十七) Swagger2接口文档示例接口api-docs | Knife4j - - +springfox 源码分析(十七) Swagger2接口文档示例接口api-docs | Knife4j + +
-

springfox 源码分析(十七) Swagger2接口文档示例接口api-docs

前面已经获取得到了swagger的分组接口信息了,接下来就是根据分组名称获取每个分组的Swagger资源详细信息,在springfox中提供了/v2/api-docs接口来进行获取

来看接口的源码

@Controller
@ApiIgnore
public class Swagger2Controller {

public static final String DEFAULT_URL = "/v2/api-docs";
private static final Logger LOGGER = LoggerFactory.getLogger(Swagger2Controller.class);
private static final String HAL_MEDIA_TYPE = "application/hal+json";

private final String hostNameOverride;
private final DocumentationCache documentationCache;
private final ServiceModelToSwagger2Mapper mapper;
private final JsonSerializer jsonSerializer;

@Autowired
public Swagger2Controller(
Environment environment,
DocumentationCache documentationCache,
ServiceModelToSwagger2Mapper mapper,
JsonSerializer jsonSerializer) {

this.hostNameOverride =
environment.getProperty(
"springfox.documentation.swagger.v2.host",
"DEFAULT");
this.documentationCache = documentationCache;
this.mapper = mapper;
this.jsonSerializer = jsonSerializer;
}

@RequestMapping(
value = DEFAULT_URL,
method = RequestMethod.GET,
produces = { APPLICATION_JSON_VALUE, HAL_MEDIA_TYPE })
@PropertySourcedMapping(
value = "${springfox.documentation.swagger.v2.path}",
propertyKey = "springfox.documentation.swagger.v2.path")
@ResponseBody
public ResponseEntity<Json> getDocumentation(
@RequestParam(value = "group", required = false) String swaggerGroup,
HttpServletRequest servletRequest) {

String groupName = Optional.fromNullable(swaggerGroup).or(Docket.DEFAULT_GROUP_NAME);
Documentation documentation = documentationCache.documentationByGroup(groupName);
if (documentation == null) {
LOGGER.warn("Unable to find specification for group {}", groupName);
return new ResponseEntity<Json>(HttpStatus.NOT_FOUND);
}
Swagger swagger = mapper.mapDocumentation(documentation);
UriComponents uriComponents = componentsFrom(servletRequest, swagger.getBasePath());
swagger.basePath(Strings.isNullOrEmpty(uriComponents.getPath()) ? "/" : uriComponents.getPath());
if (isNullOrEmpty(swagger.getHost())) {
swagger.host(hostName(uriComponents));
}
return new ResponseEntity<Json>(jsonSerializer.toJson(swagger), HttpStatus.OK);
}

private String hostName(UriComponents uriComponents) {
if ("DEFAULT".equals(hostNameOverride)) {
String host = uriComponents.getHost();
int port = uriComponents.getPort();
if (port > -1) {
return String.format("%s:%d", host, port);
}
return host;
}
return hostNameOverride;
}
}

该接口主要逻辑:

  • 传入groupName分组名称参数,从文档缓存对象中获取Documentation文档对象
  • 通过mapper提供的方法,将Documentation对象转换为标准的Swagger对象
  • JSON响应输出

Swagger的标准对象主要包含信息我们在前面也介绍过

public class Swagger {
protected String swagger = "2.0";
protected Info info;
protected String host;
protected String basePath;
protected List<Tag> tags;
protected List<Scheme> schemes;
protected List<String> consumes;
protected List<String> produces;
protected List<SecurityRequirement> security;
protected Map<String, Path> paths;
protected Map<String, SecuritySchemeDefinition> securityDefinitions;
protected Map<String, Model> definitions;
protected Map<String, Parameter> parameters;
protected Map<String, Response> responses;
protected ExternalDocs externalDocs;
protected Map<String, Object> vendorExtensions;
}

最终在ui端拿到Swagger的属性信息进行接口的信息渲染,开发人员即可进行接口的查看和调试.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox18.html b/knife4j-doc/gitee/docs/action/springfox/springfox18.html index b682e8f8c..a51288a89 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox18.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox18.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十八) 自定义扩展实现分组的排序 | Knife4j - - +springfox 源码分析(十八) 自定义扩展实现分组的排序 | Knife4j + +
-

springfox 源码分析(十八) 自定义扩展实现分组的排序

既然我们对springfox提供的接口已经有了一个初步的了解,那么针对我们在分组接口文章中提的需求,如果自定义扩展实现分组的排序如何做呢?

在swagger-bootstrap-ui以前的版本中,已经存在了增强功能,增强功能主要的方式是重写了springfox的接口,然后在我们自定义的ui中渲染即可.

因为SwaggerResource.java中没有提供排序的字段属性,所以我们可以扩展该类,提供一个排序字段

/***
*
* @since:swagger-bootstrap-ui 1.9.4
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/06/02 16:24
*/
public class SwaggerResourceExt extends SwaggerResource {

private Integer order;

public Integer getOrder() {
return order;
}

public void setOrder(Integer order) {
this.order = order;
}
}

很简单,提供一个order属性,该类继承自springfox的SwaggerResource

扩展了基础属性类,那么我们提供的方式也需要进行扩展

@Component
@Qualifier("swaggerResourcesExtProvider")
public class SwaggerResourcesExtProvider {
private final String swagger1Url;
private final String swagger2Url;

@VisibleForTesting
boolean swagger1Available;
@VisibleForTesting
boolean swagger2Available;

private final DocumentationCache documentationCache;

@Autowired
public SwaggerResourcesExtProvider(Environment environment, DocumentationCache documentationCache) {
swagger1Url = environment.getProperty("springfox.documentation.swagger.v1.path", "/api-docs-ext");
swagger2Url = environment.getProperty("springfox.documentation.swagger.v2.path", "/v2/api-docs-ext");
swagger1Available = classByName("springfox.documentation.swagger1.web.Swagger1Controller").isPresent();
swagger2Available = classByName("springfox.documentation.swagger2.web.Swagger2Controller").isPresent();
this.documentationCache = documentationCache;
}

public List<SwaggerResourceExt> get() {
List<SwaggerResourceExt> resources = new ArrayList<SwaggerResourceExt>();

for (Map.Entry<String, Documentation> entry : documentationCache.all().entrySet()) {
String swaggerGroup = entry.getKey();
Documentation documentation=entry.getValue();
List<VendorExtension> vendorExtensions=documentation.getVendorExtensions();
if (swagger1Available) {
SwaggerResourceExt swaggerResource = resource(swaggerGroup, swagger1Url,vendorExtensions);
swaggerResource.setSwaggerVersion("1.2");
}

if (swagger2Available) {
SwaggerResourceExt swaggerResource = resource(swaggerGroup, swagger2Url,vendorExtensions);
swaggerResource.setSwaggerVersion("2.0");
resources.add(swaggerResource);
}
}
//根据自定义扩展属性order进行排序
Collections.sort(resources, new Comparator<SwaggerResourceExt>() {
@Override
public int compare(SwaggerResourceExt o1, SwaggerResourceExt o2) {
return o1.getOrder().compareTo(o2.getOrder());
}
});
return resources;
}

private SwaggerResourceExt resource(String swaggerGroup, String baseUrl,List<VendorExtension> vendorExtensions) {
SwaggerResourceExt swaggerResource = new SwaggerResourceExt();
swaggerResource.setName(swaggerGroup);
swaggerResource.setUrl(swaggerLocation(baseUrl, swaggerGroup));
swaggerResource.setOrder(0);
//判断是否不为空
if (vendorExtensions!=null&&!vendorExtensions.isEmpty()){
Optional<VendorExtension> ov= FluentIterable.from(vendorExtensions).filter(new Predicate<VendorExtension>() {
@Override
public boolean apply(VendorExtension input) {
return input.getClass().isAssignableFrom(OrderExtensions.class);
}
}).first();
if (ov.isPresent()){
OrderExtensions orderExtensions=(OrderExtensions) ov.get();
swaggerResource.setOrder(orderExtensions.getValue());
}
}
return swaggerResource;
}

private String swaggerLocation(String swaggerUrl, String swaggerGroup) {
String base = Optional.of(swaggerUrl).get();
if (Docket.DEFAULT_GROUP_NAME.equals(swaggerGroup)) {
return base;
}
return base + "?group=" + swaggerGroup;
}
}

针对原springfox的方式进行扩展,主要逻辑

  • 首先获取Documentation的Map集合对象,进行遍历
  • 我们的接口参数是需要从外部由开发者自定义的传入的,那么此时我们可以利用Docket对象提供的扩展属性集合来操作,swagger-bootstrap-ui提供了OrderExtensions扩展,开发者创建Docket对象时进行参数传入即可
  • 筛选Documentation的扩展属性集合,找到符合规范的扩展,如果未找到则默认排序值为0

重写了获取SwaggerResource集合的工具类,接下来重写接口层

@ApiIgnore
@Controller
@RequestMapping("/swagger-resources-ext")
public class SwaggerBootstrapUiResourceExtController {
private final SwaggerResourcesExtProvider swaggerResourcesExtProvider;

@Autowired
public SwaggerBootstrapUiResourceExtController(@Qualifier("swaggerResourcesExtProvider") SwaggerResourcesExtProvider swaggerResources) {
this.swaggerResourcesExtProvider = swaggerResources;
}

@RequestMapping
@ResponseBody
public ResponseEntity<List<SwaggerResourceExt>> swaggerResources() {
return new ResponseEntity<List<SwaggerResourceExt>>(swaggerResourcesExtProvider.get(), HttpStatus.OK);
}
}

此时,提供一个类似springfox的分组接口,通过工具类提供,获取拿到分组信息

有了以上的扩展实现,我们SwaggerConfiguration配置文件创建Docket对象时需要稍微做一个改动

@Bean(value = "defaultApi")
public Docket defaultApi() {
ParameterBuilder parameterBuilder=new ParameterBuilder();
List<Parameter> parameters= Lists.newArrayList();
parameterBuilder.name("token").description("token令牌").modelRef(new ModelRef("String"))
.parameterType("header")
.required(true).build();
parameters.add(parameterBuilder.build());

Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("默认接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.controller"))
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build()
//添加扩展
.extensions(Lists.newArrayList(new OrderExtensions(1)))
.globalOperationParameters(parameters)
.securityContexts(Lists.newArrayList(securityContext())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey()));
return docket;
}

此时,我们使用extensions方法添加扩展,赋值OrderExtensions的排序order值

此时我们访问接口/swagger-resoueces-ext返回:

[
{
"order": 1,
"name": "默认接口",
"url": "/v2/api-docs-ext?group=默认接口",
"swaggerVersion": "2.0",
"location": "/v2/api-docs-ext?group=默认接口"
},
{
"order": 2,
"name": "分组接口",
"url": "/v2/api-docs-ext?group=分组接口",
"swaggerVersion": "2.0",
"location": "/v2/api-docs-ext?group=分组接口"
}
]

此时,我们在Ui端就可以自定义接口分组的排序了

以上功能在swagger-bootstrap-ui1.9.4版本已经实现,开发者如果有排序的需求,可以使用此方法.

注意:在使用此功能时,需要在Swagger的配置文件类上加上@EnableSwaggerBootstrapUI注解

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox19.html b/knife4j-doc/gitee/docs/action/springfox/springfox19.html index aa3e6c34b..059eaba32 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox19.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox19.html @@ -10,26 +10,26 @@ - -springfox 源码分析(十九) guava库学习 | Knife4j - - +springfox 源码分析(十九) guava库学习 | Knife4j + +
-

springfox 源码分析(十九) guava库学习

我们在研究springfox的过程中,发现springfox大量使用了guava这个库的一些方法和类,针对我们在研究源码的学习过程中,将涉及到的guava库中的类进行归纳总结,后期在工作中我们也可以熟练运用guava库为我们提供的简介api

ArrayListMultimap

从字面意思来看map中包含了数组元素

举一个简单的例子来帮助我们理解这个类

我们在读书时,作为主体对象的我们(学生),都有一个班级,即该学生是属于哪个班级的,现在拥有全校的学生列表集合,但是想通过班级名称来统计各个班级的人数情况,应该如何操作呢?

如果在数据库中,一个SQL语句的分组函数即可搞定,但是在Java中却是异常繁杂.

ArrayListMultimap就可以做到

先来看我们的学生类:

public class Student {

private String name;

private Integer age;
/***
* 班级
*/
private String classRoom;
//getter setter
}

学生类拥有姓名、年龄、班级三个属性,此时我们通过ArrayListMultimap来解决上面我们所提的问题:

List<Student> list= Lists.newArrayList();
list.add(new Student("学生A",12,"班级1"));
list.add(new Student("学生B",13,"班级2"));
list.add(new Student("学生C",12,"班级1"));
list.add(new Student("学生D",15,"班级3"));
list.add(new Student("学生E",12,"班级1"));
list.add(new Student("学生F",13,"班级2"));
list.add(new Student("学生G",11,"班级1"));
list.add(new Student("学生H",15,"班级2"));
list.add(new Student("学生I",11,"班级3"));
list.add(new Student("学生J",12,"班级1"));
list.add(new Student("学生W",16,"班级1"));
list.add(new Student("学生Q",13,"班级4"));

//针对班级分组
ArrayListMultimap<String,Student> arrayListMultimap=ArrayListMultimap.create();
for (Student student:list){
arrayListMultimap.put(student.getClassRoom(),student);
}
Map<String,Collection<Student>> map=arrayListMultimap.asMap();
for (String key:map.keySet()){
Collection<Student> students=map.get(key);
System.out.println("班级名称:"+key+",总共有学员:"+students.size());
for (Student sd:students){
System.out.println(sd.toString());
}
System.out.println("");
}

而此时,控制台的打印情况如下:

班级名称:班级1,总共有学员:6
班级:班级1,姓名:学生A,年龄:12
班级:班级1,姓名:学生C,年龄:12
班级:班级1,姓名:学生E,年龄:12
班级:班级1,姓名:学生G,年龄:11
班级:班级1,姓名:学生J,年龄:12
班级:班级1,姓名:学生W,年龄:16

班级名称:班级4,总共有学员:1
班级:班级4,姓名:学生Q,年龄:13

班级名称:班级2,总共有学员:3
班级:班级2,姓名:学生B,年龄:13
班级:班级2,姓名:学生F,年龄:13
班级:班级2,姓名:学生H,年龄:15

班级名称:班级3,总共有学员:2
班级:班级3,姓名:学生D,年龄:15
班级:班级3,姓名:学生I,年龄:11

班级数量、班级针对的学生明细、学生根据班级统计情况都很方便的统计出来了.

FluentIterable

guava提供了FluentIterable对集合进行各种简化遍历的操作,这和Java8中的stream是很相似的.

例如对一个集合中的元素进行过滤

public static void main(String[] args) {
List<Student> list= Lists.newArrayList();
list.add(new Student("学生A",12,"班级1"));
list.add(new Student("学生B",13,"班级2"));
list.add(new Student("学生C",12,"班级1"));
list.add(new Student("学生D",15,"班级3"));
list.add(new Student("学生E",12,"班级1"));
list.add(new Student("学生F",13,"班级2"));
list.add(new Student("学生G",11,"班级1"));
list.add(new Student("学生H",15,"班级2"));
list.add(new Student("学生I",11,"班级3"));
list.add(new Student("学生J",12,"班级1"));
list.add(new Student("学生W",16,"班级1"));
list.add(new Student("学生Q",13,"班级4"));
//arrmapTest(list);
fluter(list);

}

static void fluter(List<Student> list){
//过滤
List<Student> studentList=FluentIterable.from(list).filter(new Predicate<Student>() {
@Override
public boolean apply(Student input) {
return input.getClassRoom().equals("班级1");
}
}).toList();
for (Student sd:studentList){
System.out.println(sd.toString());
}
}

此时,我们筛选班级1的学生,最终输出:

班级:班级1,姓名:学生A,年龄:12
班级:班级1,姓名:学生C,年龄:12
班级:班级1,姓名:学生E,年龄:12
班级:班级1,姓名:学生G,年龄:11
班级:班级1,姓名:学生J,年龄:12
班级:班级1,姓名:学生W,年龄:16

通过Java8 来操作

List<Student> li=list.stream().filter(student -> student.getClassRoom().equals("班级1")).collect(Collectors.toList());
for (Student sd:li){
System.out.println(sd.toString());
}

Optional

Optional操作是避免开发人员出现空指针操作而设计的,在Java8 中也有该对象的使用。

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox2.html b/knife4j-doc/gitee/docs/action/springfox/springfox2.html index 53a1ecefb..bc7e50f6e 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox2.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox2.html @@ -10,26 +10,26 @@ - -springfox 源码分析(二) 初探mapstruct | Knife4j - - +springfox 源码分析(二) 初探mapstruct | Knife4j + +
-

springfox 源码分析(二) 初探mapstruct

时间:2019-5-22 12:40:21

地点:单位

前言

在继续阅读学习springfox源码之前,我们需要先来学习一下mapstruct这个组件,只有在理解了mapstruct组件后,后面再看springfox的源码才不会有疑惑

因为之前并没有接触过mapstruct这个组件,所以记录一下学习的过程.

mapstruct

官网地址:http://mapstruct.org/

GitHub:https://github.com/mapstruct/mapstruct

文档:http://mapstruct.org/documentation/stable/reference/html/

一言一概之:Java bean mappings, the easy way!

简介

通过上面的最简单的一句话,很清晰的描述了mapstruct的作用,主要用于Java Bean的映射,这有点类似mybatis中的对象关系映射,但此处的mappings并非mybatis那样

MapStruct同时也是一个代码生成器,它基于约定优于配置方法极大地简化了Java bean类型之间映射的实现。

通过MapStruct生成的映射代码使用普通方法调用,因此快速,类型安全且易于理解。

作用

我们为什么需要MapStruct组件?

我们的应用程序通常会使用分层结构,分层时每层的对象会有不同的POJO对象(例如实体DO和业务DTO),实体DO定义了程序内部的逻辑属性,而DTO定义了外部业务逻辑关系

通常我们在应用程序通过DTO接受进来外部参数时,需要将之转化为内部DO对象,供内部调用,此时MapStruct组件正为此而生.

与其他映射框架相比,MapStruct在编译时生成bean映射,可确保高性能,允许快速的开发人员反馈和彻底的错误检查。

示例

先来看一组关于MapStruct的示例

maven中引入MapStruct框架的jar包

<properties>
<mapstruct.version>1.2.0.Final</mapstruct.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <!-- or newer version -->
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.suppressGeneratorTimestamp=true
</compilerArg>
<compilerArg>
-Amapstruct.suppressGeneratorVersionInfoComment=true
</compilerArg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>

假设我们拥有DO和业务DTO对象Car.javaCarDTO.java

Car.java:

public class Car {

private String name;
private String make;
private int numberOfSeats;
//getter and setter ,constructs
}

CarDTO.java

public class CarDTO {
private int seatCount;
//getter and setter ,constructs
}

按照传统的转换关系,如果我们不使用MapStruct框架的话,使用方式如下:

Car car=new Car("c1","m1",12);
CarDTO cd=new CarDTO();
//赋值
cd.setSeatCount(car.getNumberOfSeats());

按照以上的方式会有以下局限:

  • 如果属性很多的话,需要写大量的赋值属性代码
  • 代码极其繁琐

如果使用MapStruct框架,我们可以先声明一个CarMapping接口

/***
*
* @since:spring-plugin-demo 1.0
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/05/21 21:40
*/
@Mapper
public interface CarMapper {

CarMapper INSTANCE= Mappers.getMapper(CarMapper.class);

@Mapping(source = "numberOfSeats", target = "seatCount")
CarDTO carToCarDto(Car car);


}

我们将所有DO对象及DTO对象的映射关系都定义在Mapper接口中,然后通过@Mapper注解标注

而此时我们使用的话也会有所变化:

 //given
Car car = new Car( "Morris", "4make", 13 );
//when
CarDTO carDto = CarMapper.INSTANCE.carToCarDto( car );
//then
System.out.println(carDto.getSeatCount());

此时,我们程序在compile编译时,MapStruct框架会为我们自动生成CarMapper的实现类:

此时在generated-source也会生成相应的java文件

CarMapperImpl.java


@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2019-05-21T21:46:10+0800",
comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_111 (Oracle Corporation)"
)
public class CarMapperImpl implements CarMapper {

@Override
public CarDTO carToCarDto(Car car) {
if ( car == null ) {
return null;
}

CarDTO carDTO = new CarDTO();

carDTO.setSeatCount( car.getNumberOfSeats() );

return carDTO;
}
}

映射接口自动帮助我们实现了Java实体的转换

总结

了解了mapstruct的功能,我们在接下来学习springfox的源码时会轻松很多.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox20.html b/knife4j-doc/gitee/docs/action/springfox/springfox20.html index 15f3c4cdc..df7934285 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox20.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox20.html @@ -10,26 +10,26 @@ - -springfox 源码分析(二十) 自定义扩展实现Map、JSONObject等动态字段显示 | Knife4j - - +springfox 源码分析(二十) 自定义扩展实现Map、JSONObject等动态字段显示 | Knife4j + +
-

springfox 源码分析(二十) 自定义扩展实现Map、JSONObject等动态字段显示

待续...

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox21.html b/knife4j-doc/gitee/docs/action/springfox/springfox21.html index 4829594ad..c1a1b6602 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox21.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox21.html @@ -10,26 +10,26 @@ - -springfox 源码分析(二十一) 忽略参数Class类型 | Knife4j - - +springfox 源码分析(二十一) 忽略参数Class类型 | Knife4j + +
-

springfox 源码分析(二十一) 忽略参数Class类型

我们在前面的源码过程中,了解了springfox的基本工作原理,接下来,我们可以通过使用springfox给我们提供的外部接口,来处理一些我们工作中碰到的问题,或者进行自定义扩展

本篇主要介绍如何来忽略某些特定的参数Class类型

先举一个例子,假如我们的接口是这样的:

@PostMapping("/createOr33der")
@ApiOperation(value = "创建订单")
public Rest<Order> createOrdetr(@RequestBody Order order, HttpSession httpSession){
Rest<Order> r=new Rest<>();
r.setData(order);
return r;
}

我们在我们的方法上接收了一个HttpSession的参数对象,此时,我们来看我们的文档页面效果

在我们的文档介绍页面中,多出了很多我们自认为不必要的参数,因为HttpSession对象我们并不需要传参处理,该对象我们是直接拿来使用对session进行操作的

那么,针对这种情况,我们应该如何处理呢(即把HttpSession的参数处理掉,不显示)?

目前有两种方法:

  • 在方法的参数前,添加@ApiIgnore注解
  • 在创建Docket对象时,指定忽略相关的Class

第一种方式

先来看第一种的代码处理方式:

@PostMapping("/createOr33der")
@ApiOperation(value = "创建订单")
public Rest<Order> createOrdetr(@RequestBody Order order,@ApiIgnore HttpSession httpSession){
Rest<Order> r=new Rest<>();
r.setData(order);
return r;
}

我们在HttpSession的参数前,添加@ApiIgnore注解,那么此时springfox会帮助我们忽略此参数

@ApiIgnore的作用方法不仅仅在参数上,还可以作用于整个接口Controller,或者单个接口

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.PARAMETER})
public @interface ApiIgnore {
/**
* A brief description of why this parameter/operation is ignored
* @return the description of why it is ignored
*/
String value() default "";
}

其作用范围是METHODTYPEPARAMETER

第二种方式

虽然第一种方式达到了我们的目的,但是细心的朋友可能会发现,如果目前的接口方法中,存在大量的HttpSession参数,那么每个方法都需要更改一遍?那岂不是炸了

所以针对这种情况,springfox在我们创建Docket对象时,提供了入口,我们在创建Docket对象时就可以默认传入需要忽略的类Class,这样我们就不需要每个接口都更改一遍了

先来看Docket的部分源码

/**
* Adds ignored controller method parameter types so that the framework does not generate swagger model or parameter
* information for these specific types.
* e.g. HttpServletRequest/HttpServletResponse which are already included in the pre-configured ignored types.
*
* @param classes the classes to ignore
* @return this Docket
* @see springfox.documentation.spi.service.contexts.Defaults#defaultIgnorableParameterTypes()
*/
public Docket ignoredParameterTypes(Class... classes) {
this.ignorableParameterTypes.addAll(Arrays.asList(classes));
return this;
}

传入Class的集合

springfox框架默认忽略的类型在Default

private void initIgnorableTypes() {
ignored = newHashSet();
ignored.add(ServletRequest.class);
ignored.add(Class.class);
ignored.add(Void.class);
ignored.add(Void.TYPE);
ignored.add(HttpServletRequest.class);
ignored.add(HttpServletResponse.class);
ignored.add(HttpHeaders.class);
ignored.add(BindingResult.class);
ignored.add(ServletContext.class);
ignored.add(UriComponentsBuilder.class);
ignored.add(ApiIgnore.class); //Used to ignore parameters
}

此时,我们在创建Docket对象时,做一下更改,如下:

@Bean(value = "groupRestApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.groupName("分组接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.group"))
.paths(PathSelectors.any())
.build()
.ignoredParameterTypes(HttpSession.class) //添加忽略类型
.extensions(Lists.newArrayList(new OrderExtensions(2))).securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

通过ignoredParameterTypes方法,传入HttpSession的class,告诉springfox框架该class需要忽略

最终的效果如下:

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox3.html b/knife4j-doc/gitee/docs/action/springfox/springfox3.html index a9c1ed68d..9f2f9867c 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox3.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox3.html @@ -10,26 +10,26 @@ - -springfox 源码分析(三) 初探Spring Plugin插件系统 | Knife4j - - +springfox 源码分析(三) 初探Spring Plugin插件系统 | Knife4j + +
-

springfox 源码分析(三) 初探Spring Plugin插件系统

时间:2019-5-22 12:46:50

地点:单位、家中

前言

MapStuct组件一样,因为springfox中运用到了Spring Plugin插件系统,我们对研究springfox源码之前,先来学习一下Spring Plugin插件的机制

因为在工作中很少使用到Spring Plugin,所以学习记录下

Spring Plugin

Github:https://github.com/spring-projects/spring-plugin

可以说作为Spring项目中的Spring Plugin,确实相对小众,并没有像Spring其他的项目那么流行,甚至在其他流行的框架中,都很少见到他的身影.

截止目前(2019-5-22 13:54:08),Github 的Star为222,fork数66

Spring Plugin是世界上最小规模的插件系统

如今构建可扩展的体系结构是创建可维护应用程序的核心原则。 这就是像OSGi这样的完全成熟的插件环境如今如此受欢迎的原因。 不幸的是,OSGi的引入给项目带来了很多复杂性。

Spring Plugin通过提供扩展核心系统功能的插件实现的核心灵活性,但不提供动态类加载或运行时安装和插件部署等核心OSGi功能,同时为插件开发提供了更实用的方法。 虽然Spring Plugin并不像OSGi那样强大,但它可以满足穷人构建模块化可扩展应用程序的要求。

假如你希望构建一个可扩展的应用系统,你可能需要从以下几点进行考虑:

  • 无论出于何种原因,您都无法将OSGi用作完全成熟的插件架构
  • 提供专用的插件接口来满足可扩展性
  • 通过简单地提供捆绑在JAR文件中并在类路径中可用的插件接口的实现来扩展核心系统
  • 使用Spring来构建应用系统

示例

我们通过一个小示例,来对Spring Plugin系统有一个初步的了解

Spring Plugin提供一个标准的Plugin<S>接口供开发人员继承使用声明自己的插件机制,然后通过@EnablePluginRegistries注解依赖注入到Spring的容器中,Spring容器会为我们自动匹配到插件的所有实现子对象,最终我们在代码中使用时,通过依赖注入注解,注入PluginRegistry<T extends Plugin<S>, S>对象拿到插件实例进行操作。

Plugin<S>接口声明了一个接口实现,标注实现该插件是否支持,因为有可能存在多个接口实现的情况

我们在使用时,可能这样调用:

List<Plugin<S>> plugins=plugin.getPlugins();
S delimiter;
for(Plugin<S> p:plugins){
if(p.supports(delimiter)){
p.doSomeThing();//
}
}

从应用程序的扩展性来说,开发灵活的插件系统是我们每个开发人员都需考虑的

假设目前我们有一个移动电话充值系统,在业务初期发展中,业务的目标是保证稳定性,拥有充值业务

在maven配置中先来引入相关的jar包

<properties>
<logback.version>1.2.3</logback.version>
<org.slf4j.version>1.7.21</org.slf4j.version>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.9.RELEASE</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core -->
<dependency>
<groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId>
<version>1.2.0.RELEASE</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
</dependencies>

先来看我们的客户属性:

MobileCustomer

/***
*
* @since:spring-plugin-demo 1.0
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/05/22 14:41
*/
public class MobileCustomer {

/***
* 电话号码
*/
private String tel;
//setter getter
/***
* 是否老用户
*/
private boolean old=false;
}

声明我们的充值接口:

/***
* 我们有电话增值业务,业务中有充值方法
* @since:spring-plugin-demo 1.0
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/05/22 14:42
*/
public interface MobileIncrementBusiness{

/***
* 电话充值
* @param mobileCustomer
* @param money 金额
*/
void increment(MobileCustomer mobileCustomer, int money);
}

充值接口目前有一个接口,充值,根据客户和充值金额进行充值的方法

接下来,我们来实现充值的业务逻辑,假设当前我们叫他V1版本

/***
* 第一版本的充值系统
* @since:spring-plugin-demo 1.0
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/05/22 14:44
*/
public class MobileIncrementV1 implements MobileIncrementBusiness {

Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);

@Override
public void increment(MobileCustomer mobileCustomer, int money) {
logger.info("给{}充值电话费,充值金额:{}",mobileCustomer.getTel(),money);
logger.info("充值完成.");
}
}

此时,我们在系统中加入充值插件的配置

@Configuration
public class MobileConfig {


@Bean
public MobileIncrementV1 mobileIncrementV1(){
return new MobileIncrementV1();
}
}

我们在通过对外提供一个业务Service,来调用我们的充值方法

/***
*
* @since:spring-plugin-demo 1.0
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a>
* 2019/05/22 15:00
*/
@Component
public class CustomerService {


@Autowired
MobileIncrementV1 mobileIncrementV1;

public void increments(MobileCustomer mobileCustomer,int money){
//对人员进行充值
mobileIncrementV1.increment(mobileCustomer,money);
}

}

通过CustomerService方法,就可以调用我们的充值插件进行话费的充值

我们来模拟

public class MobileTest {

public static void main(String[] args) {
AnnotationConfigApplicationContext context=
new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");

CustomerService customerService=context.getBean(CustomerService.class);
MobileCustomer mobileCustomer=new MobileCustomer("13567662664");
mobileCustomer.setOld(true);
customerService.increments(mobileCustomer,120);
}
}

我们对电话13567662664进行充值120元

控制台输出:

2019-05-22 15:11:21,391 INFO (MobileIncrementV1.java:27)- 给13567662664充值电话费,充值金额:120
2019-05-22 15:11:21,394 INFO (MobileIncrementV1.java:28)- 充值完成.

插件的使用到这里就完成了,此时我们或许会有疑问?不是说满足应用程序的可扩展性吗?此处并未体现出来啊?

假设随着电话公司的业务逐步扩大,此时,电话公司推出了老用户充话费折扣的活动,具体的规则是

  • 当前电话号码必须是老用户(通过old字段来区分)
  • 充值金额必须>100
  • 折扣金额为充值金额*10%,返冲到客户的手机上

此时,针对该活动,我们为了满足以上业务,传统的做法是继续在MobileIncrementV1代码中添加业务逻辑

代码会是这样:

public class MobileIncrementV1 implements MobileIncrementBusiness {

Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);

@Override
public void increment(MobileCustomer mobileCustomer, int money) {
logger.info("给{}充值电话费,充值金额:{}",mobileCustomer.getTel(),money);
logger.info("充值完成.");
if (mobileCustomer.isOld()){
logger.info("老用户折扣");
if (money>100){
BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));
logger.info("当前充值金额>100元,返冲{}元",big.intValue());
}
}
}

@Override
public boolean supports(MobileCustomer delimiter) {
return true;
}
}

改版后的业务逻辑,我们在V1中添加了业务逻辑,满足老客户是进行返冲

运行后,控制台:

2019-05-22 15:24:50,229 INFO (MobileIncrementV1.java:29)- 给13567662664充值电话费,充值金额:120
2019-05-22 15:24:50,231 INFO (MobileIncrementV1.java:30)- 充值完成.
2019-05-22 15:24:50,232 INFO (MobileIncrementV1.java:32)- 老用户折扣
2019-05-22 15:24:50,236 INFO (MobileIncrementV1.java:35)- 当前充值金额>100元,返冲12元

程序没有任何问题,同时也满足了活动要求,但是这样做的缺陷也是明显的,主要如下

  • 在V1充值系统中,业务已经稳定,此时,如果我们的返冲活动业务比较复杂的情况下,会出现测试不到的情况,新业务逻辑代码更新后,对非老用户的充值稳定性存在影响
  • 如果我们的业务规则变化越来越多,此时我们的V1中的business方法会越来越臃肿,不利于维护
  • 假如我们的活动是有时效性的情况下,在某一段时间,这段业务逻辑有空,而时效性失效后,这段业务逻辑是冗余的,但是它仍然存在于我们的主业务方法中.

那么,针对以上问题,我们应该如何解决呢?

Spring Plugin帮助我们解决了此问题,如果用Plugin的方式,我们应该如何做呢?

首先,改进我们的增值业务MobileIncrementBusiness,改业务接口继承Plugin<S>,代码如下:

public interface MobileIncrementBusiness extends Plugin<MobileCustomer>{

/***
* 电话充值
* @param mobileCustomer
* @param money 金额
*/
void increment(MobileCustomer mobileCustomer, int money);
}

我们继承了Plugin的接口,所以我们的子类充值V1业务代码也需要实现Plugin的supports方法,代码如下:

public class MobileIncrementV1 implements MobileIncrementBusiness {

Logger logger= LoggerFactory.getLogger(MobileIncrementV1.class);

@Override
public void increment(MobileCustomer mobileCustomer, int money) {
logger.info("给{}充值电话费,充值金额:{}",mobileCustomer.getTel(),money);
logger.info("充值完成.");
}

@Override
public boolean supports(MobileCustomer delimiter) {
return true;
}
}

此时,我们把老用户返冲的代码移除了,我们通过Plugin的方式来帮助我们

我们新建老用户返冲的业务实现MobileIncrementDiscount

public class MobileIncrementDiscount implements MobileIncrementBusiness {
Logger logger= LoggerFactory.getLogger(MobileIncrementDiscount.class);
@Override
public void increment(MobileCustomer mobileCustomer, int money) {
if (supports(mobileCustomer)){
logger.info("老用户折扣");
if (money>100){
if (money>100){
BigDecimal big=new BigDecimal(money).multiply(new BigDecimal(0.1));
logger.info("当前充值金额>100元,返冲{}元",big.intValue());
}
}
}
}

/***
* 来用户才满足
* @param delimiter
* @return
*/
@Override
public boolean supports(MobileCustomer delimiter) {
return delimiter.isOld();
}
}

此时,我们启用Plugin插件系统,将我们的返冲实现业务注入到系统中

@Configuration
@EnablePluginRegistries({MobileIncrementBusiness.class})
public class MobileConfig {


@Bean
public MobileIncrementV1 mobileIncrementV1(){
return new MobileIncrementV1();
}

@Bean
public MobileIncrementDiscount mobileIncrementDiscount(){
return new MobileIncrementDiscount();
}
}

最后,我们修改我们的CustomerService中的充值方法

@Component
public class CustomerService {

@Autowired
private PluginRegistry<MobileIncrementBusiness,MobileCustomer> mobileCustomerPluginRegistry;


public void increments(MobileCustomer mobileCustomer,int money){
//获取插件
List<MobileIncrementBusiness> plugins=mobileCustomerPluginRegistry.getPlugins();
for (MobileIncrementBusiness incrementBusiness:plugins){
//对人员进行充值
incrementBusiness.increment(mobileCustomer,money);
}
}

}

此时,我们在来运行我们的Test测试

AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext("com.xiaominfo.cloud.plugin.phone");

CustomerService customerService=context.getBean(CustomerService.class);
MobileCustomer mobileCustomer=new MobileCustomer("13567662664");
mobileCustomer.setOld(true);
customerService.increments(mobileCustomer,120);

控制台输出:

2019-05-22 15:42:01,743 INFO (MobileIncrementV1.java:29)- 给13567662664充值电话费,充值金额:120
2019-05-22 15:42:01,745 INFO (MobileIncrementV1.java:30)- 充值完成.
2019-05-22 15:42:01,746 INFO (MobileIncrementDiscount.java:28)- 老用户折扣
2019-05-22 15:42:01,752 INFO (MobileIncrementDiscount.java:32)- 当前充值金额>100元,返冲12元

通过控制台,我们发现,和在v1业务中继续新增代码的方式,效果是完全相同的,但是对于整个系统的扩展性来说,是V1方式无法比例的,主要体现在以下几个方面:

  • 通过插件的方式,不需要更改原来已经稳定的业务代码,对系统稳定性来说尤为重要(系统稳定是基础)
  • 与业务解耦,如果业务发生变化(在某个周期内),或者有新用户的活动,我们只需要构建我们的业务代码,核心框架层无需更改
  • 程序架构更清晰,分层设计更明显.

源码分析

相信通过上面的示例,我们对Spring Plugin插件技术组件有一个初步的了解,接下来我们看看Spring Plugin的源码实现

既然是号称世界上规模最小的插件系统,通过我们的使用来看,确实也够简单,所以Spring Plugin的代码量也是很精悍.

通过GitHub下载下来的源码,总共也就三个包

这对于我们学习他的源码、设计模式来说,反而是好事情.

先来看Plugin涉及到的关键类图:

我们最终使用插件时,通过PluginRegistry来获取已实现的插件bean实例,该插件提供了几个主要方法:

  • Optional<T> getPluginFor(S delimiter):根据特定条件获取插件的Optional对象(第一个)
  • T getRequiredPluginFor(S delimiter):根据条件获取插件对象,如果没有,则抛出异常
  • getPlugins():获取所有插件
  • contains(T):是否包含插件
  • ...

我们在使用Spring Plugin组件的时候,主要有以下几个步骤:

  • 在我们的Configuration配置类上通过注解@EnablePluginRegistries注入相应的Plugin接口的class
  • 在Configuration配置类中注入Plugin的实现类实体Bean
  • 通过@Autowired注解,并使用PluginRegistry<T extend Plugin<S>,S>的方式拿到我们的plugin实例,然后再业务方法中进行使用.

这里有两个关键点:

1、@EnablePluginRegistries注解具体的作用

2、PluginRegistry是接口,通过@Antowired注入,具体的实现类在哪儿?

带着这两个疑问点,我们先来看@EnablePluginRegistries的代码:

EnablePluginRegistries.java

/**
* 为开启使用Plugin插件的类型应用启用PluginRegistry的实例注入
* @see #value()
* @author Oliver Gierke
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@Import(PluginRegistriesBeanDefinitionRegistrar.class)
public @interface EnablePluginRegistries {

/**
*
* The {@link Plugin} types to register {@link PluginRegistry} instances for. The registries will be named after the
* uncapitalized plugin type extended with {@code Registry}. So for a plugin interface {@code SamplePlugin} the
* exposed bean name will be {@code samplePluginRegistry}. This can be used on the client side to make sure you get
* the right {@link PluginRegistry} injected by using the {@link Qualifier} annotation and referring to that bean
* name. If the auto-generated bean name collides with one already in your application you can use the
* {@link Qualifier} annotation right at the plugin interface to define a custom name.
*
* @return
*/
Class<? extends Plugin<?>>[] value();
}

通过注释我们得知该注解的作用

  • 注册PluginRegistry的实例Bean,并以此命名
  • 导入PluginRegistriesBeanDefinitionRegistrar类进行实例Bean注入

PluginRegistry的注入规则是,首字母变小写,例如SimplePluginRegistry的实例bean,在Spring容器中的beanName为simplePluginRegistry

如果系统的命名和自动生成的名称相冲突,可以使用@Qualifier注解来强制命名匹配以解决此问题

来看PluginRegistriesBeanDefinitionRegistrar.java代码:


/**
* {@link ImportBeanDefinitionRegistrar} to register {@link PluginRegistryFactoryBean} instances for type listed in
* {@link EnablePluginRegistries}. Picks up {@link Qualifier} annotations used on the plugin interface and forwards them
* to the bean definition for the factory.
* 为pluginRegistry接口注入动态实例bean对象
*
* @author Oliver Gierke
*/
public class PluginRegistriesBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {

private static final Logger LOG = LoggerFactory.getLogger(PluginRegistriesBeanDefinitionRegistrar.class);

/*
* importingClassMetadata:此参数为通过@EnablePluginRegistries注解标注的类型注解元数据信息对象
* registry:注入bean对象
*
*/
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {

//获取当前enablePluginRegistries注解类信息
Map<String, Object> annotationAttributes = importingClassMetadata
.getAnnotationAttributes(EnablePluginRegistries.class.getName());
//判断是否为空
if (annotationAttributes == null) {
LOG.info("No EnablePluginRegistries annotation found on type {}!", importingClassMetadata.getClassName());
return;
}
//获取什么的类型集合
//例如我们在示例中使用的@EnablePluginRegistries({MobileIncrementBusiness.class})
//此处会拿到MobileIncrementBusiness.class这个type,types.length=1
Class<?>[] types = (Class<?>[]) annotationAttributes.get("value");
//循环遍历
for (Class<?> type : types) {
//获取PluginRegistryFactoryBean类的实体bean定义builder
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(PluginRegistryFactoryBean.class);
builder.addPropertyValue("type", type);

RootBeanDefinition beanDefinition = (RootBeanDefinition) builder.getBeanDefinition();
beanDefinition.setTargetType(getTargetType(type));

Qualifier annotation = type.getAnnotation(Qualifier.class);

// If the plugin interface has a Qualifier annotation, propagate that to the bean definition of the registry
if (annotation != null) {
AutowireCandidateQualifier qualifierMetadata = new AutowireCandidateQualifier(Qualifier.class);
qualifierMetadata.setAttribute(AutowireCandidateQualifier.VALUE_KEY, annotation.value());
beanDefinition.addQualifier(qualifierMetadata);
}
//获取bean的默认名称
// Default
String beanName = annotation == null //
? StringUtils.uncapitalize(type.getSimpleName() + "Registry") //
: annotation.value();
//动态注入
registry.registerBeanDefinition(beanName, builder.getBeanDefinition());
}
}

/**
* Returns the target type of the {@link PluginRegistry} for the given plugin type.
*
* @param pluginType must not be {@literal null}.
* @return
*/
private static ResolvableType getTargetType(Class<?> pluginClass) {

Assert.notNull(pluginClass, "Plugin type must not be null!");

ResolvableType delimiterType = ResolvableType.forClass(Plugin.class, pluginClass).getGeneric(0);
ResolvableType pluginType = ResolvableType.forClass(pluginClass);

return ResolvableType.forClassWithGenerics(OrderAwarePluginRegistry.class, pluginType, delimiterType);
}
}

通过以上代码,我们知道:

  • 通过@EnablePluginRegistries会为我们动态注入PluginRetry的实体bean
  • PluginRegistryFactoryBean会产生一个目标bean的代理,此目标bean真是PluginRegistry接口的实例,首先找到容器中实现了Plugin插件接口的实体bean,最终得到一个List<Plugin<S>>的集合
  • 通过拿到该Plugins的结合,在通过OrderAwarePluginRegistry.create(List<Plugin<S>>)的方法来创建PluginRetry接口的默认实例
  • 通过上面的类图其实我们知道,PluginRetry的接口拥有他的默认子类实现,为OrderAwarePluginRegistry

回过头来看我们示例中的CustomerService的Plugin调用方式

@Component
public class CustomerService {

@Autowired
private PluginRegistry<MobileIncrementBusiness,MobileCustomer> mobileCustomerPluginRegistry;
}

通过制定泛型T和delimiter的S,最终通过依赖注入匹配到PluginRegistry的实例bean

我们可以通过调试来查看我们最终的mobileCustomerPluginRegistry是否和我们通过读源码的方式得到的一致:

我们通过Debug断点来跟踪

从上图中我们可以看到,PluginRegistry的最终实例是OrderAwarePluginRegistry实体对象

整个过程也到此结束

总结

我们通过该篇文章的分析,了解到了Spring Plugin组件的工作方式,大致跟踪学习了Plugin的初始化过程

不知道通过上面的介绍,你是否会在工作中更多的使用Spring Plugin组件的,至少从目前来看,他的使用还是很简单的,对于应用程序的可扩展性也是极强的.

Springfox的源码中大量的使用了Spring Plugin的这种方式,相信通过这篇文章,能对后面我们研究学习Springfox的源码有一个很大的提升和帮助.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox4.html b/knife4j-doc/gitee/docs/action/springfox/springfox4.html index 04ff6e947..4f10cb67c 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox4.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox4.html @@ -10,26 +10,26 @@ - -springfox 源码分析(四) 配置类初始化 | Knife4j - - +springfox 源码分析(四) 配置类初始化 | Knife4j + +
-

springfox 源码分析(四) 配置类初始化

时间:2019-5-23 12:46:50

地点:单位、家中

@EnableSwagger2

有了二三章的理解,此时我们再来看EnableSwagger2注解的内容

@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
@Target(value = { java.lang.annotation.ElementType.TYPE })
@Documented
@Import({Swagger2DocumentationConfiguration.class})
public @interface EnableSwagger2 {
}

Swagger2DocumentationConfiguration

该注解没啥好说的,最终是导入Swagger2DocumentationConfiguration的配置类

@Configuration
@Import({ SpringfoxWebMvcConfiguration.class, SwaggerCommonConfiguration.class })
@ComponentScan(basePackages = {
"springfox.documentation.swagger2.mappers"
})
@ConditionalOnWebApplication
public class Swagger2DocumentationConfiguration {

此处的@ComponentScan注解,扫描了springfox.documentation.swagger2.mappers包路径

Mappers

该包路径下包含了众多运用MapStruct组件自动生成的Mapper实体类转换关系,通过扫描注解,自动注入到Spring的容器中

关于MapStruct组件的使用,可参考:springfox 源码分析(二) 初探mapstruct

主要包括如下:

  • LicenseMapper
  • ModelMapper
  • ParameterMapper
  • SecurityMapper
  • SerivceModelToSwagger2Mapper
  • VendorExtensionsMapper

每个Mapper接口都有一个实现类MapperImpl,实现类通过@Component注解注入到Spring的容器中

最重要的是SerivceModelToSwagger2Mapper这个Mapper

该类的作用会聚合使用Model、Parameter、License等Mapper,将springfox中的对象转化为Swagger标准的对象,包括Swagger


@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2018-06-23T17:02:57-0500",
comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_151 (Oracle Corporation)"
)
@Component
public class ServiceModelToSwagger2MapperImpl extends ServiceModelToSwagger2Mapper {

@Autowired
private ModelMapper modelMapper;
@Autowired
private ParameterMapper parameterMapper;
@Autowired
private SecurityMapper securityMapper;
@Autowired
private LicenseMapper licenseMapper;
@Autowired
private VendorExtensionsMapper vendorExtensionsMapper;

@Override
public Swagger mapDocumentation(Documentation from) {
if ( from == null ) {
return null;
}

Swagger swagger = new Swagger();

swagger.setVendorExtensions( vendorExtensionsMapper.mapExtensions( from.getVendorExtensions() ) );
swagger.setSchemes( mapSchemes( from.getSchemes() ) );
swagger.setPaths( mapApiListings( from.getApiListings() ) );
swagger.setHost( from.getHost() );
swagger.setDefinitions( modelMapper.modelsFromApiListings( from.getApiListings() ) );
swagger.setSecurityDefinitions( securityMapper.toSecuritySchemeDefinitions( from.getResourceListing() ) );
ApiInfo info = fromResourceListingInfo( from );
if ( info != null ) {
swagger.setInfo( mapApiInfo( info ) );
}
swagger.setBasePath( from.getBasePath() );
swagger.setTags( tagSetToTagList( from.getTags() ) );
List<String> list2 = from.getConsumes();
if ( list2 != null ) {
swagger.setConsumes( new ArrayList<String>( list2 ) );
}
else {
swagger.setConsumes( null );
}
List<String> list3 = from.getProduces();
if ( list3 != null ) {
swagger.setProduces( new ArrayList<String>( list3 ) );
}
else {
swagger.setProduces( null );
}

return swagger;
}
//more...
}

各个Mapper组件的映射关系如下:

Mapper目标类
LicenseMapperio.swagger.models.License通过ApiInfo的属性Lincese构建目标类实体对象
ModelMapperio.swagger.models.Modelspringfox.documentation.schema.Model转化成目标类
ParameterMapperio.swagger.models.parameters.Parameterspringfox.documentation.service.Parameter转化成目标类
SecurityMapperio.swagger.models.auth.SecuritySchemeDefinition
ServiceModelToSwagger2Mapperio.swagger.models.Swagger输出Swagger完整对象

SpringfoxWebMvcConfiguration

Swagger2DocumentationConfiguration源码中,我们看到该Configuration类还引入了SpringfoxWebMvcConfiguration,该类是注入Spring Rest接口相关的配置核心类

先来看源码:


@Configuration
@Import({ ModelsConfiguration.class })
@ComponentScan(basePackages = {
"springfox.documentation.spring.web.scanners",
"springfox.documentation.spring.web.readers.operation",
"springfox.documentation.spring.web.readers.parameter",
"springfox.documentation.spring.web.plugins",
"springfox.documentation.spring.web.paths"
})
@EnablePluginRegistries({ DocumentationPlugin.class,
ApiListingBuilderPlugin.class,
OperationBuilderPlugin.class,
ParameterBuilderPlugin.class,
ExpandedParameterBuilderPlugin.class,
ResourceGroupingStrategy.class,
OperationModelsProviderPlugin.class,
DefaultsProviderPlugin.class,
PathDecorator.class,
ApiListingScannerPlugin.class
})
public class SpringfoxWebMvcConfiguration {

@Bean
public Defaults defaults() {
return new Defaults();
}

@Bean
public DocumentationCache resourceGroupCache() {
return new DocumentationCache();
}

@Bean
public static ObjectMapperConfigurer objectMapperConfigurer() {
return new ObjectMapperConfigurer();
}

@Bean
public JsonSerializer jsonSerializer(List<JacksonModuleRegistrar> moduleRegistrars) {
return new JsonSerializer(moduleRegistrars);
}

@Bean
public DescriptionResolver descriptionResolver(Environment environment) {
return new DescriptionResolver(environment);
}

@Bean
public HandlerMethodResolver methodResolver(TypeResolver resolver) {
return new HandlerMethodResolver(resolver);
}

}

从源码中我们可以看到:

  • 使用import导入ModelConfiguration配置类,该类
  • 使用@ComponentScan注解扫描配置的package包路径,完成Spring的Bean实例注入
  • 使用@EnablePluginRegistries插件机制来完成插件的动态实例Bean注入到Spring容器中,关于Spring Plugin的使用,不明白的可以参考下上一篇文章对Spring Plugin的说明
  • 注入相关Bean的实例对象

ModelsConfiguration

从webmvc配置类导入的Models配置类,我们来看该类的源码

@Configuration
@ComponentScan(basePackages = {
"springfox.documentation.schema"
})
@EnablePluginRegistries({
ModelBuilderPlugin.class,
ModelPropertyBuilderPlugin.class,
TypeNameProviderPlugin.class,
SyntheticModelProviderPlugin.class
})
public class ModelsConfiguration {
@Bean
public TypeResolver typeResolver() {
return new TypeResolver();
}
}

该类的配置和SpringfoxWebMvcConfiguration配置类相似,作用都是扫描包路径,启用PluginRetry进行Spring的实体Bean动态注入

SwaggerCommonConfiguration

Swagger2DocumenationConfiguration导入的第二个配置类SwaggerCommonConfiguration

来看代码:

SwaggerCommonConfiguration.java

@Configuration
@ComponentScan(basePackages = {
"springfox.documentation.swagger.schema",
"springfox.documentation.swagger.readers",
"springfox.documentation.swagger.web"
})
public class SwaggerCommonConfiguration {

}

作用和以上类似

总结

通过@EnableSwagger2注解,我们看到了三个4个Configuration配置类的导入

主要作用:

  • 实体Bean的注入
  • Plugin插件的动态Bean注入
  • 扫描springfox配置的各种package路径

看到这里相信我们还是一头雾水,我们并没有发现springfox何时初始化接口类的.

接下来,我们会针对上面Configuration涉及到的Plugin和@CompnentScan扫描package路径进行一一探索.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox5.html b/knife4j-doc/gitee/docs/action/springfox/springfox5.html index b2a880b22..23fe8bc58 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox5.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox5.html @@ -10,26 +10,26 @@ - -springfox 源码分析(五) web配置类Plugin插件的使用 | Knife4j - - +springfox 源码分析(五) web配置类Plugin插件的使用 | Knife4j + +
-

springfox 源码分析(五) web配置类Plugin插件的使用

时间:2019-5-23 14:46:50

地点:家中

前言

我们在上一篇文章,通过@EnableSwagger2注解,知道springfox使用开启Plugin注解的配置,注入了很多Plugin的配置类,结合我们第二篇针对Spring Plugin的使用文章介绍,该篇主要探索springfox中的各种不同Plugin的具体作用,以及声明了那些方法

插件

SpringfoxWebMvcConfiguration配置中,主要涉及了以下Plugin

  • DocumentationPlugin
  • ApiListingBuilderPlugin
  • OperationBuilderPlugin
  • ParameterBuilderPlugin
  • ExpandedParameterBuilderPlugin
  • OperationModelsProviderPlugin
  • DefaultsProviderPlugin
  • PathDecorator
  • ApiListingScannerPlugin

代码结构一览:

plugin中声明的接口,都是为处理contexts上下文中的属性

DocumentationPlugin

先来看DocumentationPlugin的源码

public interface DocumentationPlugin extends Plugin<DocumentationType> {
/**
* @return indicator to determine if the plugin is enabled
*/
boolean isEnabled();

DocumentationType getDocumentationType();

/**
* Creates a documentation context based on a given DocumentationContextBuilder
*
* @param builder - @see springfox.documentation.spi.service.contexts.DocumentationContextBuilder
* @return context to use for building the documentation
*/
DocumentationContext configure(DocumentationContextBuilder builder);

/**
* Gets the group name for the plugin. This is expected to be unique for each instance of the plugin
* @return group the plugin belongs to
*/
String getGroupName();
}

此Plugin使用的分隔符类是DocumentationType,文档类型,在Springfox中声明了三个版本的文档类型,主要是:

  • SWAGGER_2:swagger的2.0版本
  • SWAGGER_12:Swagger的1.2版本
  • SPRING_WEB:springfox项目是由原spring-mvc-swagger项目演变而来,所以这是最早的一个版本

DocumentationPlugin定义了三个方法:

  • 是否启用
  • 获取文档类型
  • 通过文档上下文Builder构建文档上下文对象
  • 获取分组名称

那么,他的实现类是谁,我们通过IDEA的编辑器功能能轻松定位到,是Docket类

来看类图:

由于Docket对象是最终实现类,而我们开发者一般在使用时,都是通过创建Docket的实体对象来注入到Spring的容器中

所以,我们创建几个Docket对象的Bean实例,那么通过PluginRetry<DocumentationPlugin,DocumentationType>的getPlugins()方法,最终就会获取到外部注入的Docket对象实例,然后再程序中就可以使用了

ApiListingBuilderPlugin

来看ApiListingBuilderPlugin的源码

public interface ApiListingBuilderPlugin extends Plugin<DocumentationType> {
/**
* Implement this method to override the ApiListing using the ApiListingBuilder
*
* @param apiListingContext - context that can be used to override the model property attributes
* @see springfox.documentation.service.ApiListing
* @see springfox.documentation.builders.ApiListingBuilder
*/
void apply(ApiListingContext apiListingContext);
}

实现ApiListingBuilderPlugin插件类需要实现apply方法,主要是处理ApiListingContext上下文的属性信息

来看类图:

ApiListingBuilderPlugin类图中,我们可以看到,他有三个子类,分别是:

  • MediaTypeReader:获取接口的RequestMapping注解,赋值Produces和Consumes属性
  • ApiListingReader:针对controller名称的处理操作,最后赋值给ApiListingBuilder对象description属性
  • SwaggerApiListingReader:获取@Api注解,赋值tag及description属性

这三个实现类都通过@Component注解注入到了Spring的容器中

OperationBuilderPlugin

springfox中的一些列插件Plugin最终的作用都是分别为定义传参的Context上下文进行一系列的赋值处理

每个上下文中几乎都会存在该对象的Builder,最终通过各种不同的Plugin来分别进行赋值,这样整个程序架构会清晰很多

Operation也不例外,先来看Operation的上下文类

OperationContext.java

public class OperationContext {
//builder函数
private final OperationBuilder operationBuilder;
//Spring中接口的请求方法类型枚举
private final RequestMethod requestMethod;
//请求接口上下文
private final RequestMappingContext requestContext;
private final int operationIndex;
//getter setter and constructor

}

此时,我们来看OperationBuilderPlugin插件的源码:

public interface OperationBuilderPlugin extends Plugin<DocumentationType> {
/**
* Implement this method to override the Operation using the OperationBuilder available in the context
*
* @param context - context that can be used to override the parameter attributes
* @see springfox.documentation.service.Operation
* @see springfox.documentation.builders.OperationBuilder
*/
void apply(OperationContext context);
}

顶级Plugin声明接口,分层逐步给OperationContext对象赋值

先来看部分类图:

由于OperationBuilderPlugin实现类比较多,此处类图进列出其中四个实现类,我们通过文字来一一说明

  • DefaultOperationReader:请求方法、接口说明、唯一id值
  • MediaTypeReader:consumes、produces
  • OperationAuthReader:权限赋值
  • OperationDeprecatedReader;接口是否过时
  • OperationHiddenReader:是否隐藏
  • OperationHttpMethodReader:接口请求方法
  • OperationImplicitParameterReader:针对@ApiImplicitParam注解的接口进行读取赋值
  • OperationImplicitParametersReader:针对@ApiImplicitParams注解的接口进行读取赋值
  • OperationNicknameIntoUniqueIdReader:昵称属性,通过读取@ApiOperation注解中的nickname属性进行赋值
  • OperationNotesReader:接口说明
  • OperationParameterHeadersConditionReader:请求头
  • OperationParameterReader:后端配置的全局parameter以及接口的parameter参数进行读取赋值
  • OperationParameterRequestConditionReader:参数条件
  • OperationPositionReader:position属性
  • OperationResponseClassReader:响应类处理
  • OperationSummaryReader:接口名称
  • OperationTagsReader:tags
  • ResponseMessagesReader:响应状态码信息,先读取后端配置的全局,然后读取接口
  • SwaggerMediaTypeReader:consumes、produces
  • SwaggerOperationResponseClassReader:响应class类
  • SwaggerOperationTagsReader:接口的tags处理
  • SwaggerResponseMessageReader:状态码信息,针对@ApiResponse注解标注的接口
  • VendorExtensionsReader:扩展

整个代码结构一览:

ParameterBuilderPlugin

针对参数处理的Plugin,先来看相关类图:

总共有七个实现类,我们一一说明:

  • ApiParamParameterBuilder:针对接口使用@ApiParam注解的参数进行处理
  • ParameterDataTypeReader:参数的数据类型
  • ParameterDefaultReader:参数默认值
  • ParameterMultiplesReader:
  • ParameterNameReader:参数名称
  • ParameterRequiredReader:参数是否必须
  • ParameterTypeReader:参数类型,包括(form、header、query、formdata、body),默认是body

ExpandedParameterBuilderPlugin

先来看类图关系

从类图关系中,实现类主要有两个:

  • ExpandedParameterBuilder:实体类参数的默认属性赋值
  • SwaggerExpandedParameterBuilder:针对我们的类使用@ApiModelProperty注解的操作

OperationModelsProviderPlugin

来看类图关系

  • OperationModelsProvider:收集所有的参数Models,返回类型,全局Models
  • SwaggerOperationModelsProvider:接口返回类型已经使用@ApiResponse标注的返回类型

DefaultsProviderPlugin

来看DefaultsProviderPlugin的源码

public interface DefaultsProviderPlugin extends Plugin<DocumentationType> {
/**
* Implement this method to override the @see springfox.documentation.spi.service.contexts
* .DocumentationContextBuilder
*
* @param documentationType - creates a default DocumentationContextBuilder based on documentation type
* @return - returns the documentation context builder
*/
DocumentationContextBuilder create(DocumentationType documentationType);
}

根据文档类型创建DocumentationContextBuilder对象

DefaultsProviderPlugin只有一个实现子类,那就是springfox.documentation.spring.web.plugins.DefaultConfiguration

public class DefaultConfiguration implements DefaultsProviderPlugin {

private final Defaults defaults;
private final TypeResolver typeResolver;
private final ServletContext servletContext;

public DefaultConfiguration(Defaults defaults,
TypeResolver typeResolver,
ServletContext servletContext) {

this.servletContext = servletContext;
this.defaults = defaults;
this.typeResolver = typeResolver;
}

@Override
public DocumentationContextBuilder create(DocumentationType documentationType) {
return new DocumentationContextBuilder(documentationType)
.operationOrdering(defaults.operationOrdering())
.apiDescriptionOrdering(defaults.apiDescriptionOrdering())
.apiListingReferenceOrdering(defaults.apiListingReferenceOrdering())
.additionalIgnorableTypes(defaults.defaultIgnorableParameterTypes())
.rules(defaults.defaultRules(typeResolver))
.defaultResponseMessages(defaults.defaultResponseMessages())
.pathProvider(new RelativePathProvider(servletContext))
.typeResolver(typeResolver)
.enableUrlTemplating(false)
.selector(ApiSelector.DEFAULT);
}

@Override
public boolean supports(DocumentationType delimiter) {
return true;
}
}

给DocumentationContextBuilder创建一系列空对象默认值,方便后期其他Plugin进行赋值初始化

DefaultsTypeResolver在前面的Configuration配置类中已经通过Bean注解进行了注入

PathDecorator

先来看类图:

PathDecorator声明了一个Guava函数库中的Function函数接口

Function


@GwtCompatible
public interface Function<F, T> {
@Nullable
@CanIgnoreReturnValue // TODO(kevinb): remove this
T apply(@Nullable F input);

/**
* <i>May</i> return {@code true} if {@object} is a {@code Function} that behaves identically to
* this function.
*
* <p><b>Warning: do not depend</b> on the behavior of this method.
*
* <p>Historically, {@code Function} instances in this library have implemented this method to
* recognize certain cases where distinct {@code Function} instances would in fact behave
* identically. However, as code migrates to {@code java.util.function}, that behavior will
* disappear. It is best not to depend on it.
*/
@Override
boolean equals(@Nullable Object object);
}

传入输入参数,返回输出参数

主要实现类:

  • OperationPathDecorator:basePath处理类
  • PathMappingDecorator:接口path处理
  • PathSanitizer:接口path-origin处理
  • QueryStringUriTemplateDecorator:接口参数处理

ApiListingScannerPlugin

来看源码

public interface ApiListingScannerPlugin extends Plugin<DocumentationType> {
/**
* Implement this method to manually add ApiDescriptions
*
* @param context - Documentation context that can be used infer documentation context
* @see springfox.documentation.service.ApiDescription
* @return List of {@link ApiDescription}
*/
List<ApiDescription> apply(DocumentationContext context);
}

该Plugin没有任何实现子类

总结

通过上面的Plugin,我们大致了解了Springfox中定义的Plugin接口,以及实现类,完事具备,此时只需要查看springfox的初始化代码部分了

在下一篇文章中我们继续.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox6.html b/knife4j-doc/gitee/docs/action/springfox/springfox6.html index 6944b9c43..0e8dfb720 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox6.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox6.html @@ -10,26 +10,26 @@ - -springfox 源码分析(六) web配置类扫描包作用探索 | Knife4j - - +springfox 源码分析(六) web配置类扫描包作用探索 | Knife4j + +
-

springfox 源码分析(六) web配置类扫描包作用探索

时间:2019-5-23 18:46:50

地点:家中

我们在上一篇中,知道了springfox一系列Plugin接口的实现、作用

而此时,我们联想到springfox为我们提供的Configuration配置类中使用了包路径扫描

先来看OperationBuilderPlugin的实现类之一OperationDeprecatedReader的代码

OperationDeprecatedReader.java

package springfox.documentation.spring.web.readers.operation;

import com.google.common.base.Optional;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.OperationBuilderPlugin;
import springfox.documentation.spi.service.contexts.OperationContext;

@Component
@Order(Ordered.HIGHEST_PRECEDENCE)
public class OperationDeprecatedReader implements OperationBuilderPlugin {
@Override
public void apply(OperationContext context) {
Optional<Deprecated> annotation = context.findAnnotation(Deprecated.class);
context.operationBuilder().deprecated(String.valueOf(annotation.isPresent()));
}

@Override
public boolean supports(DocumentationType delimiter) {
return true;
}
}

这是针对operation中接口是否过时进行处理的实现类

实现类位于springfox.documentation.spring.web.readers.operation包下,并且通过@Component注解进行bean的实例注入

此时,我们回过头来看SpringfoxWebMvcConfiguration的源码,源码中配置了springfox.documentation.spring.web.readers.operation扫描路径

@Configuration
@Import({ ModelsConfiguration.class })
@ComponentScan(basePackages = {
"springfox.documentation.spring.web.scanners",
"springfox.documentation.spring.web.readers.operation",
"springfox.documentation.spring.web.readers.parameter",
"springfox.documentation.spring.web.plugins",
"springfox.documentation.spring.web.paths"
})
@EnablePluginRegistries({ DocumentationPlugin.class,
ApiListingBuilderPlugin.class,
OperationBuilderPlugin.class,
ParameterBuilderPlugin.class,
ExpandedParameterBuilderPlugin.class,
ResourceGroupingStrategy.class,
OperationModelsProviderPlugin.class,
DefaultsProviderPlugin.class,
PathDecorator.class,
ApiListingScannerPlugin.class
})
public class SpringfoxWebMvcConfiguration {
//more..
}

@ComponentScan注解此时配置了5个包路径,分别是:

  • springfox.documentation.spring.web.scanners
  • springfox.documentation.spring.web.readers.operation
  • springfox.documentation.spring.web.readers.parameter
  • springfox.documentation.spring.web.plugins
  • springfox.documentation.spring.web.paths

源码看到这里,我们应该明白,包括Plugin的接口实现类,都会通过@ComponentScan配置的扫描包路径一并全部注入到Spring容器中

而我们只需要在我们的springfox其他代码中通过@Autowired依赖注入即可进行相应的实体bean使用

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox7.html b/knife4j-doc/gitee/docs/action/springfox/springfox7.html index 0e026e946..57234b135 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox7.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox7.html @@ -10,26 +10,26 @@ - -springfox 源码分析(七) 文档初始化 | Knife4j - - +springfox 源码分析(七) 文档初始化 | Knife4j + +
-

springfox 源码分析(七) 文档初始化

时间:2019-5-23 20:12:04

地点:家中

通过前面几篇文章对springfox的介绍,以及我们的学习准备工作,这篇我们将正式来探索springfox是如何初始化的

我们在学算法的时候,其中一个算法是快速排序,而快速排序讲究的是如果给定一个集合的元素<2,那其实就不用排序了,那就是最快的,取集合中任意元素M,然后,比M小的,排左边,比M大的排右边,这样只需要排2次(递归调用最小次数),这其中用到了分而治之的思想,这种思想我们在工作中也很适用,就拿学习源码来说吧,将一个看似很难的源码,分解成若干小块,每一个小块都逐一研究攻破,因为你不可能所有的都不懂,随着研究的过程中,自信心的增长,整个部分的源码最后你就会把他吃透.

项目结构

在这之前,我们先来看一下springfox的项目分层结构:

这是springfox 2.9.2版本的源码结构,主要包含了6个模块:

  • springfox-core:springfox的核心包,里面基本封装的是一些实体类,core模块大量的运用了设计模式中的Builder构造器
  • springfox-schema:一系列方法实现类
  • springfox-spi:一系列的Plugin接口声明
  • springfox-spring-web:针对spring-web模块的核心操作,springfox的初始化代码也在此模块中
  • springfox-swagger2:对外使用类,注解,包括我们熟知的@EnableSwagger2注解
  • springfox-swagger-common:springfox的功能模块代码,Plugin接口的实现

启动类

启动类就是springfox的开始,从前面的篇幅我们也发现了,springfox没有给我们任何有益的提示,告诉我们他的启动类是那个,是具体在何时初始化的

当然我也是很茫然,一个偶然的机会,只是在代码中多瞟了一眼,我突然就发现了她,她就如太阳一样,温暖着我的心,令我为止动容,她就是springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.java

至于是如何发现她的,你们各自体会吧...

首先来看DocumentationPluginsBootstrapper.java的部分源码:

/**
* After an application context refresh, builds and executes all DocumentationConfigurer instances found in the
* application context.
*
* If no instances DocumentationConfigurer are found a default one is created and executed.
*/
@Component
public class DocumentationPluginsBootstrapper implements SmartLifecycle {
private static final Logger log = LoggerFactory.getLogger(DocumentationPluginsBootstrapper.class);
private static final String SPRINGFOX_DOCUMENTATION_AUTO_STARTUP = "springfox.documentation.auto-startup";
//插件管理类,提供了一些列的Swagger相关参数的插件
private final DocumentationPluginsManager documentationPluginsManager;
//所有的请求接口结果
/***
* springfox.documentation.spring.web.plugins
*/
private final List<RequestHandlerProvider> handlerProviders;
}

因为DocumentationPluginsBootstrapper类实现了Spring的SmartLifecycle接口,而我们都知道,在Spring的应用程序中,实现此接口后,并且通过@Component注入到容器的bean,在Spring容器初始化完成后,都会执行这个接口的start()方法.

既然是Spring容器初始化完成后执行的操作,我想那就是springfox的初始化操作,没错了(PS:因为我也再找不到其他的启动类了。。。)。

来看start方法

@Override
public void start() {
if (initialized.compareAndSet(false, true)) {
log.info("Context refreshed");
//此处拿到DocumentationPlugin插件
//因为Docket类是实现了DocumentationPlugin,我们在程序外部通过@Bean注解注入到Spring容器中,所以此处DocumentationPlugin的实例对象是Docket对象
//一个Docket代表的一个分组,多个则是多个文档分组
//调用guava的排序规则,根据groupName排序
//思考:在重构Swagger-ui的过程中,会有需求能否提供默认的排序规则,因为groupName排序对用户来说太死板,可以提供一个order参数值来进行默认排序,这样对用户更友好
List<DocumentationPlugin> plugins = pluginOrdering()
.sortedCopy(documentationPluginsManager.documentationPlugins());
log.info("Found {} custom documentation plugin(s)", plugins.size());
//遍历Docket对象
for (DocumentationPlugin each : plugins) {
//获取文档类型,一般都是Swagger_2
DocumentationType documentationType = each.getDocumentationType();
if (each.isEnabled()) {
//如果启用,则开始扫描生成文档
scanDocumentation(buildContext(each));
} else {
log.info("Skipping initializing disabled plugin bean {} v{}",
documentationType.getName(), documentationType.getVersion());
}
}
}
}

从代码中,我们看到:

  • 首先获取DocumentationPlugin的实现类列表,而DocumentaionPlugin我们在前面的章节也介绍过,他只有一个实现类,那就是Docket,而Docket类正是我们在使用Springfox的时候,通过编写SwaggerConfiguration配置文件,通过@Bean注解注入的对象,此处DocumentationPlugin的集合实际拿到的就是List<Docket>实例集合,我们在外部创建几个Docket,此处就会有几个DocumentationPlugin
  • 通过循环外部创建的Docket实体bean,最终转换为Documentation文档对象

我们找到了springfox的初始化方法,接下来,针对Springfox的各个操作步骤,我们逐一分析.

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox8.html b/knife4j-doc/gitee/docs/action/springfox/springfox8.html index 9cf5afab6..91e61802f 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox8.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox8.html @@ -10,26 +10,26 @@ - -springfox 源码分析(八) 遍历接口获取Model对象 | Knife4j - - +springfox 源码分析(八) 遍历接口获取Model对象 | Knife4j + +
-

springfox 源码分析(八) 遍历接口获取Model对象

我们通过读DocumentationPluginsBootstrapper代码中的start方法,了解到springfox根据我们外部提供的Docket对象进行初始化时,会通过Docket对象构建DocumentationContext对象来进行初始化操作

private DocumentationContext buildContext(DocumentationPlugin each) {
return each.configure(defaultContextBuilder(each));
}

BuildContext方法是通过Docket对象来构建最终的DocumentaionContext对象

所以我们在研究Documentation之前,先来看DocumentationContext对象主要是包含哪些属性和方法

先来看DocumentationContext的源码:

public class DocumentationContext {
//文档类型
private final DocumentationType documentationType;
//请求接口
private final List<RequestHandler> handlerMappings;
//接口信息,包括title、描述等信息
private final ApiInfo apiInfo;
//分组名称
private final String groupName;
//接口选择器
private final ApiSelector apiSelector;

private final AlternateTypeProvider alternateTypeProvider;
//忽略的参数类型
private final Set<Class> ignorableParameterTypes;
//请求方法对应的响应状态码信息
private final Map<RequestMethod, List<ResponseMessage>> globalResponseMessages;
//全局参数
private final List<Parameter> globalOperationParameters;
//分组策略
private final ResourceGroupingStrategy resourceGroupingStrategy;
//路径Provider
private final PathProvider pathProvider;
//安全信息
private final List<SecurityContext> securityContexts;
//安全Scheme
private final List<? extends SecurityScheme> securitySchemes;
//接口信息
private final Ordering<ApiListingReference> listingReferenceOrdering;
//接口描述
private final Ordering<ApiDescription> apiDescriptionOrdering;
//接口信息
private final Ordering<Operation> operationOrdering;
private final GenericTypeNamingStrategy genericsNamingStrategy;
private final Optional<String> pathMapping;
private final Set<ResolvedType> additionalModels;
//tag分组标签
private final Set<Tag> tags;
private Set<String> produces;
private Set<String> consumes;
//主机号
private String host;
//协议
private Set<String> protocols;
private boolean isUriTemplatesEnabled;
//扩展属性
private List<VendorExtension> vendorExtensions;
//getter and setter and constructor
}

我们姑且称他为文档上下文环境吧,springfox是通过文档上下文(DocumentationContext)最终构建真正的Documenation对象,然后缓存在内存中,最终通过接口/v2/api-docs将Documentation对象转换为标准的Swagger对象输出.

DocumentationContextBuilder

在springfox的源码中,大量的使用了Builder构造器来进行目标对象的构建,所以文档上下文也一样,最终通过DocumentaionContextBuilder来构造创建

DocumentationPlugin中提供了根据DocumentationContextBuilder来创建DocumenationContext的方法

public interface DocumentationPlugin extends Plugin<DocumentationType> {
/**
* Creates a documentation context based on a given DocumentationContextBuilder
*
* @param builder - @see springfox.documentation.spi.service.contexts.DocumentationContextBuilder
* @return context to use for building the documentation
*/
DocumentationContext configure(DocumentationContextBuilder builder);

}

源码

根据DocumentaionPlugin对象来构建Builder

public class DocumentationContextBuilder {
//安全参数
private final List<SecurityContext> securityContexts = newArrayList();
//忽律类型
private final Set<Class> ignorableParameterTypes = newHashSet();
//接口响应状态码
private final Map<RequestMethod, List<ResponseMessage>> responseMessageOverrides = newTreeMap();
//全局参数
private final List<Parameter> globalOperationParameters = newArrayList();
//类型规则
private final List<AlternateTypeRule> rules = newArrayList();
//默认接口状态响应吗
private final Map<RequestMethod, List<ResponseMessage>> defaultResponseMessages = newHashMap();
//protocols
private final Set<String> protocols = newHashSet();
private final Set<String> produces = newHashSet();
private final Set<String> consumes = newHashSet();
//扩展类型
private final Set<ResolvedType> additionalModels = newHashSet();
//分组tag
private final Set<Tag> tags = newTreeSet(Tags.tagComparator());
//扩展属性
private List<VendorExtension> vendorExtensions = new ArrayList<VendorExtension>();
//类型处理器
private TypeResolver typeResolver;
//接口集合
private List<RequestHandler> handlerMappings;
//接口信息
private ApiInfo apiInfo;
//分组名称
private String groupName;
//资源分组策略
private ResourceGroupingStrategy resourceGroupingStrategy;
//路径处理
private PathProvider pathProvider;
private List<? extends SecurityScheme> securitySchemes;
private Ordering<ApiListingReference> listingReferenceOrdering;
private Ordering<ApiDescription> apiDescriptionOrdering;
//swagger文档类型
private DocumentationType documentationType;
private Ordering<Operation> operationOrdering;
private boolean applyDefaultResponseMessages;
//接口选择器
private ApiSelector apiSelector = ApiSelector.DEFAULT;
//主机
private String host;
//默认类型名称策略
private GenericTypeNamingStrategy genericsNamingStrategy;
//接口路径映射
private Optional<String> pathMapping;

private boolean isUrlTemplatesEnabled;
}

DocumentationContextBuilder基本覆盖了DocumentationContext的所有属性,而DocumentationContextBuilder没有提供构造函数来实例化参数,只提供了一个构造函数(文档类型),其余参数都是通过Builder构造器模式来赋值属性,最终通过Builder()方法来构建输出DocumentaionContext

构造函数

public DocumentationContextBuilder(DocumentationType documentationType) {
this.documentationType = documentationType;
}

赋值属性

public DocumentationContextBuilder requestHandlers(List<RequestHandler> handlerMappings) {
this.handlerMappings = handlerMappings;
return this;
}
//more...

通过返回this对象的方式,提供了很多属性的赋值方法

build构造

public DocumentationContext build() {
Map<RequestMethod, List<ResponseMessage>> responseMessages = aggregateResponseMessages();
OrderComparator.sort(rules);
return new DocumentationContext(documentationType,
handlerMappings,
apiInfo,
groupName,
apiSelector,
ignorableParameterTypes,
responseMessages,
globalOperationParameters,
resourceGroupingStrategy,
pathProvider,
securityContexts,
securitySchemes,
rules,
listingReferenceOrdering,
apiDescriptionOrdering,
operationOrdering,
produces,
consumes,
host,
protocols,
genericsNamingStrategy,
pathMapping,
isUrlTemplatesEnabled,
additionalModels,
tags,
vendorExtensions);
}

最终通过使用build()方法,调用DocumentationContext的构造函数,构建DocumentationContext对象

构造

所以,我们先来看DocumentationContextBuilder对象的创建,主要包含了那些参数、方法

/***
* 构建文档builder
* @param plugin
* @return
*/
private DocumentationContextBuilder defaultContextBuilder(DocumentationPlugin plugin) {
DocumentationType documentationType = plugin.getDocumentationType();
//获取RequestHandler
//疑问:handlerProviders在何时初始化
List<RequestHandler> requestHandlers = from(handlerProviders)
.transformAndConcat(handlers())
.toList();
List<AlternateTypeRule> rules = from(nullToEmptyList(typeConventions))
.transformAndConcat(toRules())
.toList();
return documentationPluginsManager
.createContextBuilder(documentationType, defaultConfiguration)
.rules(rules)
.requestHandlers(combiner().combine(requestHandlers));
}

通过代码我们可以了解到:

  • 首先获取所有的RequestHnadler,而RequestHandlerProvider的默认实现类是WebMvcRequestHandlerProvider,该实现类会接收Spring中的所有请求Mapping,最终转化为WebMvcRequestHandler,WebMvcRequestHandler是接口RequestHnadler的实现,这等于是拿到了所有的接口
  • 获取AlternateTypeRule的规则列表
  • 初始化创建Builder,赋值请求接口、rules

了解了DocumentationContextBuilder的构造方式,在来看他的创建过程

通过代码知道是通过DocumentationPluginsManagercreateContextBuilder方法来构建

public DocumentationContextBuilder createContextBuilder(
DocumentationType documentationType,
DefaultConfiguration defaultConfiguration) {
return defaultsProviders.getPluginFor(documentationType, defaultConfiguration)
.create(documentationType)
.withResourceGroupingStrategy(resourceGroupingStrategy(documentationType));
}

defaultsProviders是也是一个Plugin接口,但是我们在前面章节也介绍说过,他只有一个实现类DefaultConfiguration,但是该实现类并没有通过@Compoent注解注入到Spring的容器中,所以此处通过Plugin的实现给了一个默认值defaultConfiguration,其实,此处就是使用的defaultConfiguration

那么该默认配置的create方法做了那些操作呢?,继续跟踪代码:

public class DefaultConfiguration implements DefaultsProviderPlugin {

private final Defaults defaults;
private final TypeResolver typeResolver;
private final ServletContext servletContext;

public DefaultConfiguration(Defaults defaults,
TypeResolver typeResolver,
ServletContext servletContext) {

this.servletContext = servletContext;
this.defaults = defaults;
this.typeResolver = typeResolver;
}

@Override
public DocumentationContextBuilder create(DocumentationType documentationType) {
return new DocumentationContextBuilder(documentationType)
.operationOrdering(defaults.operationOrdering())
.apiDescriptionOrdering(defaults.apiDescriptionOrdering())
.apiListingReferenceOrdering(defaults.apiListingReferenceOrdering())
.additionalIgnorableTypes(defaults.defaultIgnorableParameterTypes())
.rules(defaults.defaultRules(typeResolver))
.defaultResponseMessages(defaults.defaultResponseMessages())
.pathProvider(new RelativePathProvider(servletContext))
.typeResolver(typeResolver)
.enableUrlTemplating(false)
.selector(ApiSelector.DEFAULT);
}
}

主要是给DocumentationContextBuilder赋值了默认的相关参数,主要包括:

  • 默认忽略Class类型
  • 默认响应状态码消息
  • 类型解析器
  • 接口选择器
  • 接口排序
  • ...

通过上面源码我们知道:

  • 首先defaultsProviders是也是一个Plugin接口,但是我们在前面章节也介绍说过,他只有一个实现类DefaultConfiguration,但是该实现类并没有通过@Compoent注解注入到Spring的容器中,所以此处通过Plugin的实现给了一个默认值defaultConfiguration,其实,此处就是使用的defaultConfiguration

  • defaultConfiguration是在DocumentationPluginsBootstrapper的构造函数中通过new的方式进行构造的

  • //通过DefaultConfiguration可以构建DocumentationContextBuilder
    this.defaultConfiguration = new DefaultConfiguration(defaults, typeResolver, servletContext);
  • 在此处的构建过程中,赋值了资源分组策略.

赋值

从源码过程中,我们已经了解到Builder赋值的参数主要包括:

  • Spring环境中的所有接口,最终是RequestHandler的集合,实际则是WebMvcRequestHandler的集合
  • 赋值AlternateTypeRule规则集合
  • 赋值分组策略属性(resourceGroupingStrategy),默认是ClassOrApiAnnotationResourceGrouping实现

DocumentationContext

获取到了DocumentationContextBuilder对象,此时在通过DocumentationPlugin的configure方法,构建DocumentationContext

来看Docket的configure方法

/**
* Builds the Docket by merging/overlaying user specified values.
* It is not necessary to call this method when defined as a spring bean.
* NOTE: Calling this method more than once has no effect.
*
* @see DocumentationPluginsBootstrapper
*/
public DocumentationContext configure(DocumentationContextBuilder builder) {
return builder
.apiInfo(apiInfo)
.selector(apiSelector)
.applyDefaultResponseMessages(applyDefaultResponseMessages)
.additionalResponseMessages(responseMessages)
.additionalOperationParameters(globalOperationParameters)
.additionalIgnorableTypes(ignorableParameterTypes)
.ruleBuilders(ruleBuilders)
.groupName(groupName)
.pathProvider(pathProvider)
.securityContexts(securityContexts)
.securitySchemes(securitySchemes)
.apiListingReferenceOrdering(apiListingReferenceOrdering)
.apiDescriptionOrdering(apiDescriptionOrdering)
.operationOrdering(operationOrdering)
.produces(produces)
.consumes(consumes)
.host(host)
.protocols(protocols)
.genericsNaming(genericsNamingStrategy)
.pathMapping(pathMapping)
.enableUrlTemplating(enableUrlTemplating)
.additionalModels(additionalModels)
.tags(tags)
.vendorExtentions(vendorExtensions)
.build();
}

针对Builder的一些列二次赋值,最终通过build方法构造

我们的Docket对象是我们开发人员在外部通过Bean来创建的,来看Docket的部分代码:

public class Docket implements DocumentationPlugin {

public static final String DEFAULT_GROUP_NAME = "default";

private final DocumentationType documentationType;
private final List<SecurityContext> securityContexts = newArrayList();
private final Map<RequestMethod, List<ResponseMessage>> responseMessages = newHashMap();
private final List<Parameter> globalOperationParameters = newArrayList();
private final List<Function<TypeResolver, AlternateTypeRule>> ruleBuilders = newArrayList();
private final Set<Class> ignorableParameterTypes = newHashSet();
private final Set<String> protocols = newHashSet();
private final Set<String> produces = newHashSet();
private final Set<String> consumes = newHashSet();
private final Set<ResolvedType> additionalModels = newHashSet();
private final Set<Tag> tags = newHashSet();

private PathProvider pathProvider;
private List<? extends SecurityScheme> securitySchemes;
private Ordering<ApiListingReference> apiListingReferenceOrdering;
private Ordering<ApiDescription> apiDescriptionOrdering;
private Ordering<Operation> operationOrdering;

private ApiInfo apiInfo = ApiInfo.DEFAULT;
private String groupName = DEFAULT_GROUP_NAME;
private boolean enabled = true;
private GenericTypeNamingStrategy genericsNamingStrategy = new DefaultGenericTypeNamingStrategy();
private boolean applyDefaultResponseMessages = true;
private String host = "";
private Optional<String> pathMapping = Optional.absent();
private ApiSelector apiSelector = ApiSelector.DEFAULT;
private boolean enableUrlTemplating = false;
private List<VendorExtension> vendorExtensions = newArrayList();
}

我们通过Docket来外部赋值的对象值,最终都会构建到DocumentationContext上下文中,我们先来看我们开发中一般创建Docket对象过程

@Bean(value = "defaultApi")
@Order(value = 4)
public Docket defaultApi() {
ParameterBuilder parameterBuilder=new ParameterBuilder();
List<Parameter> parameters= Lists.newArrayList();
parameterBuilder.name("token").description("token令牌").modelRef(new ModelRef("String"))
.parameterType("header")
.required(true).build();
parameters.add(parameterBuilder.build());

Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("默认接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.controller"))
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build().globalOperationParameters(parameters)
.securityContexts(Lists.newArrayList(securityContext())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey()));
return docket;
}

一般创建Docket对象,主要的赋值参数:

  • 分组名称
  • apiInfo信息
  • ApiSelector
  • 全局参数
  • 权限验证

主要包含了以上的一些信息,整个文档上下文环境构造完成,我们也可以以Debug的方式来跟踪代码,如下图:

除了默认的参数赋值外,接口、definitions、model等关键信息等都还没有初始化。

+ + diff --git a/knife4j-doc/gitee/docs/action/springfox/springfox9.html b/knife4j-doc/gitee/docs/action/springfox/springfox9.html index ec68235dd..db47376d4 100644 --- a/knife4j-doc/gitee/docs/action/springfox/springfox9.html +++ b/knife4j-doc/gitee/docs/action/springfox/springfox9.html @@ -10,26 +10,26 @@ - -springfox 源码分析(九) 文档初始化-分组 | Knife4j - - +springfox 源码分析(九) 文档初始化-分组 | Knife4j + +
-

springfox 源码分析(九) 文档初始化-分组

在前面我们了解了DocumennationContext的初始化过程,包括一系列的默认属性的赋值,接下来,开始真正的文档解析操作

我们的源码分析方式是按照springfox的文档初始化来进行归纳的,所以也是看到哪儿,就写到哪儿,当我们整个过程都研究完后,我会总结一篇文章来统一说明springfox的整个流程说明,或许以图文的方式来配合说明更能加深我们的印象.

我们在前面的初始化过程中,springfox将Spring环境中所有的接口都转换成了WebMvcRequestHandler,但是我们在外部创建Docket对象是对整个系统的接口文档来分组的,所以接下来需要对所有的接口进行分组(根据Docket对象传入的接口Selector来分).

先来看scan方法

 /***
* 最终生成Documentation文档对象
* @param context
* @return
*/
public Documentation scan(DocumentationContext context) {
//得到分组接口
ApiListingReferenceScanResult result = apiListingReferenceScanner.scan(context);
//more...
}

通过DocumentationContext对象创建ApiListingReferenceScanResult对象

ApiListingReferenceScanResult类只有一个属性,那就是根据controller分组后的接口方法

public class ApiListingReferenceScanResult {
//分组
private final Map<ResourceGroup, List<RequestMappingContext>> resourceGroupRequestMappings;

public ApiListingReferenceScanResult(Map<ResourceGroup, List<RequestMappingContext>> resourceGroupRequestMappings) {
this.resourceGroupRequestMappings = resourceGroupRequestMappings;
}
public Map<ResourceGroup, List<RequestMappingContext>> getResourceGroupRequestMappings() { return resourceGroupRequestMappings;
}
}

继续来看apiListingReferenceScanner对象的scan方法

public ApiListingReferenceScanResult scan(DocumentationContext context) {
LOG.info("Scanning for api listing references");

ArrayListMultimap<ResourceGroup, RequestMappingContext> resourceGroupRequestMappings
= ArrayListMultimap.create();
//拿到外部的接口选择器
//通常我们在创建Docket对象时,会赋予接口选择器,一般是以包路径来区分
ApiSelector selector = context.getApiSelector();
//过滤筛选
//如果是以package路径来区分的,则会根据接口的Handler的包路径是否已packagePath开始来进行匹配
//如果是以注解的方式,则会判断handler是否包含annotation注解
Iterable<RequestHandler> matchingHandlers = from(context.getRequestHandlers())
.filter(selector.getRequestHandlerSelector());
//
for (RequestHandler handler : matchingHandlers) {
//接口分组
//我们在一个Controller中会存在1个或多个接口方法
//所以resourceGroup和RequestMapping的关系是1:N
ResourceGroup resourceGroup = new ResourceGroup(
handler.groupName(),
handler.declaringClass(),
0);
//构建RequestMappingContext对象
RequestMappingContext requestMappingContext
= new RequestMappingContext(context, handler);

resourceGroupRequestMappings.put(resourceGroup, requestMappingContext);
}
return new ApiListingReferenceScanResult(asMap(resourceGroupRequestMappings));
}

从代码流程中,我们得知:

  • 首先获取外部Docket对象的ApiSelector选择器,该选择器我们一般选择的是包路径
  • 根据选择的规则进行接口过滤,此处会排除掉部分不符合规则的RequestHandler接口,通常是以package路径或者注解的方式,如果默认没有提供规则,那么springfox会根据在controller类上和方法上都没有标注@ApiIgnore注解的默认ApiSelctor来进行筛选
  • 最后通过ArrayListMultimap来进行接口的归类操作
  • 关于ArrayListMultimap的操作可参考springfox 源码分析(十九) guava库学习来了解
+ + diff --git a/knife4j-doc/gitee/docs/action/springmvc.html b/knife4j-doc/gitee/docs/action/springmvc.html index 5fe6e2015..b09609513 100644 --- a/knife4j-doc/gitee/docs/action/springmvc.html +++ b/knife4j-doc/gitee/docs/action/springmvc.html @@ -10,26 +10,26 @@ - -1.2 SpringMVC框架集成Knife4j | Knife4j - - +1.2 SpringMVC框架集成Knife4j | Knife4j + +
-

1.2 SpringMVC框架集成Knife4j

如果你是Spring MVC项目,想使用knife4j提供的增强ui包,使用方法很简单

demo参考示例地址:knife4j-spring-mvc-demo

1.2.1 依赖引用

1.2.1.1 2.0.4(包含)以前的版本

如果开发者使用的是2.0.4(包含)以前的版本,那么需要引入以下2个jar包

第一步是需要引入Knife4j提供的依赖包,如下:

<!--引入Knife4j-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring</artifactId>
<!--在引用时请在maven中央仓库搜索最新版本号-->
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<!--在引用时请在maven中央仓库搜索最新版本号-->
<version>2.0.4</version>
</dependency>

1.2.1.2 2.0.4(不包含)以后的版本

在2.0.4(不包含)以后的版本中,引入Knife4j进行了改善,开发者只需要引入1个jar包,如下:

<!--引入Knife4j-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-mvc</artifactId>
<!--在引用时请在maven中央仓库搜索最新版本号,如果不存在则代表尚未发布,作者正在努力开发中-->
<version>2.0.5</version>
</dependency>

1.2.2 创建配置文件

第二步是创建配置文件SwaggerConfiguration.java,示例代码如下:

@Configuration
@EnableSwagger2
public class SwaggerConfiguration {


@Bean
public Docket defaultApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.groupName("默认接口")
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.knife4j.controller"))
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build();
}


private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}
}

1.2.3 配置静态文件

由于knife4j是通过webjar的方式提供服务,因此对外访问的doc.html需要在我们的mvc环境中配置静态目录,否则会出现404,在spring.xml主容器的配置文件中配置,代码如下:

<mvc:resources location="classpath:/META-INF/resources/" mapping="doc.html"/>
<mvc:resources location="classpath:/META-INF/resources/webjars/" mapping="/webjars/**"/>

1.2.4 配置增强Filter(可选)

如果开发者需要使用Knife4j提供的两个增强Filter:Basic验证Production验证

那么需要在web.xml进行配置,代码如下:

<!--Knife4j提供的Swagger增强功能,Filter过滤保护Swagger资源-->
<!--生产环境Filter-->
<filter>
<filter-name>knife4jProductionFilter</filter-name>
<filter-class>com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter</filter-class>
<init-param>
<param-name>production</param-name>
<!--如果该值配置为true则代表开启-->
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>knife4jProductionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--Swagger资源的Basic认证保护策略-->
<filter>
<filter-name>knife4jSecurityBasic</filter-name>
<filter-class>com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter</filter-class>
<!--开启basic认证-->
<init-param>
<param-name>enableBasicAuth</param-name>
<!--如果该值配置为true则代表开启-->
<param-value>false</param-value>
</init-param>
<!--用户名&密码-->
<init-param>
<param-name>userName</param-name>
<param-value>lisi</param-value>
</init-param>
<init-param>
<param-name>password</param-name>
<param-value>123</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>knife4jSecurityBasic</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

这2个增强Filter二者只能有一个存在。

如果开发者不需要配置,可忽略该步骤。

1.2.5 配置web.xml

最后一步,我们需要配置web.xml,添加部分servlet-mapping节点,添加这些节点是防止swagger的接口出现404的出现,配置如下:

<!-- 配置knife4j的url请求路径-->

<!--1.该接口是springfox提供的Swagger实例接口-->
<servlet-mapping>
<servlet-name>knife4jDemoMvc</servlet-name>
<url-pattern>/v2/api-docs</url-pattern>
</servlet-mapping>
<!--2.该接口是springfox提供的Swagger分组接口-->
<servlet-mapping>
<servlet-name>knife4jDemoMvc</servlet-name>
<url-pattern>/swagger-resources</url-pattern>
</servlet-mapping>
<!--3.该接口是springfox提供的Swagger配置接口-->
<servlet-mapping>
<servlet-name>knife4jDemoMvc</servlet-name>
<url-pattern>/swagger-resources/configuration/ui</url-pattern>
</servlet-mapping>
<!--4.该接口是springfox提供的Swagger权限接口(在knife4j中未使用)-->
<servlet-mapping>
<servlet-name>knife4jDemoMvc</servlet-name>
<url-pattern>/swagger-resources/configuration/security</url-pattern>
</servlet-mapping>

<!--5.该接口是knife4j提供的Swagger增强接口-->
<servlet-mapping>
<servlet-name>knife4jDemoMvc</servlet-name>
<url-pattern>/v2/api-docs-ext</url-pattern>
</servlet-mapping>

在上面的配置中,1、2、3是必须添加的

如果开发者需要使用knife4j提供的增强功能,那么第5点也需要添加上

1.2.6 配置增强模式(可选)

如果开发者需要使用Knife4j提供的增强模式中的功能,那么需要进行配置,主要分两个版本

1.2.6.1 2.0.4(包含)以前的版本

如果开发者使用的是2.0.4(包含)以前的版本,启用增强功能则在SwaggerConfiguration配置文件中进行配置,代码如下:

@Configuration
@EnableSwagger2
//增强扫描
@ComponentScan(
basePackages = {
"com.github.xiaoymin.knife4j.spring.plugin",
"com.github.xiaoymin.knife4j.spring.web"
}
)
public class SwaggerConfiguration {
//more..
}

1.2.6.2 2.0.4(不包含)以后的版本

在2.0.4(不包含)以后的版本,依赖引用会有所不同,开发者引入knife4j-spring-mvc的jar包,该包中存在@EnableKnife4j注解,则启用增强代码如下:

@Configuration
@EnableSwagger2
//增强扫描
@EnableKnife4j
public class SwaggerConfiguration {
//more..
}

原理很简单,只是提供一个方便大家记忆的注解,其核心只是把上面@ComponentScan注解的功能进行了集成。

1.2.7 访问

最后,开发者可以在浏览器通过地址进行访问,访问格式:http://host:port/doc.html

+ + diff --git a/knife4j-doc/gitee/docs/blog.html b/knife4j-doc/gitee/docs/blog.html new file mode 100644 index 000000000..2feccd3ae --- /dev/null +++ b/knife4j-doc/gitee/docs/blog.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +Knife4j框架相关的blog | Knife4j + + + + +
+

Knife4j框架相关的blog

最近想来,Knife4j的GiteeGithub的仓库已经有接近2000+的issues了,issues中有包含的内容大部分都是提问为主,因此有一个想法,针对Knife4j仓库中的issues中的典型问题,整理成文章,分享给大家

大家也可以作为教程进行参考。

😄 Welcome Join Us

也欢迎大家投稿、提交PR一起参与进来

我想一篇内容主题输出的主要的形式包括:

  • 📝 一篇文章 : 文章会在官网的Blog专栏和微信公众号同步发表
  • 🌱 一份Git仓库代码 :每篇文章的代码仓库会同步更新到Github,仓库地址: knife4j-demo
  • 关联N个issues : 主要以仓库issues或者交流群的问题为文章的来源,透过问题希望能讲清楚
  • 🎥 一个视频 : 看是否有足够的时间,录制一个简单的视频继续加以说明

主要目的:

  • 💪 磨练自己的性格,做事的性格和毅力
  • 🔥 为Knife4jSwaggerOpenAPI生态添砖加瓦

Blog列表:

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/customer-add-api.html b/knife4j-doc/gitee/docs/blog/customer-add-api.html new file mode 100644 index 000000000..2d98c6ff0 --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/customer-add-api.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +自定义API接口在Knife4j的Ui界面中显示 | Knife4j + + + + +
+

自定义API接口在Knife4j的Ui界面中显示

本文主要介绍在 Spring Boot 应用中,如何使用 springfox 和 springdoc 框架自定义添加外部 API 接口,并在 Knife4j 的 UI 界面中展示。

关联Issues:

🏖️ 本文仓库:knife4j-customer-api

📹 视频地址:https://www.bilibili.com/video/BV19h4y1j7y9/?vd_source=ef34098d916a578698508a43063099ac

🌱 本质

我们要实现将自定义的API接口添加到Ui界面中显示,其实最简单的就是在我们接口渲染的Swagger或者OpenAPI对象中,添加相应的新对象(PS:用于在OpenAPI规范中描述接口定义的Operation对象)属性就好了

这需要借助于底层解析框架对外是否提供了开放接口,允许我们这么做,还好目前不管是springfox或者springdoc,其实都支持开发者自定义。

主要的区别是:

  • springfox提供的是spring-plugin体系,在解析时添加Operation对象,这是进行中的处理行为
  • springdoc提供的全局Customer接口,springdoc已经完成了所有接口的对象解析,但开发者实现Customer接口可以自定义更改,这是后置行为

📜 springfox

在springfox的框架中,提供了基于spring-plugin体系的解析接口,开发者如果阅读过springfox的源码后,应该很轻松就能实现

主要的动作包括:

  • 🎠 自定义plugin接口,实现ApiListingScannerPlugin.java类,并且通过@Component或者Java Config得@Bean注解注入到Spring的容器中
  • 🎢 创建Operation对象,该对象是一个接口的描述,包括:说明、参数、响应、请求类型等等,并且返回ApiListingScannerPlugin.java接口约束的方法类型
  • 🏎️ springfox这种方式只能提供简单的form表单类型的接口,如果是类似@RequestBody类型的JSON、XML请求,那么建议放弃~

示例:添加一个简单的login登录接口,代码如下:

com.xiaominfo.springfox.customer.CustomerApiPlugin.java
@Slf4j
@Component
public class CustomerApiPlugin implements ApiListingScannerPlugin {

@Override
public List<ApiDescription> apply(DocumentationContext context) {
// consumers、produces
Set<String> mediaSet = new HashSet<>();
mediaSet.add(MediaType.APPLICATION_JSON_VALUE);
// 设定参数
List<Parameter> parameters = new ArrayList<>();
parameters.add(new ParameterBuilder().name("username").required(true).modelRef(new ModelRef("String")).defaultValue("test").description("用户名").build());
parameters.add(new ParameterBuilder().name("password").required(true).modelRef(new ModelRef("String")).defaultValue("123").description("密码").build());
// 接口的Tag
Set<String> tags = new HashSet<>();
tags.add("首页");
// 构建Operation对象
Operation usernamePasswordOperation = new OperationBuilder(new CachingOperationNameGenerator())
.method(HttpMethod.POST)
.tags(tags)
.summary("用户名密码登录")
.notes("用户登陆获取token")
.parameters(parameters)
.consumes(mediaSet)
.produces(mediaSet)
.build();

// 需要注意的是groupName需要和开发者创建的Docket对象赋值的groupName保持一致
ApiDescription loginApiDescription = new ApiDescription("hello", "/login", "登录接口描述", Collections.singletonList(usernamePasswordOperation), false);
return Collections.singletonList(loginApiDescription);
}

@Override
public boolean supports(DocumentationType documentationType) {
return documentationType == DocumentationType.SWAGGER_2;
}
}

📚 springdoc

在springdoc中,其实和springdoc的思想是完全一致的,springdoc也开放了两种级别的customizer接口:

  • 🏜️ GlobalOperationCustomizer:针对Operation级别的全局自定义扩展钩子函数,开发者可以对接口中每一个Operation进行扩展自定义实现,或调整,或修改,或增加扩展都行,Knife4j的部分增强特性就是基于此函数实现,可以参考代码Knife4jJakartaOperationCustomizer.java
  • 🏝️ GlobalOpenApiCustomizer:是针对整个OpenAPI级别的,开发者在分组或者分包后,得到的单个OpenAPI实例,开发者可以操纵全局的OpenAPI实例,该OpenAPI对象已经是springdoc解析过的实例对象,例如该issues中的需求,开发者只需要自定义创建新Operation对象,然后通过OpenAPI实例对象进行add添加即可完成此需求,部分扩展可以参考代码:Knife4jOpenApiCustomizer.java
  • 🎠 扩展实现类接口后,注入Spring的容器中即可

考虑到我们是新增自定义的API接口,因此,可以实现GlobalOpenApiCustomizer类进行扩展

代码示例如下:

com.xiaominfo.springdoc.customer.CustomerOperation.java
@Slf4j
@Component
public class CustomerOperation implements GlobalOpenApiCustomizer {

@Override
public void customise(OpenAPI openApi) {
log.info("customer.");
// 因为要新增自定义的接口,直接这里add
PathItem pathItem = new PathItem();
// 基础信息 构建Operation
Operation operation = new Operation();
operation.operationId("login");
operation.summary("登录接口");
operation.description("根据用户名和密码登录获取token");
operation.tags(Collections.singletonList("登录"));
// 构建参数
List<Parameter> parameters = new ArrayList<>();
parameters.add(new Parameter().name("name").example("zhangFei").description("用户名").required(true).schema(new StringSchema()).in("query"));
parameters.add(new Parameter().name("password").example("123456").description("密码").required(true).schema(new StringSchema()).in("query"));
operation.parameters(parameters);
// 构建响应body
ApiResponses apiResponses = new ApiResponses();
ApiResponse apiResponse = new ApiResponse();
apiResponse.description("ok").content(new Content().addMediaType("*/*", new MediaType().schema(new StringSchema())));
apiResponses.addApiResponse("200",apiResponse);
operation.responses(apiResponses);
// 该自定义接口为post
pathItem.post(operation);
openApi.path("/login", pathItem);
}
}

此时,我们可以在界面中查看,已经存在了我们自定义新增的接口,如下图:

图1.自定义API接口在Knife4j的Ui界面中显示

📖 总结

本文主要介绍了基于springfox或者springdoc框架,添加自定义API接口的示例,开发者可以根据其中的思想自行扩展,达到自己的业务需求。

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/gateway/knife4j-gateway-introduce.html b/knife4j-doc/gitee/docs/blog/gateway/knife4j-gateway-introduce.html new file mode 100644 index 000000000..077af3133 --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/gateway/knife4j-gateway-introduce.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +Spring Cloud Gateway网关下的文档聚合?就用它了 | Knife4j + + + + +
+

Spring Cloud Gateway网关下的文档聚合?就用它了

大家好,这篇文章主要是介绍分享Knife4j-gateway网关聚合文档组件,自4.0版本发布该组件后,得到了大家的积极响应,我们也是积极响应用户的需求,持续迭代优化

该组件是一个非常轻量级的网关聚合组件,适用于开发者使用Spring Cloud Gateway网关组件进行Swagger2、OpenAPI3规范的文档聚合

🌾 1.前言

在考虑写这个组件之前,开发者在Spring Cloud Gateway网关组件下进行聚合Swagger2/OpenAPI3可能存在各种各样的问题

我认为主要包括:

  • 适配不同的Spring Cloud Gateway版本,没有形成统一稳定的技术解决方案
  • Gateway组件下Webflux异步编码的风格,学习成本异常陡峭,初学者一时之间难以掌握微服务体系
  • 聚合文档代码强耦合业务代码,无法灵活配置
  • 文档Ui无法随心所欲的配置
  • 各种404或路径错误等问题
  • 等等.....

🔥 2.解决方案

我们从开发者的实际需求出发,结合Knife4j多年开源以来积累的宝贵经验,决定了我们需要开发一个Gateway网关下的聚合组件

将开发者的需求、问题聚合在一起,众人拾薪火焰高,形成一个统一的技术解决方案

knife4j-gateway组件就是在这样的场景下诞生的

该组件主要的特点:

  • 使用简单(最低4行配置搞定聚合),学习成本低
  • 解耦Spring Cloud Gateway网关组件,聚焦文档聚合功能,职责单一
  • 提供手动配置、微服务自动发现两种灵活配置方式聚合子服务文档
  • 可以同时聚合Swagger2、OpenAPI3两种不同的规范
  • 灵活配置聚合规则,自定义排除规则支持
  • 微服务场景下支持服务的上线、下线场景,文档状态与子服务保持一致,无需重启服务

🌚 3.深入了解

我们结合knife4j-gateway组件的特点来深入分析,带着疑惑来一步步揭开她的神秘面纱~!

3.1 使用简单(最低4行配置搞定聚合),学习成本低

首先,我们既然都已经封装成组件了,那么学习和使用成本是我们首先就需要考虑的事情,需要把复杂,难处理的业务逻辑、技术细节,全部封装在组件里,而对于上层用户,我们提供简化后的配置,开发者只需要开箱即用即可

这是组件的价值,剩下学习时间成本。

当然我说使用简单(最低4行配置搞定聚合),这只是有点宣传吹牛的口吻,对于开发者来说,我又要学习了解你这个knife4j-gateway组件的四行配置,那也是学习成本啊

这个我无从反驳~~~😂

如果开发者的项目、产品采用Spring Cloud微服务体系,网关组件使用Spring Cloud Gateway,那么对于Swagger、OpenAPI3的文档聚合,采用knife4j-gateway组件的话,就可以使用组件的discover自动发现模式,实现自动聚合

在项目中的application.yml配置文件中进行如下配置,就搞定了,配置如下:

knife4j:
gateway:
# ① 第一个配置,开启gateway聚合组件
enabled: true
# ② 第二行配置,设置聚合模式采用discover服务发现的模式
strategy: discover
discover:
# ③ 第三行配置,开启discover模式
enabled: true
# ④ 第四行配置,聚合子服务全部为Swagger2规范的文档
version: swagger2

我们没有使用广告法禁止的最简单非常简单等宣传口吻进行宣传

摸着良心去看这个配置,用disocver模式进行聚合,四行配置达到开发者的目的,确实很方便啊,学习成本低~~~!

✅ 3.2 解耦Spring Cloud Gateway网关组件,聚焦文档聚合功能,职责单一

为什么我说解耦呢?因为文档功能其实是一个开发阶段的需求,是开发团队在配合完成项目、产品过程中,团队之前提升效率的一个潜在的需求场景

当我们的项目、产品开发完成,上线到生产环境的时候,或者在不同的项目开发过程中,开发者的需求又涌现出来了,例如:

还有一些其他的需求场景,一线开发者可以自行脑补,上面说列的需求,你是否在开发场景中也碰到了呢?

既然文档聚合功能和项目、产品本身并没有太大的关系,是开发者开发过程中提高效率的产物,那么对于统一的事情,我们应该避免重复操作,用独立的中间件来解决这些问题

knife4j-gateway组件聚焦Swagger2/OpenAPI3规范的文档聚合,一旦团队之间确定使用Swagger2/OpenAPI3规范,并且有聚合的需求场景,那么引入一个jar组件就能解决的事情,何乐而不为呢?

3.3 提供手动配置、微服务自动发现两种灵活配置方式聚合子服务文档

上面我们从学习成本、解耦两个方面阐述了该组件的价值,那么接下来,当我们深入去探索网关组件的下的聚合场景时,站在中间件组件的立场下,我们就需要考虑不同的团队、不同的人员的需求进行兼容合并

目前为之,结合开发任何及自身的实际工作经验,总结出了两种文档聚合的场景,供开发者进行使用

  • 手动配置聚合(manual): 开发者手动配置,灵活配置展示文档
    • 优点:使用简单、灵活,学习成本低.试错成本低
    • 缺点:服务众多时较繁琐,无法感知子服务的上下线状态
  • 服务发现自动聚合(discover):基于注册中心,主动聚合服务
    • 优点:使用及配置简单、学习成本低.
    • 缺点:暂时没想到,欢迎你来体验反馈

3.4 可以同时聚合Swagger2、OpenAPI3两种不同的规范

我们的项目/产品在长期迭代开发过程中,或者不同的团队配合开发中,有时候子服务的标准可能不尽统一。而我们需要一起聚合怎么办呢?

好在在Knife4j的前端Ui组件已经完全适配了Swagger2和OpenAPI3规范,在网关层面,我们只需要根据该组件提供的手动配置策略配置上就解决了该问题,可参考下面的文章介绍。

3.5 灵活配置聚合规则,自定义排除规则支持

灵活配置是knife4j-gateway组件为网关聚合服务提供的带刀侍卫,保障开发者们在手动/服务发现两大场景下配合使用以达到最终目的

他主要提供的服务包括:

  • 设定网关层面聚合的排除规则,支持正则表达式或者开发者根据SPI接口自定义实现

    例如有Dubbo服务的接口,需要在网关层面进行排除,禁止聚合

  • 子服务的服务名称别名、展示顺序、接口顺序等配置自定义
  • 子服务的自定义ContextPath自由灵活配置,满足业务需要

1、在网关层面,排除不需要的子服务时,我们可以基于正则表达式(自4.3.0版本进行支持),配置如下:


knife4j:
gateway:
enabled: true
strategy: discover
discover:
version: swagger2
enabled: true
# 排除不需要聚合的子服务,基于正则表达式(支持多个)
excluded-services:
# 排除order开头的服务
- order.*
# 排除服务中包含dubbo字样的服务
- .*?dubbo.*

2、配置子服务的别名,排序,自定义配置如下:

knife4j:
gateway:
enabled: true
strategy: discover
discover:
version: swagger2
enabled: true
excluded-services:
- order.*
# 自定义配置子服务的别名,排序规则
service-config:
order-service:
- group-name: 订单服务
order: 1
user-service:
- group-name: 用户服务
order: 2

3、网关成统一开启配置子服务的tag、operation排序规则

knife4j:
gateway:
enabled: true
strategy: discover
discover:
version: swagger2
enabled: true
# 排序规则
tags-sorter: order
operations-sorter: order

🐐 4.聚焦两大使用场景(手动/服务发现自动)聚合

4.1 手动配置聚合(manual)

手动配置聚合,顾名思义,开发者需要自行写子服务的规则或者路径,这和微服务场景下自动复现聚合是形成互补机制,双剑合璧威力之下,完成最终成果输出

该场景解决不同的问题,包括:

  • 子服务同时存在Swagger2/OpenAPI3规范的服务
  • 子服务存在不同的package包分组的的规范实例,用过springfox或者springdoc的开发者应该清楚可以根据package包路径、path路由创建接口分组

如下图:

图1.Spring Gateway网关聚合文档流程示意图-手动配置

这是一个简单的示意图,我们有三个服务:

  • gateway-service:网关服务,负责网关路由鉴权、路由转发
  • order-service:子服务之一,基于OpenAPI3规范暴露规范地址:/v3/api-docs
  • user-service: 子服务之一,基于Swagger2规范暴露规范地址:/v2/api-docs

我们从服务架构流程图中了解到了我们需要的信息,那么在gateway-service组件中,就可以使用knife4j-gateway组件提供的手动配置聚合,将文档进行聚合展示

简单的配置如下:

knife4j:
gateway:
enabled: true
# 选择手动
strategy: manual
routes:
- name: 用户服务
service-name: user-service
url: /user/v2/api-docs
- name: 订单服务
service-name: order-service
url: /order/v3/api-docs

4.2 服务发现自动聚合(discover)

手动聚合的唯一问题就是,一旦我们的产品/项目,子服务数量众多,纯靠手动去配,那对于开发者来说也是极其痛苦的,就好像是侮辱开发者一样。。

我都能写代码了,你还让我写这么多繁杂的配置,那是对程序员的不尊重。

基于服务发现自动聚合的需求场景,就由此诞生.

在上面我们介绍knife4j-gateway特点时,我们提到该组件解耦,聚焦文档聚合功能,职责单一,这里得以体现

对于服务发现场景下的自动聚合,配置就更简单了,但对我们也有一些小小的约束

⚠️ 我们的子服务规范实现需要统一,要么全部用Swagger2规范,或者OpenAPI3规范

配置如下:

knife4j:
gateway:
# ① 第一个配置,开启gateway聚合组件
enabled: true
# ② 第二行配置,设置聚合模式采用discover服务发现的模式
strategy: discover
discover:
# ③ 第三行配置,开启discover模式
enabled: true
# ④ 第四行配置,聚合子服务全部为Swagger2规范的文档
version: swagger2

这个特点和我们前面提到的使用简答这一条又对上了,真的只有三四行配置。

但是在微服务聚合场景下,我们虽然封装内部实现,也有必要和大家分享一下,具体的处理规则原理

先来看一张简单的架构图-服务发现的场景,如下图:

图2.Spring Gateway网关聚合文档流程示意图-服务发现

在服务发现的场景中,我们依赖注册中心组件,这里以Nacos为例,但我们将网关服务gateway-service也注册到Nacos中时

本身基于Spring Cloud微服务体系的DiscoverClient.java接口,在Nacos组件实例下,会为我们解决各个子服务注册上来的服务发现问题,包括子服务实例对象,是否上线、心跳检测等等

而我们依赖Spring体系提供的ApplicationEvent事件监听体系,就可以从统一的DiscoverClient体系下,实现我们的自动聚合场景,这样的好处是不用关心各个注册中心的差异,在Spring Cloud的微服务体系下,注册中心需要遵循DiscoverClient接口进行标准实现。

knife4j-gateway的服务发现场景下,我们通过@EventListener实现对微服务场景下的事件监听,以填充网关成文档的数据实现

监听事件回调处理源码如下:

@Slf4j
@AllArgsConstructor
public class ServiceChangeListener {

final DiscoveryClient discoveryClient;
final ServiceDiscoverHandler serviceDiscoverHandler;
final Knife4jGatewayProperties knife4jGatewayProperties;

@EventListener(classes = {ApplicationReadyEvent.class, HeartbeatEvent.class, RefreshRoutesEvent.class})
public void discover() {
log.debug("discover service.");
List<String> services = discoveryClient.getServices();
if (Objects.equals(knife4jGatewayProperties.getStrategy(), GatewayStrategy.DISCOVER)) {
this.serviceDiscoverHandler.discover(services);
}
}
}

通过注册中心在DiscoverClient体系下的实现,包括调度(Scheduler)心跳检测(HeartBeat)事件回调(ApplicationEvent)等机制,实现微服务网关层面文档的自动聚合。

🐮 5.服务发现的路由聚合策略-数据来源

在上面章节中,我们从使用特点、两大场景(手动/服务发现)等全面介绍了knife4j-gateway组件,在文末,还是有必要和大家讲讲该组件在discover服务发现模式下,子服务的是数据来源处理规则

主要是4个方面,包括:

  • 基于Spring Cloud Gateway配置的routes规则解析子服务路由,数据来源:spring.cloud.gateway.routes
  • 在discover服务发现场景下,针对自定义添加的routes,默认再次追加,数据来源:knife4j.gateway.routes
  • 服务发现discover模式下,开发者在网关成的路由转发模式默认通过DiscoveryClient的默认方式转发路由,规则是pattern:/service-id/**
  • 接收编码方式动态注入Spring Cloud Gateway网关的路由,进行聚合转发

5.1 手动配置-自定义Routes

自定义Routes主要是开发者根据Knife4j-gateway组件提供的开发配置,在进行手动聚合时,填写的配置,这部分的配置是网关聚合的数据来源之一

而配置内容knife4j-gateway组件不会做任何处理,开发者配置什么就展示什么

示例配置如下:

knife4j:
gateway:
enabled: true
# 选择手动
strategy: manual
routes:
- name: 用户服务
service-name: user-service
url: /user/v2/api-docs

5.2 DiscoverClient自动发现

如果开发者在Spring Cloud Gateway网关组件下没有配置子服务的转发路由规则,完全依靠默认的转发规则(pattern:/service-id/**),其实就是根据子服务名称进行转发

在这种规则下,knife4j-gateway组件会读取DiscoverClient组件下注入的DiscoveryClientRouteDefinitionLocator路由列表进行解析

在Spring Cloud Gateway网关的配置,开启该规则,配置如下:

spring:
# 路由网关配置
gateway:
# 启用了自动根据服务名建立路由
discovery:
locator:
enabled: true
lower-case-service-id: true

knife4j-gateway组件中,就是直接获取该模式下的子服务列表转发规则,注入到knife4j-gateway组件下的数据源,作为ui层面的转发依据

部分源码解析如下:

public class DiscoverClientRouteServiceConvert extends AbstactServiceRouterConvert {

final DiscoveryClientRouteDefinitionLocator discoveryClientRouteDefinitionLocator;
final Knife4jGatewayProperties knife4jGatewayProperties;
@Override
public void process(ServiceRouterHolder holder) {
log.debug("Spring Cloud Gateway DiscoverClient process.");
// 取默认子服务的路径规则
discoveryClientRouteDefinitionLocator.getRouteDefinitions()
.filter(routeDefinition -> ServiceUtils.startLoadBalance(routeDefinition.getUri()))
.filter(routeDefinition -> ServiceUtils.includeService(routeDefinition.getUri(), holder.getService(), holder.getExcludeService()))
.subscribe(routeDefinition -> parseRouteDefinition(holder, this.knife4jGatewayProperties.getDiscover(), routeDefinition.getPredicates(), routeDefinition.getUri().getHost(),
routeDefinition.getUri().getHost()));
}
//others...
}

5.3 Spring Gateway网关Routes配置

该配置属性和自定义配置knife4j-gateway组件的routes一样,开发者一般会自定义配置子服务的路由转发策略,通过spring.cloud.gateway.routes进行配置

knife4j-gateway会获取该部分的数据源,通过读取子服务配置的Predicate来获取子服务的Path前缀ContextPath规则进行聚合

5.4 动态路由注册配置

动态路由注册可能在某些特殊的场景下也有需求,因此knife4j-gateway也会把动态注入进来的路由进行聚合,作为文档数据源进行展示

动态数据源来源于RouteDefinitionRepository对象

6.👻 总结

好了,本文介绍到这里也基本涵盖了knife4j-gateway网关聚合组件的方方面面,希望该组件能给你带来帮助~~!

您有更多的想法或者建议,可以关注公众号"Knife4j",参与Knife4j的交流群进行沟通反馈,谢谢

图5.Knife4j微信公众号

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/handler-enum.html b/knife4j-doc/gitee/docs/blog/handler-enum.html new file mode 100644 index 000000000..97e487df9 --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/handler-enum.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +枚举烦恼终结!在Knife4j文档中如何优雅的处理枚举类型的展示及调试问题 | Knife4j + + + + +
+

枚举烦恼终结!在Knife4j文档中如何优雅的处理枚举类型的展示及调试问题

本文主要介绍在Knife4j中如何处理枚举,主要包含两个方面:

  • 通过技术手段,将枚举的value值以及描述在文档界面进行呈现,完善接口信息展示
  • 能通过Knife4j的调试功能针对枚举参数快速调试。

关联Issues:

🏖️ 本文仓库:knife4j-handler-enum

需求场景分析

通常我们在定义枚举时,不管是简单的枚举定义,或者枚举类中包含多种属性,在Swagger或者springdoc的界面中,都只能通过枚举的name属性进行展示,

例如如下枚举类:

@AllArgsConstructor
@Getter
public enum CourseType {

MATH(1,"数学"),
ENGLISH(2,"英语"),
CHINESE(3,"语文"),
COMPUTER(4,"计算机");

/**
* 课程编码
*/
final int code;
/**
* 课程标签
*/
final String label;

}

最终在文档页面展示效果如下图:

图1.Knife4j中常规枚举展示效果

问题

这种效果可能无法满足我们的要求,主要是我们提供给外部调用我们的接口文档的开发者,如果我们的枚举name属性定义的通俗易懂,那么是没有问题,如果有其他的场景定义,那么只通过name属性是很难达到文档解释清楚的

对于文档中,开发者可能更希望将枚举说代表的label意义在文档中进行展示,这对于接口对接人员可以一目了然清楚枚举的最终定义和说明

解决方案

对于枚举类型展示明细的description,最简单的方案就是重写枚举类的toString方法,开发者可以将枚举的字典定义以及description描述信息统一在该方法中进行重写输出

示例代码如下:

@AllArgsConstructor
@Getter
public enum CourseType {

MATH(1,"数学"),
ENGLISH(2,"英语"),
CHINESE(3,"语文"),
COMPUTER(4,"计算机");

/**
* 课程编码
*/
final int code;
/**
* 课程标签
*/
final String label;

@Override
public String toString() {
return this.name()+":"+this.label;
}
}

我们通过重写toString方法,将枚举的name属性和label属性进行拼接,label属性一般将我们该枚举说要展示的意思描述清楚,知道该枚举类说代表的意思。

在Ui中最终效果展示如下:

图2.Knife4j中枚举重写toString展示效果

我们虽然解决了文档展示问题,但是又会带来新的问题,如果我们的请求是form的情况下,在调试时,枚举类型参数选择下拉框,枚举类参数下拉框的值也会随之变成value - desc,导致传参异常:

报错信息(数据绑定异常):

2023-08-07T20:04:35.640+08:00  WARN 40180 --- [io-19001-exec-8] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MethodArgumentNotValidException: Validation failed for argument [0] in public org.springframework.http.ResponseEntity<com.xiaominfo.knife4j.core.CourseInfo> com.xiaominfo.knife4j.rest.EnumRestController.form(com.xiaominfo.knife4j.core.CourseInfo): [Field error in object 'courseInfo' on field 'courseType': rejected value [2]; codes [typeMismatch.courseInfo.courseType,typeMismatch.courseType,typeMismatch.com.xiaominfo.knife4j.core.CourseType,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [courseInfo.courseType,courseType]; arguments []; default message [courseType]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.xiaominfo.knife4j.core.CourseType' for property 'courseType'; Failed to convert from type [java.lang.String] to type [@io.swagger.v3.oas.annotations.media.Schema com.xiaominfo.knife4j.core.CourseType] for value [2]]] ]

issues:枚举类参数value和desc的注释中反馈的一样

⚠️ 该问题在swagger2规范下会复现,openapi3存在解析问题,但是调试问题依然存在

图3.Knife4j中枚举调试下拉框

那么,如何解决调试问题呢?

数据调试

我们在解决这样的场景时,需要要考虑到两种不同接口在Spring Boot框架中的参数赋值情况,主要是:

  • application/x-www-form-urlencoded:基于表单请求的方式,Spring Boot框架针对提交的请求参数主要通过WebDataBinder组件实现提交参数的数据转换、绑定、格式化等处理操作
  • application/json:而对于JSON提交的接口参数,对于数据的转换这主要依赖于数据的反序列化

这两种方式对于springdoc-openapi处理也是一样,会存在不同的差异,开发者需要分开进行处理。

接下来就针对这这两种不同的接口场景,对于枚举类型展示明细的description提供不同的处理方案

表单请求

针对表单请求,我们需要为WebDataBinder组件单独提供枚举类的数据绑定逻辑,通过实现PropertyEditorSupport接口,并且在Spring Boot框架中Controller增强为WebDataBinder初始化不同枚举类的数据绑定。

考虑到在实际项目中的通用解决方案(为每个枚举提供数据绑定解析),抽象一个通用接口

public interface CommonFormEnumParser<T extends Enum<T>> {

/**
* Realize the instantiation of the enumeration according to the input input
* @param input input character
* @return enumeration instance
*/
T fromValue(String input);
}


我们在枚举类中实现该接口,提供根据外部数据进行枚举实例对象转换的方法,如下:

@Slf4j
@AllArgsConstructor
@Getter
public enum CourseType implements CommonFormEnumParser<CourseType> {

MATH(1,"数学"),
ENGLISH(2,"英语"),
CHINESE(3,"语文"),
COMPUTER(4,"计算机");

/**
* 课程编码
*/
final int code;
/**
* 课程标签
*/
final String label;

@Override
public String toString() {
return this.name()+":"+this.label;
}

@Override
public CourseType fromValue(String input) {
log.info("input:{}",input);
for (CourseType courseType : CourseType. values()) {
// 根据规则自定义实现
if (input.startsWith(Objects.toString(courseType))||input.equalsIgnoreCase(courseType.name())) {
return courseType;
}
}
throw new IllegalArgumentException("Invalid CourseType value: " + input);
}
}

根据反射class创建一个默认的PropertyEditorSupport实现,代码如下:

@AllArgsConstructor
public class GenericEnumPropertySupport <T extends Enum<T>> extends PropertyEditorSupport {
final Class<T> enumClass;

@Override
public void setAsText(String text) throws IllegalArgumentException {
if (enumClass.isEnum()){
//必须是枚举
if (CommonFormEnumParser.class.isAssignableFrom(enumClass)){
T[] values=enumClass.getEnumConstants();
if (values!=null&&values.length>0){
// 因为都实现了CommonFormEnumParser接口,随便取一个枚举元素都行
CommonFormEnumParser<T> one= (CommonFormEnumParser<T>) values[0];
setValue(one.fromValue(text));
}
}
}
}
}

最后通过Spring框架提供的Advice增强注入到框架中,实现@InitBinder绑定逻辑

@RestControllerAdvice
public class GlobalRestAdvice {

@InitBinder
public void initBinder(WebDataBinder binder) {
//这里可以做成scan扫描包的方式,扫描所有枚举类,然后分批注入,或者其他的方式也行,看自己项目的规则
binder.registerCustomEditor(CourseType.class,new GenericEnumPropertySupport<>(CourseType.class));
}

}

由于我们自定义了枚举的初始化数据绑定方法,逻辑是:名称相等或者和name匹配

if (input.startsWith(Objects.toString(courseType))||input.equalsIgnoreCase(courseType.name())) {
return courseType;
}

此时,我们在form表单接口提交请求时,对于枚举的类型,就可以参考常规的方案,提交枚举的name进行调试,如下图:

图4.Knife4j中枚举调试form

JSON请求

而对于JSON的请求,就简单很多,我们在上面提过,JSON的数据绑定是在Spring Boot框架中是通过反序列化进行处理。

以框架中用jackson为例,首先需要更改枚举类的toString方法,通过@JsonValue注解将枚举的属性值列出来,以便文档展示,其次,反序列化时,提供反序列化的规则。

代码如下:

@Slf4j
public class CourseTypeDeserializer extends JsonDeserializer<CourseType> {
@Override
public CourseType deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
log.info("des....");
String input = jsonParser.getValueAsString();
log.info("value:{}",input);
for (CourseType courseType : CourseType.values()) {
// 根据规则自定义实现
if (input.startsWith(Objects.toString(courseType))||input.equalsIgnoreCase(courseType.name())) {
return courseType;
}
}
throw new IllegalArgumentException("Invalid CourseType value: " + input);
}
}

并且在枚举类中通过注解@JsonDeserialize强指定反序列化规则

@Slf4j
@AllArgsConstructor
@Getter
@JsonDeserialize(using = CourseTypeDeserializer.class)
public enum CourseType implements CommonFormEnumParser<CourseType> {

//others...
}

总结

以上就是针对枚举在Knife4j中通过文档展示以及Debug调试的通用方案分享,对于代码中枚举的反序列化以及通过WebDataBinder组件进行数据绑定的操作,本文只是提供了一个思路方案,开发者可以在本文基础上进行扩展优化

例如对于所有枚举类的scan扫描class的方式,批量在WebDataBinder组件中进行添加,等等,希望本文能给开发者提供一个思路,开发者根据此内容举一反三,处理自己在实际项目中碰到的问题。

您有更多的想法或者建议,可以关注公众号"Knife4j",参与Knife4j的交流群进行沟通反馈,谢谢

图5.Knife4j微信公众号

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/product/knife4j-new-product-idea.html b/knife4j-doc/gitee/docs/blog/product/knife4j-new-product-idea.html new file mode 100644 index 000000000..63e300823 --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/product/knife4j-new-product-idea.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +Knife4j新产品的想法 | Knife4j + + + + +
+

Knife4j新产品的想法

写在开头

Knife4j的发展已经有好几个年头了,最近想来,虽然这个小组件不太稳定,但有每天依然收到很多小伙伴的积极反馈,这让我又不由自主的对这个项目产生了羁绊。一直以来,总想把一些工作中的想法,以及和Knife4j周边生态相关的内容结合起来,做一些不一样的事情。

在Knife4j目前的生态中,我主要为Knife4j写了一些技术的组件,主要包括:

  • Knife4j-ui:前端组件部分,主要基于Swagger2/OpenAPI3规范的识别,通过不同的展现及交互,为开发者提供不同的体验
  • knife4j-aggregation:前期基于Servlet生态体系下的聚合组件,解决在Spring Cloud Gateway等异步编码较困难的人文档聚合问题,打通各个注册中心组件(Nacos\Eureka\Consul等)实现接口文档的聚合
  • knife4j-gateway:Spring Cloud Gateway网关下的聚合组件,4行配置搞定网关下的接口文档聚合
  • Knife4j-extension:基于Chrome浏览器的调试插件,只要是Swagger2/OpenAPI规范,就可以预览文档/调试文档,为了上架还开通了vista卡,付费给Google5美元,现在下架了(长时间没更新代码有漏洞被迫下架)😂。。。
  • knife4j-insight:独立运行的聚合中间件,将硬盘/Nacos等作为Swagger2/OpenAPI3规范的数据源,复用aggregation的生态,聚合各个注册中心,实现平台化,聚合所有接口规范,统一预览/调试。。更新了3个版本(我觉得自己思路挺好的)。。😂

新想法

最近这段时间,主要思考的是Knife4j这个项目应该如何发展下去,如果做新产品,与市面上已经存在的其他产品如何做差异化的竞争。

思来想去,我又有了新的方向和目标~!

折腾新产品的心态一直没停过。。

市面上的产品包括PostmanApifoxApipost等等,专注在自己的领域里面,覆盖面都挺广的,而Knife4j好像以Ui界面交互起家,受众要宅一些,想想这些产品的词云关键字:API文档调试协作测试API设计等等

每一个关键字里面所需要投入的精力,都是Knife4j无法企及的,而且我在很早之前分享Knife4j的定位时,我一直想把他作为一个工具输出,单纯的工具,因此,包括:协作涉及自动化等等标签,都不适合我

那么,应该做什么?做一点不一样的呢?

Knife4jInsight这个产品的思路我自认为还是得发展下去,只不过需要更加产品化一下,做成平台,给用户提供更方便的可操作化的界面,简化整个使用步骤。

基于这个想法,和脑子里蹦出了一些新的Idea,包括:开放平台接口展示LLM大模型

我有了一个产品的大致雏形,我画了一个草图,大概是这个样子:

图1.产品架构图

在上图中,Knife4jInsight是一个独立服务组件,依附在Apache APISIX网关组件下的服务。那么,产品定位是什么呢?

产品定位:统一的通用接口文档及开放平台服务系统

在功能上,主要是三大块的功能:

  • 开放文档的统一管理:借助于Knife4j的前端界面,接口文档完全遵循Swagger2/OpenAPI3规范,下游或者外游服务的接口文档,只需要是符合规范的,都可以统一在平台进行管理维护,并提供文档最基础的预览、调试、鉴权访问等功能
  • 开发密钥统一管理:开发者开放的API接口,很多时候,如果要对外的情况下,通常开发者们都需要实现接口的鉴权控制逻辑,而如果每个服务或不同的项目都实现一遍,那太耗费精力了,那么我觉得只要是聚合上来的接口文档,所对应的下游服务,都可以通过该平台进行统一的管理,分配鉴权及管理开放用户
  • 下游服务统一管理:一旦涉及到开放平台,那么网关的企业级别高性能要求不可避免,这不是Knife4j的强项,作者也没这个能力,作为开放平台网关层,这里考虑Apache APISIX来实现服务的分发,依靠Apache APISIX提供的Admin API接口,平台通过将下游服务的转发规则进行动态注册,这样接口文档和开放平台就从功能职责上进行了区分,互相存在依赖关系,但职责分工不同

平台的网关鉴权,通过实现Apache APIXIS的鉴权插件,植入到网关组件中,此时所有开放平台的网关入口流量,都会通过该插件与Knife4jInsight中的开发密钥进行联动,实现接口的鉴权。

开放文档的统一管理

先来看开放文档的统一管理,考虑到我们要与开源Knife4j项目共同发展,因此产品的功能上,也是以开源Knife4j为主,接口文档完全遵循Swagger2/OpenAPI3规范,在这个场景下,实现文档的统一管理和聚合

主要包括两个功能:

  • Namespace:命名空间(namespace)是平台中抽象的概念,一个namespace下可以允许存在多个OpenAPI规范实例,用户可以讲该功能理解为企业、项目、部门、产品等等
  • ApiRegister:服务实例(ApiRegister)是一个OpenAPI规范的最小单元,将OpenAPI接口规范数据源通过自动注册或手动填报的方式,保存在平台中后即可进行接口文档的在线预览功能,这样的好处是我们即可以对接口文档进行归档保存,又可以和下游服务联动,打通调试。
  • 文档用户中心: 每一个namespace下的文档都是有鉴权属性的,用户可以选择对齐是否开放,这样的好处是保持接口的🔐安全,避免所有人都能访问

先来看下一界面原型。

命名空间(namespace):namespace列表可以查看所有的项目列表,并且namespac是可以直接访问的,如果当前namespace下面有接口实例,那么就可以通过Knife4j的前端界面进行预览和调试

图2.命名空间

点击namespaceId查看文档效果如下:

图3.命名空间文档展示

服务实例(ApiRegister):是一个OpenAPI规范的最小单元,可以通过接口自动注册上来,也可以通过平台进行主动编辑添加

包括接口的规范类型,数据来源类型,注册类型等等信息。

图4.接口实例

明细信息展示如下:

图5.接口实例文档展示

同样,当个APIRegister也是可以独立访问的,平台提供的单实例的访问方法:

开发密钥统一管理

开发者开放的API接口,很多时候,如果要对外的情况下,通常开发者们都需要实现接口的鉴权控制逻辑,而如果每个服务或不同的项目都实现一遍,那太耗费精力了,那么我觉得只要是聚合上来的接口文档,所对应的下游服务,都可以通过该平台进行统一的管理,分配鉴权及管理开放用户

下游服务统一管理

一旦涉及到开放平台,那么网关的企业级别高性能要求不可避免,这不是Knife4j的强项,作者也没这个能力,作为开放平台网关层,这里考虑Apache APISIX来实现服务的分发,依靠Apache APISIX提供的Admin API接口,平台通过将下游服务的转发规则进行动态注册,这样接口文档和开放平台就从功能职责上进行了区分,互相存在依赖关系,但职责分工不同

LLM大模型结合

目前,AIGC火热发展的当下,大模型落地更多产品的场景,我觉得是不可避免的,而对于在Knife4jInsight平台中,我目前也想到了一些LLM大模型可以落地的场景,主要包括:

  • 接口的i18n转化:本身Knife4j提供的界面目前是支持中英文的,但是开发者如果要提供英文的接口文档描述,通常在项目开发阶段,或者定义OpenAPI接口规范时,技术层面就需要提供支持,而如果通过平台中大模型的翻译工具,基于Prompt工程,将OpenAPI数据源直接生成对应的目标语言,那么开发者就无需在技术启动接口考虑i18n的事情,Knife4jInsight平台中自动集成即可快速实现。

    图6.LLM大模型

  • 代码模版:将Prompt工程+OpenAPI规范结合,植入到Knife4j到每一个功能点中,包括代码示例生成、curl等等不同的场景,调试LLM大模型的Prompt工程,将幂等性的接口输出到应用测,给予开发者更多的便利。

    图7.LLM大模型

结尾

以上就是我的一些新想法,如果您对该产品感兴趣,欢迎和我联系(xiaoymin@foxmail.com)~~~

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/production-forbidden-ui.html b/knife4j-doc/gitee/docs/blog/production-forbidden-ui.html new file mode 100644 index 000000000..551a5c8d3 --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/production-forbidden-ui.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +生产环境如何屏蔽Knife4j、Swagger等Ui资源和接口 | Knife4j + + + + +
+

生产环境如何屏蔽Knife4j、Swagger等Ui资源和接口

本文主要介绍在 Spring Boot 应用中,如何在生产环境屏蔽Knife4j及相关Swagger资源

关联Issues:

🏖️ 本文仓库:knife4j-forbidden-api

从仓库的issues中不难发现,该需求确确实实存在,虽然在Knife4j之前的版本,并没有提供屏蔽资源相关的配置,但也有很多开发者提了建议

这在之后的版本迭代中,Knife4j主要提供了Basic验证Production暴力屏蔽的手段,这些都是基于实际需求场景出发来做的,生产环境屏蔽接口描述也是为了保护应用程序安全的一种手段。

本文主要站在实际需求以及业务场景的角度,去分析如何在生产环境进行屏蔽接口

从issues中,我们屏蔽的场景主要发生在:

  • ✅ 单体Spring Boot应用屏蔽接口和静态ui资源
  • ✅ 微服务Spring Cloud、Spring Cloud Gateway网关场景下屏蔽接口和静态资源

屏蔽的手段主要包括以下几种(欢迎补充):

  • 🌱 基于Spring Boot框架提供的@Conditional条件控制相关@Bean的生效
  • ⛔ 基于Servlet体系下的Filter过滤器进行拦截屏蔽
  • ⛰️ 基于Gateway网关体系下的Filter过滤器进行拦截屏蔽
  • 💀 基于Maven项目的jar排除机制从根源解决问题
  • 💣 基于生产环境Nginx、Ingress等控制请求路径处理

1.目的

通过开发者提出的issues,屏蔽的目的及提供Basic验证的方案来分析,我觉得主要有以下几点:

  • 🔐 生产环境上线的系统,屏蔽接口描述性规范,对于生产系统是一种安全保护机制
  • 🔐 Basic方案更希望的是能够上线后也保留接口,解决生产环境出问题时便于调试定位问题,当Basic能起到一定的安全防护作用

2.解决方案

2.1 🌱 基于Spring Boot框架提供的@Conditional条件控制相关@Bean的生效

在Spring Boot开发框架中,提供了一种条件注入的机制注解@Conditional,顾名思义就是可以指定我们的代码在特定环境才生效。

开发者在写第三方的starter的包时,是一种经常使用的手段。有关@Conditional注解等条件注入的说明,可以参考我之前分享的一篇Blog《Spring Boot框架中如何优雅的注入实体Bean》

我们的需求场景是:在生产环境中能够屏蔽部分接口以及Ui资源,那么我们是否可以结合@Conditional注解以及@Profile注解来实现不同环境的@Bean加载机制呢?

答案当然是可以的,考虑到在Spring Boot环境中大部分的中间件都提供了配置化,类似enable属性来开启加载配置,这里可以使用spring.profiles通过配置进行区分

简单的例子:我们对于Knife4j的配置文件有两个,分别对应dev环境和prod环境

配置文件如下:

  • 开发环境(dev)
application-dev.yml
knife4j:
enable: true
## other properties.......

  • 生产环境(prod)
application-prod.yml
knife4j:
enable: false
## other properties.......

在这种情况下,我们程序在启动时,只需要通过设定Spring Boot应用的Profiles,就可以实现我们的接口无法访问,如果我们指定prod环境,那么访问文档时,会出现接口404的情况~

总结:这种情况是对于Java后端应用的Configuration类级别的控制,通过Spring Boot框架提供的@Conditional注解来达到条件注入及部分代码可配置生效的目的

虽然界面可访问,但是对于接口的规范描述并没有作用。

2.2 ⛔ 基于Servlet体系下的Filter过滤器进行拦截屏蔽

基于Servlet体系下的Filter过滤器进行拦截屏蔽是一种拦截机制,主要利用了Servlet规范下的Filter机制,对所有的请求资源进行拦截,开发者可以对所有涉及到Knife4j、Swagger资源的请求都进行拦截屏蔽

场景的资源拦截地址可以参考文档《访问权限控制》

我们知道了要屏蔽的资源,以及Filter机制,此时,开发者即可以自己实现Filter代码,并将其注入到Spring Boot的应用框架中接口

在Knife4j提供的ProductionSecurityFilter.java 如下:

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
if (production) {
String uri = httpServletRequest.getRequestURI();
// 匹配判断uri地址是否我们需要屏蔽的资源
if (!match(uri)) {
chain.doFilter(request, response);
} else {
HttpServletResponse resp = (HttpServletResponse) response;
resp.setStatus(customCode);
resp.sendError(customCode, "You do not have permission to access this page");
}
} else {
chain.doFilter(request, response);
}
}

2.3 ⛰️ 基于Gateway网关体系下的Filter过滤器进行拦截屏蔽

基于Gateway网关体系下的Filter过滤器进行拦截屏蔽和Servlet体系下的Filter进行拦截是同一种思想,因为Spring Cloud Gateway是基于Netty驱动设计实现,但思想方法是同一种

无非是使用Spring Cloud Gateway提供的Filter接口,自定义实现match后屏蔽过滤

可以参考Knife4j代码中的WebFluxSecurityBasicAuthFilter.java

2.4 💀 基于Maven项目的jar排除机制从根源解决问题

该方法也是利用Maven项目提供的Profiles机制,我们在项目打包构建的时候,可以对一些不需要的jar包进行exclusion排除,比如Knife4j的ui包或者swagger官方ui包,这种jar包都是webjar类型,里面全部是静态资源

MavenProfiles是一种配置管理机制,允许你根据不同的环境或条件设置和激活不同的构建配置。可以使用Profiles来定义一组插件、依赖项和构建选项,这些选项在特定的构建环境中生效

如果我们想在生产环境无需访问提供外部入口,那么我们在打包构建的时候可以直接排除即可

基于这种思想,我们可以考虑在项目的pom.xml中配置Maven的Profiles,配置如下:

<profiles>
<profile>
<id>dev</id>
<activation>
<!-- 激活条件为"dev"系统属性存在 -->
<property>
<name>env</name>
<value>dev</value>
</property>
</activation>
</profile>
<profile>
<id>prod</id>
<activation>
<!-- 激活条件为"prod"环境变量存在 -->
<property>
<name>env</name>
<value>prod</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-ui</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>swagger-ui</artifactId>
</exclusion>
</exclusions>

</dependency>
</dependencies>
</profile>
</profiles>

在上面的配置中,主要作用如下:

  • ✅ 声明了两个Profile类型,id分别为devprod
  • ✅ 配置了两种Profile类型的激活条件,通过环境变量名称来进行区分
  • ✅ 在prod类型下面,我们配置的引用jar的exclusions规则,该Profile类型下会排除knife4j-openapi3-uiswagger-ui这两个jar包,而这两个包分别是Knife4j和swagger官网提供的Ui资源包

此时,当我们在项目构建打包时,我们就可以通过传入变量,进行构建,排除相关的jar包,命令如下:

mvn clean package -Pprod

2.5 💣 基于生产环境Nginx、Ingress等控制请求路径处理

上面2.1~2.4提供的方案都是通过代码或者工程上进行配置以达到目的,如果我们的服务已经上线,不管是Nginx或者在Kubernetes集群环境中,都可以通过Nginx、Ingress等代理服务器进行配置拦截处理

也不失为一种处理方式。

在Nginx中,我们只需要配置拦截资源接口,配置如下:


location /doc.html {
return 403; # 返回 403 状态码表示禁止访问
}

location /swagger-ui.html {
return 403; # 返回 403 状态码表示禁止访问
}

// 其他路由接口及资源

而在Kubernetes集群环境中,可以通过使用Ingress控制请求,配置示例如下:


apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
spec:
rules:
- http:
paths:
# 转发doc.html到error-service,可以在该服务中定义一个错误页面或返回适当的错误码
- path: /doc.html
pathType: Prefix
backend:
service:
name: error-service
port:
number: 80

3.总结

本文从工程、代码等多方角度给大家提供了一种解决思路方案,希望能对大家有所帮助。

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/blog/use-claude-fixed-issues.html b/knife4j-doc/gitee/docs/blog/use-claude-fixed-issues.html new file mode 100644 index 000000000..7e2b5210b --- /dev/null +++ b/knife4j-doc/gitee/docs/blog/use-claude-fixed-issues.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + +使用Claude修改Knife4j中的issues | Knife4j + + + + +
+

使用Claude修改Knife4j中的issues

本文和Knife4j使用无关,主要分享作者在解决Knife4j的issues过程中如何通过Claude.Ai快速解决问题

关联Issues:

📹 视频地址:https://www.bilibili.com/video/BV1mm4y1E7iV/?vd_source=ef34098d916a578698508a43063099ac

🌋 背景

在上面的issues中,有用户提到在目前的Knife4j的界面中,对于生成的Script代码(主要是TypeScript),对于实体类部分,缺失属性定义,于是需要解决

主要的问题点:

  • ❓ Knife4j的Script功能来源于PR
  • ❓ 代码中使用了babel/generator,而我对该组件并不熟悉

🔥 解决过程

传统方案

1、首先,我直接定位到函数的源码,查看源码,看是否有属性直接能够使用,部分源码:

export interface TSPropertySignatureBuilder {
(key: K.ExpressionKind, typeAnnotation?: K.TSTypeAnnotationKind | null, optional?: boolean): namedTypes.TSPropertySignature;
from(params: {
comments?: K.CommentKind[] | null;
computed?: boolean;
initializer?: K.ExpressionKind | null;
key: K.ExpressionKind;
loc?: K.SourceLocationKind | null;
optional?: boolean;
readonly?: boolean;
typeAnnotation?: K.TSTypeAnnotationKind | null;
}): namedTypes.TSPropertySignature;
}

图1.t.tsPropertySignature函数源码

在源码中,有comments属性,在没有查看官网文档的情况下,我姑且一试,直接给comments赋值,看直接传递是否奏效,结果并未不满意。

2、这种情况下只能去去看了babel/generator的官方文档了,去翻看部分函数的doc文档参数,希望能够快速找到能够为生成的interface的属性标注comment的方法

但我并没有找到我所需要的,能够为生成的properties增加注释的方法

💯 求助AI

想到之前在网上看到Claude2已经发布,支持100k的上下文并且免费,因此决定试试看

1、首先我将Knife4j中整段js函数作为附件进行了上传,并且构建了Prompt,如下图:

图2.Claude2中的Prompt

Claude2也给出了答案,但好像并不是我想要的,如下图:

图3.Claude2中回答

2、于是我在继续追问,因为知道具体的函数所执行的位置,所以直接问函数中的某一个方法,看看Claude2是否能够定位问题

图4.Claude2中回答

这一次,Claude2好像理解了我的意图,并定位出了问题所在,我根据提示,在代码中进行了修改,代码修改如下:

export function getInterfaceBody(props, openOptional) {
return props.map(p => {
let ta = t.tsTypeAnnotation(getTsType(p, getBaseType(p.type), openOptional), p.description);
let key = t.identifier(p.name);
let pro = t.tsPropertySignature(
key,
ta,
openOptional ? !p.require : false,
)
// 增加注释
pro.leadingComments = [{
type: "CommentBlock",
value: `${p.description} `
}]
return pro;
})
}

此时在界面中,再次刷新界面,Knife4j的Scirpt中,每一个定义的interface都有了comment,如下图:

图5.Knife4j中Script功能

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/changelog.html b/knife4j-doc/gitee/docs/changelog.html index ef4ac0922..8e006a74a 100644 --- a/knife4j-doc/gitee/docs/changelog.html +++ b/knife4j-doc/gitee/docs/changelog.html @@ -10,27 +10,26 @@ - -更新日志 | Knife4j - - +更新日志 | Knife4j + +
-

更新日志

新闻标题发布时间
Knife4j v4.3.0 发布,深挖Gateway网关聚合场景,解决各种疑难杂症2023-08-06
Knife4j v4.2.0 发布,优化Gateway聚合组件2023-07-31
Knife4j v4.1.0 发布,Gateway网关聚合更上一层楼2023-03-23
Knife4j v4.0.0 发布,新征程2022-12-20
Knife4j 4.0计划2022-8-9
Knife4j 2.0.9发布,解决issue 150+2021-06-28
Knife4j 2.0.7发布,细节优化2020-11-02
Knife4j 2.0.6发布,支持OpenAPI3及Auth2认证2020-10-26
Knife4j 2.0.5发布,性能优化2020-09-14
Knife4j 2.0.4发布,支持自定义 Host2020-06-28
Knife4j 2.0.3发布,支持springdoc和i18n2020-05-24
knife4j-admin v1.0发布,任意聚合 Swagger 文档2020-05-20
Knife4j 2.0.2发布,Swagger接口文档赋能工具2020-03-08
Knife4j 2.0.1 发布,细节处理!2019-12-23
Knife4j 2.0 发布,涅槃重生~!2019-12-16
swagger-bootstrap-ui 1.9.6 发布,解决长整型精度丢失的问题2019-08-28
swagger-bootstrap-ui 1.9.5 发布,支持过滤请求参数2019-07-31
swagger-bootstrap-ui 1.9.4 发布,扩展支持动态字段注释2019-06-10
swagger-bootstrap-ui 1.9.3 发布,i18n及自定义文档支持2019-04-23
swagger-bootstrap-ui 1.9.2 发布,提供前后端分离解决方案2019-04-08
swagger-bootstrap-ui 1.9.1 发布,优化大数据响应接口2019-03-11
swagger-bootstrap-ui 1.9.0 发布,提供Swagger资源保护2019-02-25
Swagger-Bootstrap-Ui 1.8.9 发布,文档下载、增强优化2019-01-11
Swagger-Bootstrap-Ui 1.8.8 发布,多个响应code支持2018-12-17
Swagger-Bootstrap-Ui 1.8.7 发布,Swagger Models支持2018-11-12
Swagger-bootstrap-ui 1.8.6 发布,Spring MVC接口增强异常2018-10-31
swagger-bootstrap-ui 1.8.5 发布,文档增强,接口排序2018-10-16
swagger-bootstrap-ui 1.8.4 发布,Model解析异常修复2018-09-25
swagger-bootstrap-ui 1.8.3 发布,treetable展示参数2018-09-17
swagger-bootstrap-ui 1.8.2 发布,优化UI样式2018-08-27
swagger-bootstrap-ui 1.8.1 发布,修复basePath导致4042018-08-14
swagger-bootstrap-ui 1.8.0 发布,调试栏优化2018-08-10
swagger-bootstrap-ui 1.7.9 发布,Authorize授权支持2018-08-06
swagger-bootstrap-ui 1.7.8发布,文件上传BUG修复2018-08-03
swagger-bootstrap-ui 1.7.7 发布,修复JS内存溢出2018-07-25
swagger-bootstrap-ui 1.7.6 发布,全局默认参数2018-07-18
swagger-bootstrap-ui 1.7.5,Ui全面改版2018-07-16
swagger-bootstrap-ui 1.7 发布,分组功能实现2017-12-18
swagger-bootstrap-ui 1.6 发布,支持文件上传2017-09-06
swagger-bootstrap-ui 1.5 发布,修改groupId2017-09-01
swagger-bootstrap-ui 开源2017-04-19
+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open.html b/knife4j-doc/gitee/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open.html index 072d1926b..cc2fd950f 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-open.html @@ -10,26 +10,26 @@ - -[v1.0-2017/04/19 开源] | Knife4j - - +[v1.0-2017/04/19 开源] | Knife4j + +
-

[v1.0-2017/04/19 开源]

swagger-bootstrap-ui 1.0发布,开源

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue.html index b57e685c1..3257d271c 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issue.html @@ -10,26 +10,26 @@ - -[v1.1-2017/04/27 在线调试BUG] | Knife4j - - +[v1.1-2017/04/27 在线调试BUG] | Knife4j + +
-

[v1.1-2017/04/27 在线调试BUG]

swagger-bootstrap-ui 1.1 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

本次更新:

1、PathVariable类型的参数,在线调试bug

2、绝对路径改成相对路径,适配带项目名称

3、接口返回数据Model解析,文档说明中展示

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue.html index f660588ec..da267a750 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issue.html @@ -10,26 +10,26 @@ - -[v1.2-2017/05/14 添加PUT、DELETE方法支持] | Knife4j - - +[v1.2-2017/05/14 添加PUT、DELETE方法支持] | Knife4j + +
-

[v1.2-2017/05/14 添加PUT、DELETE方法支持]

swagger-bootstrap-ui 1.2 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

本次更新:

1、添加PUTDELETE方法支持

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue.html index 28c78490d..b7a2e1360 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issue.html @@ -10,26 +10,26 @@ - -[v1.3-2017/07/05 修改格式发送参数bug] | Knife4j - - +[v1.3-2017/07/05 修改格式发送参数bug] | Knife4j + +
-

[v1.3-2017/07/05 修改格式发送参数bug]

swagger-bootstrap-ui 1.3 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

本次更新:

1、修复application/json格式发送参数bug,文本框替换为textarea

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue.html index eb2bdba9b..240ef01a9 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issue.html @@ -10,26 +10,26 @@ - -[v1.4-2017/07/11 修改请求参数异常bug] | Knife4j - - +[v1.4-2017/07/11 修改请求参数异常bug] | Knife4j + +
-

[v1.4-2017/07/11 修改请求参数异常bug]

swagger-bootstrap-ui 1.4 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

本次更新:

1、修改请求参数异常bug

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue.html index e349d5a6d..ebde2ae06 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issue.html @@ -10,26 +10,26 @@ - -[v1.5-2017/09/01 修改groupId] | Knife4j - - +[v1.5-2017/09/01 修改groupId] | Knife4j + +
-

[v1.5-2017/09/01 修改groupId]

swagger-bootstrap-ui 1.5 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

本次更新:

1、修改groupid为com.github.xiaoymin

2、新增layer弹框,增加接口表单验证功能,针对required=true的字段

3、修复实体类中包含自引用递归算法错误的bug

4、类型dataType有ref类型显示为string的bug

5、响应实体字段详细说明table添加

6、针对RequestBody字段,如果是ref属性,详细列出每个字段的说明

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.5</version>
</dependency>

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue.html index f2500c872..cc5f6d4d2 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issue.html @@ -10,27 +10,27 @@ - -[v1.6-2017/09/06 支持文件上传] | Knife4j - - +[v1.6-2017/09/06 支持文件上传] | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue.html b/knife4j-doc/gitee/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue.html index beb48ac58..45b158e2f 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issue.html @@ -10,27 +10,27 @@ - -[v1.7-2017/12/18 分组功能实现] | Knife4j - - +[v1.7-2017/12/18 分组功能实现] | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.html index c35ecc33f..8b557405b 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issue.html @@ -10,26 +10,26 @@ - -[v1.7.2-2018/01/20 响应状态码无效] | Knife4j - - +[v1.7.2-2018/01/20 响应状态码无效] | Knife4j + +
-

[v1.7.2-2018/01/20 响应状态码无效]

主要包含文档说明、在线调试两大核心功能

Swagger-Bootstrap-UI是Swagger的前端UI实现,采用jQuery+bootstrap实现,目的是替换Swagger默认的UI实现Swagger-UI,使文档更友好一点儿...

1.fixed ISSUE responseBody是List时,Model结构无法显示,只有个Array

2.fixed ISSUE @ApiResponse定义的状态码无效

3.去除默认响应状态码展示

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.html index d50df8efb..61d611eb1 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issue.html @@ -10,26 +10,26 @@ - -[v1.7.3-2018/04/28 HTTP常规方法支持] | Knife4j - - +[v1.7.3-2018/04/28 HTTP常规方法支持] | Knife4j + +
-

[v1.7.3-2018/04/28 HTTP常规方法支持]

swagger-bootstrap-ui 1.7.3 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.7.3更新如下:

1、添加patch、head、trace等http其他方法

2、响应参数解析集合类型不展示属性bug

3、响应参数、请求参数使用treegrid-table组件

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.html index f6e1012a6..d4d776cb2 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issue.html @@ -10,19 +10,19 @@ - -[v1.7.5-2018/07/16 Ui全面改版] | Knife4j - - +[v1.7.5-2018/07/16 Ui全面改版] | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.html index b658dd307..61f2b880d 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issue.html @@ -10,26 +10,26 @@ - -[v1.7.6-2018/07/18 全局默认参数] | Knife4j - - +[v1.7.6-2018/07/18 全局默认参数] | Knife4j + +
-

[v1.7.6-2018/07/18 全局默认参数]

swagger-bootstrap-ui 1.7.6 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

该版本基本是fixed版本,修复了很多bug,针对全局参数这种新特性,影响比较大,建议升级

swagger-bootstrap-ui 1.7.6 主要更新如下:

1、fixed 全局默认参数,设置值无效问题

2、add 简介页添加basePath属性

3、fixed 响应类型是Ref引用属性,在响应json中未列出属性

4、fixed 默认值未显示,swagger 2.9.2版本响应json的默认值为x-example属性

5、fixed tags存在大写的情况不显示接口 bug,在swagger2.9.2版本测试时,swagger又将后台的tags改为区分大小写了,所以建议升级swagger版本到最新

6、fixed 相同url地址,不同method类型,接口未展示bug

7、fixed 请求参数为ref引用类型时,文档列出请求类型和schema类型一致,显示schema类型

8、tip:推荐使用chrome浏览器,别的浏览器可能有js、css兼容问题,文档效果未到最佳

9、tip:建议swagger版本升级到2.9.2

<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.7.6</version>
</dependency>

欢迎提BUG给我

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.html index 89abdfdb7..0fe554cd1 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issue.html @@ -10,26 +10,26 @@ - -[v1.7.7-2018/07/25 修复JS内存溢出] | Knife4j - - +[v1.7.7-2018/07/25 修复JS内存溢出] | Knife4j + +
-

[v1.7.7-2018/07/25 修复JS内存溢出]

swagger-bootstrap-ui 1.7.7 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

该版本基本是fixed版本,修复了很多bug,针对全局参数这种新特性,影响比较大,建议升级

swagger-bootstrap-ui 1.7.7 主要更新如下:

1、fixed 对象ref应用本身,JS 出现死循环了么,栈内存溢出BUG

2、优化递归查找ref方法,fixed ref自身引用,相互引用的情况下,文档出不来bug

3、响应json属性太多,文档太长,不利于查看,使用jsonview插件格式化,可收缩,便于查看

4、fixed 对象属性值存在required属性时,值显示不对bug

5、兼容firefox,文档菜单换行显示异常问题

6、新增枚举请求参数类型支持,调试页面枚举类型为下拉框

7、fixed 请求swagger-resources接口响应为string类型,文档无法展示,格式化json展示文档

8、fixed 全局参数重新赋值无效

9、fixed 针对@ApiOperation注解自定义tags接口无法显示bug

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.7.7</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

欢迎提BUG给我

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.html index 111744d2d..4a59fdba9 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issue.html @@ -10,26 +10,26 @@ - -[v1.7.8-2018/08/03 文件上传支持] | Knife4j - - +[v1.7.8-2018/08/03 文件上传支持] | Knife4j + +
-

[v1.7.8-2018/08/03 文件上传支持]

swagger-bootstrap-ui 1.7.8 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.7.8 主要更新如下:

1、fixed 针对@RequestBody注解实体类属性required的值一直显示默认false问题

2、fixed 针对文件上传,使用allowMultiple = true,上传按钮不显示bug,推荐使用@ApiImplicitParam注解,并且指定dataType = "MultipartFile"

3、分组接口移动至顶部,菜单列表添加icon图标,移除简介页的软件介绍信息,丰富简介页信息,新增各类型接口统计信息,菜单简介名称更名为主页

4、增加调试参数记忆功能,下次点击该接口时,上次输入的参数会保存继续可使用

5、优化 针对@RequestBody注解,参数使用默认description的问题,将使用@ApiModel注解实体类上的description属性

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.7.8</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

欢迎提BUG、Pull Request给我,共同来完善这个小工具

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.html index b5c6d42f4..1117a363f 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issue.html @@ -10,26 +10,26 @@ - -[v1.7.9-2018/08/06 Authorize授权支持] | Knife4j - - +[v1.7.9-2018/08/06 Authorize授权支持] | Knife4j + +
-

[v1.7.9-2018/08/06 Authorize授权支持]

swagger-bootstrap-ui 1.7.9 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.7.9 主要更新如下:

1、fixed 针对Integer、double、float等类型参数,有format参数则显示format属性,以区分准确类型,如:int64|int32等

2、fixed 滚动条出现底部部分内容不显示bug

3、优化菜单接口根据不同接口类型,颜色调整

4、优化文档响应数据jsonview字体,优化间距,更显紧促,优化菜单,接口及接口类型加粗

5、add 顶部加搜索功能、可根据api地址、api介绍、api类型、分组名称实现模糊搜索,默认搜索当前已加载的分组api,如果其他分组未加载则搜索不到.

6、add 针对Security-JWT等权限验证,显示Authorize菜单授权

7、add 左侧菜单栏可自由拖动长度大小

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.7.9</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

欢迎提BUG、Pull Request给我,共同来完善这个小工具

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.html index 1702964e6..52b1ec215 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issue.html @@ -10,26 +10,26 @@ - -[v1.8.0-2018/08/10 调试栏优化] | Knife4j - - +[v1.8.0-2018/08/10 调试栏优化] | Knife4j + +
-

[v1.8.0-2018/08/10 调试栏优化]

swagger-bootstrap-ui 1.8.0 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.0 主要更新如下:

1、fixed 请求参数出现重复问题,去重

2、fixed 无法显示spring cloud 子项目路径,针对basePath不为空,或者不为"/"根路径的情况,相关api地址加上basePath前缀

3、调整菜单url各方法配色、接口配色,文档介绍、调试返回响应数据json配色

4、响应模块添加http响应码、接口耗时、大小,参数栏添加全选按钮,调试页面针对响应内容tab选项卡去除灰色背景色,为默认白色底色

5、调试响应模块增加raw、curl两个子tab选项卡,实现curl功能,方便远程调试

6、针对接口二进制返回,提供下载按钮,可点击弹出下载功能

7、fixed 针对图片返回时报DApiUI is not defined错误

8、文档doc.html页面title根据用户自定义title显示

9、发送中增加loading效果

10、调整菜单顶部分组接口位置,移动到最左侧,添加可隐藏/显示MENU元素

11、fixed 针对schema类型的参数,显示类型为string类型,按schema类型展示

12、文件上传支持文件多选

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.0</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

欢迎提BUG、Pull Request给我,共同来完善这个小工具

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.html index 49eaa8bb2..33cc9a6b4 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issue.html @@ -10,26 +10,26 @@ - -[v1.8.1-2018/08/14 修复basePath导致404] | Knife4j - - +[v1.8.1-2018/08/14 修复basePath导致404] | Knife4j + +
-

[v1.8.1-2018/08/14 修复basePath导致404]

swagger-bootstrap-ui 1.8.1 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.1 主要更新如下:

1、fixed 针对basePath属性,调试接口重复添加basePath路径,接口报404错误(重大bug,建议升级)

2、fixed 针对@ApiModelProperty注解,针对example属性值,array类型值带单引号,文档无法显示bug

3、fixed 针对404 异常,header-curl tab选项卡切换bug

4、fixed curl -X 参数bug,显示缺少"/"根路径

5、fixed 左侧接口列表滚条无法完全滚动到底部

6、fixed 窗口大小改变后,界面混乱

7、优化菜单做成接口方法类型和接口类型左对齐

8、fixed 左侧接口列表滚条无法完全滚动到底部

9、优化 针对枚举类型,参数说明显示可用值列表

10、表单类型显示header、可提交header信息

11、fixed 基础类型响应数据为空的情况

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.1</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.html index 5ab1cd998..ebd3f326e 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issue.html @@ -10,26 +10,26 @@ - -[v1.8.2-2018/08/26 优化UI样式] | Knife4j - - +[v1.8.2-2018/08/26 优化UI样式] | Knife4j + +
-

[v1.8.2-2018/08/26 优化UI样式]

swagger-bootstrap-ui 1.8.2 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.2 主要更新如下:

1、fixed 关于@ApiModelProperty的value不支持\n issue #IM7XC @GITEE

2、fixed 关于在线调试界面显示的优化,调试栏新增参数类型列,区分数据参数请求类型 issue #IM7TV @GITEE

3、fixed 在springcloud下 整合到zuul时 测试路径不正确issue #IM69X @GITEE

4、属性介绍说明,表格栏统一使用中文

5、fixed 发布到tomcat非root目下时路径被多层嵌套curl路径正确 ui内部测试路径多层issue #IM69H @GITEE

6、fixed List<String>和String[]类型解析不正确,应该为array,实际为String并且不能增加issue #IM2ZI @GITEE

7、fixed 类型及引用类在出现array类型时不一致的问题issue #7 @GitHub

8、fixed DELETE请求无法正确处理请求头issue #16 @GitHub

9、fixed 在线调试-参数名称更改不生效 issue #IMBN3 @GITEE

10、fixed 升级到1.8.1后,火狐浏览器无法显示文档issue #IM37D @GITEE

11、fixed 关于请求是form表单,但是业务参数是body(json体的)请求异常issue #IM2YE @GITEE

12、fixed 入参中的对象被处理成stringissue #ILU3S @GITEE

13、fixed UI 样式建议(采纳大部分建议,非常感谢@永夜 提出的建议)issue #IMCET @GitEE

14、fixed 当请求,出现param参数时,与body参数时,传到服务器无效params没有传,同issue #IM2YE issue #IM72N @GITEE

15、优化,返回raw文本标签页添加复制文本功能,方便开发者调用,复制按钮增加icon

16、fixed 文件上传的bugissue #IM4RG @GITEE

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.2</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

还未给swagger-bootstrap-ui点过赞的朋友,前往https://gitee.com/xiaoym/swagger-bootstrap-ui给个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.html index 4ccfffc8e..fc2c4e0c4 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issue.html @@ -10,26 +10,26 @@ - -[v1.8.3-2018/09/17 treetable展示参数] | Knife4j - - +[v1.8.3-2018/09/17 treetable展示参数] | Knife4j + +
-

[v1.8.3-2018/09/17 treetable展示参数]

swagger-bootstrap-ui 1.8.3 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.3 主要更新如下:

1、新增tab选项卡,各个api接口详情通过新开选项卡来展现

2、去除原schema表格形式展示,请求参数、响应参数改由treetable组件(树组件)展示

3、fixed 请求参数有array类型,显示为schema类型的bug

4、fixed springcloud zuul 整合ui情况下 地址多个/ISSUE #IMF0L @Gitee

5、响应内容去除cookies选项卡,响应示例、响应内容使用ace-editor展示响应内容,方便复制

6、优化(全局参数&Authorize)加入浏览器缓存问题,使用localStorage对象全局存储issue #IMH77 @Gitee

7、fixed 泛型数据接口返回list类型时,不能解析issue #26 @GitHub

8、fixed 模型内部包含模型没有展示issue #25 @GitHub

9、优化请求参数是否必填样式,如果该参数必填,则以红色标注显示issue #22 @Github

10、fixed DELETE请求不能正确处理Query参数 issue #19 @GitHub

11、fixed 请参数类型为 formData 的参数,填写了参数值还是提示 参数不能为空issue #24 @GitHubissue #IMMMJ @Gitee

12、优化离线文档多行,换行、多空格显示问题

预览效果如下:

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.3</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

还未给swagger-bootstrap-ui点过赞的朋友,前往https://gitee.com/xiaoym/swagger-bootstrap-ui给个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.html index e6f7f2ba4..6c6b7545b 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issue.html @@ -10,26 +10,26 @@ - -[v1.8.4-2018/09/25 Model解析异常修复] | Knife4j - - +[v1.8.4-2018/09/25 Model解析异常修复] | Knife4j + +
-

[v1.8.4-2018/09/25 Model解析异常修复]

swagger-bootstrap-ui 1.8.4 发布了。swagger-bootstrap-ui 是 Swagger 的前端 UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.4 主要更新如下:

1、fixed key-value表单请求 @RequestParam映射无效,在线调试bugissue #IMXOV @Giteeissue #30 @GitHub

2、fixed 树形model默认展开issue #IMXH5 @Gitee

3、fixed 两个list里放同一个bean,一个显示一个不显示issue #IMXOY @Gitee

4、fixed 同时传输文本信息和文件时,值重复issue #IMXDT @Gitee

5、fixed issue #IN03Q

6、fixed 响应类 3层嵌套解析不出来issue #IMXOF @Gitee

7、fixed 全局参数设置接口中已有变量,会导致在线调试里面出现2个参数,不方便调试(如果后端swagger配置文件中使用globalParameter设置全局参数,并且赋予默认值,则以后端全局参数值为准)issue #IMXVD @Gitee

8、fixed ["text/plain"] controller接收问题issue #IN0PC @Gitee

9、优化调试页响应高度,ace-editor响应高度

10、默认在Swagger-bootstrap-ui的请求,UI会增加一个默认的请求头Request-Origion:SwaggerBootstrapUi

11、fixed Authorize默认tab不选中的bug

12、fixed curl响应参数,针对中文urlencode处理

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.4</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

还未给swagger-bootstrap-ui点过赞的朋友,前往https://gitee.com/xiaoym/swagger-bootstrap-ui给个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.html index 4c8fca20b..29c54a674 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issue.html @@ -10,26 +10,26 @@ - -[v1.8.5-2018/10/16 文档增强,接口排序] | Knife4j - - +[v1.8.5-2018/10/16 文档增强,接口排序] | Knife4j + +
-

[v1.8.5-2018/10/16 文档增强,接口排序]

swagger-bootstrap-ui 1.8.5 发布了。swagger-bootstrap-ui 是 Swagger 的增强UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui在1.8.5以后,她不在是一个纯webjar的UI工具了,她增强了swagger的一些功能支持,例如tags、接口的排序,一些个性化的支持,目前只增强接口排序

后续更多关于swagger的增强功能需求非常欢迎大家提issue反馈,让这款UI更加丰富强大.

swagger-bootstrap-ui 1.8.5 主要更新如下:

1、fixed formdata类型参数针对array数组类型无增加按钮

2、fixed 响应内容高度占比,参数过多的情况无法显示

3、多选项卡文档介绍、在线调试position位置引起的不适改动,由竖变横.

4、增强排序功能,添加个性化配置管理功能,可开启个性化配置

5、关于个性化增强功能,目前已经实现了tags、和接口api方法的排序,使用方式:

在原EnableSwagger2注解上增加@EnableSwaggerBootstrapUi注解

@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
public class SwaggerConfiguration {
//more...
}

针对tags分组排序,UI的排序规则是顺序排序,最小值1,最大值也是默认值Integer.Max_VALUE;

如果不使用SwaggerBootstrapUi的增强功能,则无需开启@EnableSwaggerBootstrapUi注解

tags的排序规则分两种

a、一种是判断Swagger的@Api注解的position属性是否不等于0(默认值为0),如果该值不为空,则获取此值,根据该值排序

b、如果postion=0(不写的情况下),判断是否存在注解@ApiSort的值,如果有值,则获取此值,根据该值排序

c、所以排序的取值规则是:position>@ApiSort

接口api的排序规则

a、判断@ApiOperation注解上的postion属性是否不等于0(默认值为0),如果该值不为空,则获取此值,根据该值排序

//postion属性赋值
@ApiOperation(httpMethod = "POST",position = 2,value = "Test2Model测试数组参数,多个",response=Test2Model.class)
@ApiResponses({
@ApiResponse(code = 200, message = "非HTTP状态码,返回值JSON code字段值,描述:成功")
})
@ApiImplicitParams({
@ApiImplicitParam(name = "ids",paramType ="form",value = "参数",allowMultiple = true, required = true)
})

b、如果postion=0(不写的情况下),判断是否存在注解@ApiOperationSort的值,如果有值,则获取此值,根据该值排序

c、所以排序的取值规则是:position>@ApiOperationSort

注意

注解@EnableSwaggerBootstrapUi@ApiSort@ApiOperationSort是本UI工具包提供的Java注解,排序功能的使用需要在启用原EnableSwagger2注解上增加@EnableSwaggerBootstrapUi注解方可生效

6、默认去除接口api地址的线上,默认只显示方法类型、方法说明两个属性,当然,新版本增加的个性化的配置功能,如果你觉得api地址显示任然有需要,可在个性化配置中开启该功能,个性化配置属性存储在localStorage对象中.只需要配置一次接口.

7、fixed 构建curl功能中写死http,根据window.location.href动态判断(http|https)的情况

8、如果请求参数是json参数body类型,文档说明中添加请求示例json展示,方便查看

9、请求示例、响应示例json自动适配高度

10、选中接口api菜单时,菜单显示激活色,显示背景颜色background-color: #eee;

11、fixed 离线文档markdown格式错乱问题(table标题换行导致显示异常)

12、离线文档已预览html的方式展现,复制文档功能依然是复制markdown语法

13、请求参数及响应参数说明改为多行显示,超出长度不以省略号显示,防止出现浮层一直显示的bug

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.5</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

还未给swagger-bootstrap-ui点过赞的朋友,前往https://gitee.com/xiaoym/swagger-bootstrap-ui给个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.html index a6831b839..ad983698d 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issue.html @@ -10,26 +10,26 @@ - -[v1.8.6-2018/10/31 Spring MVC接口增强异常] | Knife4j - - +[v1.8.6-2018/10/31 Spring MVC接口增强异常] | Knife4j + +
-

[v1.8.6-2018/10/31 Spring MVC接口增强异常]

swagger-bootstrap-ui 1.8.6 发布了。swagger-bootstrap-ui 是 Swagger 的增强UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

swagger-bootstrap-ui 1.8.6 主要更新如下:

特性增加

1、请求参数类型(header|body|query)等以不同颜色着色区分

2、调试栏针对必须项(require=true)时,文本框着红色以区分

3、调试页输入框可通过tab键自动切换上下级输入框.

Bug修复

1、修复Spring使用cglib生成的代理类,导致class无法获取Spring的相关注解,导致接口增强排序失败

2、针对basePath属性不是根路径“/”,导致接口排序比对失败,无法排序的问题

3、修复针对SpringCloud通过zuul路由组件加载swagger接口存在basePath属性,增强接口缺失basePath属性的bug,导致增强接口请求失败的问题

4、修复Spring的请求地址仅支持value属性,不支持path属性的bug

5、针对请求头Content-Type中多余空格问题,部分接口调用失败的问题

6、修复针对参数、参数说明太长,导致table换行,样式失效问题.

7、修复针对header、path等参数外,传参只包含body类型无请求json示例的问题.

8、修复针对请求参数存在多个数组,增加按钮无效的BUG.

9、优化离线文档相关的显示格式问题.包括JSON显示格式错乱、添加请求JSON示例、文档开始说明等信息

UI效果展示

header-json.png

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.6</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GITHUB:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

欢迎提BUG、Pull Request给我,共同来完善这个小工具

还未给swagger-bootstrap-ui点过赞的朋友,前往https://gitee.com/xiaoym/swagger-bootstrap-ui给个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.html index 945b051f1..34ec25395 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issue.html @@ -10,26 +10,26 @@ - -[v1.8.7-2018/11/12 Swagger Models支持] | Knife4j - - +[v1.8.7-2018/11/12 Swagger Models支持] | Knife4j + +
-

[v1.8.7-2018/11/12 Swagger Models支持]

Swagger-Bootstrap-Ui 1.8.7 发布了。Swagger-Bootstrap-Ui是 Swagger 的增强UI 实现,目的是替换 Swagger 默认的 UI 实现 Swagger-UI,使文档更友好一点儿

从1.0到更新至今,Swagger-Bootstrap-Ui也新增了很多小特性,为使更多人了解她,我重写了一份关于Swagger-Bootstrap-Ui的文档说明.希望越来越多使用她的用户都能体验到她带来的便利.详情可关注README.MD

Swagger-Bootstrap-Ui 1.8.7 主要更新如下:

特性&优化

1、优化调试框响应内容高度,根据响应内容自动设置响应高度,不再设固定高度.

2、Authorize功能提供注销功能,清空当前缓存在浏览器的相关Auth信息.

3、新增Swagger Models菜单项功能,以TreeTable的方式展示当前Swagger分组实例文档中所有相关的Models属性说明.

4、个性化配置项新增是否显示tag分组description属性的选择项,勾选后,会和swagger官方文档一样显示description属性,默认为false不显示.

5、引入async.js异步组件库,优化文档解析效率,解析渲染速度提升5倍以上.

6、优化接口的id生成策略,使用MD5针对接口地址和mehtod方式生成接口id,调试参数全局缓存localStorage对象中,方便下次刷新访问调试.

7、响应状态栏增加全屏icon,点击全屏icon可全屏查看响应内容.

8、解决离线文档再开启UI增强功能后不排序的问题

9、调试框根据Swagger接口参数显示当前接口的Content-Type类型,在某些特殊情况下可更改默认定义Content-Type请求头类型,如果使用UI提供的全局参数功能,自定义了Content-Type的请求头,则默认以全局参数中的Content-Type为主.

10、增加对JSR-303 annotations 注解的支持(部分)

Bug修复

1、针对SpringCloud通过网关构建Swagger分组获取不到Documentation对象的情况,根据default再获取一次

2、修复UI增强关于使用@Api注解tags属性不赋值,使用value,增强排序失败的问题.

3、修复针对@RequestMapping注解无value属性,UI增强出现数组越界的问题

4、修复针对扩展Spring的RequestMappingHandlerMapping自定义实现方式,获取不到扩展接口url地址信息,导致UI增强排序失败的问题.

UI效果展示

header-json.png

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.7</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

Star & Issue

或许她不是最漂亮的SwaggerUi,但绝对是目前最实用的SwaggerUi

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.html b/knife4j-doc/gitee/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.html index 0b4819626..e23364180 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issue.html @@ -10,19 +10,19 @@ - -[v1.8.8-2018/12/17 多个响应code支持] | Knife4j - - +[v1.8.8-2018/12/17 多个响应code支持] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.8</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

Star & Issue

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.html index 3f430e7ed..c0f4e9a44 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issue.html @@ -10,19 +10,19 @@ - -[v1.8.9-2019/01/11 文件下载、增强优化] | Knife4j - - +[v1.8.9-2019/01/11 文件下载、增强优化] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.8.9</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

代码集成示例

SpringBoot在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

Spring Mvc在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/swagger-bootstrap-ui-demo-mvc

Star & Issue

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.html index b49309555..d97f6a2d7 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issue.html @@ -10,19 +10,19 @@ - -[v1.9.0-2019/02/25 提供Swagger资源保护] | Knife4j - - +[v1.9.0-2019/02/25 提供Swagger资源保护] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.0</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

项目文档:http://www.xiaominfo.com/swagger-bootstrap-ui/

代码集成示例

SpringBoot在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

Spring Mvc在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/swagger-bootstrap-ui-demo-mvc

Star & Issue

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.html index fbedfd9e6..de7690d3a 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issue.html @@ -10,19 +10,19 @@ - -[v1.9.1-2019/03/11 优化大数据响应接口] | Knife4j - - +[v1.9.1-2019/03/11 优化大数据响应接口] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.1</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

项目文档:http://www.xiaominfo.com/swagger-bootstrap-ui/

代码集成示例

SpringBoot在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

Spring Mvc在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/swagger-bootstrap-ui-demo-mvc

Star & Issue

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.html index 04cd0d4c7..bc81de2a2 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issue.html @@ -10,19 +10,19 @@ - -[v1.9.2-2019/04/08 提供前后端分离解决方案] | Knife4j - - +[v1.9.2-2019/04/08 提供前后端分离解决方案] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.2</version>
</dependency>

码云https://gitee.com/xiaoym/swagger-bootstrap-ui

GitHub:https://github.com/xiaoymin/Swagger-Bootstrap-UI

在线体验:http://swagger-bootstrap-ui.xiaominfo.com/doc.html

项目文档:http://www.xiaominfo.com/swagger-bootstrap-ui/

代码集成示例

SpringBoot在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

Spring Mvc在线demo地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo/tree/master/swagger-bootstrap-ui-demo-mvc

Star & Issue

前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

相关链接

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.html index dacb6c13f..f6a496c3f 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issue.html @@ -10,19 +10,19 @@ - -[v1.9.3-2019/04/23 i18n及自定义文档支持] | Knife4j - - +[v1.9.3-2019/04/23 i18n及自定义文档支持] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.3</version>
</dependency>

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue.html index 686e47edb..032dea7c9 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issue.html @@ -10,26 +10,26 @@ - -[v1.0-2020/05/20 Knife4j-Admin 1.0发布,任意聚合 Swagger 文档] | Knife4j - - +[v1.0-2020/05/20 Knife4j-Admin 1.0发布,任意聚合 Swagger 文档] | Knife4j + +
-

[v1.0-2020/05/20 Knife4j-Admin 1.0发布,任意聚合 Swagger 文档]

knife4j-admin是一个基于Spring Cloud Gateway网关,通过网关的特性,结合knife4j对Swagger的文档进行动态聚合的管理平台

平台特点:

  • 跨语言、跨平台
  • 任意聚合Swagger文档,动态发布,调试
  • 文档个性化配置、权限等
  • 彻底告别聚合网关文档等由于软件版本等造成的技术集成问题
  • 独立部署

目前V1.0版本提供的功能:

  • 项目管理:查看项目列表,新增项目文档

  • 文档预览:通过项目的JSON结构,解析动态添加至Spring Cloud Gateway网关进行文档聚合,并且可以在线调试

项目新增

1、添加项目必须按照如下格式进行

{
"name": "大数据测试平台",
"code":"test1",
"description":"我是描述信息",
"groups": [
{
"name": "用户模块",
"uri":"http://knife4j.xiaominfo.com",
"header":"server1",
"url": "/v2/api-docs?group=2.X版本",
"swaggerVersion": "2.0"
},{
"name": "订单模块",
"uri":"http://swagger-bootstrap-ui.xiaominfo.com",
"header":"server2",
"url": "/v2/api-docs?group=1.8.X版本接口",
"swaggerVersion": "2.0"
}
//more..
]
}

2、平台会根据用户上传的JSON文件在服务端保存一个.json文件,每一个项目代表内容都是以上一个完整的json文件

3、项目code必须唯一

4、项目下的服务列表信息中,header必须全局唯一,该参数值用户可以随机生成,只需要保证唯一性即可,作为Spring Cloud Gateway网关组件的转发依据

5、groups集合中,所提供的Swagger接口必须保证可以访问,完整的访问路径是uri+url

解决痛点

1、多语言使用Swagger时,集成Knife4j较麻烦

虽然Knife4j提供了其他语言的前端版本,但是从总体上还需要自己打包构建,而且依赖于其他Web容器进行单独部署,使用上叫复杂

Knife4j-admin目前是根据OpenAPI V2的Swagger规范文档聚合平台,不同的语言在使用Knife4j时也可以很方便的使用

2、以Spring Cloud的微服务体系聚合Swagger困难重重

在Knife4j的技术交流群中,目前问的最多的就是Spring Cloud微服务架构如何聚合Swagger文档,要么是文档聚合失败,无法显示,要么是由于网关组件(Gateway|zuul)等组件本身的版本问题导致文档显示异常

Knife4j-admin是独立部署,只需要提供微服务的接口既可以通过admin来很方便的集成

3、个性化配置

个性化的配置问题同样也是开发者关心的,例如:

1).Swagger文档能否登陆?

2).如何在生产环境屏蔽Swagger文档

3).文档界面中的XXX功能能否不显示

4).more...

对于个性化的需求,由于Knife4j-admin是独立的平台,对于文档的安全性等方面,可以做到很精准的控制,平台有用户,有可视化操作,有授权,并且可以作为唯一的对外文档发布平台,结合自身的服务器网络环境,做到内外网的环境隔离,文档安全输出.

更多有趣的功能等你来发掘~~!!!

试用

目前,在服务器上部署了一个版本,开发者如果有兴趣可以去体验

访问地址:http://kadmin.xiaominfo.com/index.html#/home

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.html index 2f39a5839..09005d0dc 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issue.html @@ -10,19 +10,19 @@ - -[v1.9.4-2019/06/10 扩展支持动态字段注释] | Knife4j - - +[v1.9.4-2019/06/10 扩展支持动态字段注释] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.4</version>
</dependency>

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

源码分析

距离上一个版本也有挺长时间了,这段时间主要是对springfox的源码进行了一些研究和学习,并且记录了一些博客,该版本(1.9.4)的一些功能也在看源码的过程中对我有一些启发,对于Swagger的规范也多了一些了解

对springfox源码有兴趣的朋友可以去我的博客查看,点击前往

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.html index 2d4e1a5bc..d0c1dc51c 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issue.html @@ -10,19 +10,19 @@ - -[v1.9.5-2019/07/31 支持过滤请求参数] | Knife4j - - +[v1.9.5-2019/07/31 支持过滤请求参数] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.5</version>
</dependency>

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.html index 13cadca10..6ff388aa2 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issue.html @@ -10,19 +10,19 @@ - -[v1.9.6-2019/08/28 解决长整型精度丢失的问题] | Knife4j - - +[v1.9.6-2019/08/28 解决长整型精度丢失的问题] | Knife4j + +
-
- - +

项目地址

Maven坐标

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.6</version>
</dependency>

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/swagger-bootstrap-ui点个Star吧~~ :)

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue.html index 398a3ab59..49acebe02 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-12-16-knife4j-2.0.0-issue.html @@ -10,26 +10,26 @@ - -[v2.0.0-2019/12/16 Knife4j 2.0发布,涅槃重生~!] | Knife4j - - +[v2.0.0-2019/12/16 Knife4j 2.0发布,涅槃重生~!] | Knife4j + +
-

[v2.0.0-2019/12/16 Knife4j 2.0发布,涅槃重生~!]

Knife4j前身是swagger-bootstrap-ui,取名knife4j是希望她能像一把匕首一样小巧,轻量,并且功能强悍,更名也是希望把她做成一个为Swagger接口文档服务的通用性解决方案,不仅仅只是专注于前端Ui前端.虽然目前还只是在前端,但以后功能肯定不止于此.

2.0版本主要是使用Vue+Ant Design Vue对前端Ui进行重写,该版本是真正的前后端分离版本,同时依赖于Vue的技术生态,以后会有更多有趣的功能实现,全方位满足开发者的需要.

文档:http://doc.xiaominfo.com

效果(旧版):http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.0版):http://knife4j.xiaominfo.com/doc.html

Gitee:https://gitee.com/xiaoym/knife4j

GitHub:https://github.com/xiaoymin/swagger-bootstrap-ui

示例:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

knife4j-spring-ui

1、使用Vue+Ant Design Vue对Ui进行重写,统一整体界面风格,更清晰的文档说明能力以及接口调试能力

2、支持在界面中导出离线Markdown、离线Html格式的文档,Markdown、Html风格较之前都做了极致的优化,Markdown格式主要是针对树形Model的展示通过缩进的方式在md格式的table中显示更加直观,Html离线文档和在线版风格几乎没有区别,简洁、直观.点击预览导出离线Html效果

3、单接口文档页的复制文档也是通过复制Markdown格式的问题,同上主要优化md格式的table显示问题,以缩进的方式显示树形表格

4、对调试栏进行优化、区分请求头和请求体参数,使用tab标签页组件可以对请求参数进行动态的添加、维护、如果你使用对文档进行缓存,文档页的动态调试参数会持久化处理.

5、文档的个性化配置(增强功能)有删减,目前只保留4项功能,即(请求参数缓存、过滤重复同类型接口、本地缓存打开tab接口、文档增强)

6、Tab标签页打开接口、右键可以根据选择关闭不同的Tab标签页

7、调试框请求头、请求体均支持动态参数,开发者可以自行添加动态参数进行调试,更加灵活方便

8、提供增强直接访问地址,http://ip:port/doc.html#/plus,后端在保证开启增强注解的情况下可直接使用该地址,不需要在前端个性化配置中再进行配置,方便团队直接进行沟通

9、响应下载类型增加至141种,几乎涵盖目前常见的文件类型

10、修复响应体中会出现属性多余双引号的buggitee # I125B2github #156

11、修复请求参数数据类型的format不显示的问题,针对Long类型区分int64、int32- github #161

12、解决多个Schema响应状态码的情况下SwaggerModels字段不显示的问题github #170

13、调试请求默认追加一个Ui的请求头Request-Origion,值为Knife4j,原来该值是SwaggerBootsrapUi,在2.0版本中进行了变更.

14、解决Models属性嵌套过多时,页面白板,效率问题github #106

如果你后端是Java+Spring的技术栈,在使用springfox的同时,想换一个Swagger的Ui皮肤,通过在pom.xml中直接引入即可,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.0</version>
</dependency>

Knife4j-Spring

1、移除增强注解@EnableSwaggerBootstrapUi,以后的增强开启注解请使用@EnableKnife4j

2、knife4j-spring-boot-starter组件移除默认springfox的ui-jar包springfox-swagger-ui,只保留knife4j-spring-ui,开发者如果要使用springfox的ui包需要自行在项目中引入

3、合并PR12-修复IDEA debug无法显示动态Response的问题,修复动态类加载不到的问题

使用SpringBoot的技术栈可以通过引用starter的方式快速引入使用,注意该starter组件是包含Ui的,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>

如果是微服务的情况下,微服务其实不需要引用Ui的jar包,只需要在网关引用Ui的jar包依赖,所以在微服务情况下,使用增强属性只需要引用微服务版本的starter依赖,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

最后

这次版本是基于Vue重写,对于某些问题有极大的可能难免考虑不周,大家在使用的过程中如果有问题也欢迎及时通过issues和我沟通,会尽快修正,谢谢大家~!!

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue.html b/knife4j-doc/gitee/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue.html index 3c1f5a6e3..a6c515661 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2019-12-23-knife4j-2.0.1-issue.html @@ -10,26 +10,26 @@ - -[v2.0.1-2019/12/23 Knife4j 2.0.1发布,细节处理!] | Knife4j - - +[v2.0.1-2019/12/23 Knife4j 2.0.1发布,细节处理!] | Knife4j + +
-

[v2.0.1-2019/12/23 Knife4j 2.0.1发布,细节处理!]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档服务的工具

文档:http://doc.xiaominfo.com

效果(旧版):http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.0版):http://knife4j.xiaominfo.com/doc.html

Gitee:https://gitee.com/xiaoym/knife4j

GitHub:https://github.com/xiaoymin/swagger-bootstrap-ui

示例:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

knife4j-spring-ui

1、解决x-www-form-urlencoded类型的表单请求,参数勾选复选框无法取消的情况gitee #I16S14

2、个性化配置中新增是否开启动态参数选项,默认为false,不开启,如果有需要的可以勾选此选项,可以无限动态添加参数进行接口调试

3、实现全局搜索功能gitee #I16ZW4

4、@Deprecated 标记的接口置为过时gitee #I1736T

5、针对返回的数据太大,导致页面卡死的情况下,界面做限制处理,如果返回的数据大于2M,不进行格式化处理,弹出提示,提醒开发者在raw进行响应内容的查看,只显示纯文本gitee #I16ZV4

6、优化响应数据大小的格式化显示,BYTE\KB\MB

7、实现图片预览功能gitee #I173AN

如果你后端是Java+Spring的技术栈,在使用springfox的同时,想换一个Swagger的Ui皮肤,通过在pom.xml中直接引入即可,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.1</version>
</dependency>

Knife4j-Spring

使用Spring Boot的技术栈可以通过引用starter的方式快速引入使用,注意该starter组件是包含Ui的,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>

如果是微服务的情况下,微服务其实不需要引用Ui的jar包,只需要在网关引用Ui的jar包依赖,所以在微服务情况下,使用增强属性只需要引用微服务版本的starter依赖,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

最后

这次版本是基于Vue重写,对于某些问题有极大的可能难免考虑不周,大家在使用的过程中如果有问题也欢迎及时通过issues和我沟通,会尽快修正,谢谢大家~!!

关注

关注我的微信公众号,实时了解swagger-bootstrap-ui的最新资讯

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue.html index 02a730506..ec5747416 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-03-08-knife4j-2.0.2-issue.html @@ -10,26 +10,26 @@ - -[v2.0.2-2020/03/08 Knife4j 2.0.2发布,Swagger接口文档赋能工具] | Knife4j - - +[v2.0.2-2020/03/08 Knife4j 2.0.2发布,Swagger接口文档赋能工具] | Knife4j + +
-

[v2.0.2-2020/03/08 Knife4j 2.0.2发布,Swagger接口文档赋能工具]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://doc.xiaominfo.com

效果(旧版):http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

knife4j

1、新增knife4j-dependencies模块,管理knife4j的相关Maven引用,可以以Maven的BOM方式引入Knife4j

2、官网文档同步更新.

3、解决swagger-annotations导致的版本冲突gitee #I17G31GitHub #191

knife4j-spring-ui

1、修复切换tab之后 再次发送请求不带参数且不显示响应数据的问题,调试异常等问题PR 13 @giteegitee #I17FFXGitHub #196GitHub #187

2、优化调试框全部选中的问题,在取消全选时,只有在输入参数改变时才会选中该参数,取消原来默认选中全部参数gitee #I19V6D

3、针对Form表单类型的请求构造curl命令行时在未输入值的情况下为null的情况,修改为空字符串gitee #I18IBZ

4、优化全局参数设置功能,针对参数数据太长不换行问题,以及参数需要修改时需要重新删除的交互体验,开发者在新增参数后可以方便的更改参数数据值以及参数的类型gitee #I17OV1gitee #I19GJKgitee #I1A9V1gitee #I18HMJGitHub #176

5、请求参数在未给定example默认值的情况下,文本输入框的placeHolder属性显示该字段的文字说明gitee #I17RKI

6、修复增强属性忽略参数不生效的问题gitee #PR-16gitee #I136KUgitee #I187VNgitee #I16A71

7、调试参数框增加对后端枚举的支持,改输入框为下拉选择框gitee #I18MHO

8、service-worker.js报404问题,构建打包时添加此文件gitee #I17D0YGitHub #185

9、get请求参数出现特殊字符未编码处理导致出现400错误gitee #I19C8Y

10、后端新增接口或者接口编辑后,在ui界面显示更新标志,在菜单上会出现一个蓝色的徽标gitee #I1AQFW,如下图:

11、后端增强注解@ApiOperationSupport(author = "xiaoymin@foxmail.com")支持每个接口提供开发者的呈现,最终如下图:

12、调试发送按钮增加loading效果,针对接口响应较长的情况下提升交互效果

13、针对Authorize菜单栏的参数,保存参数是全局保存,其它逻辑分组的接口再调试时,不需要再保存一次新值gitee #I16Z10

14、修复部分情况响应字段在ace-editor编辑器右边栏不显示字段说明的情况gitee #I17F5Y

15、搜索框完善对接口请求Api地址栏的模糊搜索匹配gitee #I19EN0gitee #I1B0Q9

16、调试响应数据行太长,无法换行的问题gitee #I17F1J

17、在当前接口无参数的情况下,界面添加全局参数无效果的bug

如果你后端是Java+Spring的技术栈,在使用springfox的同时,想换一个Swagger的Ui皮肤,通过在pom.xml中直接引入即可,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.2</version>
</dependency>

Knife4j-Spring

使用Spring Boot的技术栈可以通过引用starter的方式快速引入使用,注意该starter组件是包含Ui的,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency>

如果是微服务的情况下,微服务其实不需要引用Ui的jar包,只需要在网关引用Ui的jar包依赖,所以在微服务情况下,使用增强属性只需要引用微服务版本的starter依赖,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency>

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue.html index 2bd59ea2c..5e1ff1303 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-05-24-knife4j-2.0.3-issue.html @@ -10,26 +10,26 @@ - -[v2.0.3-2020/05/24 Knife4j 2.0.3发布,支持springdoc和i18n] | Knife4j - - +[v2.0.3-2020/05/24 Knife4j 2.0.3发布,支持springdoc和i18n] | Knife4j + +
-

[v2.0.3-2020/05/24 Knife4j 2.0.3发布,支持springdoc和i18n]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://doc.xiaominfo.com

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

knife4j

1、读取Markdown文件时,当文件不存在时日志错误信息简化打印,开发者可以忽略该错误gitee #I1E1S1

knife4j-spring-ui

1、移除Vue中的pwa机制,解决service-work.js引起的各种问题github #206

2、支持UiConfiguration中方法调试的配置,如并未配置任何支持的方法,在ui界面中不会出现调试栏Tab,代码如下:

@Bean
public UiConfiguration uiConfiguration(){
return UiConfigurationBuilder.builder()
.supportedSubmitMethods(new String[]{})
.build();
}

界面中的显示效果如下(仅显示文档):

3、GET请求出现参数未填的情况下发送Null的buggitee #I1BG4Ogithub #213

4、针对开发者在调试时更改接口地址,在接口地址中添加参数的情况,出现发送请求失败的buggitee #I1C5OQ

5、解决集成文档时各种basePath问题导致Ui的logo不显示的问题,通过Base64将logo图片转换处理,img标签直接显示base64字符串gitee #1CQ1F

6、左侧菜单栏在收缩状态下显示版本控制的标识导致菜单异常的问题,在收缩状态下禁用该项gitee #I1CCXTgitee #I1DBDF

7、增强功能忽略参数不完全的问题gitee PR#18

8、服务端在没有Write任何数据的情况下,针对非200状态码不显示状态的异常问题gitee #I1BKRH

9、针对raw类型的请求接口类型,全局参数中只能是header参数的问题,支持query类型的全局参数gitee #I1C86F

10、增加对Xml请求的适配支持,服务端consumes属性设为application/xml接口gitee #I1BCKB

11、增加@ApiSupport注解,分组Controller下可以设置全局author属性,或者order排序属性

12、剔除webjar文件中的favicon.ico文件,以避免和主项目产生冲突gitee #I1ELHNgithub #215

13、新增includeParameters属性,开发者可以在文档的参数中新增一种选择,该特性是和ignoreParameters对立,具体可以参考文档

14、优化在editor编辑器中的属性字段显示效果gitee #I1G3G9

15、导出的Html、Markdown离线文件添加作者属性gitee #I1EXXO

16、在Ui的全局参数配置中添加Header类型的请求参数后,非空情况下会自动合并每个接口的Header请求参数,接口中的Header如果和全局参数配置中的Header同名但是为空的情况下,Ui会使用全局参数配置中的Header参数gitee #I1GD87

17、优化请求数据类型的显示问题,Ui自动根据参数的类型识别出当前接口的请求类型并进行展示,解决springfox等框架始终解析为json请求的buggitee #I1EMJ9gitee #I1903T

18、修复请求头Content-Type在调试时被忽略的问题,该问题具体参考gitee #I18HGS,knife4j在2.x版本使用的是axios组件,axios针对发送的请求头data属性如果没有传递的情况下会忽略Content-Type请求头,具体可参考https://github.com/axios/axios/issues/86

19、添加I18n的支持,目前支持的语言:中文、English

20、请求头携带Cookie的情况,如果要使用Cookie,请求头的名称请确保为Cookie,不能有小写或其他.

21、添加对springdoc框架的集成支持,非常感谢teddygong提交的PR

如果你后端是Java+Spring的技术栈,在使用springfox的同时,想换一个Swagger的Ui皮肤,通过在pom.xml中直接引入即可,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.3</version>
</dependency>

后端渲染OpenAPI的解析框架是springdoc,则添加如下依赖引用:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-springdoc-ui</artifactId>
<version>2.0.3</version>
</dependency>

Knife4j-Spring

使用Spring Boot的技术栈可以通过引用starter的方式快速引入使用,注意该starter组件是包含Ui的,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.3</version>
</dependency>

如果是微服务的情况下,微服务其实不需要引用Ui的jar包,只需要在网关引用Ui的jar包依赖,所以在微服务情况下,使用增强属性只需要引用微服务版本的starter依赖,如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
<version>2.0.3</version>
</dependency>

Knife4j-Admin

knife4j-admin是一个基于Spring Cloud Gateway网关,通过网关的特性,结合knife4j对Swagger的文档进行动态聚合的管理平台

平台特点:

  • 跨语言、跨平台
  • 任意聚合Swagger文档,动态发布,调试
  • 文档个性化配置、权限等
  • 彻底告别聚合网关文档等由于软件版本等造成的技术集成问题
  • 独立部署

如果你有以上的需求的话,可以考虑使用一下knife4j-admin这个产品,产品文档点这里

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue.html index 24f2aa31b..efca4d807 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-06-28-knife4j-2.0.4-issue.html @@ -10,26 +10,26 @@ - -[v2.0.4-2020/06/28 Knife4j 2.0.4发布,支持自定义 Host] | Knife4j - - +[v2.0.4-2020/06/28 Knife4j 2.0.4发布,支持自定义 Host] | Knife4j + +
-

[v2.0.4-2020/06/28 Knife4j 2.0.4发布,支持自定义 Host]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://doc.xiaominfo.com

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

1、支持UiConfiguration中方法调试的配置,如并未配置任何支持的方法,在ui界面中不会出现调试栏Tab,代码如下:

@Bean
public UiConfiguration uiConfiguration(){
return UiConfigurationBuilder.builder()
.supportedSubmitMethods(new String[]{})
.build();
}

界面中的显示效果如下(仅显示文档):

2、在当前文档页添加复制接口功能,便于开发人员快速复制接口地址github #238

3、修复Authorize修改或注销的问题gitee #I1IJK3

4、个性化配置新增Host属性的配置,如果当前对外提供的接口文档和接口本身Host属性存在冲突,可以自动配置此属性进行接口的联调,Host属性可以配置为ip:port的形式,这样默认是HTTP进行访问,开发者也可以配置完整的域名或者HTTPS等配置

其工作原理是在调用axios组件进行接口调试时,配置其baseURL属性

var baseUrl='';//默认是空
//是否启用Host
if(this.enableHost){
baseUrl=this.enableHostText;
}
var requestConfig={
baseURL:baseUrl,//调用目标Host服务的接口
url: url,
method: methodType,
headers: headers,
params: formParams,
data: data,
//Cookie标志
withCredentials:this.debugSendHasCookie(headers),
timeout: 0
}

开发者要使用此Host的配置后端必须开启跨域的配置,如果是Spring Boot,示例代码如下:

@Bean
public CorsFilter corsFilter(){
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration corsConfiguration=new CorsConfiguration();
corsConfiguration.setAllowCredentials(true);
corsConfiguration.addAllowedOrigin("*");
corsConfiguration.addAllowedHeader("*");
corsConfiguration.addAllowedMethod("*");
corsConfiguration.setMaxAge(10000L);
source.registerCorsConfiguration("/**",corsConfiguration);
CorsFilter corsFilter=new CorsFilter(source);
return corsFilter;
}

5、调试接口时,接口在无返回数据或者异常的情况下弹框错误信息,提示开发者

6、图片预览接口无法在响应内容中在线预览图片的问题gitee #I1KP0Q

7、修复针对Map字段时,Value指引是本类时出现递归死循环的问题,结构如下:

"SensorTable": {
"type": "object",
"properties": {
"attrib": {
"type": "integer",
"format": "int32"
},
"sensorMap": {
"type": "object",
"additionalProperties": {
"originalRef": "SensorTable",
"$ref": "#/definitions/SensorTable"
}
}
//more...
},
"title": "SensorTable"
},

8、修复离线文档功能导出Markdown时,响应参数格式异常的问题gitee #I1LMYO

9、修复在使用中间件对接口响应内容进行拦截处理时,响应内容不显示的bug,例如使用sentinel 进行QPS限流,一般在这种情况下是由于接口响应的Content-Type是json,但实际响应内容却是text导致gitee #I1JO73

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue.html index 2ef8b38fc..2670080e5 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-09-14-knife4j-2.0.5-issue.html @@ -10,26 +10,26 @@ - -[v2.0.5-2020/09/14 Knife4j 2.0.5发布,性能优化] | Knife4j - - +[v2.0.5-2020/09/14 Knife4j 2.0.5发布,性能优化] | Knife4j + +
-

[v2.0.5-2020/09/14 Knife4j 2.0.5发布,性能优化]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://doc.xiaominfo.com

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

1、Ui整体性能优化,主要从以下几个方面展开Gitee #I1TYNKGitee #I1LWNMGitee #I1J52CGitHub #243

  • 获取接口初始化Swagger文档时,只初始化菜单、以及基础信息字段
  • 接口path节点以及Model-definition节点作为异步解析,除了导出功能外只有展示的文档涉及到的信息才会进行解析,缩减没必要的内存开销和空间性能等待
  • SwaggerModels功能中的所有Model通过异步加载,减少内存开销.

2、通过@EnableKnife4j注解注入的实体Bean包含部分Filter,Filter涉及到应用入侵,优化为只有在开发者启用了Knife4j提供的配置值时,该实体Bean才生效

3、解决通过/plus路径来开启增强模式时失效的问题Gitee #I1OJCK

4、接口描述信息支持Markdown语法渲染

5、解决调试发送后,状态栏curl出现参数为null的问题Gitee #I1QC7ZGtiee #I1QXJ1

6、移除fastjson等不必要的依赖Gitee I1OIY9

7、在左侧菜单接口中新增接口类型,并且在分组中显示当前分组下包含的接口数量Gitee #I1PE0H,如下图:

8、优化在当前分组名称/Controller名称/接口分词中带字符/导致页面空白的问题,如果包含使用字符-进行替换Gitee #I1SMAY

9、Vue以及ant-design-vue版本升级到当前最新版

10、导出的离线Html文档优化属性,去除无效的属性引用导致Html文档文件太大(降低5倍以上).

11、增加导出Word文档的实现

12、返回大数据量造成页面卡死的问题优化Gitee #I1QIJK

13、优化默认的标题显示,开发者未设置分组服务标题时文档标题默认显示Knife4j 接口文档Gitee #I1P4OQ

14、枚举类型针对Array数组类型支持多选Gitee #I1NOTEGitHub #267

15、针对POSTPUTPATCH等请求方式,以x-www-form-urlencoded请求头发送请求时,请求参数在url追加的问题,以避免请求时400错误的发生.

16、在i18n环境下离线文档导出时没有完全国际化的优化操作Gitee #I1MKP7

17、针对@RequestBody的请求下载接口响应乱码的问题修复Gitee I1U4LA

18、调试返回状态栏数据大小的显示优化B.KBMBGitHub #264

19、支持UiConfiguration中方法调试的配置,如并未配置任何支持的方法,在ui界面中不会出现调试栏TabGitHub #241,代码如下:

@Bean
public UiConfiguration uiConfiguration(){
return UiConfigurationBuilder.builder()
.supportedSubmitMethods(new String[]{})
.build();
}

界面中的显示效果如下(仅显示文档):

20、接口文档中针对请求参数存在示例值的情况下,在接口的参数说明中予以显示GitHub #109

21、去除doc.htmlfavicon.ico的请求,以避免开发者在网关微服务的架构中集成时出现404.

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue.html index 50e3fbba5..976a7353e 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-10-26-knife4j-2.0.6-issue.html @@ -10,26 +10,26 @@ - -[v2.0.6-2020/10/26 Knife4j 2.0.6发布,支持OpenAPI3及Auth2认证] | Knife4j - - +[v2.0.6-2020/10/26 Knife4j 2.0.6发布,支持OpenAPI3及Auth2认证] | Knife4j + +
-

[v2.0.6-2020/10/26 Knife4j 2.0.6发布,支持OpenAPI3及Auth2认证]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

关键词OpenAPI3Auth2.0AfterScriptSpringfox3.0增强改善

文档https://doc.xiaominfo.com

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

2.0.6是继续在上个版本中进行迭代更新,开发者使用OpenAPI2的结构可以直接修改版本号即可进行升级,springfox框架升级到2.10.5

springfox 2.10.5 版本变化:

1、spring-plugin组件升级到2.0.0,移除了guava包

2、@EnableSwagger2注解升级为@EnableSwagger2WebMvc

Maven引用:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--OpenAPI2.0的开发者继续使用Knife4j 2.x系列的版本-->
<version>2.0.6</version>
</dependency>

1、OAuth2认证功能的支持:简化模式(implicit)、授权码模式(authorization_code)、密码模式(password)、客户端模式(client_credentials),详细规则请参考文档

2、针对@RequestBody注解标注的请求实体类,在接口请求参数时是否必须(require)的显示异常的问题Gitee #I1VBGBGitee #I1YK2QGitee #I1WCMFGitee #I1VDSHGitHub #277

3、针对服务端指定consumes的情况优化,如果服务端不指定,Ui会默认根据参数类型进行适配Gitee #I1VE25

4、解决在创建Docket对象时赋予Host属性后,文档界面显示接口地址异常的问题Gitee #I1XYG9

5、微服务网关聚合文档时,自定义分组名称导致增强失败的问题Gitee #I1Y79W

6、针对query类型的参数,如果该参数是schema类型,解析该schema为json提作为请求值.Gitee #I1VLHH,如下图:

  • 文档展示:

  • 调试效果:

7、调试栏新增AfterScript特性,开发者可根据Knife4j定义的全局变量编写自定义JavaScript脚本,增强接口交互体验Gitee #I1YNU3Gitee #I1CAAD,关于AfterScript特性可参考文档

主要应用场景:

  • 针对JWT类型的接口,调用登录接口后,每个接口请求时带上Token参数,此时可以通过该脚本动态赋值全局token参数,省去复制粘贴的麻烦.

假设某一个登录接口响应的JSON内容如下:

{
"code": 8200,
"message": null,
"data": {
"token": "1y1tn8tvw93fxixp79dcx0nugixkw4su"
}
}

该接口是登录接口,除该接口外其余接口请求都需要带上token的请求头,因此我们访问登录接口后,设置全局Header参数token,此操作Knife4j接下来会为每一个请求接口带上token参数,代码如下:

var code=response.data.code;
if(code==8200){
//判断,如果服务端响应code是8200才执行操作
//获取token
var token=response.data.data.token;
//1、如何参数是Header,则设置全局Header
ke.global.setHeader("token",token);
}

8、通过创建Docket对象时设置globalOperationParameters全局参数时,针对header类型的allowableValues不支持下拉框选择的问题Gitee #I1OC0H

代码如下:

parameters.add(new ParameterBuilder().name("header-test").description("balabala")
.modelRef(new ModelRef("string"))
.parameterType("header")
.allowableValues(new AllowableListValues(Arrays.asList("下拉1", "下拉2"), "string"))
.required(false).order(1).build());
new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName("2.X版本")
.globalOperationParameters(parameters)

最终效果:

9、离线导出功能板块增加导出OpenAPI的原始JSON格式数据,导出该逻辑分组下所有接口的OpenAPI原始json格式。如下图:

10、针对单个接口,提供OpenAPI的源码格式,可以通过复制或者下载该源码格式直接导入POSTMAN进行测试Gitee #I1Z7AP。如下图:

11、增强注解@EnableKnfie4j增加Spring Boot中的Conditional条件@ConditionalOnWebApplication,仅在Web环境下加载,避免在使用junit单元测试时出现异常。

12、增强模式的改进,主要有两个变化,更加详细的使用规则,开发者请参考文档

  • 提供spring.factories进行自动装置,开发者可以直接在Spring Boot的配置文件yml或者property等使用属性knife4j.enable:true进行开启使用,配置属性后无需再使用@EnableKnife4j注解

  • 提供spring-configuration.meta.json文件,对Knife4j提供的各个增强配置属性进行注释,方便开发者在配置文件中进行配置,如下图:

13、针对其它文档的配置,开发者可以根据每一个逻辑分组Docket进行配置,其他文档支持自定义文档的分组标题

14、接口排序需求无需再Ui界面勾选增强,只需要在配置文件中开启knife4j.enable=true接口,然后使用@ApiSupport注解或者@ApiSortController类上进行使用,优先级@ApiSupport>@ApiSort,该方式更加融合了springfox框架的特性,也更符合对扩展属性扩展的规范,在OpenAPI结构节点增加x-order扩展参数,如下图:

15、移除增强扩展接口地址/v2/api-docs-ext,个性化配置及增强通过后端配置文件进行配置即可,通过更加规范的使用增强注解,符合OpenAPI的扩展属性规范。

16、其他文档以更加符合OpenAPI的扩展规范进行展示,开发者可以在yml配置文件中配置多个分组文档(前提是knife4j.enable=true),然后再创建的Docket对象中使用Knife4j提供的OpenApiExtensionResolver扩展extension,最终配置的md文件会在文档中进行分组呈现.GitHub #115

application.yml配置示例代码如下:

knife4j:
enable: true
documents:
-
group: 2.X版本
name: 接口签名
locations: classpath:sign/*
-
group: 2.X版本
name: 另外文档分组请看这里
locations: classpath:markdown/*

Java代码:

@Configuration
@EnableSwagger2WebMvc
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any())
.build()
//此处调用openApiExtensionResolver的方法获取extensions集合
.extensions(openApiExtensionResolver.buildExtensions(groupName))
.securityContexts(CollectionUtil.newArrayList(securityContext())).securitySchemes(CollectionUtil.newArrayList(apiKey()));
return docket;
}
}

最终Ui界面效果图:

17、针对使用@ApiModelProperty注解,给予实体String类型的属性字段赋值example示例值json字符串时显示异常的问题GitHub #233

18、请求示例和响应示例中的长整形精度丢失的问题GitHub #269

19、针对当前接口存在Authorze认证情况下,没有点击该功能时参数不会默认在接口调试中的Bug以及query类型参数始终出现在请求头参数栏的情况Gitee #I1VC4I

20、去除Ui界面中个性化设置中的启用增强配置。

21、增强注解@ApiOperationSupport@DynamicResponseParameters同时使用时,动态响应字段丢失的问题Gitee #I22K0R

22、离线文档下载失败的问题,变量引用错误导致Gitee #I1W5UB

OpenAPI3

如果开发者想使用springfox的OpenAPI3的版本,Knife4j此次发布了两个版本,针对3.0版本,Knife4j底层升级springfox组件到springfox3.0.0,并且版本号从3.x系列开始,代表OpenAPI3,以区分2.x系列。

Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--如果想使用springfox3.0及OpenAPI3请用3.x版本-->
<version>3.0</version>
</dependency>

针对SpringFox3.0的版本,作者在开发过程中虽然在Ui上对OpenAPI3进行了支持,但是目前springfox3.0还存在诸多的问题,建议开发者慎重使用springfox3。不管是对于OpenApi2以及OpenApi3的支持,目前springfox3在兼容性等方面都存在一些问题,毕竟刚发布一个版本.

相对而言,springfox2.x系列的版本较稳定.当Springfox对于3.0的结构相对稳定后,Knife4j的主分支版本会向3.0靠拢。

相关ISSUES:

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue.html index fdbcd2de8..f706c13bb 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-11-02-knife4j-2.0.7-issue.html @@ -10,26 +10,26 @@ - -[v2.0.7-2020/11/02 Knife4j 2.0.7发布,细节处理] | Knife4j - - +[v2.0.7-2020/11/02 Knife4j 2.0.7发布,细节处理] | Knife4j + +
-

[v2.0.7-2020/11/02 Knife4j 2.0.7发布,细节处理]

Knife4j 2.0.7发布,细节优化

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://doc.xiaominfo.com

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

特性 & 优化

1、服务端创建Docket对象时配置globalOperationParameters参数时,header类型不选中或丢失的问题

2、如果服务端写会的json参数中包含base64的图片格式,在响应栏增加图片标签直接显示

3、springfox升级到2.10.5版本后,针对basePath会在解析时自动追加到path节点,因为以前的版本没有追加,所以会导致重复添加basePath的问题。Gitee #I230K8Gitee #I23G5V

4、导出出md离线文档请求参数部分字段的设置和文档中同步Gitee #I22UFA

5、字段参数说明支持html标签样式。Gitee #I22RZ2

示例代码:

@ApiModelProperty(value = "奖金名称,记住:<br /><span style=\"color:red\">我很重要</span>",example = "MVP奖杯")
private String name;

效果图:

6、默认去除小蓝点的版本控制,开发者可以通过在服务端通过配置进行开启,详情请参考增强文档

knife4j:
enable: true
setting:
#是否开启界面中对某接口的版本控制,如果开启,后端接口变化后Ui界面会存在小蓝点
enableVersion: true

7、可以通过配置重命名界面Swagger Models的命名,详情请参考增强文档,例如:

knife4j:
enable: true
setting:
enableSwaggerModels: true
swaggerModelName: 实体类列表

8、可以通过配置是否显示调试栏中的AfterScript功能,该属性默认为true,详情请参考增强文档,例如:

knife4j:
enable: true
setting:
enableAfterScript: false

9、支持@RequestMapping注解中的params参数Gitee #I22J5Q

10、3.0版本不支持Authorize的问题Gitee #I22WVM

11、增加局部刷新变量的按钮功能,可以通过服务端配置开启Gitee #I22XXI,该属性默认为false,详情请参考增强文档,例如:

knife4j:
enable: true
setting:
enableReloadCacheParameter: true

12、修复兼容性bug,当升级后,默认Swagger Models以及文档管理功能丢失的问题

使用方法

Java开发使用Knife4j目前有一些不同的版本变化,主要如下:

1、如果开发者继续使用OpenAPI2的规范结构,底层框架依赖springfox2.10.5版本,那么可以考虑Knife4j的2.x版本

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索2.X最新版本号-->
<version>2.0.7</version>
</dependency>

2、如果开发者使用OpenAPI3的结构,底层框架依赖springfox3.0.0,可以考虑Knife4j的3.x版本

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索3.X最新版本号-->
<version>3.0.1</version>
</dependency>

3、如果开发者底层框架使用的是springdoc-openapi框架,则需要使用Knife4j提供的对应版本,需要注意的是该版本没有Knife4j提供的增强功能,是一个纯Ui。

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-springdoc-ui</artifactId>
<!--在引用时请在maven中央仓库搜索3.X最新版本号-->
<version>3.0.1</version>
</dependency>

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue.html b/knife4j-doc/gitee/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue.html index d7a91cff4..8446ceff6 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2020-11-22-knife4j-2.0.8-issue.html @@ -10,27 +10,27 @@ - -[v2.0.8-2020/11/22 Knife4j 2.0.8发布,轻量级微服务聚合文档中间件诞生] | Knife4j - - +[v2.0.8-2020/11/22 Knife4j 2.0.8发布,轻量级微服务聚合文档中间件诞生] | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue.html b/knife4j-doc/gitee/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue.html index 575555c1e..f7449cc89 100644 --- a/knife4j-doc/gitee/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue.html +++ b/knife4j-doc/gitee/docs/changelog/x/2021-06-28-knife4j-2.0.9-issue.html @@ -10,26 +10,26 @@ - -[v2.0.9-2021/06/28 Knife4j 2.0.9发布,解决issue 150+] | Knife4j - - +[v2.0.9-2021/06/28 Knife4j 2.0.9发布,解决issue 150+] | Knife4j + +
-

[v2.0.9-2021/06/28 Knife4j 2.0.9发布,解决issue 150+]

Knife4j前身是swagger-bootstrap-ui,是一个为Swagger接口文档赋能的工具

文档https://xiaoym.gitee.io/knife4j/

效果(旧版)http://swagger-bootstrap-ui.xiaominfo.com/doc.html

效果(2.X版)http://knife4j.xiaominfo.com/doc.html

Giteehttps://gitee.com/xiaoym/knife4j

GitHubhttps://github.com/xiaoymin/swagger-bootstrap-ui

示例https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

日志

OpenAPI3

1、在OpenAPI3.0规范中针对下载请求对象显示错误的优化Gitee#I374SP

2、针对OpenAPI3规范中对于binary类型的format属性,上传组件不显示的问题Gitee#I34NOSGitee #I3BRWT

3、OpenAPI3.0规范中Swagger models 中的枚举显示PR #43Gitee #I3DP8P

4、针对OpenAPI3.0规范权限拦截问题增加接口地址Gitee #I2810RGitee #I3HSK4

5、针对OpenAPI3规范支持请求参数中包含$ref的问题Gitee #I2A89C

6、针对OpenAPI3规范中图片预览的问题优化Gitee #I3IUUQ

聚合组件aggregation

1、聚合组件针对Cloud模式转发HTTP请求时,请求头重复导致转发失败的问题Gitee #PR39

2、aggregation聚合组件增加order属性,方便开发者排序设置聚合OpenAPI文档的顺序Gitee #I27ST2

3、aggregation聚合组件Nacos聚合微服务文档支持Nacos用户名及密码访问OpenAPI接口Gitee #I28IF9

4、聚合组件日志打印信息优化,增加isDebugEnabled逻辑判断,日志级别全部由info改为debug级别Gitee #I39QPL

5、聚合组件响应Model不显示的问题Gitee #I3EMZE

6、聚合组件没有正确响应接口的状态码信息PR #44

7、基于Eureka/Nacos注册中心的聚合组件,增加心跳检测机制(30s/per),自动剔除已经下线的服务,保证聚合文档的正常访问Gitee #I2CKQTGitee #I2CDCKGitee #I2KUUY

8、Cloud模式增加心跳检测机制(30s/per),自动剔除已经下线的服务,保证聚合文档的正常访问

8、聚合组件转发文件时参数丢失的问题Gitee #I39OXE

常规

1、OAuth2授权Content-Type的异常问题Gitee#PR35Gitee#I2CKHA

2、OAuth2判断异常的问题Gitee #PR37

3、修复离线导出Markdown文档自定义文档为undefined的问题Gitee#I2EDI8Gitee #I2WCQG

4、日志的打印优化Gitee #I39QPL

5、微服务聚合时basePath不追加的问题Gitee #I3B5BKGitee #I3EEJ3

6、针对List类型示例值多出换行符的问题Gitee #I2D6D4

7、解决Form类型上传参数时传递Null的问题Gitee #I3AHDQ

8、针对个性化配置的保存问题修改逻辑,开发者通过界面保存个性化配置后丢失的问题Gitee #I27CN8Gitee #I2CBZQGitee #I2978YGitee #I3IEXTGitee #I3Q0MOGitee #I3QSAN

9、针对接口分组中不存在API接口时出现链接点击空白的问题处理,如果分组下没有API接口,默认点击显示主页Gitee #I2CVTF

10、OpenAPI规范中tags缺失时导致接口不显示的问题优化,增加default默认分组Gitee #I27M98

11、针对服务端使用@RequestMapping注解通过method限定方法类型时,Ui增强功能过滤不生效的问题Gitee #I28RJ5

12、文件上传类型接口请求数据显示类型错误的情况改进,根据参数设置接口请求数据类型为multipart/form-dataGitee #I29KMH

13、优化响应html/xml/text等内容时展现方式Gitee #I2A0QA

14、分组下拉框搜索失效的问题Gitee #I3BAOK

15、优化OpenAPI版本判断的逻辑,根据响应OpenAPI规范JSON再判断获取当前的规范版本,防止出现空异常或Model不显示等问题Gitee #I37X0QGitee #I3EMZE

16、针对JSON请求格式的提交,增加Beantify按钮,可以对文本格式化美化的功能Gitee #I39MUP

image-20210507212527321

17、调试发送时增强loading效果体验Gitee #I3BG5V

image-20210509083436452

18、SwaggerModels 内容太长不会自动换行的问题Gitee #I3QC02

19、针对Map属性的结构展示异常的问题Gitee #I37WB7

20、解决afterScript特性不能添加多个参数的问题Gitee #I3OJUW

21、优化响应内容判断base64导致效率低下的问题Gitee #I2VRD5

22、针对增强注解@ApiOperationSupport提供的ignoreParameters属性提供正则模式的忽略策略支持Gitee #I21ZKC

特点

  • 基于Vue+Ant Design构建的文档,更强大、清晰的接口文档说明能力以及接口调试能力
  • 左右布局,基于Tabs组件的多文档查阅风格
  • 支持在线导出Html、Markdown、Word、PDF等多种格式的离线文档
  • 接口排序,支持分组及接口的排序功能
  • 支持接口全局在线搜索功能
  • 提供Swagger资源保护策略,保护文档安全
  • 接口调试支持无限参数,开发者调试非常灵活,动态增加、删除参数
  • 全局缓存调试信息,页面刷新后依然存在,方便开发者调试
  • 以更人性化的table树组件展示Swagger Models功能
  • 文档以多tab方式可显示多个接口文档
  • 请求参数栏请求类型、是否必填着颜色区分
  • 主页中粗略统计接口不同类型数量
  • 支持自定义全局参数功能,主页包括header及query两种类型
  • JSR-303 annotations 注解的支持
  • 更多个性化设置功能

界面

接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

其他

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/4.0.html b/knife4j-doc/gitee/docs/changelog/x/4.0.html index b2b4518f9..09ecf7dbd 100644 --- a/knife4j-doc/gitee/docs/changelog/x/4.0.html +++ b/knife4j-doc/gitee/docs/changelog/x/4.0.html @@ -10,27 +10,27 @@ - -v4.0.0版本-2022/12/20 | Knife4j - - +v4.0.0版本-2022/12/20 | Knife4j + +
-

v4.0.0版本-2022/12/20

Knife4j 4.0版本今天正式发布了! 🎉🎉🎉

该版本处理了近12个月以来Gitee、GitHub两大平台积压的近300多个issue

同时也带来了一些新的特性。

主要更新亮点:

  • 🆕统一各个组件版本号,使用Knife4j时开发者根据需要自行引用,artifactId发生了变化
  • 💯支持Spring Boot 3
  • 🌼兼容适配springdoc-openapi底层框架,全面迁移到OpenAPI3的规范支持
  • 🌿针对OpenAPI2(Swagger)规范提供了优化,开发者基于Spring Boot2版本可以无缝衔接
  • 💪Knife4j-Desktop组件架构升级重写,新架构支持不同需求的OpenAPI规范进行聚合
  • 💪提供官方Docker镜像服务,基于Knife4j可方便在云服务上进行使用
  • 💥官网文档更新重写

架构整理

为了以后Knife4j发展的可持续性,整个架构重新梳理,后续可以根据不同的需求,提供不同的服务

新的架构图,有的是规划(尚未实现),有的已经实现,欢迎大佬一起贡献。

统一版本

在此次4.0版本中,统一各个版本,将OpenAPI2规范与OpenAPI3规范区分开,避免版本及规范混乱使用产生的误解,使用者可以更清晰

需要注意,4.0版本artifactId发生了变化

目前knife4j的项目结构:

模块名称说明
knife4j-aggregation-spring-boot-starter基于 Servlet 体系下的聚合中间件
knife4j-core核心类,包含一些工具包、增强注解等
knife4j-dependenciesKnife4j 提供的 dependencies 工程,引入该工程后,knife4j\springfox\swagger\springdoc-openapi 等版本号不用在独自声明
knife4j-openapi2-ui增强 UI 文档,该包是一个 webjar,只包含前端代码,支持 OpenAPI2
knife4j-openapi3-ui增强 UI 文档,该包是一个 webjar,只包含前端代码,支持 OpenAPI3
knife4j-gateway-spring-boot-starter基于Spring Cloud Gateway网关的项目可以引用该组件实现简单的文档聚合,参考https://gitee.com/xiaoym/knife4j/tree/dev/knife4j/knife4j-gateway-spring-boot-starter
knife4j-openapi2-spring-boot-starter基于 OpenAPI2 规范,在 Spring Boot < 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层依赖 springfox-swagger 2.10.5 项目
knife4j-openapi3-spring-boot-starter基于 OpenAPI3 规范,在 Spring Boot < 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层基于 springdoc-openapi 项目
knife4j-openapi3-jakarta-spring-boot-starter基于 OpenAPI3 规范,在 Spring Boot >= 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层基于 springdoc-openapi 项目

开发者继续使用Spring Boot 2以及OpenAPI2的规范

该starter底层依然依赖springfox项目,版本2.10.5

可以使用knife4j-openapi2-spring-boot-starter,maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

开发者使用Spring Boot 2以及OpenAPI3规范,那需要考虑在项目的注解上做迁移变更,并且knife4j 4.0版本针对3的规范底层迁移使用springdoc-openapi项目,放弃springfox3.0

可以使用knife4j-openapi3-spring-boot-starter,maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

支持Spring Boot 3

开发者使用Spring Boot 3以及使用OpenAPI3规范

可以使用knife4j-openapi3-jakarta-spring-boot-starter,maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

Knife4j配置属性变化

此次Knife4j提供的Spring Boot Starter组件,增强配置属性通过spring-boot-configuration-processor工具自动生成spring-configuration-metadata.json描述性文件,因此,不同于之前的版本,配置属性会将之前的命名大写全部转为下划线

Knife4j之前的增强配置属性(老的):

knife4j:
enable: true
# 以setting配置为例
setting:
language: zh-CN
enableSwaggerModels: true
enableDocumentManage: true

Knife4j 4.0配置的增强属性(新的):

knife4j:
enable: true
setting:
custom-code: 500
enable-footer-custom: false
footer-custom-content: 我是自定义的Footer

springdoc-openapi项目增强适配

Knife4j之前的版本一直都是基于springfox项目提供了增强功能,此次4.0版本针对springdoc-openapi项目也提供了增强,Knife4j提供的增强功能可以无缝在OpenAPI3的规范中使用

Knife4j独立服务工具架构升级

Knife4j在此次版本中针对聚合OpenAPI规范文档提供了独立的服务组件

整个架构重新设计,代码重写,并将该服务发布到Docker官方镜像仓库,支持不同配置中心中间件对接,数据+应用进行分离,OpenAPI的数据源可以轻松放到配置中心中,实现文档的聚合

架构图如下: +

详细使用说明请参考文档

文档

Knife4j新版本文档采用新的模板,可以区分不同的版本,方便开发使用者PR贡献或者查看

❗4.0版本的文档作者正在疯狂码字中…….敬请期待.

示例程序

正是由于4.0的文档还在输出中,因此Knife4j在4.0新版本中也提供了不同版本的示例程序

示例如下:

社区

感兴趣的朋友可以加群参与讨论贡献

关注官网底部公众号"Knife4j",点击菜单获取加群二维码

整个4.0版本从确定开发方向以及迭代过程,感兴趣的朋友可以通过该issue了解:

https://gitee.com/xiaoym/knife4j/issues/I5LIQZ

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/4.1.html b/knife4j-doc/gitee/docs/changelog/x/4.1.html index 1723862e9..c84eb2241 100644 --- a/knife4j-doc/gitee/docs/changelog/x/4.1.html +++ b/knife4j-doc/gitee/docs/changelog/x/4.1.html @@ -10,26 +10,26 @@ - -v4.1.0版本-2023/03/23 | Knife4j - - +v4.1.0版本-2023/03/23 | Knife4j + +
-

v4.1.0版本-2023/03/23

大家好,Knife4j v4.1.0版本发版,本次版本发版主要解决两个问题:

  • 🐛常规Bug修复:主要针对v4.0版本的异常bug、ui兼容性问题修复
  • 🎄Spring Cloud Gateway网关聚合组件升级:提供手动、服务发现两种模式,轻松聚合OpenAPI文档

主要更新

🐛常规bug修复

1、网关聚合组件knife4j-gateway-spring-boot-starter针对OpenAPI3规范聚合时丢失context-path的支持,在ui层面做兼容

2、springdoc-openapi版本升级到最新版本1.6.15、2.0.4 Gitee#I6OIB1

3、knife4j-openapi3-jakarta-spring-boot-starter模块属性配置在idea不提示的异常情况处理

4、增强属性自定义文档加载分组的bug处理GitHub#PR525

5、knife4j-dependencies模块漏掉部分依赖模块版本定义的情况

6、解决不添加 springdoc-openapi-ui 依赖异常的问题Gitee#I66YJA**

7、针对OAS3规范中Parameter属性缺失字段说明的异常情况修复

8、针对OAS3规范中扩展属性包括排序、作者等不生效的问题Gitee#I6FB9I

9、部分字段翻译问题GitHub#540

10、使用增强属性开启production时出现的NPE异常GitHub#527

11、针对OpenAPI3规范的tag名称兼容性问题Gitee#I6JATP

12、实体类接收url参数时文档不显示参数说明的问题Gitee#I6H8CD

13、修复OAS3规范上传组件的识别问题Gitee#I6HAW0GitHub#538

14、SpringWebflux框架的集成组件starter封装GitHub#521

15、针对Basic验证的特性增加include属性,允许开发者自定义配置GitHub#530

16、全局搜索框支持tag名称的模糊搜索Gitee#I6NWV6

🎄Spring Cloud Gateway网关聚合组件升级

在v4.1.0版本中,继续升级Spring Cloud Gateway网关聚合组件,提供discover服务发现的模式,自动聚合OpenAPI文档。使用方式更加简单,一个Starter组件+yml配置,即可完成网关层的聚合。

1、引入starter依赖,maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>

2、基于discover模式自动聚合注册中心的文档,则最简洁的配置如下:

更多场景case的使用,可以参考knife4j-gateway-discussions

knife4j:
gateway:
enable: true
# 指定服务发现的模式聚合微服务文档,并且是默认`default`分组
strategy: discover
discover:
enable: true
# 指定版本号(Swagger2|OpenAPI3)
version : openapi3

如此,我们的聚合工作就完成了。

在浏览器访问Knife4j提供的文档地址:http://ip:网关端口/doc.html

示例程序

正是由于 4.0 的文档还在输出中,因此 Knife4j 在 4.0 新版本中也提供了不同版本的示例程序

示例如下:

社区

感兴趣的朋友可以加群参与讨论贡献

关注公众号 "Knife4j",点击菜单获取加群二维码

输入图片说明

仓库坐标

+ + diff --git a/knife4j-doc/gitee/docs/changelog/x/4.2.html b/knife4j-doc/gitee/docs/changelog/x/4.2.html new file mode 100644 index 000000000..f769654b4 --- /dev/null +++ b/knife4j-doc/gitee/docs/changelog/x/4.2.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + +v4.2.0版本-2023/07/31 | Knife4j + + + + +
+

v4.2.0版本-2023/07/31

大家好,Knife4j v4.2.0版本发版,本次版本发版主要解决问题:

更新日志

依赖升级

1、升级boot3版本为3.0.7、springdoc版本‣

2、springdoc版本升级,主要包括:

  • 针对Spring Boot2版本的,升级springdoc版本到1.7.0
  • 针对Spring Boot3版本的,升级springdoc版本到2.1.0

优化knife4j-gateway组件

1、针对服务发现模式(discover),可以动态读取服务转发路由配置前缀prefix,开发者可不用在独立配置,感谢当幸福碰错了头PR

2、支持除default默认分组外的多分组类型,感谢谢进伟PR

3、针对在Dubbo场景下会出现聚合各个Service的场景,该版本提供自动排除服务的扩展SPI接口,开发者可集成自动扩展实现规则进行聚合服务的排除,参考Gitee#I6YLMB

@Slf4j
@Component
public class MyExcludeService implements GatewayServiceExcludeService {
@Override
public Set<String> exclude(Environment environment, Knife4jGatewayProperties properties, List<String> services) {
log.info("自定义过滤器.");
if (!CollectionUtils.isEmpty(services)){
// 排除注册中心包含order字眼的服务
return services.stream().filter(s -> s.contains("order")).collect(Collectors.toSet());
}
return new TreeSet<>();
}
}

4、解决在Nginx等二级代理转发情况下的路径错误问题Gitee#giteeGitHub#609[Gitee#I6KYUJ][https://gitee.com/xiaoym/knife4j/issues/I6KYUJ]GitHub#603GitHub#586

5、增加对子服务的排序规则设置,配置如下:

knife4j:
gateway:
tags-sorter: alpha # 接口排序规则
operations-sorter: alpha

不管是tag还是operation,排序规则主要提供两种实现方式:

  • alpha:官方swagger-ui的默认排序规则实现。
  • order:nife4j提供的增强排序规则,开发者可在子服务中扩展x-order,根据数值来自定义排序

6、knife4j-gateway组件增加basic验证GitHub#555

Ui更新

1、Script脚本生成的TypeScript代码增加注释Gitee#I6T78EGitHub#568

2、OAS2新增allof特性的支持Github#PR589

3、针对jakarta环境中Basic的属性提示已经match优化GitHub#578

增强部分

1、openapi3规范中增加对@ApiSupport增强注解的支持Gitee#I79WIJ

2、Post发送请求query的方式修改Gitee#I7DNRP

3、优化基础jar包的引用关系,lombok、slf4j等jar包级别改为providedGitHub#591

感谢

非常感谢以下开发者的PR贡献(排名不分先后):

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/changelog/x/4.3.html b/knife4j-doc/gitee/docs/changelog/x/4.3.html new file mode 100644 index 000000000..98e22b939 --- /dev/null +++ b/knife4j-doc/gitee/docs/changelog/x/4.3.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + +v4.3.0版本-2023/08/06 | Knife4j + + + + +
+

v4.3.0版本-2023/08/06

大家好,Knife4j v4.3.0版本发版,本次版本发版主要解决问题:

更新日志

4.3.0版本主要解决在Spring Cloud Gateway网关组件下聚合Swagger2或者OpenAPI3提供最简单的配置,简化开发者工作。

最简单的配置如下(4个配置属性完成所有子服务的网关聚合):

knife4j:
gateway:
enabled: true
strategy: discover
discover:
# 聚合所有子服务(swagger2规范),子服务是3规范则替换为openapi3
version: swagger2
enabled: true

优化knife4j-gateway组件

1、在gateway网关聚合服务中,排除其他服务支持正则表达式

knife4j:
gateway:
enabled: true
strategy: discover
discover:
version: swagger2
enabled: true
excluded-services:
# 排除order开头的配置
- order.*

2、聚合子服务时,两个子服务是根路由转发时只聚合单个服务的bug(主要是order排序属性导致)

3、启用DisocverClient作为网关默认转发路由场景下聚合失败的问题

4、针对Swagger2规范聚合失败的问题

5、在手动聚合模式(manual)下同时支持swagger2openapi3规范的聚合

knife4j:
gateway:
enabled: true
strategy: manual
routes:
# swagger2
- name: 订单openapi2
service-name: user-service
url: /order-service-openapi2/v2/api-docs?group=default
context-path: /
# openapi3
- name: 订单openapi3
service-name: order-service
url: /order/v3/api-docs/default
context-path: /order

6、在子服务全部是swagger2规范情况下contextPath路径错误的问题

7、优化knife4j-gateway的部分代码结构及聚合场景,目前聚合子服务路由在服务发现(discover)模式下主要4种模式,主要包括:

  • 基于Spring Cloud Gateway配置的routes规则解析子服务路由,数据来源:spring.cloud.gateway.routes
  • 在discover服务发现场景下,针对自定义添加的routes,默认再次追加,数据来源:knife4j.gateway.routes
  • 服务发现discover模式下,开发者在网关成的路由转发模式默认通过DiscoveryClient的默认方式转发路由,规则是pattern:/service-id/**
  • 接收编码方式动态注入Spring Cloud Gateway网关的路由,进行聚合转发

其他部分

1、修复@ApiSupport注解不生效的问题Gitee#PR89

2、数据存在枚举值时,SwaggerModel无法正常展开Gitee#PR90

3、解决组件冲突的问题GitHub#630

4、增加title属性的支持Gitee#I7KUYP

感谢

非常感谢以下开发者的PR贡献(排名不分先后):

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/community.html b/knife4j-doc/gitee/docs/community.html index 5b50030cc..d1088eac5 100644 --- a/knife4j-doc/gitee/docs/community.html +++ b/knife4j-doc/gitee/docs/community.html @@ -10,26 +10,26 @@ - -社区 | Knife4j - - +社区 | Knife4j + +
-

社区

Knife4j鼓励开发者通过获取帮助中的方式发起提问,这样有助于Knife4j的社区发展,当然如果你嫌麻烦,也可以直接加入Knife4j提供的QQ群或者微信交流群与作者直接交流获取帮助

关注微信公众号获取加群二维码

目前Knife4j有10个QQ技术交流群,群里主要讨论Swagger、Springfox、Knife4j、OpenAPI等项目问题.如果你有兴趣,可以加入其中获取帮助,或者帮助别人.

温馨提示

目前QQ群作者极少时间登录,可能回复处理的较慢,建议开发者提issues或者加微信交流群。

  • img
  • img
  • img
  • img
  • img
  • img
  • img
  • img
  • img
  • img
+ + diff --git a/knife4j-doc/gitee/docs/community/apache.html b/knife4j-doc/gitee/docs/community/apache.html index 968255366..1d2d0775c 100644 --- a/knife4j-doc/gitee/docs/community/apache.html +++ b/knife4j-doc/gitee/docs/community/apache.html @@ -10,26 +10,26 @@ - -Apache 2.0 许可证 | Knife4j - - +Apache 2.0 许可证 | Knife4j + +

Apache 2.0 许可证

Knife4j是在Apache 2.0许可下发行的开源软件。

+ + diff --git a/knife4j-doc/gitee/docs/community/changelog.html b/knife4j-doc/gitee/docs/community/changelog.html index dbd19fdff..5f53e9e06 100644 --- a/knife4j-doc/gitee/docs/community/changelog.html +++ b/knife4j-doc/gitee/docs/community/changelog.html @@ -10,26 +10,26 @@ - -版本说明 | Knife4j - - +版本说明 | Knife4j + +
-

版本说明

在更名为Knife4j之前,原来的名称是叫swagger-bootstrap-ui,这是两种不一样风格的Ui,对比情况如下:

软件开发语言&框架状态最后版本风格
Knife4jJava、JavaScript、Vue持续更新中黑色
swagger-bootstrap-uiJava、JavaScript、jQuery停更1.9.6蓝色

Knife4j从开源至今,目前主要经历版本的变化,分别如下:

版本说明
1.9.6蓝色皮肤风格,开始更名,增加更多后端模块
2.0~2.0.5Ui重写,底层依赖的springfox框架版本是2.9.2
2.0.6~2.0.9底层springfox框架版本升级知2.10.5,OpenAPI规范是v2
3.0~3.0.3底层依赖springfox框架版本升级至3.0.3,OpenAPI规范是v3
4.0~4.0重要版本,提供OpenAPI2和OpenAPI3两种规范供开发者自行选择,主版本统一

每一个版本的更详细的更新日志,开发者可参考更新日志

+ + diff --git a/knife4j-doc/gitee/docs/community/community-get-helps.html b/knife4j-doc/gitee/docs/community/community-get-helps.html index c70d380b3..174f77b30 100644 --- a/knife4j-doc/gitee/docs/community/community-get-helps.html +++ b/knife4j-doc/gitee/docs/community/community-get-helps.html @@ -10,26 +10,26 @@ - -获取帮助 | Knife4j - - +获取帮助 | Knife4j + +
-

获取帮助

如果您需要有关Knife4j的帮助,我们将在这里为您提供帮助,以下是获取帮助的一些方法:

+ + diff --git a/knife4j-doc/gitee/docs/community/contributing.html b/knife4j-doc/gitee/docs/community/contributing.html index f4a3c0e2c..47006b2a9 100644 --- a/knife4j-doc/gitee/docs/community/contributing.html +++ b/knife4j-doc/gitee/docs/community/contributing.html @@ -10,26 +10,26 @@ - -如何贡献代码 | Knife4j - - +如何贡献代码 | Knife4j + +
-

如何贡献代码

作为一个开源项目,Knife4j 的成长离不开社区贡献者的支持和参与。我们非常欢迎广大社区用户为 Knife4j 贡献代码、文档或改进网站,在此过程中,我们愿意为您提供必要的支持。

社区贡献

开源贡献

Knife4j仓库结构说明

  • knife4j-desktop:Knife4j的独立中间件,基于Java编写,可以独立运行渲染OpenAPI规范文件
  • knife4j-doc: 官网文档,基于Docusaurus进行编写
  • knife4j-vue: 前端源码,基于Vue2框架编写
  • knife4j: Java端代码,包括所有公开使用的starter组件封装

指导方针

  • 在开始进行功能或者修复Bug之前,事先请在Github、Gitee平台上搜索与之相关的功能是否已经实现,或着也可以通过Github、Gitee平台的issue与我们取得联系。以确保该任务没有其他人在处理,避免重复操作。
  • 所有功能可通过Github或者Gitee的issues进行沟通讨论,避免浪费大家的时间。
  • 如果是重大功能更新,建议你在编码开发的同时,将该功能的设计、思想、实现以及使用说明通过文档进行输出。最好是合并在Knife4j的官方文档上
  • 提交PR时,需要将PR请求提交到dev分支!!!

调试代码

目前knife4j-vue是前端代码,基于Vue2框架编写编写

开发者如果想贡献代码或者自己改造,得启动此项目进行调试

1、环境准备

首先,开发者本地需要安装Node环境,目前该版本的Node依赖比较低,作者本地使用的版本是v15.14.0,可以通过nvm工具切换安装不同的node版本,高版本的Node目前可能会存在问题,保持一致即可

2、安装依赖

执行命令

npm install 

3、后端接口准备

目前Knife4j组件还是以Java生态为主,所以在调试获取OpenAPI数据源时,是根据解析框架做兼容适配,主要是两个框架:

而Knife4j-vue前端代码目前还是比较笨拙的方式,主要体现在knife4j-vue/src/layouts/BasicLayout.vue文件中

create()方法时会存在区别

 created() {
// 调试springdoc框架时,使用该方法,注释下面的this.initKnife4jSpringUi()方法
this.initSpringDocOpenApi();
// 调试springfox框架时,使用该方法,注释上面的 this.initSpringDocOpenApi()方法
//this.initKnife4jSpringUi();
this.initI18n();
},

这种方法在打包构建时,也同样如此

4、服务端代理端口

knife4j-vue/vue.config.js配置文件中,修改proxy节点下的配置

在上面springfox和springdoc两个demo工程下,服务启动后,修改为相应的端口即可

devServer: {
watchOptions: {
ignored: /node_modules/
},
proxy: {
"/": {
// 代理服务端端口
target: 'http://localhost:8990/',
ws: true,
changeOrigin: true
}
}
},

+ + diff --git a/knife4j-doc/gitee/docs/community/donate.html b/knife4j-doc/gitee/docs/community/donate.html index 69999f124..f05ae7197 100644 --- a/knife4j-doc/gitee/docs/community/donate.html +++ b/knife4j-doc/gitee/docs/community/donate.html @@ -10,26 +10,26 @@ - -赞助我们 | Knife4j - - +赞助我们 | Knife4j + +
-

赞助我们

Knife4j自2017年开源至今已经5年有余,开源路上,离不开开发者的支持和帮助!!!

如果您有产品需要在Knife4j的官网上进行推广,可以申请成为Knife4j的赞助商,Knife4j将对您的产品在Banner位进行展示,Knife4j官网通过CPM(曝光度)的方式收取费用,详情可以加微信细聊:xiao934447

或者可以通过发送邮件的方式与我们取得联系,邮箱地址:xiaoymin@foxmail.com

当然如果您觉得Knife4j不错,也可以通过扫码的方式请Knife4j的作者喝一杯咖啡!!!

当然也欢迎Star、PR、ISSUE等任何方式的支持,非常感谢~~!

前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/community/joinus.html b/knife4j-doc/gitee/docs/community/joinus.html index 6d120c0fc..c2303508f 100644 --- a/knife4j-doc/gitee/docs/community/joinus.html +++ b/knife4j-doc/gitee/docs/community/joinus.html @@ -10,26 +10,26 @@ - -如何贡献文档 | Knife4j - - +如何贡献文档 | Knife4j + +
-

如何贡献文档

我们欢迎您参与Knife4j项目。有很多贡献方式,包括回答有关issues的问题,编写新代码,改进现有代码,协助编写文档,开发示例或教程,报告错误或仅提出建议。有关更多信息,请参见我们的贡献文档。

如何贡献文档

目前Knife4j的新版本文档开发者可以直接通过编写Markdown文档的方式执行参与文档贡献。你的文档贡献能帮助到每一个使用Knife4j的人,社区的壮大离不开每个开发者的贡献。

Knife4j的文档通过Docusaurus进行编写,文档源码位于Knife4j项目dev分支下的knife4j-doc目录

主要步骤:

1、开发者对仓库进行fork操作,然后pull到本地

2、本地安装Docusaurus ,具体可以参考官方文档

需要安装Node环境,Node版本必须符合Docusaurus要求

3、安装本地依赖npm install

4、运行Knife4j-doc文档查看效果npm run start

文档目录说明:

目前Knife4j-doc文档中主要包含4个顶级目录:

目录名称说明
middleware中间件
middleware-sources中间件
features增强属性
action实战指南,欢迎开发者贡献所有关于Knife4j实战部分的文章
oasOAS规范,OAS规范介绍,可以包含不同语言端的注解或说明
changelogKnife4j详细更新日志
faqFAQ问题列表

每个不同的目录中,开发者只需要在该目录创建markdown文档即可,一篇markdown文档即代表一篇文档说明,最终在docusaurus.config.js中添加该markdown文档到相应的目录显示即可

如果有更多的实战文档,开发者可以现在action目录创建好与之对应的Markdown文档,然后在这里自行添加目录

需要注意的是,如果篇幅中有图片,且不是网络图片,贡献者可以将图片放在static/images的目录中.

文档写完后,就可以在Knife4j的Gitee仓库中向作者发起PR请求了,需要将PR请求提交到dev分支!!!

+ + diff --git a/knife4j-doc/gitee/docs/community/simple-demo.html b/knife4j-doc/gitee/docs/community/simple-demo.html index 5f74675e3..cf48fdb34 100644 --- a/knife4j-doc/gitee/docs/community/simple-demo.html +++ b/knife4j-doc/gitee/docs/community/simple-demo.html @@ -10,26 +10,26 @@ - -示例代码 | Knife4j - - +示例代码 | Knife4j + +
-

示例代码

目前Knife4j以及前身swagger-bootstrap-ui也提供了一些代码示例,可以前往Gitee仓库地址直接获取。

Demo示例地址:https://gitee.com/xiaoym/swagger-bootstrap-ui-demo

主要模块说明:

模块说明
knife4j-spring-boot27-demoKnife4j 4.0基于OpenAPI2规范
knife4j-spring-boot3-demoKnife4j 4.0 基于OpenAPI3+Spring Boot 3.0
knife4j-openapi3-spring-boot3-webflux-demoKnife4j 4.0 基于OpenAPI3+Spring Boot 3+SpringWebFlux,参考说明
knife4j-openapi3-spring-webflux-demoKnife4j 4.0 基于OpenAPI3+Spring Boot 2+SpringWebFlux,参考说明
knife4j-springdoc-openapi-demoKnife4j 4.0 基于Spring Boot 2+OpenAPI3
knife4j-aggregation-disk-demoKnife4j提供的微服务聚合组件,Disk模式下聚合,可参考实战文档
knife4j-aggregation-cloud-demoKnife4j提供的微服务聚合组件,Cloud模式下聚合,可参考实战文档
knife4j-aggregation-eureka-demoKnife4j提供的微服务聚合组件,Eureka模式下聚合,可参考实战文档
knife4j-aggregation-nacos-demoKnife4j提供的微服务聚合组件,Disk模式下聚合,可参考实战文档
knife4j-springdoc-openapi-demo在Spring Boot单体架构下集成Knife4j,基于springdoc-openapi以及OpenAPIV3
knife4j-springfox-boot-v3-demo在Spring Boot单体架构下集成Knife4j,基于Springfox3以及OpenAPIv3
knife4j-spring-boot-demo在Spring Boot架构下集成knife4j的项目示例,主要是基于OpenAPIV2
knife4j-lower-spring-boot-demoSpring Boot低版本测试集成Knife4j,主要复测Bug使用。开发者可不用理会
knife4j-spring-boot-single-demo在Spring Boot单体架构下集成knife4j的项目示例
knife4j-spring-boot-fast-demoSpring Boot单体框架快速集成Knife4j示例,可参考文档快速开始
knife4j-spring-oauth2-authorization_codeKnife4j集成OAuth2.0的授权码模式,可参考实战文档
knife4j-spring-oauth2-implicitKnife4j集成OAuth2.0的简化模式,可参考实战文档
knife4j-spring-oauth2-client_credentialsKnife4j集成OAuth2.0的客户端模式,可参考实战文档
knife4j-spring-oauth2-passwordKnife4j集成OAuth2.0的密码模式,可参考实战文档
knife4j-spring-cloud-gateway在Spring Cloud微服务架构下通过gateway网集成knife4j的示例
knife4j-spring-boot2-demoSpring Boot 2.x系列版本集成Knife4j
knife4j-jfinal-demo在JFinal框架中集成Knife4j,目前正在开发中,该示例无效,开发者可不用理会
swagger-bootstrap-ui-demo-mvc在Spring MVC模式下集成swagger-bootstrap-ui
swagger-bootstrap-ui-demo在Spring Boot单体架构下集成swagger-bootstrap-ui
swagger-bootstrap-ui-gateway在Spring Cloud微服务架构下通过gateway网关集成swagger-bootstrap-ui
swagger-bootstrap-ui-zuul在Spring Cloud微服务架构下通过zuul网关集成swagger-bootstrap-ui
+ + diff --git a/knife4j-doc/gitee/docs/community/sourcecode.html b/knife4j-doc/gitee/docs/community/sourcecode.html index 2f0fe83e8..e0bb0bc05 100644 --- a/knife4j-doc/gitee/docs/community/sourcecode.html +++ b/knife4j-doc/gitee/docs/community/sourcecode.html @@ -10,27 +10,27 @@ - -源代码 | Knife4j - - +源代码 | Knife4j + +
-

源代码

你可以在码云Gitee上https://gitee.com/xiaoym/knife4j获得我们最新的源代码

star +fork

萧明/knife4j

如果你一般在GitHub活动,Knife4j的代码在GitHub也有备份库:

https://github.com/xiaoymin/knife4j

注意:GitHub仓库作者只是作为一个备份,代码可能不是最新,最新的代码都在Gitee仓库的dev分支,开发者如果想提交PR,尽量在Gitee的dev分支下提交!!!

+ + diff --git a/knife4j-doc/gitee/docs/donate.html b/knife4j-doc/gitee/docs/donate.html index d3bf4f7cf..c371a884f 100644 --- a/knife4j-doc/gitee/docs/donate.html +++ b/knife4j-doc/gitee/docs/donate.html @@ -10,16 +10,15 @@ - -index | Knife4j - - +index | Knife4j + +
-

index

- - +

index

+ + diff --git a/knife4j-doc/gitee/docs/faq.html b/knife4j-doc/gitee/docs/faq.html index c1d04e080..3e029ece0 100644 --- a/knife4j-doc/gitee/docs/faq.html +++ b/knife4j-doc/gitee/docs/faq.html @@ -10,27 +10,27 @@ - -FAQ | Knife4j - - +FAQ | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/faq/format-exception.html b/knife4j-doc/gitee/docs/faq/format-exception.html index 10f311b2d..79ea692f5 100644 --- a/knife4j-doc/gitee/docs/faq/format-exception.html +++ b/knife4j-doc/gitee/docs/faq/format-exception.html @@ -10,26 +10,26 @@ - -java.lang.NumberFormatException: For input string: "" | Knife4j - - +java.lang.NumberFormatException: For input string: "" | Knife4j + +
-

java.lang.NumberFormatException: For input string: ""

很多朋友在升级Springfox-Swagger到2.9.2版本后会碰见NumberFormatException异常java.lang.NumberFormatException: For input string: ""

异常信息如下:

java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_111]
at java.lang.Long.parseLong(Long.java:601) ~[na:1.8.0_111]
at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_111]
at
//more....

解决办法是在pom.xml中排除Springfox-Swagger的Swagger-Models的jar包,重新引入,如下:

<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- https://mvnrepository.com/artifact/io.swagger/swagger-models -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>
+ + diff --git a/knife4j-doc/gitee/docs/faq/knife4j-exception.html b/knife4j-doc/gitee/docs/faq/knife4j-exception.html index 232003e00..9d8c8c7b2 100644 --- a/knife4j-doc/gitee/docs/faq/knife4j-exception.html +++ b/knife4j-doc/gitee/docs/faq/knife4j-exception.html @@ -10,19 +10,19 @@ - -Knife4j文档请求异常 | Knife4j - - +Knife4j文档请求异常 | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/faq/md-format-error.html b/knife4j-doc/gitee/docs/faq/md-format-error.html index 3a28983e9..a074f1b4e 100644 --- a/knife4j-doc/gitee/docs/faq/md-format-error.html +++ b/knife4j-doc/gitee/docs/faq/md-format-error.html @@ -10,26 +10,26 @@ - -离线文档markdown格式错乱 | Knife4j - - +离线文档markdown格式错乱 | Knife4j + +
-

离线文档markdown格式错乱

即使文档格式错乱,但是在相关markdown转换软件中依然是可以正常使用的,该功能使用art-template来渲染,多少会出现一些空格、换行之类的问题

markdown软件推荐使用Typora,我一直在用,相当好用,适合不会排版word的程序员们

+ + diff --git a/knife4j-doc/gitee/docs/faq/sp-nmerror.html b/knife4j-doc/gitee/docs/faq/sp-nmerror.html index 799c9aeae..7e4096293 100644 --- a/knife4j-doc/gitee/docs/faq/sp-nmerror.html +++ b/knife4j-doc/gitee/docs/faq/sp-nmerror.html @@ -10,26 +10,26 @@ - -Springfox-Swagger升级到2.9.2导致的NoSuchMethodError异常 | Knife4j - - +Springfox-Swagger升级到2.9.2导致的NoSuchMethodError异常 | Knife4j + +
-

Springfox-Swagger升级到2.9.2导致的NoSuchMethodError异常

很多朋友在将SpringFox-Swagger版本升级到2.9.2版本后,运行程序都会出现如下错误:

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: com.google.common.collect.FluentIterable.concat(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;
org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176)
org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346)
org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149)
org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112)
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:851)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:633)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:681)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:552)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)xxxxxxxxxx sp-nmerrororg.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: com.google.common.collect.FluentIterable.concat(Ljava/lang/Iterable;Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable; org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176) org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51) org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346) org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:851) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:667) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:633) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:681) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:552) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:493) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) javax.servlet.GenericServlet.init(GenericServlet.java:158) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)java

造成该错误的原因是,Springfox-swagger引用的guava版本相对于你项目中版本较高,此时和低版本的guava引起冲突.

Springfox-Swagger中guava的版本为20

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
<scope>compile</scope>
</dependency>

解决此错误的办法是排除低版本的guava即可.

maven命令在项目根目录运行:mvn dependency:tree命令可以看到jar包项目的引用树结构,可以看到低版本的guava是那个jar引入的

+ + diff --git a/knife4j-doc/gitee/docs/faq/springboot-404.html b/knife4j-doc/gitee/docs/faq/springboot-404.html index 077392982..681b2bd9a 100644 --- a/knife4j-doc/gitee/docs/faq/springboot-404.html +++ b/knife4j-doc/gitee/docs/faq/springboot-404.html @@ -10,26 +10,26 @@ - -SpringBoot访问doc.html页面404 | Knife4j - - +SpringBoot访问doc.html页面404 | Knife4j + +
-

SpringBoot访问doc.html页面404

默认情况下并不需要添加此配置即可访问

很多朋友在使用SpringBoot集成swagger-bootstrap-ui后,都无法访问doc.html界面,此时,你可能需要实现SpringBoot的WebMvcConfigurer接口,添加相关的ResourceHandler,代码如下:

@SpringBootApplication
public class SwaggerBootstrapUiDemoApplication implements WebMvcConfigurer{

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("doc.html").addResourceLocations("classpath*:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath*:/META-INF/resources/webjars/");
}
}

或者


@SpringBootApplication
public class SwaggerBootstrapUiDemoApplication implements WebMvcConfigurer{

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}

如果你是使用的老的版本SpringBoot,通过继承WebMvcConfigurationSupport来扩展SpringBoot相关的配置,则把以上配置加在相应的addResourceHandlers方法中即可

推荐使用实现WebMvcConfigurer接口的方式来进行扩展

如果以上方式还是不行,建议开启Spring的Debug日志来进行跟踪,一般访问doc.html页面会出现如下日志(成功情况下):

2019-04-19 13:39:36,896 DEBUG (AbstractHandlerMethodMapping.java:312)- Looking up handler method for path /doc.html
2019-04-19 13:39:36,902 DEBUG (AbstractHandlerMethodMapping.java:322)- Did not find handler method for [/doc.html]
2019-04-19 13:39:36,921 DEBUG (AbstractUrlHandlerMapping.java:199)- Matching patterns for request [/doc.html] are [/**]
2019-04-19 13:39:36,922 DEBUG (AbstractUrlHandlerMapping.java:233)- URI Template variables for request [/doc.html] are {}
2019-04-19 13:39:36,923 DEBUG (AbstractUrlHandlerMapping.java:146)- Mapping [/doc.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@da32f3]]] and 1 interceptor
2019-04-19 13:39:36,957 DEBUG (RequestContextFilter.java:104)- Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@28759ea7
2019-04-19 13:39:41,649 DEBUG (RequestContextFilter.java:114)- Bound request context to thread: org.apache.catalina.connector.RequestFacade@28759ea7

同理,在使用SpringMvc或者shiro等权限框架时,如果页面无法访问,配置doc.html属性即可

关于SpringBoot的代码示例可参考swagger-bootstrap-ui-demo

+ + diff --git a/knife4j-doc/gitee/docs/faq/springmvc-404.html b/knife4j-doc/gitee/docs/faq/springmvc-404.html index 2d81734e9..7e1df0056 100644 --- a/knife4j-doc/gitee/docs/faq/springmvc-404.html +++ b/knife4j-doc/gitee/docs/faq/springmvc-404.html @@ -10,26 +10,26 @@ - -SpringMvc访问页面404 | Knife4j - - +SpringMvc访问页面404 | Knife4j + +
-

SpringMvc访问页面404

SpringMvc中文档出现异常一般分2种情况:

  • doc.html打开提示404
  • doc.html已经可以打开,但是页面无任何接口文档

针对以上两种情况的解决办法:

第一种:doc.html打开提示404?

一般无需添加此配置,如果出现这种情况,在Spring的xml配置文件中,添加Spring的静态资源映射路径即可,如下:

<mvc:resources location="classpath:/META-INF/resources/" mapping="doc.html"/>
<mvc:resources location="classpath:/META-INF/resources/webjars/" mapping="/webjars/**"/>

第二种:doc.html已经可以打开,但是页面无任何接口文档?

web.xml中配置了DispatcherServlet,则需要追加一个url匹配规则,如下

<!-- 配置swagger-bootstrap-ui的url请求路径-->
<servlet-mapping>
<servlet-name>swaggerDemoMvc</servlet-name>
<url-pattern>/v2/api-docs</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>swaggerDemoMvc</servlet-name>
<url-pattern>/swagger-resources</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>swaggerDemoMvc</servlet-name>
<url-pattern>/swagger-resources/configuration/ui</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>swaggerDemoMvc</servlet-name>
<url-pattern>/swagger-resources/configuration/security</url-pattern>
</servlet-mapping>
<!--此接口地址为SwaggerBootstrapUi提供的增强地址,如果不使用增强功能,可排除此配置-->
<servlet-mapping>
<servlet-name>swaggerDemoMvc</servlet-name>
<url-pattern>/v2/api-docs-ext</url-pattern>
</servlet-mapping>

关于SpringMvc的代码示例可参考swagger-bootstrap-ui-demo-mvc

+ + diff --git a/knife4j-doc/gitee/docs/faq/springmvc-notshow.html b/knife4j-doc/gitee/docs/faq/springmvc-notshow.html index f077e0869..47c66e326 100644 --- a/knife4j-doc/gitee/docs/faq/springmvc-notshow.html +++ b/knife4j-doc/gitee/docs/faq/springmvc-notshow.html @@ -10,26 +10,26 @@ - -Spring MVC不显示接口文档 | Knife4j - - +Spring MVC不显示接口文档 | Knife4j + +
-

Spring MVC不显示接口文档

很多朋友在使用Spring MVC时,会碰到接口文档没有的情况,在此处做一个说明

1、首先保证SwaggerConfig的配置文件中配置正确的Docket对象(即默认扫描的包路径或者基于@ApiOperation注解)

2、其次,区别于SpringBoot的注入,不使用@Configuration注解注入到Spring的IOC容器中,采用<bean>XML注入的方式注入到Spring的容器中,如下:

<bean id="SwaggerConfig" class="com.xiaominfo.swagger.config.SwaggerConfiguration"></bean>

3、需保证注入的SwaggerConfig的bean在Spring的MVC的容器中,因为Spring MVC存在父子容器的关系,如果不将该Bean注入到Spring MVC容器中的话,Swagger就会扫描不到Controller层的接口,自然也就不会显示文档

例如:

<servlet>
<servlet-name>swaggerDemoMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<!--在第二步中注入的SwaggerConfig的bean需写在spring.xml文件中-->
<param-value>classpath:config/spring.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
+ + diff --git a/knife4j-doc/gitee/docs/faq/swagger-des-not-found.html b/knife4j-doc/gitee/docs/faq/swagger-des-not-found.html index c91fbb924..9074191ed 100644 --- a/knife4j-doc/gitee/docs/faq/swagger-des-not-found.html +++ b/knife4j-doc/gitee/docs/faq/swagger-des-not-found.html @@ -10,26 +10,26 @@ - -Swagger字段属性说明不显示 | Knife4j - - +Swagger字段属性说明不显示 | Knife4j + +
-

Swagger字段属性说明不显示

不管是在SwaggerBootstrapUi以前的版本中,还是在SwaggerBootstrapUi的1.8.9版本发布新功能字段注释逐行显示时,很多朋友都会问为啥自己的UI文档上不显示注释.

1.8.9的功能展示如下图:

正常情况下,不管是调试还是文档说明都会显示以上字段说明(除非你没写注解说明)

这里很多朋友碰见的最多的问题主要有2个:

  • 返回Map|Object为何不显示
  • 使用泛型T还是不显示

不显示效果可能如下图:

返回Object不显示字段属性

返回Map为何不显示

为何返回Map不显示,大家都知道Map是Java里面的集合接口,不管是Map本身还是诸如HashMap等子实现,这类数据对于Swagger来说都是未定义结构的数据

Swagger只认识定义好的类-属性,所以接口返回Map,对于Swagger来说是没有字段展示的,这种情况同样适用与返回Object这个顶级父类.这也是为何要适用泛型T的原因

适用泛型T还是不显示

很多朋友会说我已经使用泛型T了,可是文档上还是不显示,这里主要的原因有以下几点

属性定义必须是泛型T,如下:

private T data;//返回属性T

返回T类型的get方法必须是返回T,有时候自动生成get、setter方法插件等会将我们的代码生成返回Object,例如:

public Object getData(){
return data;
}

以上是错误的形式,尽管属性中已经定义为T了,正确的方式:

public T getData(){
return data;
}

最重要的一步,以上步骤完全正确,代码也没有问题,可是ui还是不显示属性,必须在接口层强指定泛型类型(可能是Swagger要求我们写代码要规范吧~~~),如下:

友情提示

在2.0.6等后面的高版本中,由于升级了Springfox基础组件,如果开发者使用类似JRebel这类热加载插件的时候,会出现类字段没有的情况,目前没有办法解决springfox项目与JRebel插件的冲突,建议是不用JRebel

如果以上情况都ok,还是不显示说明,恭喜你发现了SwaggerBootstrapUi的一个bug,欢迎提issue反馈给我,我会搞定它的~~!

另外

一般在完成以上情况后,字段说明都会显示,这里再提醒一下大家,如果已经在泛型中强制约束了返回类型后,就无需在注解@ApiOperation中设置response属性值,比如如下代码

@ApiOperation(value = "查询所有",response=AlarmReponse.class)
@GetMapping("/queryAll")
public Rest<List<AlarmResponse>> queryAll(){
//more..
}

以上代码返回了泛型Rest类型的List-AlarmResponse集合,但是却ApiOperation注解中加了response属性为AlarmResponse.class,这种情况会造成Ui只显示AlarmReponse类的属性说明,这显然是不对的,因为它把Rest的属性给忽略了,所以:

一般情况下,是不写注解@ApiOperation中的response属性值,能少写就少写,将剩下的交给springfox-swagger这个框架,由它自动解析生成接口返回类型

最后贴一个简单的返回封装类供大家参考(Rest.java)

public class Rest<T> {

@ApiModelProperty(value = "是否成功")
private boolean success=true;
@ApiModelProperty(value = "返回对象")
private T data;
@ApiModelProperty(value = "错误编号")
private Integer errCode;
@ApiModelProperty(value = "错误信息")
private String message;

public boolean isSuccess() {
return success;
}

public void setSuccess(boolean success) {
this.success = success;
}

public T getData() {
return data;
}

public void setData(T data) {
this.data = data;
}

public Integer getErrCode() {
return errCode;
}

public void setErrCode(Integer errCode) {
this.errCode = errCode;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}
友情提示

在泛型基础封装类中,开发者有两点需要注意:

1、基础封装泛型类中,不能使用@ApiModel注解来约束该泛型类的类名称,因为泛型类一旦用该注解进行约束后,在OpenAPI的结构中,类名称就只有一个,会导致字段属性找不到的情况。错误的代码示例

/*
* 泛型类中不能使用@ApiModel注解,应该去掉
*/
@ApiModel("结果类")
public class Rest<T> {
//....
}

2、针对泛型T的属性,不应该在使用@ApiModelProperty注解时,赋予example值,错误的代码示例

public class Rest<T> {
/*
* 泛型T属性不能赋予example值,因为T有可能是实体类,这样赋值会导致生成的示例值不一致,应该交给框架去解析类结构
*/
@ApiModelProperty(value = "返回对象",example="Test")
private T data;
}
+ + diff --git a/knife4j-doc/gitee/docs/faq/swaggerResourceInvalid.html b/knife4j-doc/gitee/docs/faq/swaggerResourceInvalid.html index a4bfe32c8..89c64dc24 100644 --- a/knife4j-doc/gitee/docs/faq/swaggerResourceInvalid.html +++ b/knife4j-doc/gitee/docs/faq/swaggerResourceInvalid.html @@ -10,26 +10,26 @@ - -请确保swagger资源接口正确 | Knife4j - - +请确保swagger资源接口正确 | Knife4j + +
-

请确保swagger资源接口正确

swagger-bootstrap-ui1.9.X系列版本中,打开文档页面初始化会碰见问题,针对此情况,为了显示更友好一下,在核心的JS代码中进行了异常捕获操作

try{
//some operation
}
catch (err){
that.error(err);
layer.msg(i18n.message.sys.loadErr+",Err:"+err.message);
if (window.console){
console.error(err);
}
}

错误信息即开发者常见的请确保swagger资源接口正确

一般出现这种错误的时候有几种情况

swagger接口请求非200

开发者可以通过chrome浏览器的network控制台进行查看,首先需要排除swagger两个接口状态码非200的情况

有时候开发者未按正确的方式集成springfox-swagger组件,导致访问的时候接口地址出现404,springfox-swagger提供的两个接口:

  • 分组接口:接口url一般为swagger-resources
  • api资源实例接口: 该接口为/v2/api-docs或者增强接口/v2/api-docs-ext

另外,swagger-bootstrap-ui增强的接口地址是/v2/api-docs-ext,如果出现访问此接口的时候状态码为404,请确保在Swagger的配置文件类上加上启用注解@EnableSwaggerBootstrapUI,该注解是和springfox的@EnableSwagger2配合一起使用,并非替代.

代码示例:

@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {
//more ...
}

swagger接口格式不对

我们在使用集成springfox-swagger组件的时候,该组件为我们提供了两个接口,而这两个接口也是swagger-bootstrap-ui组件所依赖的接口,主要是分组接口和接口示例接口

分组接口:接口url一般为swagger-resources

该接口返回的正确格式为:

[
{
"name": "1.8.X版本接口",
"url": "/v2/api-docs?group=1.8.X版本接口",
"swaggerVersion": "2.0",
"location": "/v2/api-docs?group=1.8.X版本接口"
},
{
"name": "1.9.X版本接口",
"url": "/v2/api-docs?group=1.9.X版本接口",
"swaggerVersion": "2.0",
"location": "/v2/api-docs?group=1.9.X版本接口"
},
{
"name": "默认接口",
"url": "/v2/api-docs?group=默认接口",
"swaggerVersion": "2.0",
"location": "/v2/api-docs?group=默认接口"
}
]

在低版本中可能会没有url属性,但是在springfox-swagger相对较高的版本中,都会存在,以上格式是一个纯数组的JSON对象,很多时候,后端的开发对响应的接口都会做一层统一的封装,例如封装了响应code、错误信息等,但是针对springfox组件提供的接口需要排除在外,这是开发者需要注意的地方

api资源实例接口: 该接口为/v2/api-docs或者增强接口/v2/api-docs-ext

实例接口正确格式为:

{
"swagger": "2.0",
"info": {
//...
},
"host": "127.0.0.1:8999",
"basePath": "/",
"tags": [
{
"name": "1.8.2版本",
"description": "Api 182 Controller"
}
],
"paths": {
"/2/api/new187/postRequest": {
//....
},
"securityDefinitions": {
//,,.,
},
"definitions": {
"AInfoVo": {
//....
}
}

包含了OpenAPI 2.0规范中定义的相关属性字段,是一个纯JSON对象,开发者不能封装之外的字段进来.

JSON格式非法

如果以上两种情况都排除的话,最后还有一种情况会造成此问题的出现,那就是响应的JSON并非是一个标准的JSON

一般出现此情况时,是因为后端在给List集合的属性赋予了exmpale属性,例如:

@ApiModel(description = "客户字段分组模型",value = "CrmFieldGroupResponse")
public class CrmFieldGroupResponse {

@ApiModelProperty(value = "客户字段分组ID")
private int id;

@ApiModelProperty(value = "客户字段分组名称")
private String name;

@ApiModelProperty(value = "客户字段数据",example = "{'id':'xxx'}")
private List<CrmFieldResponse> fields;

}

该情况会导致生成出来的JSON并非是一个标准的JSON,而swagger-bootstrap-ui组件在前端是通过JSON.parse()方法对后端返回回来的数据进行JSON转换,这会导致转换失败

解决方法是把集合属性中的example属性去掉,交个springfox-swagger框架来自动解析

正确方式:

@ApiModel(description = "客户字段分组模型",value = "CrmFieldGroupResponse")
public class CrmFieldGroupResponse {

@ApiModelProperty(value = "客户字段分组ID")
private int id;

@ApiModelProperty(value = "客户字段分组名称")
private String name;

@ApiModelProperty(value = "客户字段数据")
private List<CrmFieldResponse> fields;

}
+ + diff --git a/knife4j-doc/gitee/docs/faq/upload-error.html b/knife4j-doc/gitee/docs/faq/upload-error.html index 976aae5c4..653df23b6 100644 --- a/knife4j-doc/gitee/docs/faq/upload-error.html +++ b/knife4j-doc/gitee/docs/faq/upload-error.html @@ -10,26 +10,26 @@ - -文件上传不显示上传选择文本域 | Knife4j - - +文件上传不显示上传选择文本域 | Knife4j + +
-

文件上传不显示上传选择文本域

在使用SwaggerBootstrapUi的朋友经常询问的一个问题,为什么上传参数file对象不显示file文本域,而是普通文本,如下图:

因为Springfox-Swagger针对不同的版本,某些版本也会出现此问题,为一劳永逸,SwaggerBootstrapUi特别指定需要强指定dataType类型为MultipartFile

代码示例(UploadController.java):

@ApiOperation(value = "文件素材上传接口")
@ApiImplicitParams({@ApiImplicitParam(name = "file[]", value = "文件流对象,接收数组格式", required = true,dataType = "MultipartFile",allowMultiple = true),
@ApiImplicitParam(name = "title", value = "title", required = true)}
)
@RequestMapping(value="/uploadMaterial",method = RequestMethod.POST)
@ResponseBody
public RestMessage uploadMaterial(@RequestParam(value="file[]",required = true) MultipartFile[] files,@RequestParam(value = "title") String title, HttpServletRequest request) throws IOException {
//int mul=1*1024*1024;
String realPath=request.getSession().getServletContext().getRealPath("/upload");
File realFile=new File(realPath);
if (!realFile.exists()){
realFile.mkdirs();
}
List<Map> uploadFiles= Lists.newArrayList();
System.out.println("进入图片上传接口:"+files.length +"张");
for (MultipartFile file : files) {
File targetFile=new File(realFile,file.getOriginalFilename());
FileOutputStream fileOutputStream=null;
InputStream ins=null;
try{
fileOutputStream=new FileOutputStream(targetFile);
int i=-1;
byte[] bytes=new byte[1024*1024];
ins=file.getInputStream();
while ((i=ins.read(bytes))!=-1){
fileOutputStream.write(bytes,0,i);
}
}catch (IOException e){
}finally {
closeQuilty(ins);
closeQuilty(fileOutputStream);
}
Map fileInfo= Maps.newHashMap();
fileInfo.put("id", UUID.randomUUID().toString());
fileInfo.put("url",targetFile.getPath());
fileInfo.put("original_name",targetFile.getName());
uploadFiles.add(fileInfo);
}
RestMessage rm=new RestMessage();
rm.setData(uploadFiles);
return rm;
}

关于多文件上传,设置allowMultiple=true即可,在UI界面端,按住Ctrl键即可多选文件.

+ + diff --git a/knife4j-doc/gitee/docs/faq/v4/knife4j-base64-response.html b/knife4j-doc/gitee/docs/faq/v4/knife4j-base64-response.html index a01508e6e..14ce06f0b 100644 --- a/knife4j-doc/gitee/docs/faq/v4/knife4j-base64-response.html +++ b/knife4j-doc/gitee/docs/faq/v4/knife4j-base64-response.html @@ -10,26 +10,26 @@ - -针对4.1.0版本接口响应Base64编码的情况 | Knife4j - - +针对4.1.0版本接口响应Base64编码的情况 | Knife4j + +
-

针对4.1.0版本接口响应Base64编码的情况

Knife4j 在4.1.0版本升级了springdoc的版本号,导致很多开发者反馈会出现初始化OpenAPI接口响应的是Base64编码的情况.导致在Knife4j 界面初始化接口失败。

这种情况主要是开发者在Spring Boot项目中,自定义了MessageConvert的情况,示例代码如下:

@Configuration
public class CommonWebMvcConfig implements WebMvcConfigurer {

@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// 自定义convert
converters.add(fastJsonHttpMessageConverters());
//需要追加byte,否则springdoc-openapi接口会响应Base64编码内容,导致接口文档显示失败
// https://github.com/springdoc/springdoc-openapi/issues/2143
// 解决方案
converters.add(new ByteArrayHttpMessageConverter());
}

}

开发者需要添加ByteArrayHttpMessageConverter,具体可以参考springdoc-openapi的issues:

https://github.com/springdoc/springdoc-openapi/issues/2143

+ + diff --git a/knife4j-doc/gitee/docs/faq/v4/knife4j-no-openapi.html b/knife4j-doc/gitee/docs/faq/v4/knife4j-no-openapi.html index 46d576725..44a1742be 100644 --- a/knife4j-doc/gitee/docs/faq/v4/knife4j-no-openapi.html +++ b/knife4j-doc/gitee/docs/faq/v4/knife4j-no-openapi.html @@ -10,26 +10,26 @@ - -No OpenAPI resource found for group: swagger-config | Knife4j - - +No OpenAPI resource found for group: swagger-config | Knife4j + +
-

No OpenAPI resource found for group: swagger-config

很多朋友在升级到Knife4j 4.0的OpenAPI3版本中,会出现该错误信息,导致页面加载失败

No OpenAPI resource found for group: swagger-config

解决办法是再添加一个springdoc-openapi-ui的依赖即可,Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

<!--再添加一个jar-->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<!--保持版本与Knife4j v4.0的版本一致,避免jar包冲突,因为Knife4j-v4.0.0版本依赖的springdoc版本是1.6.9 -->
<version>1.6.9</version>
</dependency>

该问题会在之后的4.1版本中把依赖添加进去,这样开发者就不必再单独引入了。在4.1版本没发版本之前,先临时这么解决吧~

+ + diff --git a/knife4j-doc/gitee/docs/faq/v4/knife4j-parameterobject-flat-param.html b/knife4j-doc/gitee/docs/faq/v4/knife4j-parameterobject-flat-param.html index 09f63dbd4..11080ae06 100644 --- a/knife4j-doc/gitee/docs/faq/v4/knife4j-parameterobject-flat-param.html +++ b/knife4j-doc/gitee/docs/faq/v4/knife4j-parameterobject-flat-param.html @@ -10,26 +10,26 @@ - -Knife4j v4.0版本针对参数解析ParameterObject的问题说明 | Knife4j - - +Knife4j v4.0版本针对参数解析ParameterObject的问题说明 | Knife4j + +
-

Knife4j v4.0版本针对参数解析ParameterObject的问题说明

备注说明

该文档仅限Knife4j v4.0.0版本作为一种解决方案,在未来Knife4j v4.1.0版本中,会将springdoc-openapi的基础版本升级到最新版本,这样开发者就不用在maven中使用exclusions进行排除低版本再重新引入了

先来看示例代码:

@Operation(summary = "Get 请求", tags = "对接口分组", description = "对接口的作用进行描述")
@RequestMapping(value = "/api/v1/open-api", method = RequestMethod.GET)
public R<GetDTO> get(GetDTO dto) {
return R.ok(dto);
}

实体类GetDTO.java

@Data
@Schema(description = "请求 Param 对象")
class GetDTO {

@Schema(description = "param 必填参数", required = true, example = "param 必填参数")
private String paramRequired;

@Schema(description = "param 非必填参数", example = "param 非必填参数")
private String paramNoRequired;
}

这种情况在之前springfox的框架下,会直接解析成form参数,开发者无需过多的配置,但是在升级到Knife4j v4.0版本后,文档的界面效果却和开发者展示的不一样,如下图:

很多朋友会误以为这是Knife4j的前端Ui解析Bug,但其实不是,针对这种情况,目前有两种解决方案:

1、所有的该类型的接口中,增加注解@ParameterObject,代码最终如下:

@Operation(summary = "Get 请求", tags = "对接口分组", description = "对接口的作用进行描述")
@RequestMapping(value = "/api/v1/open-api", method = RequestMethod.GET)
public R<GetDTO> get(@ParameterObject GetDTO dto) {
return R.ok(dto);
}

但是这种情况很多开发者可能会觉得很麻烦,因为如果涉及到接口太多的话,那么确实每个接口都需要加注解的话,工作量会非常的大

提示

但是这种情况很多开发者可能会觉得很麻烦,因为如果涉及到接口太多的话,那么确实每个接口都需要加注解的话,工作量会非常的大

2、第二种情况则是在目前Knife4j的v4.0.0版本中,可以考虑升级springdoc-openapi的版本来解决,通过新特性,一行配置搞定

在springdoc-openapi的1.6.11版本中,增加了defaultFlatParamObject的配置项,通过配置该属性,可以不用添加注解,达到上面1中的效果

在项目yml配置中,配置如下:

springdoc:
# 默认是false,需要设置为true
default-flat-param-object: true

在Knife4j 4.0.0版本中,排除低版本做升级即可,Maven配置如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.0.0</version>
<!--排查低版本-->
<exclusions>
<exclusion>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.7</version>
</dependency>


<!--springdoc-openapi的Jar包引用-->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-common</artifactId>
<version>1.6.14</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-core</artifactId>
<version>1.6.14</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webmvc-core</artifactId>
<version>1.6.14</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.14</version>
</dependency>


+ + diff --git a/knife4j-doc/gitee/docs/features.html b/knife4j-doc/gitee/docs/features.html index 104c9e19d..4bf31a1dc 100644 --- a/knife4j-doc/gitee/docs/features.html +++ b/knife4j-doc/gitee/docs/features.html @@ -10,26 +10,26 @@ - -增强特性 | Knife4j - - +增强特性 | Knife4j + +
-

增强特性

增强

+ + diff --git a/knife4j-doc/gitee/docs/features/accessControl.html b/knife4j-doc/gitee/docs/features/accessControl.html index 2ea7e019e..9550737fb 100644 --- a/knife4j-doc/gitee/docs/features/accessControl.html +++ b/knife4j-doc/gitee/docs/features/accessControl.html @@ -10,26 +10,26 @@ - -3.5 访问权限控制 | Knife4j - - +3.5 访问权限控制 | Knife4j + +
-

3.5 访问权限控制

温馨提醒
  • 增强功能需要通过配置yml配置文件开启增强,自2.0.7开始
knife4j:
enable: true

在开发Knife4j功能时,同很多开发者经常讨论的问题就是在生产环境时,屏蔽或者去除Swagger的文档很麻烦

,通常有时候我们碰到的问题如下:

  • 系统部署生产环境时,我们想屏蔽Swagger的文档功能,不管是接口或者html文档
  • 通常我们有时候需要生产环境部署后,又需要Swagger的文档调试功能,辅助开发者调试,但是存在安全隐患,没有对Swagger的资源接口过滤
  • 等等

针对以上两种情况,Knife4j基于Servlet体系提供了过滤Filter功能,如果开发者使用Spring Boot开发框架进行开发的话,只需在application.properties或者application.yml配置文件中配置相关属性即可方便的解决上面的问题,不用删除Springfox-swagger的jar包或者删除相关代码等复杂的操作,提升开发体验.

3.5.1 生产环境屏蔽资源

目前Springfox-Swagger以及Knife4j提供的资源接口包括如下:

资源说明
/doc.htmlKnife4j提供的文档访问地址
/v2/api-docs-extKnife4j提供的增强接口地址,自2.0.6版本后删除
/swagger-resourcesSpringfox-Swagger提供的分组接口
/v2/api-docsSpringfox-Swagger提供的分组实例详情接口
/swagger-ui.htmlSpringfox-Swagger提供的文档访问地址
/swagger-resources/configuration/uiSpringfox-Swagger提供
/swagger-resources/configuration/securitySpringfox-Swagger提供

springdoc以及Knife4j提供的资源接口包括如下:

资源说明
/doc.htmlKnife4j提供的文档访问地址
/v3/api-docsspringdoc提供的实例接口
/v3/api-docs/swagger-configspringdoc提供的分组接口
/v3/api-docs/**分组
/swagger-ui/index.htmlspringdoc提供的文档访问地址

当我们部署系统到生产系统,为了接口安全,需要屏蔽所有Swagger的相关资源

如果使用SpringBoot框架,只需在application.properties或者application.yml配置文件中配置

knife4j:
# 开启增强配置
enable: true
 # 开启生产环境屏蔽
production: true

配置此属性后,所有资源都会屏蔽输出.

效果图如下:

3.5.2 访问页面加权控制

不管是官方的swagger-ui.html或者doc.html,目前接口访问都是无需权限即可访问接口文档的,很多朋友以前问我能不能提供一个登陆界面的功能,开发者输入用户名和密码来控制界面的访问,只有知道用户名和密码的人才能访问此文档

做登录页控制需要有用户的概念,所以相当长一段时间都没有提供此功能

针对Swagger的资源接口,Knife4j提供了简单的Basic认证功能

效果图如下:

允许开发者在配置文件中配置一个静态的用户名和密码,当对接者访问Swagger页面时,输入此配置的用户名和密码后才能访问Swagger文档页面,如果您使用SpringBoot开发,则只需在相应的application.properties或者application.yml中配置如下:

knife4j:
# 开启增强配置
enable: true
 # 开启Swagger的Basic认证功能,默认是false
basic:
enable: true
# Basic认证用户名
username: test
# Basic认证密码
password: 123

如果用户开启了basic认证功能,但是并未配置用户名及密码,Knife4j提供了默认的用户名和密码:

admin/123321

如果您使用的是SpringMVC,则需要在web.xml中添加相应的Filter,参考Xml配置如下:

点击查看代码
<!--Knife4j提供的Swagger增强功能,Filter过滤保护Swagger资源-->
<!--生产环境Filter-->
<filter>
<filter-name>swaggerProductionFilter</filter-name>
<filter-class>com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter</filter-class>
<init-param>
<param-name>production</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>swaggerProductionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--Swagger资源的Basic认证保护策略-->
<filter>
<filter-name>swaggerSecurityBasic</filter-name>
<filter-class>com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter</filter-class>
<!--开启basic认证-->
<init-param>
<param-name>enableBasicAuth</param-name>
<param-value>true</param-value>
</init-param>
<!--用户名&密码-->
<init-param>
<param-name>userName</param-name>
<param-value>lisi</param-value>
</init-param>
<init-param>
<param-name>password</param-name>
<param-value>123</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>swaggerSecurityBasic</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
+ + diff --git a/knife4j-doc/gitee/docs/features/afterScript.html b/knife4j-doc/gitee/docs/features/afterScript.html index 6e84fd074..11f7511b4 100644 --- a/knife4j-doc/gitee/docs/features/afterScript.html +++ b/knife4j-doc/gitee/docs/features/afterScript.html @@ -10,27 +10,27 @@ - -3.18 afterScript | Knife4j - - +3.18 afterScript | Knife4j + +
-

3.18 afterScript

输入图片说明 +AfterScript功能是Knife4j2.0.6版本开始新增的一项特性功能,在每个接口进行调试Tab中,开发者可以根据Knife4j提供的全局变量,在接口调用之前编写一段JavaScript脚本,当接口调用成功后,Knife4j会执行该脚本。

主要应用场景:

  • 针对JWT类型的接口,调用登录接口后,每个接口请求时带上Token参数,此时可以通过该脚本动态赋值全局token参数,省去复制粘贴的麻烦.

3.18.1 全局对象

Knife4j目前主要提供ke(Knife4j Environment)对象来获取或者操作全局对象,主要包含的对象:

  • global:全局操作,可以获取或者设置目前的全局参数
    • setHeader(name,value):设置当前逻辑分组下的全局参数Header请求头
    • setAllHeader(name,value):设置所有逻辑分组下的全局参数Header请求头
    • setParameter(name,value):设置当前逻辑分组下,主要是针对query类型参数进行设置全局设置。
    • setAllParameter(name,value):设置所有逻辑分组下的全局参数,主要是query类型
  • response:当前请求接口响应内容
    • headers:服务端响应Header对象,注意,此处所有的header的名称全部进行小写转换
    • data:服务端响应数据(json/xml/text等等)

设计结构:

ke={
global:{
setHeader:function(name,value){

},
setAllHeader:function(name,value){

},
setParameter:function(name,value){

},
setAllParameter:function(name,value){

}
},
response:{
headers:{

},
data:{

}
}
}

3.18.2 代码示例

1、获取服务端响应的Header参数

当我们调用API接口后,开发者如果想拿到服务端写出的响应Header头-Content-Type,并且进行控制台输出打印,可以这样编写AfterScript

var contentType=ke.response.headers["content-type"];
console.log("响应ContentType:"+contentType)

2、根据服务端响应的值设置全局Header

假设某一个接口响应的JSON内容如下:

{
"code": 8200,
"message": null,
"data": {
"token": "1y1tn8tvw93fxixp79dcx0nugixkw4su"
}
}

该接口是登录接口,每个接口请求都需要带上token的请求头,因此我们访问登录接口后,设置全局Header参数token,代码如下:

var code=ke.response.data.code;
if(code==8200){
//判断,如果服务端响应code是8200才执行操作
//获取token
var token=ke.response.data.data.token;
//1、如何参数是Header,则设置当前逻辑分组下的全局Header
ke.global.setHeader("token",token);

}
友情提示

在2.0.8或者以前的版本中,该功能特性无法同时执行两个变量,场景参考这个issue,如果开发者遇到这个问题,则可以考虑升级一下版本,该问题会在2.0.9版本中解决

+ + diff --git a/knife4j-doc/gitee/docs/features/apiSort.html b/knife4j-doc/gitee/docs/features/apiSort.html index 737d09949..53c4322b1 100644 --- a/knife4j-doc/gitee/docs/features/apiSort.html +++ b/knife4j-doc/gitee/docs/features/apiSort.html @@ -10,26 +10,26 @@ - -3.6 接口排序 | Knife4j - - +3.6 接口排序 | Knife4j + +
-

3.6 接口排序

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.6开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

3、如果使用openapi3版本,那么Knife4j 版本>=4.1.0

基础使用

针对Controller下的具体接口,排序规则是使用Knife4j提供的增强注解@ApiOperationSupport中的order字段,代码示例如下:

@ApiOperationSupport(order = 33)
@ApiOperation(value = "忽略参数值-Form类型")
@PostMapping("/ex")
public Rest<LongUser> findAll(LongUser longUser) {
Rest<LongUser> r=new Rest<>();
r.setData(longUser);
return r;
}

Knife4j通过Spring Plugin插件体系,对每个接口进行扫描,最终将扫描的@ApiOperationSupport注解获取的order值通过OpenAPI的扩展属性规范进行赋值

最终在OpenAPI的规范中,接口的path节点下,通过x-order属性得到接口的排序,最终前端根据排序值进行排序(顺序),如下图:

开发者如果遇到排序不生效的问题,可以通过检查接口返回的OpenAPI规范中,接口path节点下是否包含x-order的扩展属性

springdoc-openapi版本适配

开发者使用Knife4j针对springdoc-openapi版本的情况下,必须使用Knife4j 版本>=4.1.0版本,这里会有几个注意事项:

1、开发者如果自己通过springdoc-openapi的情况下设置了排序,代码如下:

springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
# 该参数是swagger默认的排序规则,如果设置为alpha,那么Knife4j提供的按照order排序的增强规则不生效
operations-sorter: alpha

2、修改配置

springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
# 使用增强order属性进行排序,或者不设置该参数
operations-sorter: order

knife4j-gateway版本聚合的order不生效

在目前knife4j提供的gateway网关聚合组件中,也会出现order排序不生效的问题

主要原因是在Knife4j网关服务端代码中,将分组的接口排序规则硬编码了,代码如下:

knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java

public class OpenAPI3Response implements Serializable {

/**
* ConfigUrl,eg: /v3/api-docs/swagger-config
*/
private String configUrl;
/**
* oauth2RedirectUrl,eg : http://192.168.10.103:17812/swagger-ui/oauth2-redirect.html
*/
private String oauth2RedirectUrl;

/**
* operation接口排序规则
*/
private String operationsSorter = "alpha";

/**
* tag排序规则,此处硬编码导致排序order不生效
*/
private String tagsSorter = "alpha";

// other....

}

这个在未来4.2.0版本中会修复该问题

临时的解决办法(投机取巧),按当前knife4j的一样的包路径,在项目代码中重写该实体类,修改为如下:

knife4j-gateway-spring-boot-starter/com/github/xiaoymin/knife4j/spring/gateway/spec/v3/OpenAPI3Response.java

public class OpenAPI3Response implements Serializable {

/**
* ConfigUrl,eg: /v3/api-docs/swagger-config
*/
private String configUrl;
/**
* oauth2RedirectUrl,eg : http://192.168.10.103:17812/swagger-ui/oauth2-redirect.html
*/
private String oauth2RedirectUrl;

/**
* operation接口排序规则
*/
private String operationsSorter = "alpha";

/**
* 修改为order
*/
private String tagsSorter = "order";

// other....

}

完整实体类代码参考OpenAPI3Response.java

+ + diff --git a/knife4j-doc/gitee/docs/features/author.html b/knife4j-doc/gitee/docs/features/author.html index 25afb7295..15fec493b 100644 --- a/knife4j-doc/gitee/docs/features/author.html +++ b/knife4j-doc/gitee/docs/features/author.html @@ -10,26 +10,26 @@ - -3.3 接口添加作者 | Knife4j - - +3.3 接口添加作者 | Knife4j + +
-

3.3 接口添加作者

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.7开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

有时候在开发接口时,我们希望给该接口添加一个作者,这样前端或者别个团队来对接该接口时,如果该接口返回的数据或者调用有问题,都能准确找到该人,提升效率

添加作者需要使用knife4j提供的增强注解@ApiOperationSupport

接口代码示例如下:

@ApiOperationSupport(author = "xiaoymin@foxmail.com")
@ApiOperation(value = "写文档注释我是认真的")
@GetMapping("/getRealDoc")
public Rest<RealDescription> getRealDoc(){
Rest<RealDescription> r=new Rest<>();
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
r.setData(new RealDescription());
return r;
}

在文档中显示效果如下:

在2.0.3版本中,收到开发者反馈希望能在Controller上增加作者的注解

所代表的意思是该Controller模块下所有的接口都是该作者负责开发,当然用@ApiOperationSupport的注解也能覆盖

因此,在2.0.3版本中新增加了@ApiSupport注解,该注解目前有两个属性,分别是author(作者)和order(排序)

使用代码示例:

@Api(tags = "2.0.3版本-20200312")
@ApiSupport(author = "xiaoymin@foxmail.com",order = 284)
@RestController
@RequestMapping("/api/nxew203")
public class Api203Constroller {


}

在文档中显示效果如下:

开发者如果遇到排序不生效的问题,可以通过检查接口返回的OpenAPI规范中,分组path节点下是否包含x-author的扩展属性

+ + diff --git a/knife4j-doc/gitee/docs/features/clearCache.html b/knife4j-doc/gitee/docs/features/clearCache.html index 216cd064f..3662aa841 100644 --- a/knife4j-doc/gitee/docs/features/clearCache.html +++ b/knife4j-doc/gitee/docs/features/clearCache.html @@ -10,26 +10,26 @@ - -3.14 清除缓存 | Knife4j - - +3.14 清除缓存 | Knife4j + +
-

3.14 清除缓存

温馨提醒

knife4j 版本>2.0.1 使用此规则

在文档升级、或者产生一些莫名其妙的问题时,大家可以点击文档右上角的清除缓存操作,如下图

Knife4j的缓存全部存储在浏览器中的IndexedDB中,所以,通过浏览器的强制刷新等操作是无法起到清理缓存的作用的

缓存位置如下图:

你也可以手工删除该缓存值,然后再刷新Knife4j的文档查看文档效果

+ + diff --git a/knife4j-doc/gitee/docs/features/customFooter.html b/knife4j-doc/gitee/docs/features/customFooter.html index 344512157..5fdb7e555 100644 --- a/knife4j-doc/gitee/docs/features/customFooter.html +++ b/knife4j-doc/gitee/docs/features/customFooter.html @@ -10,26 +10,26 @@ - -3.24 自定义Footer | Knife4j - - +3.24 自定义Footer | Knife4j + +
-

3.24 自定义Footer

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.8开始

knife4j:
enable: true

Knife4j自2.0.8版本开始,开发者可以底部Footer的内容,可以更改为与本公司或者该产品相关的介绍信息,通过配置yml来进行开启,配置文件如下

knife4j:
enable: true
setting:
enable-footer: false
enable-footer-custom: true
footer-custom-content: Apache License 2.0 | Copyright 2019-[浙江八一菜刀研究基地](https://gitee.com/xiaoym/knife4j)

属性说明:

  • enable-footer: 禁用默认的Footer显示,如果要自定义的话该属性必须设置为false,否则不会生效
  • enable-footer-custom:该属性为Boolean值,默认false,如果开发者要自定义Footer内容,该选项设置为true
  • footer-custom-content: 最终在Ui界面底部显示的Footer内容,支持Markdown格式
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildSettingExtensions());
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildSettingExtensions方法,获取x-settings的增强属性

最终界面效果如下:

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-openapi属性,代表增加的扩展自定义属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/customHome.html b/knife4j-doc/gitee/docs/features/customHome.html index 209ffa203..a223226a1 100644 --- a/knife4j-doc/gitee/docs/features/customHome.html +++ b/knife4j-doc/gitee/docs/features/customHome.html @@ -10,26 +10,26 @@ - -3.23 自定义主页内容 | Knife4j - - +3.23 自定义主页内容 | Knife4j + +
-

3.23 自定义主页内容

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.8开始

knife4j:
enable: true

Knife4j自2.0.8版本开始,开发者可以提供一个Markdown文件来自定义显示Home主页的显示内容,通过配置yml来进行开启,配置文件如下

knife4j:
enable: true
setting:
enable-home-custom: true
# 自4.1.0版本开始,该属性过时,请使用下面home-custom-path属性
home-custom-location: classpath:markdown/home.md
# 自4.1.0版本开始,替代home-custom-location属性,开发者请使用该配置
home-custom-path: classpath:markdown/home.md

属性说明:

  • enable-home-custom:该属性为Boolean值,默认false,如果开发者要自定义主页内容,该选项设置为true
  • home-custom-location:提供一个主页的Markdown文件位置
  • home-custom-path:提供一个主页的Markdown文件位置
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildSettingExtensions());
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildSettingExtensions方法,获取x-settings的增强属性

最终界面效果如下:

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-openapi属性,代表增加的扩展自定义属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/dynamicRequestDescription.html b/knife4j-doc/gitee/docs/features/dynamicRequestDescription.html index b189765dd..83c6cd8d4 100644 --- a/knife4j-doc/gitee/docs/features/dynamicRequestDescription.html +++ b/knife4j-doc/gitee/docs/features/dynamicRequestDescription.html @@ -10,26 +10,26 @@ - -3.15 动态请求参数添加文档注释 | Knife4j - - +3.15 动态请求参数添加文档注释 | Knife4j + +
-

3.15 动态请求参数添加文档注释

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.6开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

3、该特性自4.0版本后后续版本不在提供支持

在开发Knife4j的过程中,很多人询问能否提供动态的参数文档注释,因为大多数人在开发接口的时候使用的传递参数都是Map或者JSONObject这类参数

这类参数对于Swagger这种预先定义再渲染的框架来说是无法满足要求的,即接口文档中是无任何参数注释的,这对于接口对接的人来说很痛苦,因为对接接口的人并不知道需要传递那些参数

Knife4j提供了的对于动态参数的注释,使用增强注解@DynamicParameters进行说明,代码示例如下:

@PostMapping("/createOrder426")
@ApiOperation(value = "jdk-HashMap-动态创建显示参数-无@RequestBody")
@DynamicParameters(name = "CreateOrderHashMapModel",properties = {
@DynamicParameter(name = "",value = "注解id",example = "X000111",required = true,dataTypeClass = Integer.class),
@DynamicParameter(name = "name3",value = "订单编号-gson"),
@DynamicParameter(name = "name1",value = "订单编号1-gson"),
})
public Rest<HashMap> createOrder1235332(@RequestBody HashMap map){
Rest<HashMap> r=new Rest<>();
r.setData(map);
return r;
}

注解@DynamicParameters中有一个name属性,该值开发者可以理解为一个类名,如果你赋予name属性值,那么请保证全局唯一,或者干脆不赋值,交给Knife4j自动生成一个全局唯一的name值

目前针对动态请求参数只能做到简单的参数说明,对于数组、泛型等复杂的类型暂不提供支持。

提示

虽然Knife4j提供了这种功能,但作为作者我来说并不推荐使用该功能,主要有以下几个方面:

1、接口层提供Map这类动态参数,传递给Service层,代码可读性大大降低,时间长了后,作为写接口的你,再回头来看这段代码,你可能都想不起来需要传递那些字段属性,对于你的代码维护者来说,那就是更加痛苦了。

2、对于很多鄙视Swagger注解的人来说,这无疑是给人予口实,动态参数注解写了一大堆,从代码简洁程度来说不如一个实体类来的痛快

3、建议大家多多使用Java的一些特性,封装、继承等

以上仅仅是我的个人建议,仅供参考

+ + diff --git a/knife4j-doc/gitee/docs/features/dynamicRequestParameter.html b/knife4j-doc/gitee/docs/features/dynamicRequestParameter.html index 7c4e81f1f..e779cb3fe 100644 --- a/knife4j-doc/gitee/docs/features/dynamicRequestParameter.html +++ b/knife4j-doc/gitee/docs/features/dynamicRequestParameter.html @@ -10,26 +10,26 @@ - -3.9 动态请求参数 | Knife4j - - +3.9 动态请求参数 | Knife4j + +
-

3.9 动态请求参数

温馨提醒

knife4j 版本>2.0.1 使用此规则

在某些特定的情况下,因为我们对于接口使用的是一种先定义,后展示的规范执行,所以我们在界面上看到的请求参数,全部来源于我们后端接口层如何定义

但是如果后端定义的是一种Map结构,或者是参数并没有定义声明,而希望也能达到一种动态添加参数进行调试的结果,这种体验有点类似于postman

Knife4j针对上面的需求提供了支持

后台开启

开发者也可以通过开启Knife4j的增强配置,进行默认开启,配置如下:

knife4j:
enable: true
setting:
# 开启动态请求参数,true-开启,false-关闭
enable-dynamic-parameter: true

界面开启

Knife4j的前端页面中,个性化设置功能里,可以开启对参数的动态调试(该选项默认是关闭状态),如下图:

当在配置中勾选该选项后,我们的接口栏会有变化,如下图:

在原本已存在的参数栏下会出现一栏空的参数栏,开发者可以输入参数名称、参数值对参数进行添加

不管是参数名称的变化还是参数值的变化,变化后会自动追加一行新的调试栏参数,效果图如下:

+ + diff --git a/knife4j-doc/gitee/docs/features/dynamicResponseDescription.html b/knife4j-doc/gitee/docs/features/dynamicResponseDescription.html index 80f24f671..07bde6af2 100644 --- a/knife4j-doc/gitee/docs/features/dynamicResponseDescription.html +++ b/knife4j-doc/gitee/docs/features/dynamicResponseDescription.html @@ -10,26 +10,26 @@ - -3.16 动态响应参数添加文档注释 | Knife4j - - +3.16 动态响应参数添加文档注释 | Knife4j + +
-

3.16 动态响应参数添加文档注释

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.6开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

3、该特性自4.0版本后后续版本不在提供支持

动态响应参数其实和动态请求参数添加注释类似

同样使用Knife4j提供的增强注解@DynamicResponseParameters,代码示例如下:

@PostMapping("/createOrder426")
@ApiOperation(value = "jdk-HashMap-动态创建显示参数-无@RequestBody")
@DynamicResponseParameters(name = "CreateOrderHashMapModel",properties = {
@DynamicParameter(name = "",value = "注解id",example = "X000111",required = true,dataTypeClass = Integer.class),
@DynamicParameter(name = "name3",value = "订单编号-gson"),
@DynamicParameter(name = "name1",value = "订单编号1-gson"),
})
public Rest<HashMap> createOrder1235332(@RequestBody HashMap map){
Rest<HashMap> r=new Rest<>();
r.setData(map);
return r;
}

注解@DynamicResponseParameters中有一个name属性,该值开发者可以理解为一个类名,如果你赋予name属性值,那么请保证全局唯一,或者干脆不赋值,交给Knife4j自动生成一个全局唯一的name值

同样对于数组、泛型等复杂的类型暂不提供支持。

+ + diff --git a/knife4j-doc/gitee/docs/features/enhance.html b/knife4j-doc/gitee/docs/features/enhance.html index 8958efad8..85b29221c 100644 --- a/knife4j-doc/gitee/docs/features/enhance.html +++ b/knife4j-doc/gitee/docs/features/enhance.html @@ -10,26 +10,26 @@ - -3.1 增强模式 | Knife4j - - +3.1 增强模式 | Knife4j + +
-

3.1 增强模式

Knife4j自2.0.6版本开始,将目前在Ui界面中一些个性化配置剥离,开发者可以在后端进行配置,并且提供的knife4j-spring-boot-strater组件自动装载

spring.factories配置如下:

# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.github.xiaoymin.knife4j.spring.configuration.Knife4jAutoConfiguration

在Spring Boot配置文件中,完整的配置如下:

重要提示

Knife4j 自4.0版本,配置属性元数据全部改由spring-boot-configuration-processor自动生成,因此之前版本的驼峰命名全部修改成了横杠(-)代替

knife4j:
enable: true
documents:
-
group: 2.X版本
name: 接口签名
locations: classpath:sign/*
setting:
language: zh-CN
enable-swagger-models: true
enable-document-manage: true
swagger-model-name: 实体类列表
enable-version: false
enable-reload-cache-parameter: false
enable-after-script: true
enable-filter-multipart-api-method-type: POST
enable-filter-multipart-apis: false
enable-request-cache: true
enable-host: false
enable-host-text: 192.168.0.193:8000
enable-home-custom: true
home-custom-path: classpath:markdown/home.md
enable-search: false
enable-footer: false
enable-footer-custom: true
footer-custom-content: Apache License 2.0 | Copyright 2019-[浙江八一菜刀股份有限公司](https://gitee.com/xiaoym/knife4j)
enable-dynamic-parameter: false
enable-debug: true
enable-open-api: false
enable-group: true
cors: false
production: false
basic:
enable: false
username: test
password: 12313

在以前的版本中,开发者需要在配置文件中手动使用@EnableKnife4j来使用增强,自2.0.6版本后,只需要在配置文件中配置knife4j.enable=true即可不在使用注解

注意:要使用Knife4j提供的增强,knife4j.enable=true必须开启

各个配置属性说明如下:

属性默认值说明值
knife4j.enablefalse是否开启Knife4j增强模式
knife4j.corsfalse是否开启一个默认的跨域配置,该功能配合自定义Host使用
knife4j.productionfalse是否开启生产环境保护策略,详情参考文档
knife4j.basic对Knife4j提供的资源提供BasicHttp校验,保护文档
knife4j.basic.enablefalse关闭BasicHttp功能
knife4j.basic.usernamebasic用户名
knife4j.basic.passwordbasic密码
knife4j.documents自定义文档集合,该属性是数组
knife4j.documents.group所属分组
knife4j.documents.name类似于接口中的tag,对于自定义文档的分组
knife4j.documents.locationsmarkdown文件路径,可以是一个文件夹(classpath:markdowns/*),也可以是单个文件(classpath:md/sign.md)
knife4j.setting前端Ui的个性化配置属性
knife4j.setting.enable-after-scripttrue调试Tab是否显示AfterScript功能,默认开启
knife4j.setting.languagezh-CNUi默认显示语言,目前主要有两种:中文(zh-CN)、英文(en-US)
knife4j.setting.enable-swagger-modelstrue是否显示界面中SwaggerModel功能
knife4j.setting.swagger-model-nameSwagger Models重命名SwaggerModel名称,默认
knife4j.setting.enable-document-managetrue是否显示界面中"文档管理"功能
knife4j.setting.enable-reload-cache-parameterfalse是否在每个Debug调试栏后显示刷新变量按钮,默认不显示
knife4j.setting.enable-versionfalse是否开启界面中对某接口的版本控制,如果开启,后端变化后Ui界面会存在小蓝点
knife4j.setting.enable-request-cachetrue是否开启请求参数缓存
knife4j.setting.enable-filter-multipart-apisfalse针对RequestMapping的接口请求类型,在不指定参数类型的情况下,如果不过滤,默认会显示7个类型的接口地址参数,如果开启此配置,默认展示一个Post类型的接口地址
knife4j.setting.enable-filter-multipart-api-method-typePOST具体接口的过滤类型
knife4j.setting.enable-hostfalse是否启用Host
knife4j.setting.enable-host-textfalseHOST地址
knife4j.setting.enable-home-customfalse是否开启自定义主页内容
knife4j.setting.home-custom-path主页内容Markdown文件路径
knife4j.setting.enable-searchfalse是否禁用Ui界面中的搜索框
knife4j.setting.enable-footertrue是否显示Footer
knife4j.setting.enable-footer-customfalse是否开启自定义Footer
knife4j.setting.footer-custom-contentfalse自定义Footer内容
knife4j.setting.enable-dynamic-parameterfalse是否开启动态参数调试功能
knife4j.setting.enable-debugtrue启用调试
knife4j.setting.enable-open-apitrue显示OpenAPI规范
knife4j.setting.enable-grouptrue显示服务分组
重要提示

Knife4j 自4.0版本,下面的配置在knife4j-openapi2-spring-boot-starter中仍然需要如此配置,而在knife4j-openapi3-spring-boot-starterknife4j-openapi3-jakarta-spring-boot-starter则不需要!!!

关于个性化文档(knife4j.documents)以及个性化设置(knife4j.setting),有一些细微的区别,开发者在配置文件中进行配合好后,还需要在创建Docket对象时调用Knife4j提供的扩展Extesions进行赋值

示例代码如下:

@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

/*引入Knife4j提供的扩展类*/
private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
//赋予插件体系
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

buildExtensions方法需要传入分组名称,该分组名称主要是为了区分开发者在构建自定义文档时,在不同的Docket逻辑分组下进行区别显示。

OpenApiExtensionResolver辅助类需要配置knife4j.enable=true才能自动@Autowired

增强效果开启后,在最终调用接口时,Knife4j会添加扩展属性x-openapi,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/exportDocument.html b/knife4j-doc/gitee/docs/features/exportDocument.html index 1713aedfa..d27d333eb 100644 --- a/knife4j-doc/gitee/docs/features/exportDocument.html +++ b/knife4j-doc/gitee/docs/features/exportDocument.html @@ -10,26 +10,26 @@ - -3.10 导出离线文档 | Knife4j - - +3.10 导出离线文档 | Knife4j + +
-

3.10 导出离线文档

温馨提醒

knife4j 版本>2.0.1 使用此规则,离线文档导出功能目前暂时未提供导出PDF,推荐大家使用一款MD的渲染软件(Typora)进行导出

在以前的开发人员使用Swagger的时候,希望Swagger能够导出一份精细的文档,不管是集成何种方式,使用方法都是比较繁琐的,而且导出的文档效果也不尽如人意

为了解决这个问题,Knife4j在前端界面直接集成了两种导出Swagger文档的方式,主要是导出Markdown和离线Html

对于使用者来说,能把过程简单化是最好的,而Knfie4j提供的导出功能就是如此简单

在前端Ui界面中的文档管理 => 离线文档 菜单栏,我们点击后可以看到如下界面:

特别说明:

  • markdown:导出当前逻辑分组下所有接口的Markdown格式的文档
  • Html:导出当前逻辑分组下所有接口的Html格式的文档
  • Word:导出当前逻辑分组下所有接口的Word格式的文档(自2.0.5版本开始)
  • OpenAPI:导出当前逻辑分组下的原始OpenAPI的规范json结构(自2.0.6版本开始)
  • PDF:未实现

直接点击下载Markdown,Knife4j就会为我们生成一份精细的MD文档,效果图如下:

导出的Html效果,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/filterRequestParameter.html b/knife4j-doc/gitee/docs/features/filterRequestParameter.html index bf8032b8e..c17aa08dc 100644 --- a/knife4j-doc/gitee/docs/features/filterRequestParameter.html +++ b/knife4j-doc/gitee/docs/features/filterRequestParameter.html @@ -10,26 +10,26 @@ - -3.11 过滤请求参数 | Knife4j - - +3.11 过滤请求参数 | Knife4j + +
-

3.11 过滤请求参数

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.6开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

3、该特性自4.0版本后后续版本不在提供支持

通常我们在开发接口时,比如一个新增接口和一个修改接口,修改接口需要传递主键id、而新增接口则不需要传递此属性,但大部分情况,我们只写一个Model类,此时在新增接口时显示主键id会显得很多余.

使用自定义增强注解ApiOperationSupport中的ignoreParameters属性,可以强制忽略要显示的参数.

忽略的规则如下:

  • 例如新增接口时,某实体类不需要显示Id,即可使用该属性对参数进行忽略.ignoreParameters={"id"}
  • 如果存在多个层次的参数过滤,则使用名称.属性的方式,例如 ignoreParameters={"uptModel.id","uptModel.uptPo.id"},其中uptModel是实体对象参数名称,id为其属性,uptPo为实体类,作为uptModel类的属性名称
  • 如果参数层级只是一级的情况下,并且参数是实体类的情况下,不需要设置参数名称,直接给定属性值名称即可
  • 如果实体类属性中是通过List这种数组的方式,那么过滤规则会有所不同,在属性后面需要追加一个下标[0]ignoreParameters={"uptModel.uptPo[0].id"}

在接口过滤时,主要有两种情况

3.11.1 表单参数

我们在使用实体类直接作为参数时,在我们的ui界面中是不会显示参数名称的,此时可以直接使用实体的属性名称进行参数忽略,例如如下代码:

表单类型的请求是不需要添加参数名的

@ApiOperation(value = "新增Model接口1")
@ApiOperationSupport(ignoreParameters = {"id","orderDate.id"})
@PostMapping("/insertMode1l")
public Rest<UptModel> insertModel1(UptModel uptModel){
Rest<UptModel> r =new Rest<>();
r.setData(uptModel);
return r;
}

实体类UptModel.java文件代码

public class UptModel {

@ApiModelProperty(value = "主键id")
private String id;

@ApiModelProperty(value = "姓名")
private String name;

@ApiModelProperty(value = "邮箱")
private String email;

@ApiModelProperty(value = "订单信息")
private OrderDate orderDate;
}

此时,最终过过滤掉UptModel的属性id和属性orderDate类中的id属性,不在界面显示.

3.11.2 JSON参数

如果请求参数是使用JSON的方式

代码如下:

@ApiOperation(value = "新增Model接口")
@ApiOperationSupport(ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"})
@PostMapping("/insertModel")
public Rest<UptModel> insertModel(@RequestBody UptModel uptModel){
Rest<UptModel> r =new Rest<>();
r.setData(uptModel);
return r;
}

此时如果要过滤id的话,需要指定带上参数名称uptModel

最终忽略的值为ignoreParameters = {"uptModel.id","uptModel.name","uptModel.orderDate.id"}

+ + diff --git a/knife4j-doc/gitee/docs/features/forbidDebug.html b/knife4j-doc/gitee/docs/features/forbidDebug.html index 437767840..a45fb1748 100644 --- a/knife4j-doc/gitee/docs/features/forbidDebug.html +++ b/knife4j-doc/gitee/docs/features/forbidDebug.html @@ -10,26 +10,26 @@ - -3.26 禁用调试 | Knife4j - - +3.26 禁用调试 | Knife4j + +
-

3.26 禁用调试

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.8开始

knife4j:
enable: true

在以前的版本中,开发者如果要禁用调试功能,是通过在服务端创建UiConfiguration的实体Bean对象,配置supportMethod来达到禁用部分接口的调试,自2.0.8版本后,该属性被废弃

开发者如果想要禁用调试功能,需要通过增强属性进行配置,在yml配置如下:

knife4j:
enable: true
setting:
enable-debug: false

属性说明:

  • enable-debug:该属性是一个Boolean值,代表是否启用调试功能,默认值为true(代表开启调试),如果要禁用调试,该值设为false
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildSettingExtensions());
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildSettingExtensions方法,获取x-settings的增强属性

最终界面效果如下:

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-openapi属性,代表增加的扩展自定义属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/forbidOpenApi.html b/knife4j-doc/gitee/docs/features/forbidOpenApi.html index e1f9fd79b..5bfd28132 100644 --- a/knife4j-doc/gitee/docs/features/forbidOpenApi.html +++ b/knife4j-doc/gitee/docs/features/forbidOpenApi.html @@ -10,26 +10,26 @@ - -3.28 禁用OpenApi结构显示 | Knife4j - - +3.28 禁用OpenApi结构显示 | Knife4j + +
-

3.28 禁用OpenApi结构显示

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.8开始

knife4j:
enable: true

开发者如果想要禁用Ui界面中的OpenAPI功能,需要通过增强属性进行配置(需要注意的是如果开发者直接禁用调试,那么OpenAPI默认也是不显示的),在yml配置如下:

knife4j:
enable: true
setting:
enable-open-api: false

属性说明:

  • enable-open-api:该属性是一个Boolean值,代表是否启用OpenAPI功能,默认值为true(代表开启OpenAPI显示),如果要禁用OpenAPI显示,该值设为false
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildSettingExtensions());
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildSettingExtensions方法,获取x-settings的增强属性

最终界面效果如下:

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-openapi属性,代表增加的扩展自定义属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/forbidSearch.html b/knife4j-doc/gitee/docs/features/forbidSearch.html index d251a975f..66c11baf5 100644 --- a/knife4j-doc/gitee/docs/features/forbidSearch.html +++ b/knife4j-doc/gitee/docs/features/forbidSearch.html @@ -10,26 +10,26 @@ - -3.27 禁用搜索框 | Knife4j - - +3.27 禁用搜索框 | Knife4j + +
-

3.27 禁用搜索框

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.8开始

knife4j:
enable: true

开发者如果想要禁用Ui界面中的搜索功能,需要通过增强属性进行配置,在yml配置如下:

knife4j:
enable: true
setting:
enable-search: false

属性说明:

  • enable-search:该属性是一个Boolean值,代表是否启用搜索功能,默认值为true(代表开启搜索),如果要禁用搜索,该值设为false
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildSettingExtensions());
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildSettingExtensions方法,获取x-settings的增强属性

最终界面效果如下:

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-openapi属性,代表增加的扩展自定义属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/gitVersion.html b/knife4j-doc/gitee/docs/features/gitVersion.html index c7d64ea05..66e861ab1 100644 --- a/knife4j-doc/gitee/docs/features/gitVersion.html +++ b/knife4j-doc/gitee/docs/features/gitVersion.html @@ -10,26 +10,26 @@ - -3.29 版本控制 | Knife4j - - +3.29 版本控制 | Knife4j + +
-

3.29 版本控制

knife4j 使用浏览器的localStorage对象,提供了一个细微的版本控制功能,主要体现在如下两个方面:

  • 后端新增接口是识别出变化
  • 后端接口信息变更是会识别出接口变更

knife4j 判断新接口的依据:接口地址+接口请求类型(POST|GET|PUT...)

而任何元素的变更,包括参数类型、接口说明、响应参数等等元素的变更,knife4j 都能识别出接口的变化,并通过icon图表(new)的方式在接口文档中展示出来

对接接口的开发者只需要刷新当前文档页就能看到后端接口是否新增或修改.

效果图:

+ + diff --git a/knife4j-doc/gitee/docs/features/globalParameter.html b/knife4j-doc/gitee/docs/features/globalParameter.html index def3f9660..c7c0264aa 100644 --- a/knife4j-doc/gitee/docs/features/globalParameter.html +++ b/knife4j-doc/gitee/docs/features/globalParameter.html @@ -10,26 +10,26 @@ - -3.21 全局参数 | Knife4j - - +3.21 全局参数 | Knife4j + +
-

3.21 全局参数

Knife4j提供基于UI临时设置全局参数功能,例如后台全局token参数等.提供该功能主要是方便开发者进行调试

目前全局参数功能主要提供两种参数类型:query(表单)、header(请求头)

如果后端Swagger有配置全局参数,该功能可以无视

功能目录:文档管理 -> 全局参数设置

+ + diff --git a/knife4j-doc/gitee/docs/features/host.html b/knife4j-doc/gitee/docs/features/host.html index e7d057541..803d723ec 100644 --- a/knife4j-doc/gitee/docs/features/host.html +++ b/knife4j-doc/gitee/docs/features/host.html @@ -10,26 +10,26 @@ - -3.17 自定义Host | Knife4j - - +3.17 自定义Host | Knife4j + +
-

3.17 自定义Host

在Knife4j的2.0.4版本新增该功能,新增Host的个性化配置也是方便开发或调试人员在Swagger文档部署后,针对不同的网络环境,可以通过配置该属性,方便的进行调试.

3.17.1 前置条件

要在Knife4j使用此属性,服务端必须开启跨域配置,如果你的工程是Spring Boot,示例代码如下:

@Bean
public CorsFilter corsFilter(){
//针对CorsFilter详细的用法,不同的Spring Boot可能配置不太一样,建议开发者跟踪源码查看具体的使用方式
// 此处代码仅给出示例参考
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration corsConfiguration=new CorsConfiguration();
corsConfiguration.setAllowCredentials(true);
corsConfiguration.addAllowedOrigin("*");
corsConfiguration.addAllowedHeader("*");
corsConfiguration.addAllowedMethod("*");
corsConfiguration.setMaxAge(10000L);
source.registerCorsConfiguration("/**",corsConfiguration);
CorsFilter corsFilter=new CorsFilter(source);
return corsFilter;
}

以上代码在Knife4j中已经内置,如果开发者嫌弃每个项目都需要配置很麻烦,可以通过在application.yml配置文件通过配置进行开启使用,配置如下:

当然,开发者也可以在后端控制文档语言呈现方式(自2.0.6版本开始)

yml配置如下:

knife4j:
enable: true
setting:
# 是否启用Host
enable-host: false
# 启用Host后地址,例如:http://192.168.0.111:8080
enable-host-text: ""
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

在配置文件中进行配置后,还需要在创建Docket对象时,通过调用Knife4j提供的工具对象OpenApiExtensionResolver提供一个OpenAPI的扩展属性结构

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildExtensions方法,该方法需要一个逻辑分组名称,就是开发者在yml配置文件中配置的group名称

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-setting属性,代表增加的扩展自定义文档属性,最终在Ui界面解析呈现,结构如下图:

一般Spring Boot的单体架构可以使用此方式进行开启Cors的跨域配置,但是如果你的服务是走网关的形式,那么必须在网关层进行开启,网关层的形式会有所不同

Spring Cloud Gateway为例,该网关底层是基于Netty,并非是Servlet架构,所以需要使用网关自带的WebFilter进行开启,否则在前端到请求服务时,数据可以流入,但是在网关层时会无法响应数据,出现Access-Control-Allow-Origin等错误

3.17.2 配置形式

Host的配置可以有多种形式,举例如下:

1、ip+port的形式,例如192.169.0.111:8080

2、HTTP/HTTPS+ip+port的形式,例如:http://192.168.0.111:8080或者https://192.168.0.111:8080

3、域名的方式,例如:knife4j.xiaominfo.com

4、HTTP/HTTPS+域名,例如:http://knife4j.xiaominfo.com或者https://knife4j.xiaominfo.com

5、除了配置域名或者ip地址外,在Host后还可以跟随basePath,例如:http://192.168.0.111:8080/v1

如果当前配置的Host不包含Protocol,默认为HTTP

3.17.3 原理

使用该Host后,Knife4j会在发送接口调试时校验是否启用,其原理是在通过调用axios组件时,配置其baseURL属性

伪代码如下:

var baseUrl='';//默认是空
//是否启用Host
if(this.enableHost){
baseUrl=this.enableHostText;
}
var requestConfig={
baseURL:baseUrl,//调用目标Host服务的接口
url: url,
method: methodType,
headers: headers,
params: formParams,
data: data,
//Cookie标志
withCredentials:this.debugSendHasCookie(headers),
timeout: 0
}
+ + diff --git a/knife4j-doc/gitee/docs/features/i18n.html b/knife4j-doc/gitee/docs/features/i18n.html index b9ee62a26..c2e17f8f6 100644 --- a/knife4j-doc/gitee/docs/features/i18n.html +++ b/knife4j-doc/gitee/docs/features/i18n.html @@ -10,27 +10,27 @@ - -3.2 i18n国际化 | Knife4j - - +3.2 i18n国际化 | Knife4j + +
-

3.2 i18n国际化

在Knife4j 2.0.3版本提供了i18n的支持,目前支持的语言主要包含2种:中文(zh-CN)、英文(en-US)。Knife4j默认是中文

那么,如何使用呢?

3.2.1 文档中选择

通过访问doc.html打开文档界面,可以在文档的右上角看到语言的选择,如下图:

直接选择相应的语言版本即可

3.2.2 通过文档地址直接默认i18n

Knife4j也提供了通过地址栏直接将文档显示为指定的语言显示

访问地址规则:

  • 中文:http://host:port/doc.html#/home/zh-CN
  • 英文:http://host:port/doc.html#/home/en-US

另外,如果你是使用了knife4j提供的增强功能,你也可以这样访问

  • 中文:http://host:port/doc.html#/plus/zh-CN
  • 英文:http://host:port/doc.html#/plus/en-US

3.2.3 服务端yml配置设定

当然,开发者也可以在后端控制文档语言呈现方式(自2.0.6版本开始)

yml配置如下:

knife4j:
enable: true
setting:
# Knife4j默认显示中文(zh-CN),如果开发者想直接显示英文(en-US),在通过该配置进行设置即可
language: zh-CN

在配置文件中进行配置后,还需要在创建Docket对象时,通过调用Knife4j提供的工具对象OpenApiExtensionResolver提供一个OpenAPI的扩展属性结构

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildExtensions方法,该方法需要一个逻辑分组名称,就是开发者在yml配置文件中配置的group名称

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-setting属性,代表增加的扩展自定义文档属性,最终在Ui界面解析呈现,结构如下图:

3.2.4 接口、注释、参数全部i18n

如果开发者继续使用的是OpenAPI2规范,自Knife4j 4.0版本,提供了针对接口、参数注释等全部i18n的处理方案

1、引用的starter必须是knfie4j-openapi2-spring-boot-starter组件,openapi3没有此功能 +2、示例代码参考knife4j-spring-boot27-demo

第一步,配置开启Spring Boot 框架的i18n功能,增加i18n的配置属性,配置如下:


spring:
messages:
basename: i18n/message
encoding: utf-8
cache-duration: 3600

第二步,配置新增i18n的配置文件,在src/main/resources目录下,新建i18n/message文件夹,如下图:

第三步,修改代码中的注释配置,代码如下:



@ApiOperation(value = "API_JOB_I18n",notes = "API_JOB_I18n_DESC")
@PostMapping("/hidden3")
public ResponseEntity<ModelUser> i18n3(@RequestBody ModelUser sysUser){
return ResponseEntity.ok(sysUser);
}

第四步,设置Knife4j提供的增强配置,开发者自行选择是中文还是英文,配置如下:


knife4j:
enable: true
setting:
# Knife4j默认显示中文(zh-CN),如果开发者想直接显示英文(en-US),在通过该配置进行设置即可
language: zh-CN
+ + diff --git a/knife4j-doc/gitee/docs/features/includeRequestParameter.html b/knife4j-doc/gitee/docs/features/includeRequestParameter.html index a9bf40abb..2087bdf16 100644 --- a/knife4j-doc/gitee/docs/features/includeRequestParameter.html +++ b/knife4j-doc/gitee/docs/features/includeRequestParameter.html @@ -10,26 +10,26 @@ - -3.12 包含请求参数 | Knife4j - - +3.12 包含请求参数 | Knife4j + +
-

3.12 包含请求参数

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.6开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

3、该特性自4.0版本后后续版本不在提供支持

在实际开发中,Knife4j提供了忽略参数的特性,这帮助开发者在某些场景中大大提高文档的可变性操作

但有时候需要忽略的参数太多时,我们需要写很多的忽略参数属性,此时,一个与忽略参数对立取反的特性就显得很有帮助了

使用自定义增强注解ApiOperationSupport中的includeParameters属性,可以强制包含要显示的参数.去除多余的参数显示

include的规则如下:

  • 例如新增接口时,某实体类不需要显示Id,即可使用该属性对参数进行忽略.includeParameters={"id"}
  • 如果存在多个层次的参数包含关系,则使用名称.属性的方式,例如 includeParameters={"uptModel.id","uptModel.uptPo.id"},其中uptModel是实体对象参数名称,id为其属性,uptPo为实体类,作为uptModel类的属性名称
  • 一般是form表单类的请求,不需要设置参数名称,直接给定属性值名称即可

3.12.1 表单请求

简单请求比较简单,一般以formdata或者x-www-form-urlencoded类型的请求居多,针对这种请求的参数包含关系,我们在开发中只需要直接写上相应的属性名称即可

代码示例如下:

@ApiOperationSupport(order = 40,includeParameters = {"ignoreLabels","longUser.ids"})
@ApiOperation(value = "包含参数值-Form类型1")
@PostMapping("/ex1c")
public Rest<IgnoreP1> findAllc12(IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}

IgnoreP1.java如下:

public class IgnoreP1 {
@ApiModelProperty(value = "姓名a啊",example = "你好")
private String name;

@ApiModelProperty(value = "用户列表")
private LongUser longUser;

@ApiModelProperty(value = "标签集合")
private List<IgnoreLabel> ignoreLabels;
//getter and setter...

}

3.12.2 JSON请求

JSON请求相比较简单请求有一个区别,需要把一级参数名称带上

代码示例如下:

@ApiOperationSupport(order = 42,includeParameters = {"ignoreP1.ignoreLabels.code","ignoreP1.longUser.ids"})
@ApiOperation(value = "包含参数值-JSON类型1")
@PostMapping("/exc3")
public Rest<IgnoreP1> findAllc3(@RequestBody IgnoreP1 ignoreP1) {
Rest<IgnoreP1> r=new Rest<>();
r.setData(ignoreP1);
return r;
}

在上面的代码示例中,是一个标准的JSON请求应用,ignoreP1就是参数名称,在包含该JSON下的某些属性时,必须在includeParameters属性中指明

例如:ignoreP1.longUser.ids

+ + diff --git a/knife4j-doc/gitee/docs/features/jsr303.html b/knife4j-doc/gitee/docs/features/jsr303.html index 4de621180..846b53fbf 100644 --- a/knife4j-doc/gitee/docs/features/jsr303.html +++ b/knife4j-doc/gitee/docs/features/jsr303.html @@ -10,26 +10,26 @@ - -3.25 JSR303 | Knife4j - - +3.25 JSR303 | Knife4j + +
-

3.25 JSR303

JSR303规范注解在目前的Knife4j界面中做的比较隐晦,主要是考虑到并没有一个好的交互方式进行呈现,开发者可以通过在接口文档的请求参数栏进行查看

在接口文档的请求参数中,针对每个参数的数据类型,如果该参数包含JSR303注解规范,则会以下滑曲线的方式呈现,效果如下图:

开发者如果要使用JSR303注解,需要在创建Swagger的配置文件中导入springfox的关于JSR303的配置文件,如下:

@Configuration
@EnableSwagger2WebMvc
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {
//more...
}

BeanValidatorPluginsConfiguration是核心,Springfox项目主要是通过spring-plugin插件体系对JSR303提供支持,而BeanValidatorPluginsConfiguration配置文件则是将和JSR303相关的实体Plugin实现注入到Spring的容器中

代码如下:

@Configuration
public class BeanValidatorPluginsConfiguration {

@Bean
public ExpandedParameterMinMaxAnnotationPlugin expanderMinMax() {
return new ExpandedParameterMinMaxAnnotationPlugin();
}

@Bean
public ExpandedParameterNotNullAnnotationPlugin expanderNotNull() {
return new ExpandedParameterNotNullAnnotationPlugin();
}

@Bean
public ExpandedParameterNotBlankAnnotationPlugin expanderNotBlank() {
return new ExpandedParameterNotBlankAnnotationPlugin();
}

@Bean
public ExpandedParameterPatternAnnotationPlugin expanderPattern() {
return new ExpandedParameterPatternAnnotationPlugin();
}

@Bean
public ExpandedParameterSizeAnnotationPlugin expanderSize() {
return new ExpandedParameterSizeAnnotationPlugin();
}

@Bean
public springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin parameterMinMax() {
return new springfox.bean.validators.plugins.parameter.MinMaxAnnotationPlugin();
}

@Bean
public springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin parameterNotNull() {
return new springfox.bean.validators.plugins.parameter.NotNullAnnotationPlugin();
}

@Bean
public springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin parameterNotBlank() {
return new springfox.bean.validators.plugins.parameter.NotBlankAnnotationPlugin();
}

@Bean
public springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin parameterPattern() {
return new springfox.bean.validators.plugins.parameter.PatternAnnotationPlugin();
}

@Bean
public springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin parameterSize() {
return new springfox.bean.validators.plugins.parameter.SizeAnnotationPlugin();
}

@Bean
public MinMaxAnnotationPlugin minMaxPlugin() {
return new MinMaxAnnotationPlugin();
}

@Bean
public DecimalMinMaxAnnotationPlugin decimalMinMaxPlugin() {
return new DecimalMinMaxAnnotationPlugin();
}

@Bean
public SizeAnnotationPlugin sizePlugin() {
return new SizeAnnotationPlugin();
}

@Bean
public NotNullAnnotationPlugin notNullPlugin() {
return new NotNullAnnotationPlugin();
}

@Bean
public NotBlankAnnotationPlugin notBlankPlugin() {
return new NotBlankAnnotationPlugin();
}

@Bean
public PatternAnnotationPlugin patternPlugin() {
return new PatternAnnotationPlugin();
}
}

+ + diff --git a/knife4j-doc/gitee/docs/features/oauth2.html b/knife4j-doc/gitee/docs/features/oauth2.html index 1f11dfd9e..997d1164e 100644 --- a/knife4j-doc/gitee/docs/features/oauth2.html +++ b/knife4j-doc/gitee/docs/features/oauth2.html @@ -10,26 +10,26 @@ - -3.19 OAuth2 | Knife4j - - +3.19 OAuth2 | Knife4j + +
-

3.19 OAuth2

Knife4j提供的OAuth2认证功能相对于原生SwaggerUi来说使用起来更加方便,因此也归为增强属性一类。至少从交互上而言。

Knife4j自2.0.6版本开始添加对OAuth2的认证支持

目前支持的OAuth2模式包括:简化模式(implicit)、授权码模式(authorization_code)、密码模式(password)、客户端模式(client_credentials)

3.19.1 简化模式(implicit)

简化模式(implicit)在Knife4j中界面显示效果如下(点击左侧菜单Authorize查看):

简化模式(implicit)需要配置Knife4j提供的OAuth2的回调地址,回调页面位于knife4j-spring-ui.jar

资源目录:webjars/oauth/oauth2.html

因此,需要在服务端配置该回调地址,Spring Security OAuth2示例代码如下:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//简化模式(implicit)
clients.inMemory()
.withClient("app1").secret("123")
.authorizedGrantTypes("implicit")
.redirectUris(\"http://192.168.1.10:8080/webjars/oauth/oauth2.html")
.scopes("read","write","reads","writes");
}

界面效果如下:

使用者直接输入clientId,点击授权,此时进行调整授权界面,开发者授权即可

注意:当点击按钮Authorize授权后,如果授权成功,接下来点击其余的接口进行调试时,在请求头会存在参数Authorization,如何在未授权之前打开了接口,则需要在授权后关闭该接口的Tab,然后重新打开

创建Swagger的授权配置示例代码:

点击查看代码
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//简单模式implicit
ImplicitGrant implicitGrant=new ImplicitGrant(new LoginEndpoint("http://localhost:8999/oauth/authorize"),"access_token");
grantTypes.add(implicitGrant);

OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read all resources"));
SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(CollectionUtil.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=CollectionUtil.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=CollectionUtil.newArrayList(securityContext);

String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts).securitySchemes(securitySchemes);
return docket;
}

3.19.2 授权码模式(authorization_code)

授权码模式(authorization_code)在Knife4j中界面显示效果如下(点击左侧菜单Authorize查看):

授权码模式(authorization_code)需要配置Knife4j提供的OAuth2的回调地址,回调页面位于knife4j-spring-ui.jar

资源目录:webjars/oauth/oauth2.html

因此,需要在服务端配置该回调地址,Spring Security OAuth2示例代码如下:

@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
//授权码模式(authorization code)
clients.inMemory()
.withClient("app1").secret("123")
.authorizedGrantTypes("authorization_code")
.redirectUris(\"http://192.168.1.10:8080/webjars/oauth/oauth2.html")
.scopes("read","write","reads","writes");
}

界面效果如下:

使用者直接输入clientIdclientSecret后,点击授权,此时进行调整授权界面,开发者授权即可

注意:当点击按钮Authorize授权后,如果授权成功,接下来点击其余的接口进行调试时,在请求头会存在参数Authorization,如何在未授权之前打开了接口,则需要在授权后关闭该接口的Tab,然后重新打开

创建Swagger的授权配置示例代码:

点击查看代码
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//授权码模式AuthorizationCodeGrant
TokenRequestEndpoint tokenRequestEndpoint=new TokenRequestEndpoint("http://localhost:8999/oauth/authorize","app1","123");
TokenEndpoint tokenEndpoint=new TokenEndpoint("http://192.168.1.10:8080/oauth/token","access_token");
AuthorizationCodeGrant authorizationCodeGrant=new AuthorizationCodeGrant(tokenRequestEndpoint,tokenEndpoint);
grantTypes.add(authorizationCodeGrant);

OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read all resources"));
SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(CollectionUtil.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=CollectionUtil.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=CollectionUtil.newArrayList(securityContext);

String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts).securitySchemes(securitySchemes);
return docket;
}

3.19.3 客户端模式(client_credentials)

客户端模式(client_credentials)在Knife4j中界面显示效果如下(点击左侧菜单Authorize查看):

界面效果如下:

使用者直接输入clientIdclientSecret后,点击授权即可

注意:当点击按钮Authorize授权后,如果授权成功,接下来点击其余的接口进行调试时,在请求头会存在参数Authorization,如何在未授权之前打开了接口,则需要在授权后关闭该接口的Tab,然后重新打开

创建Swagger的授权配置示例代码:

点击查看代码
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//客户端模式(client credentials)
String clientTokenUrl="http://192.168.1.10:8080/oauth/token";
ClientCredentialsGrant clientCredentialsGrant=new ClientCredentialsGrant(clientTokenUrl);
grantTypes.add(clientCredentialsGrant);


OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read all resources"));
SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(CollectionUtil.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=CollectionUtil.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=CollectionUtil.newArrayList(securityContext);

String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts).securitySchemes(securitySchemes);
return docket;
}

3.19.4 密码模式(password)

密码模式(password)在Knife4j中界面显示效果如下(点击左侧菜单Authorize查看):

界面效果如下:

使用者直接输入username,password,clientIdclientSecret后,点击授权即可

注意:当点击按钮Authorize授权后,如果授权成功,接下来点击其余的接口进行调试时,在请求头会存在参数Authorization,如何在未授权之前打开了接口,则需要在授权后关闭该接口的Tab,然后重新打开

创建Swagger的授权配置示例代码:

点击查看代码
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
//schema
List<GrantType> grantTypes=new ArrayList<>();
//密码模式
String passwordTokenUrl="http://192.168.1.10:8080/oauth/token";
ResourceOwnerPasswordCredentialsGrant resourceOwnerPasswordCredentialsGrant=new ResourceOwnerPasswordCredentialsGrant(passwordTokenUrl);
grantTypes.add(resourceOwnerPasswordCredentialsGrant);

OAuth oAuth=new OAuthBuilder().name("oauth2")
.grantTypes(grantTypes).build();
//context
//scope方位
List<AuthorizationScope> scopes=new ArrayList<>();
scopes.add(new AuthorizationScope("read","read all resources"));
SecurityReference securityReference=new SecurityReference("oauth2",scopes.toArray(new AuthorizationScope[]{}));
SecurityContext securityContext=new SecurityContext(CollectionUtil.newArrayList(securityReference),PathSelectors.ant("/api/**"));
//schemas
List<SecurityScheme> securitySchemes=CollectionUtil.newArrayList(oAuth);
//securyContext
List<SecurityContext> securityContexts=CollectionUtil.newArrayList(securityContext);

String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.securityContexts(securityContexts).securitySchemes(securitySchemes);
return docket;
}
+ + diff --git a/knife4j-doc/gitee/docs/features/postman.html b/knife4j-doc/gitee/docs/features/postman.html index 6cfe974f6..dc88baaca 100644 --- a/knife4j-doc/gitee/docs/features/postman.html +++ b/knife4j-doc/gitee/docs/features/postman.html @@ -10,26 +10,26 @@ - -3.20 导出Postman | Knife4j - - +3.20 导出Postman | Knife4j + +
-

3.20 导出Postman

Knife4j自2.0.6版本开始,在每个接口的详情界面,除了一开始的文档调试两个Tab选项卡功能,增加了Open选项卡,该选项卡主要是将当前接口的OpenAPI规范结构展示,效果图如下:

开发者可以直接点击界面中的复制按钮,将该接口复制导入到POSTMAN工具中进行调试

+ + diff --git a/knife4j-doc/gitee/docs/features/requestCache.html b/knife4j-doc/gitee/docs/features/requestCache.html index 877c50823..f736d9bfa 100644 --- a/knife4j-doc/gitee/docs/features/requestCache.html +++ b/knife4j-doc/gitee/docs/features/requestCache.html @@ -10,26 +10,26 @@ - -3.8 请求参数缓存 | Knife4j - - +3.8 请求参数缓存 | Knife4j + +
-

3.8 请求参数缓存

在默认情况下,在接口调试的情况下,Knifetj对于接口的请求参数都会缓存起来,该配置可以在前端界面中的个性化设置中看到,如下图:

如果你不喜欢在调试的时候对参数进行缓存,可以在个性化设置中将该选项取消

缓存的情况只会在后端没有给属性example的情况下产生,如果后端在写Swagger的注解的时候,给每个字段赋予了example的值,那么,Knife4j不会使用调试时缓存的值,而是会一直使用后端的example值

例如后端Java实体类如下情况:

public class SwaggerRequestBody{

@ApiModelProperty(value="姓名",example="张飞")
private String name;

//more...
}

对于上面的代码示例,Knife4j在每一次打开该接口的请求参数值,其默认值都是张飞

以下情况会在第二次请求的情况下启用上一次调试时填的缓存值

public class SwaggerRequestBody{

@ApiModelProperty(value="姓名")
private String name;

//more...
}

这种情况在ui界面不会出现默认值,所以当开发者在调试的时候,填了name属性的值后,Knife4j就会将该值缓存起来,方便下次调试调用.

当然,开发者也可以在后端控制文档的接口调试功能,针对请求后的参数是否需要缓存(自2.0.6版本开始)

yml配置如下:

knife4j:
enable: true
setting:
# 对于调试中的请求参数是否缓存进行开启配置,该参数默认为true
enable-request-cache: true
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

在配置文件中进行配置后,还需要在创建Docket对象时,通过调用Knife4j提供的工具对象OpenApiExtensionResolver提供一个OpenAPI的扩展属性结构

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildExtensions方法,该方法需要一个逻辑分组名称,就是开发者在yml配置文件中配置的group名称

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-setting属性,代表增加的扩展自定义文档属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/search.html b/knife4j-doc/gitee/docs/features/search.html index 61f2d4e71..1498f4fa6 100644 --- a/knife4j-doc/gitee/docs/features/search.html +++ b/knife4j-doc/gitee/docs/features/search.html @@ -10,26 +10,26 @@ - -3.13 搜索API接口 | Knife4j - - +3.13 搜索API接口 | Knife4j + +
-

3.13 搜索API接口

温馨提醒

knife4j 版本>2.0.1 使用此规则

在文档的右上角,Knife4j提供了文档检索的功能,如下图:

针对文档检索,主要有一些注意点

1、检索的纬度有哪些?

目前Knife4j提供的检索的功能主要包括,接口的地址、接口名称、接口描述

提示

目前检索功能仅对当前分组下的已经加载的接口有效,对于分组中的接口,没有加载的情况下是搜索不到的,这点需要注意,换句话说该检索功能并非是全局检索,只对当前你看到的整体所有接口列表进行检索

+ + diff --git a/knife4j-doc/gitee/docs/features/selfdocument.html b/knife4j-doc/gitee/docs/features/selfdocument.html index f095b03dc..4c42afece 100644 --- a/knife4j-doc/gitee/docs/features/selfdocument.html +++ b/knife4j-doc/gitee/docs/features/selfdocument.html @@ -10,26 +10,26 @@ - -3.4 自定义文档 | Knife4j - - +3.4 自定义文档 | Knife4j + +
-

3.4 自定义文档

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.7开始

knife4j:
enable: true

Knife4j为了满足文档的个性化配置,添加了自定义文档功能,自定义文档功能能丰富接口文档,在OpenAPI不足以满足接口说明的情况下,开发者通过Knife4j提供的自定义文档功能能够把接口文档更清晰的描述。开发者自定义.md文件扩展补充整个系统的文档说明

开发者可以在当前项目中添加多个个文件夹,文件夹中存放.md格式的markdown文件,每个.md文档代表一份自定义文档说明

注意:自定义文档说明必须以.md结尾的文件,其他格式文件会被忽略

例如项目结构如下:

每个.md文件中,Knife4j允许一级(h1)、二级(h2)、三级(h3)标题作为最终的文档标题

比如api.md文档:

# 自定义文档说明

## 效果说明

`knife4j`为了满足文档的个性化配置,添加了自定义文档功能

开发者可自定义`md`文件扩展补充整个系统的文档说明

开发者可以在当前项目中添加一个文件夹,文件夹中存放`.md`格式的markdown文件,每个`.md`文档代表一份自定义文档说明

**注意**:自定义文档说明必须以`.md`结尾的文件,其他格式文件会被忽略

最终在Knife4j的界面中,api.md的文档标题会是自定义文档说明

整个文档效果如下:

如果没有按照一级(h1)、二级(h2)、三级(h3)来设置标题,默认标题会是文件名称,如图上的api2.md

如何使用

在Spring Boot环境中,首先需要在application.yml或者application.properties配置文件中配置自定义文档目录,支持多级目录

如下:

knife4j:
enable: true
documents:
-
group: 1.2.x
name: 测试自定义标题分组
# 某一个文件夹下所有的.md文件
locations: classpath:markdown/*
-
group: 1.2.x
name: 接口签名
# 某一个文件夹下单个.md文件
locations: classpath:markdown/sign.md

在配置knife4j.documents中,该属性是一个集合数组,代表开发者可以添加多个自定义文档分组,因为我们在最终呈现接口文档时,会存在逻辑分组的情况,有时候我们希望不同的逻辑分组下显示不同的逻辑分组文档,所以需要通过该节点下的group(分组名称)进行区分

相关属性说明如下:

属性名称是否必须说明
grouptrue逻辑分组名称,最终在逻辑分组时该属性需要传入
nametrue自定义文档的分组名称,可以理解为开发者存在多个自定义文档,最终在Ui界面呈现时的一个分组名称
locationtrue提供自定义.md文件的路径或者文件
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildExtensions方法,该方法需要一个逻辑分组名称,就是开发者在yml配置文件中配置的group名称

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-markdownFiles属性,代表增加的扩展自定义文档属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/springSecurity.html b/knife4j-doc/gitee/docs/features/springSecurity.html index 92e9b7938..2239ffe28 100644 --- a/knife4j-doc/gitee/docs/features/springSecurity.html +++ b/knife4j-doc/gitee/docs/features/springSecurity.html @@ -10,16 +10,15 @@ - -3.30 Spring Security注解 | Knife4j - - +3.30 Spring Security注解 | Knife4j + +
-

3.30 Spring Security注解

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自4.0.0开始

knife4j:
enable: true

Knife4j为了满足权限验证将Spring Security的PostAuthorizePostFilterPreAuthorizePreFilter的注解信息追加到接口描述中

代码展示

@RestController
@RequestMapping("/hello")
@PostAuthorize("hasAuthority('class')")
@PostFilter("hasAuthority('class')")
@PreAuthorize("hasAuthority('class')")
@PreFilter("hasAuthority('class')")
public class HelloController {

@GetMapping("/security")
@PostAuthorize("hasAuthority('method')")
@PostFilter("hasAuthority('method')")
@PreAuthorize("hasAuthority('method')")
@PreFilter("hasAuthority('method')")
@ApiOperation(value = "", notes = "Spring Security注解追加到接口描述")
public String security() {
return "hello security";
}
}
- - +

3.30 Spring Security注解

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自4.0.0开始

knife4j:
enable: true

Knife4j为了满足权限验证将Spring Security的PostAuthorizePostFilterPreAuthorizePreFilter的注解信息追加到接口描述中

代码展示

@RestController
@RequestMapping("/hello")
@PostAuthorize("hasAuthority('class')")
@PostFilter("hasAuthority('class')")
@PreAuthorize("hasAuthority('class')")
@PreFilter("hasAuthority('class')")
public class HelloController {

@GetMapping("/security")
@PostAuthorize("hasAuthority('method')")
@PostFilter("hasAuthority('method')")
@PreAuthorize("hasAuthority('method')")
@PreFilter("hasAuthority('method')")
@ApiOperation(value = "", notes = "Spring Security注解追加到接口描述")
public String security() {
return "hello security";
}
}
+ + diff --git a/knife4j-doc/gitee/docs/features/swaggermodels.html b/knife4j-doc/gitee/docs/features/swaggermodels.html index 6a89155ab..d4f1fa883 100644 --- a/knife4j-doc/gitee/docs/features/swaggermodels.html +++ b/knife4j-doc/gitee/docs/features/swaggermodels.html @@ -10,26 +10,26 @@ - -3.22 自定义Swagger Models名称 | Knife4j - - +3.22 自定义Swagger Models名称 | Knife4j + +
-

3.22 自定义Swagger Models名称

温馨提醒

增强功能需要通过配置yml配置文件开启增强,自2.0.7开始

knife4j:
enable: true

Knife4j在Ui菜单层提供的OpenAPI规范中的模型结构菜单名称Swagger Models,对于接口文档展示的效果来说,可能很多人并不知道其具体所代表的含义,因此自2.0.7版本开始,开发者可以自定义该名称的显示

如何使用

在Spring Boot环境中,首先需要在application.yml或者application.properties配置文件中配置自定义名称

如下:

knife4j:
enable: true
setting:
enable-swagger-models: true
swagger-model-name: 我是自定义的Model名称
重要提醒

自Knife4j 4.0版本开始,下面的配置在使用knife4j-openapi2-spring-boot-starter组件时才需要,而使用knife4j-openapi3-spring-boot-starter或者knife4j-openapi3-jakarta-spring-boot-starter组件则不需要!!!,开发者需要注意。

开发者配置好后,最核心的一步,也是最后最重要的一步,开发者需要在创建Docket逻辑分组对象时,通过Knife4j提供的工具对象OpenApiExtensionResolver将扩展属性进行赋值

示例代码如下:

点击查看代码
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfiguration {

private final OpenApiExtensionResolver openApiExtensionResolver;

@Autowired
public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
this.openApiExtensionResolver = openApiExtensionResolver;
}

@Bean(value = "defaultApi2")
public Docket defaultApi2() {
String groupName="2.X版本";
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.host("https://www.baidu.com")
.apiInfo(apiInfo())
.groupName(groupName)
.select()
.apis(RequestHandlerSelectors.basePackage("com.swagger.bootstrap.ui.demo.new2"))
.paths(PathSelectors.any())
.build()
.extensions(openApiExtensionResolver.buildExtensions(groupName));
return docket;
}

private ApiInfo apiInfo() {
return new ApiInfoBuilder()
//.title("swagger-bootstrap-ui-demo RESTful APIs")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact("xx@qq.com")
.version("1.0")
.build();
}
}

通过上面示例代码,主要步骤如下:

1、通过@Autowired注解引入Knife4j向Spring容器注入的Bean对象OpenApiExtensionResolver

2、最终在Dcoket对象构建后,通过调用Docket对象的extensions方法进行插件赋值

3、插件赋值需要调用OpenApiExtensionResolver提供的buildExtensions方法,该方法需要一个逻辑分组名称,就是开发者在yml配置文件中配置的group名称

提示

为什么需要这么做?这样做的目的一方面是充分利用Spring Boot提供的配置方式,方便开发者自定义配置属性,另一方面,通过扩展OpenAPI的规范属性,也更加符合OpenAPI对于扩展属性的要求

OpenAPI规范明确规定,对于扩展属性,开发者应当在响应的某个节点中,增加x-开头的属性方式,以扩展自定义的属性配置

自定义文档的扩展属性,开发者可以通过浏览器的Network功能查看OpenAPI的结构,最终Knife4j扩展增加x-markdownFiles属性,代表增加的扩展自定义文档属性,最终在Ui界面解析呈现,结构如下图:

+ + diff --git a/knife4j-doc/gitee/docs/features/tagSort.html b/knife4j-doc/gitee/docs/features/tagSort.html index c8c31b6fb..ad81e6454 100644 --- a/knife4j-doc/gitee/docs/features/tagSort.html +++ b/knife4j-doc/gitee/docs/features/tagSort.html @@ -10,26 +10,26 @@ - -3.7 分组排序 | Knife4j - - +3.7 分组排序 | Knife4j + +
-

3.7 分组排序

温馨提醒

1、增强功能需要通过配置yml配置文件开启增强,自2.0.7开始

knife4j:
enable: true

2、自Knife4j 4.0版本,开发者必须使用knife4j-openapi2-spring-boot-starter组件才生效

Controller之间的排序主要有两种方式,排序的规则是倒序,但是排序的最小值必须大于0

建议优先级是:@ApiSupport>@ApiSort>@Api

对于最高级别的值,可以从999开始

@ApiSupport注解自2.0.3版本引入

第一种,使用@ApiSupport注解中的属性order,代码示例如下:

@Api(tags = "2.0.3版本-20200312")
@ApiSupport(order = 284)
@RestController
@RequestMapping("/api/nxew203")
public class Api203Constroller {


}

第二种情况,使用knife4j提供的增强注解@ApiSort,代码示例如下:

@Api(tags = "2.0.2版本-20200226")
@ApiSort(286)
@RestController
@RequestMapping("/api/nxew202")
public class Api202Controller {


}

第三种,使用注解@Api中的属性position(需要注意的是该属性以及过时,建议开发者使用第一种),代码示例如下:

@Api(tags = "2.0.2版本-20200226",position = 286)
@RestController
@RequestMapping("/api/nxew202")
public class Api202Controller {


}

接口排序规则一样,Knife4j也是通过Spring Plugin插件化的方式,扫描接口注解,最终通过扩展OpenAPI的扩展属性x-order进行赋值,最终在Ui界面中解析,然后再进行排序后渲染组件

最终在OpenAPI的结构如下:

开发者如果遇到排序不生效的问题,可以通过检查接口返回的OpenAPI规范中,分组tag节点下是否包含x-order的扩展属性

+ + diff --git a/knife4j-doc/gitee/docs/introduction.html b/knife4j-doc/gitee/docs/introduction.html index 21bc5610f..c9e98850f 100644 --- a/knife4j-doc/gitee/docs/introduction.html +++ b/knife4j-doc/gitee/docs/introduction.html @@ -10,26 +10,26 @@ - -介绍 | Knife4j - - +介绍 | Knife4j + +
-

介绍

Knife4j的前身是swagger-bootstrap-ui,前身swagger-bootstrap-ui是一个纯swagger-uiui皮肤项目

一开始项目初衷是为了写一个增强版本的swagger的前端ui,但是随着项目的发展,面对越来越多的个性化需求,不得不编写后端Java代码以满足新的需求,在swagger-bootstrap-ui的1.8.5~1.9.6版本之间,采用的是后端Java代码和Ui都混合在一个Jar包里面的方式提供给开发者使用.这种方式虽说对于集成swagger来说很方便,只需要引入jar包即可,但是在微服务架构下显得有些臃肿。

因此,项目正式更名为knife4j,取名knife4j是希望她能像一把匕首一样小巧,轻量,并且功能强悍,更名也是希望把她做成一个为Swagger接口文档服务的通用性解决方案,不仅仅只是专注于前端Ui前端.

swagger-bootstrap-ui的所有特性都会集中在knife4j-spring-ui包中,并且后续也会满足开发者更多的个性化需求.

主要的变化是,项目的相关类包路径更换为com.github.xiaoymin.knife4j前缀,开发者使用增强注解时需要替换包路径

后端Java代码和ui包分离为多个模块的jar包,以面对在目前微服务架构下,更加方便的使用增强文档注解(使用SpringCloud微服务项目,只需要在网关层集成UI的jar包即可,因此分离前后端)

knife4j沿用swagger-bootstrap-ui的版本号,第1个版本从1.9.6开始,关于使用方法,请参考文档

+ + diff --git a/knife4j-doc/gitee/docs/introduction/gvp.html b/knife4j-doc/gitee/docs/introduction/gvp.html index ec66bcf42..00c3ad8e1 100644 --- a/knife4j-doc/gitee/docs/introduction/gvp.html +++ b/knife4j-doc/gitee/docs/introduction/gvp.html @@ -10,26 +10,26 @@ - -GVP申请 | Knife4j - - +GVP申请 | Knife4j + +

GVP申请

Knife4j在2020年3月24日收到码云的官方邮件,审核通过,成为码云的GVP(码云最有价值开源项目)项目

这是Knife4j自2017年开源维护至今收到的最大肯定.

+ + diff --git a/knife4j-doc/gitee/docs/introduction/introduction-background.html b/knife4j-doc/gitee/docs/introduction/introduction-background.html index d6eb83da1..fadf97da1 100644 --- a/knife4j-doc/gitee/docs/introduction/introduction-background.html +++ b/knife4j-doc/gitee/docs/introduction/introduction-background.html @@ -10,26 +10,26 @@ - -项目背景 | Knife4j - - +项目背景 | Knife4j + +
-

项目背景

概是在2017年4月份,我们团队整个开发方式都决定使用前后端分离的方式来合作开发,前后端分离当时整个技术方案也是由我来负责整理,探索,如何让整个团队更高效的开发,完成自己的本职工作.从一开始的jsonp,到后面nginx反向代理,这里面我也收获了很多东西,也写了一些相关的博客总结,

但最让人头疼的还是前后端如何针对接口来对接,当时找了很多解决方案,一开始使用的是叫apidocs的,有些类似于写java的注释,使用起来还是不错的,不过没有在线生成的,文档写完后需要单独命令来生成一个文档,挺麻烦,后来就放弃了

最终就考虑使用Swagger来做文档的这块,但Swagger大家都知道,Swagger的ui虽然能把文档说清楚,但是不怎么好用,可能不适合我们国人的眼光吧,至少我是这么认为的,所以当时也就想看看Swagger的生成方式,Knife4j的前身swagger-bootstrap-ui就因此诞生了

这里谈谈swagger,虽然很多人喷他,不好用,基于注解,代码入侵很强,等等 很多原因。但总体来看,swagger发展至今,包括在各个语言,NodeJs.netjavaphp等等,它可以说是一个有些接口规范的东西,从开始,到一步步规范,其实是一个很艰难的过程,任何事物,都不是尽善尽美的,swagger也是一样,至少它给这么多语言提供了一种文档生成的解决方案,其价值就远超它本身的缺点

在Java里面,是Springfox实现了swagger的接口方式(Spring框架几乎统一了Java端Web层框架的实现),其他语言也类似.

我一直觉得如果前面有人开发出来这个东西,而且用户范围,稳定性都相对较高的情况下,这个东西一定是有他的意义存在的,站在巨人的肩膀上,做正确的事,一直是我认为符合实际情况的,起码你不用自己填坑,因为,做开源,一个想法在当时,可能比较新颖,关注度很高,但是我想,大部分人都逃离不了惰性,缺少的是持之以恒,特别是在中国,很多开源其实都是个人在做(包括目前的Knife4j),意识上,相对国外还是比较薄弱的,而且还有精力,锲而不舍的精神,任重而道远矣~!

但随着项目的发展,仅仅一个swagger-bootstrap-ui皮肤已经不能满足开发者的需求,需要增加更多的服务端代码来满足开发者的需求,所以,作者决定从更名开始,一个新的名字也代表着进入新纪元,Knife4j正式走上了开发者的视野。

所以,Knife4j不仅仅将前身的Ui皮肤通过Vue技术栈进行了重写,也增加了更多个性化的特性增强功能,基于springfox项目以及OpenAPI的规范,希望为Swagger的生态发展做一份贡献。

Knife4j开源至今也有三年半有余了,为自己一直坚持下来打call,也会一直坚持下去,继续维护它,东西虽小,但坚持下去总会有收获.

+ + diff --git a/knife4j-doc/gitee/docs/introduction/milestone.html b/knife4j-doc/gitee/docs/introduction/milestone.html index 2358120db..9bc3be7ea 100644 --- a/knife4j-doc/gitee/docs/introduction/milestone.html +++ b/knife4j-doc/gitee/docs/introduction/milestone.html @@ -10,26 +10,26 @@ - -发展大事记 | Knife4j - - +发展大事记 | Knife4j + +
-

发展大事记

Knife4j主要发展里程碑事件:

2022年

  • 2022.12.20 Knife4j 4.0版本正式发布!!!
  • 2022.8.20 Knife4j 官网文档新版发布上线,新功能,新特性,也是新起点.
  • 2022.8.6 Knife4j 4.0迭代计划呼之欲出,未来我们将拥抱变化,重新出发~!

2021年

  • 2021.6.28 Knife4j 2.0.9稳定版本发布,解决issues 150+

2020年

  • 2020.12.29 独立渲染OpenAPI中间件Knife4j-Aggregation-Desktop诞生发布.
  • 2020.11.23 轻量级微服务聚合文档中间件Knife4j-aggregation诞生发布
  • 2020.5.20 生态组件Knife4j-admin v1.0发布,任意聚合Swagger文档
  • 2020.3.24 Knife4j获得开源中国Gitee官方认证,成为码云的GVP(码云最有价值开源项目)项目

2019 年

  • 2019.12.16 项目更名为Knife4j,发布基于Vue+Antdv的2.0重构版本
  • 2019.8.29 swagger-bootstrap-ui 发布1.9.6稳定版本,也是最后一个基于jQuery的版本
  • 2019.5.20 发布基于Chrome浏览器的离线插件swagger-bootstrap-ui-extension

2018年

  • 2018.7.16 swagger-bootstrap-ui 1.7.5版本发布,Ui重大升级

2017年

  • 2017.9.1 swagger-bootstrap-ui 1.5版本发布,上传Maven中央仓库,正式走上持续开源迭代之路.
  • 2017.4.19 开源写下第一行代码,项目取名swagger-bootstrap-ui
+ + diff --git a/knife4j-doc/gitee/docs/introduction/support.html b/knife4j-doc/gitee/docs/introduction/support.html index 2ffc7f641..e3a267b61 100644 --- a/knife4j-doc/gitee/docs/introduction/support.html +++ b/knife4j-doc/gitee/docs/introduction/support.html @@ -10,26 +10,26 @@ - -支持用户 | Knife4j - - +支持用户 | Knife4j + +
-

支持用户

目前主要支持以Java开发为主,并且是依赖于大环境下使用的Spring MVCSpring BootSpring Cloud框架.

当然,Knife4j也提供了离线版本,只要是符合Swagger的OpenAPI版本的规范JSON,都可以通过简单的配置进行适配,离线版本是适合于任何语言中使用Swagger的,非常的灵活、方便。

+ + diff --git a/knife4j-doc/gitee/docs/introduction/ui.html b/knife4j-doc/gitee/docs/introduction/ui.html index 63b7238e8..2b08872c7 100644 --- a/knife4j-doc/gitee/docs/introduction/ui.html +++ b/knife4j-doc/gitee/docs/introduction/ui.html @@ -10,27 +10,27 @@ - -界面赏鉴 | Knife4j - - +界面赏鉴 | Knife4j + +
-

界面赏鉴

Knife4j采用Vue+And Design Vue组件重写,相关功能界面如下,供大家赏鉴:

12 +接口文档显示界面如下:

接口调试界面如下:

Swagger Models功能

支持导出离线Markdown、Html功能,markdown的表格较原先版本通过缩减显示为树形结构,点击预览导出离线Html效果,效果图如下:

通过第三方Markdown软件导出的PDF效果如下图:

同时提供了导出离线Html功能,Html功能界面风格和在线几乎没有区别,美观、大方、简洁,点击在线预览效果

界面效果如下图:

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources.html b/knife4j-doc/gitee/docs/middleware-sources.html index a48a0b106..e2e8e7bb3 100644 --- a/knife4j-doc/gitee/docs/middleware-sources.html +++ b/knife4j-doc/gitee/docs/middleware-sources.html @@ -10,26 +10,26 @@ - -中间件介绍 | Knife4j - - +中间件介绍 | Knife4j + +
-

中间件介绍

温馨提醒

1、🔥 Spring Cloud Gateway网关场景下的聚合,强烈推荐使用knife4j-Gateway组件

2、🔥 Knife4j独立运行组件Knife4jInsight强制发布,渲染OpenAPI规范就用Knife4j,详见文档

Knife4jInsight视频介绍

温馨提醒

以下视频为Knife4jInsight 1.0(原名:Knife4jAggregationDesktop)发布的使用视频,在发布Knife4j 4.0版本时,作者重构了该组件,目前没有最新视频,开发者可以参考使用文档

第一篇 Knife4jAggregationDesktop介绍

第二篇 Knige4jAggregationDesktiop安装和使用说明

第三篇 Knife4jAggregationDesktop使用-Disk模式

第四篇 Knife4jAggregationDesktop使用-Cloud模式

第五篇 Knife4jAggregationDesktop使用-Eureka模式

第六篇 Knife4jAggregationDesktop使用-Nacos模式

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/aggregation-cloud.html b/knife4j-doc/gitee/docs/middleware-sources/aggregation-cloud.html index dcb48a8b4..0a8ac010f 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/aggregation-cloud.html +++ b/knife4j-doc/gitee/docs/middleware-sources/aggregation-cloud.html @@ -10,26 +10,26 @@ - -1.3 Cloud模式 | Knife4j - - +1.3 Cloud模式 | Knife4j + +
-

1.3 Cloud模式

更加详细的实战demo请参考基于Cloud模式聚合OpenAPI

取名Cloud模式代表的是开发者的OpenAPI规范是以HTTP接口的形式存在,开发者可以配置通过调用HTTP接口来获取OpenAPI规范

knife4j:
enable-aggregation: true
cloud:
enable: true
routes:
- name: 用户体系
uri: 192.168.0.152:8999
location: /v2/api-docs?group=2.X版本
  • knife4j.cloud.enable:将该属性设置为true,则代表启用Cloud模式
  • knife4j.cloud.route-auth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的HTTP接口需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.cloud.route-auth.enable:是否启用Basic验证
  • knife4j.cloud.route-auth.usernae:Basic用户名
  • knife4j.cloud.route-auth.password:Basic密码
  • knife4j.cloud.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.cloud.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.cloud.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.cloud.routes.location::具体资源接口地址,最终Knife4j是通过uri+location的组合路径进行访问
  • knife4j.cloud.routes.swagger-version:版本号,默认是2.0,可选配置
  • knife4j.cloud.routes.service-path:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/aggregation-disk.html b/knife4j-doc/gitee/docs/middleware-sources/aggregation-disk.html index 9af973092..a499132c8 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/aggregation-disk.html +++ b/knife4j-doc/gitee/docs/middleware-sources/aggregation-disk.html @@ -10,26 +10,26 @@ - -1.2 Disk模式 | Knife4j - - +1.2 Disk模式 | Knife4j + +
-

1.2 Disk模式

更加详细的实战demo请参考基于Disk模式聚合OpenAPI

Disk模式即代表你拥有OpenAPI规范的静态JSON文件,那么可以考虑使用Knife4jAggregation组件进行聚合展示,目前只支持JSON文件的格式

Disk模式的配置如下:

knife4j:
enable-aggregation: true
disk:
enable: true
routes:
- name: 用户
location: classpath:openapi/user.json
  • knife4j.disk.enable:将该属性设置为true,则代表启用Disk模式
  • knife4j.disk.routes:需要聚合的服务集合,可以配置多个
  • knife4j.disk.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.disk.routes.location:本地Disk模式聚合的OpenAPI规范JSON文件,可以是V2也可以是V3版本
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/aggregation-eureka.html b/knife4j-doc/gitee/docs/middleware-sources/aggregation-eureka.html index 837b9d6c8..7bfc410fd 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/aggregation-eureka.html +++ b/knife4j-doc/gitee/docs/middleware-sources/aggregation-eureka.html @@ -10,27 +10,27 @@ - -1.4 Eureka模式 | Knife4j - - +1.4 Eureka模式 | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/aggregation-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/aggregation-introduction.html index 1cf3036d7..515cd6e1d 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/aggregation-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/aggregation-introduction.html @@ -10,27 +10,27 @@ - -1.1 介绍 | Knife4j - - +1.1 介绍 | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/aggregation-nacos.html b/knife4j-doc/gitee/docs/middleware-sources/aggregation-nacos.html index 71db853cf..606684351 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/aggregation-nacos.html +++ b/knife4j-doc/gitee/docs/middleware-sources/aggregation-nacos.html @@ -10,27 +10,27 @@ - -1.5 Nacos模式 | Knife4j - - +1.5 Nacos模式 | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/cloud-function.html b/knife4j-doc/gitee/docs/middleware-sources/cloud-function.html index fb31308cb..d239b85ed 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/cloud-function.html +++ b/knife4j-doc/gitee/docs/middleware-sources/cloud-function.html @@ -10,16 +10,15 @@ - -3.2 功能介绍 | Knife4j - - +3.2 功能介绍 | Knife4j + +
-

3.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

3.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

3.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

3.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

3.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

3.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

3.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

- - +

3.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

3.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

3.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

3.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

3.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

3.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

3.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/cloud-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/cloud-introduction.html index 2a50dbd26..6f0a9fe4f 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/cloud-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/cloud-introduction.html @@ -10,16 +10,15 @@ - -3.1 介绍 | Knife4j - - +3.1 介绍 | Knife4j + +
-

3.1 介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

- - +

3.1 介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/cloud-openapi.html b/knife4j-doc/gitee/docs/middleware-sources/cloud-openapi.html index f5d0ef0be..c041a4e1a 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/cloud-openapi.html +++ b/knife4j-doc/gitee/docs/middleware-sources/cloud-openapi.html @@ -10,16 +10,15 @@ - -3.3 开放API | Knife4j - - +3.3 开放API | Knife4j + +
-

3.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

3.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

3.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}
- - +

3.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

3.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

3.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/cloud-use.html b/knife4j-doc/gitee/docs/middleware-sources/cloud-use.html index 11c5a8303..070dfb94d 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/cloud-use.html +++ b/knife4j-doc/gitee/docs/middleware-sources/cloud-use.html @@ -10,16 +10,15 @@ - -3.4 产品试用 | Knife4j - - +3.4 产品试用 | Knife4j + +
-
- - +
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-install.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-install.html index 84f8ebf4c..8bf224a57 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-install.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-install.html @@ -10,26 +10,26 @@ - -安装 | Knife4j - - +安装 | Knife4j + +
-

安装

注意事项

由于目前Knife4jInsight是以Docker的方式提供的服务,因此使用者在使用的时候有些事项还是需要注意,否则会导致一些问题发生

  • 不管是Disk模式还是Nacos模式,如果是配置使用通过HTTP接口获取OpenAPI数据的服务类型(Cloud/Nacos/Eureka模式),需要保证Docker容器内的网络能够互通进行访问
  • 如果是Nacos模式启动,注意启动参数knife4j.nacos.namespace的设定,要保持一致,否则会获取Nacos配置失败,导致聚合访问文档不成功
  • docker-compose.yml中的network_mode模式使用的是bridge,开发者根据自身情况自己选择即可
  • 如果聚合访问文档失败,可以查看程序logs日志,确定自己是否配置错误所导致,确认软件问题可以通过issues向作者反馈

自2.0版本开始,不在提供发行版文件包的方式进行安装运行,推荐使用docker-compose的方式。

Knife4jInsight组件自2.0版本开始,数据源开启支持配置中心中间件的模式,因此,相较于原1.0版本中只支持本地磁盘的方式,在使用上会有所不同,这取决于开发者自己选择。

目前的版本中,主要两种模式:

  • Disk本地磁盘:数据来源于本地磁盘,包括OpenAPI规范文件,或者所支持的集中模式配置文件
  • Nacos配置中心:数据来源于Nacos中间件上,使用者只需要将配置在Nacos上进行操作即可。

两种模式所分别对应docker-compose.yml配置有所不同。

模式类别

Disk本地磁盘

docker-compose.yml
# 通过docker-compose可以快速部署knife4j服务
version: "2.0"
services:
knife4j:
container_name: knife4j-insight
restart: always
image: "xiaoymin/knife4j:v2.0.1"
network_mode: "bridge"
# 本地磁盘目录映射
volumes:
- D:\Temp\data:/knife4j/data
ports:
- "10000:10000"
# 指定配置属性模式为disk本地磁盘
environment:
- knife4j.source=disk
- knife4j.disk.dir=/knife4j/data

开发者需注意,此处volumes挂载目录D:\Temp\data仅供参考使用

如目录不同,可自行创建,windows/linux均可。

详细说明请参考使用说明

Nacos配置中心

注意:Nacos推荐使用版本 >= 2.0

docker-compose.yml

# 通过docker-compose可以快速部署knife4j服务
version: "2.0"
services:
knife4j:
container_name: knife4j-insight-nacos
restart: always
# 访问
image: "xiaoymin/knife4j:v2.0.1"
network_mode: "bridge"
# 端口映射
ports:
- "10000:10000"
# 指定配置属性模式为Nacos配置中心
environment:
- knife4j.source=nacos
- knife4j.nacos.server=127.0.0.1:8848
- knife4j.nacos.username=nacos
- knife4j.nacos.password=nacos
# 使用者自行在所指定的nacos上创建 namespace 、dataid、group
- knife4j.nacos.namespace=knife4j
- knife4j.nacos.dataId=knife4j_data_id
- knife4j.nacos.group=DEFAULT_GROUP

详细说明请参考使用说明

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-introduction.html index ad5485ae4..c76acea88 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-introduction.html @@ -10,26 +10,26 @@ - -介绍 | Knife4j - - +介绍 | Knife4j + +
-

介绍

温馨提醒

1.0老版本请移步老的文档地址介绍

Knife4jInsight是一款致力于基于OpenAPI2及OpenAPI3规范进行聚合的独立中间件

Knife4j 4.0版本发布之际,作者也对该组件进行了了架构重新设计,代码重构。

并也发布了该独立中间件的2.0版本,基于Spring Boot 3.0版本进行开发。

主要功能作用及理念:

  • 独立部署(推荐使用docker-compose进行部署)
  • 延续Knife4jAggregation组件在Java生态中的四种(PS:后续可以扩展更多)支持的模式
  • 提供多配置中心中间件(目前暂支持Nacos)的支持,数据、功能独立分开
  • 动态配置、实时生效预览
  • 不同文档提供单独鉴权(该特性还待开发中...)

软件架构

软件架构图如下:

整个架构设计分层说明如下:

  • 第一层(Web):对外暴露接口文档层,限定只支持一级context-path目录,context-path名称由使用者自定义,该组件理论上支持N个项目的文档聚合展示。
  • 第二层(Security):提供对当前单个项目文档的鉴权,提供两种鉴权机制,一种是配置写死,另外一种可对接第三方自定义鉴权接口(需符合该组件定义的规范)
  • 第三层(Gateway):基于Knife4jInsight,用户在真实调试时,基于当前流行的HttpClient、OkHttp组件库,实现从web层到真实各子服务的请求代理转发.
  • 第四层(DataContext):数据层,该数据层是Knife4jInsight的数据来源,主要分两大类型:
    • 服务中心类型: 各个服务注册中心模式的解析,通过将服务中心注册的微服务进行聚合,其核心还是RESTFul API接口
    • 配置中心类型: Knife4jInsight支持的配置中心的类型,通过将数据源存放在配置中心中间件上,可以保证使用者灵活使用,目前暂支持了两种模式(本地磁盘(Disk)和Nacos)
  • 第五层(Base):基础设施层,代表了当前组件所支持的规范类型(OpenAPI2+OpenAPI3),当然,后续有新的规范,在时间允许的情况下,我们都可以进行扩展支持。

快速开始

以开发常用Windows系统为例,基于docker-compose快速拉取Knife4j的服务镜像

docker-compose.yml
# 通过docker-compose可以快速部署knife4j服务
version: "2.0"
services:
knife4j:
container_name: knife4j-desktop
restart: always
image: "xiaoymin/knife4j:v2.0"
network_mode: "bridge"
# 本地磁盘目录映射
volumes:
- D:\Temp\data:/knife4j/data
ports:
- "10000:10000"
# 指定配置属性模式为disk本地磁盘
environment:
- knife4j.source=disk
- knife4j.disk.dir=/knife4j/data

注意点:

  • volumes挂载目录需要指定本地磁盘指定的目录与Knife4j容器中的目录映射,上面配置中的D:\Temp\data开发者可修改为本地任意目录
  • ports端口,Knife4j容器端口默认10000
  • environment为初始化环境,本次使用disk模式

docker-compose.yml文件配置完成后,即可通过命令启动服务。

docker-compose up 

接口在浏览器访问接口文档查看效果:http://localhost:10000/doc.html

信息

该镜像服务如果是初次启动,在映射的数据目录D:\Temp\data下会存放一个默认的openapi规范的离线yml文件,旨在让使用者有一个快速体验的效果,后面可以替换。

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-mode.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-mode.html index ddfcb2802..6781ff600 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-mode.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-mode.html @@ -10,16 +10,15 @@ - -配置中心模式 | Knife4j - - +配置中心模式 | Knife4j + +
-

配置中心模式

- - +

配置中心模式

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-service-mode.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-service-mode.html index b70fecb67..cd02804c9 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-service-mode.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-service-mode.html @@ -10,16 +10,15 @@ - -服务中心模式 | Knife4j - - +服务中心模式 | Knife4j + +
-

服务中心模式

- - +

服务中心模式

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-test.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-test.html index d640a2daa..3a084704f 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-test.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-test.html @@ -10,16 +10,15 @@ - -2.4 测试场景 | Knife4j - - +2.4 测试场景 | Knife4j + +
-

2.4 测试场景

本文主要包含作者对Knife4jAggregationDesktop的测试场景,主要包含支持的四种模式进行分别测试,仅供使用者进行参考

注意:以下测试场景无需重启服务

2.3.1 Disk模式

视频介绍-Knife4jAggregationDesktop使用-Disk模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,直接放入OpenAPI规范的静态JSON文件,不重启的情况下渲染正常(正常)

2、修改某个文件夹下的OpenAPI规范静态JSON文件,不重启的情况下等待5s后刷新文档是否变更(正常)

3、为disk模式创建disk.properties,为disk模式配置服务的重命名是否生效(正常)

4、修改disk.properties配置文件,修改服务的名称显示是否生效(正常)

5、修改disk.properties配置文件,为服务配置host开启调试功能,调试是否生效(正常)

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json

6、修改disk.properties配置文件,取消调试配置host的属性,调试是否失效(正常)

7、删除disk.properties配置文件,刷新是否正常(正常)

8、修改disk.properties配置文件,配置basicAuth以开启文档保护策略,是否生效(正常)

knife4j.basicAuth.enable=true
knife4j.basicAuth.username=zhangsan
knife4j.basicAuth.password=123456

9、修改disk.properties配置文件,配置basicAuth以开启文档保护策略后,访问其他项目的文档是否无影响能正常访问(正常)

10、修改disk.properties配置文件,删除basicAuth去除文档的保护策略,是否生效(正常)

11、修改disk.properties配置文件,为routes节点配置servicePath属性,是否能正常渲染及调试(正常)

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json
knife4j.disk.routes[0].servicePath=/niubia

12、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,直接放入OpenAPI规范的静态yml文件,是否渲染正常(正常)

13、按规定放入ymljson两种OpenAPI规范的静态文件,是否渲染正常(正常)

14、创建disk.properties配置文件,对于yml和json两种格式的文件进行重命名配置,是否渲染生效(正常)

knife4j.disk.routes[0].name=yml格式
knife4j.disk.routes[0].location=33.yml
knife4j.disk.routes[0].order=1
knife4j.disk.routes[1].name=json格式
knife4j.disk.routes[1].location=DolphinScheduler.json
knife4j.disk.routes[1].order=2

供参考示例配置disk.properties:

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json
knife4j.disk.routes[0].servicePath=/niubia
knife4j.disk.routes[1].name=用户体系
knife4j.disk.routes[1].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[1].location=user.json
#knife4j.basicAuth.enable=true
#knife4j.basicAuth.username=zhangsan
#knife4j.basicAuth.password=123456

2.3.2 Cloud模式

视频介绍-Knife4jAggregationDesktop使用-Cloud模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建cloud.properties配置文件及配置,是否生效(正常)

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com

2、修改cloud.properties配置文件,增加排序字段,排序(正序)是否生效(正常)

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].order=1
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].order=2
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com

3、调试是否正常(正常)

4、修改cloud.properties配置文件,配置basicAuth以开启文档保护策略,是否生效(正常)

knife4j.basicAuth.enable=true
knife4j.basicAuth.username=cloud
knife4j.basicAuth.password=123456

5、修改cloud.properties配置文件,配置basicAuth以开启文档保护策略后,访问其他项目的文档是否无影响能正常访问(正常)

6、修改cloud.properties配置文件,删除basicAuth去除文档的保护策略,是否生效(正常)

7、修改cloud.properties配置文件,为routes节点配置servicePath属性,是否能正常渲染及调试(正常)

参考示例配置cloud.properties:

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].order=12
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
#knife4j.cloud.routes[0].servicePath=/niub
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].order=2
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com
#knife4j.cloud.routes[1].servicePath=/cloud
#knife4j.basicAuth.enable=true
#knife4j.basicAuth.username=cloud
#knife4j.basicAuth.password=123456

2.3.3 Eureka模式

视频介绍-Knife4jAggregationDesktop使用-Eureka模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建eureka.properties配置文件及配置,是否生效(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户服务asdf
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[1].name=订单服务2ff
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default

2、修改eureka.properties配置文件,增加order属性修改分组显示顺序,是否正常(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户服务asdf
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=订单服务2ff
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2

3、修改eureka.properties配置文件,修改服务的显示名称name,文档界面是否正常显示(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2

4、调试是否正常(正常)

5、修改eureka.properties配置文件,增加Basic权限控制,访问该文档需要输入用户名及密码,是否正常显示(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2
knife4j.basicAuth.enable=true
knife4j.basicAuth.username=abc
knife4j.basicAuth.password=123456

6、修改eureka.properties配置文件,去除basic权限控制,访问文档是否正常(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=abc
knife4j.basicAuth.password=123456

7、删除eureka.properties配置文件,文档是否还能访问(正常)

2.3.4 Nacos模式

视频介绍-Knife4jAggregationDesktop使用-Nacos模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建nacos.properties配置文件及配置,是否生效(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].name=自定义服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default

2、修改nacos.properties配置文件,增加order属性修改分组显示顺序,是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2

3、修改nacos.properties配置文件,修改服务的显示名称name,文档界面是否正常显示(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2

4、调试是否正常(正常)

5、修改nacos.properties配置文件,增加Basic权限控制,访问该文档需要输入用户名及密码,是否正常显示(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
knife4j.basicAuth.enable=true
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

6、修改nacos.properties配置文件,去除basic权限控制,访问文档是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

7、Nacos注册中心开启了权限验证,在nacos.properties配置文件中进行配置,测试文档聚合是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
# Nacos OpenAPI权限
knife4j.nacos.serviceAuth.enable=true
knife4j.nacos.serviceAuth.username=nacos
knife4j.nacos.serviceAuth.password=nacos

knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

8、删除nacos.properties配置文件,文档是否还能访问(正常)

- - +

2.4 测试场景

本文主要包含作者对Knife4jAggregationDesktop的测试场景,主要包含支持的四种模式进行分别测试,仅供使用者进行参考

注意:以下测试场景无需重启服务

2.3.1 Disk模式

视频介绍-Knife4jAggregationDesktop使用-Disk模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,直接放入OpenAPI规范的静态JSON文件,不重启的情况下渲染正常(正常)

2、修改某个文件夹下的OpenAPI规范静态JSON文件,不重启的情况下等待5s后刷新文档是否变更(正常)

3、为disk模式创建disk.properties,为disk模式配置服务的重命名是否生效(正常)

4、修改disk.properties配置文件,修改服务的名称显示是否生效(正常)

5、修改disk.properties配置文件,为服务配置host开启调试功能,调试是否生效(正常)

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json

6、修改disk.properties配置文件,取消调试配置host的属性,调试是否失效(正常)

7、删除disk.properties配置文件,刷新是否正常(正常)

8、修改disk.properties配置文件,配置basicAuth以开启文档保护策略,是否生效(正常)

knife4j.basicAuth.enable=true
knife4j.basicAuth.username=zhangsan
knife4j.basicAuth.password=123456

9、修改disk.properties配置文件,配置basicAuth以开启文档保护策略后,访问其他项目的文档是否无影响能正常访问(正常)

10、修改disk.properties配置文件,删除basicAuth去除文档的保护策略,是否生效(正常)

11、修改disk.properties配置文件,为routes节点配置servicePath属性,是否能正常渲染及调试(正常)

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json
knife4j.disk.routes[0].servicePath=/niubia

12、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,直接放入OpenAPI规范的静态yml文件,是否渲染正常(正常)

13、按规定放入ymljson两种OpenAPI规范的静态文件,是否渲染正常(正常)

14、创建disk.properties配置文件,对于yml和json两种格式的文件进行重命名配置,是否渲染生效(正常)

knife4j.disk.routes[0].name=yml格式
knife4j.disk.routes[0].location=33.yml
knife4j.disk.routes[0].order=1
knife4j.disk.routes[1].name=json格式
knife4j.disk.routes[1].location=DolphinScheduler.json
knife4j.disk.routes[1].order=2

供参考示例配置disk.properties:

knife4j.disk.routes[0].name=测试平台
knife4j.disk.routes[0].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[0].location=test.json
knife4j.disk.routes[0].servicePath=/niubia
knife4j.disk.routes[1].name=用户体系
knife4j.disk.routes[1].host=http://knife4j.xiaominfo.com
knife4j.disk.routes[1].location=user.json
#knife4j.basicAuth.enable=true
#knife4j.basicAuth.username=zhangsan
#knife4j.basicAuth.password=123456

2.3.2 Cloud模式

视频介绍-Knife4jAggregationDesktop使用-Cloud模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建cloud.properties配置文件及配置,是否生效(正常)

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com

2、修改cloud.properties配置文件,增加排序字段,排序(正序)是否生效(正常)

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].order=1
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].order=2
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com

3、调试是否正常(正常)

4、修改cloud.properties配置文件,配置basicAuth以开启文档保护策略,是否生效(正常)

knife4j.basicAuth.enable=true
knife4j.basicAuth.username=cloud
knife4j.basicAuth.password=123456

5、修改cloud.properties配置文件,配置basicAuth以开启文档保护策略后,访问其他项目的文档是否无影响能正常访问(正常)

6、修改cloud.properties配置文件,删除basicAuth去除文档的保护策略,是否生效(正常)

7、修改cloud.properties配置文件,为routes节点配置servicePath属性,是否能正常渲染及调试(正常)

参考示例配置cloud.properties:

knife4j.cloud.routes[0].name=大数据平台1
knife4j.cloud.routes[0].order=12
knife4j.cloud.routes[0].location=/v2/api-docs?group=3.默认接口
knife4j.cloud.routes[0].uri=http://knife4j.xiaominfo.com
#knife4j.cloud.routes[0].servicePath=/niub
knife4j.cloud.routes[1].name=甄选平台
knife4j.cloud.routes[1].order=2
knife4j.cloud.routes[1].location=/v2/api-docs?group=2.X版本
knife4j.cloud.routes[1].uri=http://knife4j.xiaominfo.com
#knife4j.cloud.routes[1].servicePath=/cloud
#knife4j.basicAuth.enable=true
#knife4j.basicAuth.username=cloud
#knife4j.basicAuth.password=123456

2.3.3 Eureka模式

视频介绍-Knife4jAggregationDesktop使用-Eureka模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建eureka.properties配置文件及配置,是否生效(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户服务asdf
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[1].name=订单服务2ff
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default

2、修改eureka.properties配置文件,增加order属性修改分组显示顺序,是否正常(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户服务asdf
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=订单服务2ff
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2

3、修改eureka.properties配置文件,修改服务的显示名称name,文档界面是否正常显示(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2

4、调试是否正常(正常)

5、修改eureka.properties配置文件,增加Basic权限控制,访问该文档需要输入用户名及密码,是否正常显示(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2
knife4j.basicAuth.enable=true
knife4j.basicAuth.username=abc
knife4j.basicAuth.password=123456

6、修改eureka.properties配置文件,去除basic权限控制,访问文档是否正常(正常)

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=自定义服务1
knife4j.eureka.routes[0].serviceName=service-user
knife4j.eureka.routes[0].location=/aub/v2/api-docs?group=default
knife4j.eureka.routes[0].order=1
knife4j.eureka.routes[1].name=自定义服务2
knife4j.eureka.routes[1].serviceName=service-order
knife4j.eureka.routes[1].location=/v2/api-docs?group=default
knife4j.eureka.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=abc
knife4j.basicAuth.password=123456

7、删除eureka.properties配置文件,文档是否还能访问(正常)

2.3.4 Nacos模式

视频介绍-Knife4jAggregationDesktop使用-Nacos模式

1、在data目录下新增文件夹并且修改符合Desktop要求的名称格式,新建nacos.properties配置文件及配置,是否生效(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].name=自定义服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default

2、修改nacos.properties配置文件,增加order属性修改分组显示顺序,是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2

3、修改nacos.properties配置文件,修改服务的显示名称name,文档界面是否正常显示(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2

4、调试是否正常(正常)

5、修改nacos.properties配置文件,增加Basic权限控制,访问该文档需要输入用户名及密码,是否正常显示(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
knife4j.basicAuth.enable=true
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

6、修改nacos.properties配置文件,去除basic权限控制,访问文档是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

7、Nacos注册中心开启了权限验证,在nacos.properties配置文件中进行配置,测试文档聚合是否正常(正常)

knife4j.nacos.serviceUrl=http://192.168.0.223:8848/nacos
# Nacos OpenAPI权限
knife4j.nacos.serviceAuth.enable=true
knife4j.nacos.serviceAuth.username=nacos
knife4j.nacos.serviceAuth.password=nacos

knife4j.nacos.routes[0].name=自定义X服务1
knife4j.nacos.routes[0].serviceName=service-user
knife4j.nacos.routes[0].location=/v2/api-docs?group=default
knife4j.nacos.routes[0].order=3
knife4j.nacos.routes[1].name=自定义X服务2
knife4j.nacos.routes[1].serviceName=service-order
knife4j.nacos.routes[1].location=/v2/api-docs?group=default
knife4j.nacos.routes[1].order=2
# 可以改为false,或者把下面的配置全部注释,两种方式都行
knife4j.basicAuth.enable=false
knife4j.basicAuth.username=nacos
knife4j.basicAuth.password=1234

8、删除nacos.properties配置文件,文档是否还能访问(正常)

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop-use.html b/knife4j-doc/gitee/docs/middleware-sources/desktop-use.html index fcc2a46eb..97bcefdb5 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop-use.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop-use.html @@ -10,16 +10,15 @@ - -Disk本地磁盘模式 | Knife4j - - +Disk本地磁盘模式 | Knife4j + +
-

Disk本地磁盘模式

本篇文档主要介绍如何使用Knife4jAggregationDesktop

2.3.1 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

2.3.2 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

2.3.2.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件或者yml文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json
|--------goodsOpenApi.yml

在ROOT目录下,我们放置了三个OpenAPI文档的静态文件:userOpenAPI以及orderOpenApigoodsOpenApi.yml,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在三个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

knife4j.disk.routes[2].name=商品服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[2].location=goodsOpenApi.yml

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Eloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

- - +

Disk本地磁盘模式

本篇文档主要介绍如何使用Knife4jAggregationDesktop

2.3.1 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

2.3.2 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

2.3.2.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件或者yml文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json
|--------goodsOpenApi.yml

在ROOT目录下,我们放置了三个OpenAPI文档的静态文件:userOpenAPI以及orderOpenApigoodsOpenApi.yml,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在三个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

knife4j.disk.routes[2].name=商品服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[2].location=goodsOpenApi.yml

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Eloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

2.3.2.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的Nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式

配置好后,无需重启,应用会自动加载,也可以参考测试场景中的配置

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-disk.html b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-disk.html index 59a21a9cd..4951259f9 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-disk.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-disk.html @@ -10,26 +10,26 @@ - -Disk本地配置模式 | Knife4j - - +Disk本地配置模式 | Knife4j + +
-

Disk本地配置模式

Disk本地磁盘的配置中心模式是最简单的,用户只需要在本地磁盘建立一个数据目录即可。

启动配置

先来看Disk模式的docker-compose.yml信息:

docker-compose.yml
# 通过docker-compose可以快速部署knife4j服务
version: "2.0"
services:
knife4j:
container_name: knife4j-desktop
restart: always
image: "xiaoymin/knife4j:v2.0"
network_mode: "bridge"
# 本地磁盘目录映射
volumes:
- D:\Temp\data:/knife4j/data
ports:
- "10000:10000"
# 指定配置属性模式为disk本地磁盘
environment:
- knife4j.source=disk
- knife4j.disk.dir=/knife4j/data

属性说明:

属性说明
volumesdocker磁盘挂载映射目录,规则:宿主机本地目录(自定义):/knife4j/data
knife4j.source代表当前容器以什么模式启动,disk模式则代表是当前本地磁盘模式
knife4j.disk.dir代表disk模式下的配置信息读取目录,该目录可以存放OpenAPI离线文件(json/yml),也可以存放支持的服务中心以从远端拉取数据进行聚合

文档配置

那么,当我们通过docker-compose将容器启动后,如何增加文档呢?

增加文档

针对disk配置中心模式,在上面我们指定的volumes目录下

用户可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数字,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

Disk模式

此disk模式代表的是服务中心的disk,虽然有点绕,但希望别混淆。

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件或者yml文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json
|--------goodsOpenApi.yml

在ROOT目录下,我们放置了三个OpenAPI文档的静态文件:userOpenAPI以及orderOpenApigoodsOpenApi.yml,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在三个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

knife4j.disk[0].routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk[0].routes[0].location=userOpenApi.json

knife4j.disk[0].routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk[0].routes[1].location=orderOpenApi.json

knife4j.disk[0].routes[2].name=商品服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk[0].routes[2].location=goodsOpenApi.yml

配置好后,无需重启,应用会自动加载

配置属性说明:

属性类型说明
knife4jobject顶级目录
knife4j.disk[0]arraydisk模式文档,因为disk模式以文件夹名称进行了切割,所有这里所有的配置都配置下标为0
knife4j.disk[0].routesarraydisk模式聚合的文档数量,多个则下标增加即可
knife4j.disk[0].routes[0].namestring当前文档分组显示名称
knife4j.disk[0].routes[0].locationstring当前文档在本目录下的文件名称,目前只支持以.json.yml结尾的OpenAPI规范文件
knife4j.disk[0].routes[0].debugUrlstring当前文档在调试时的HTTP地址,例如:http://192.168.1.1:9090
knife4j.disk[0].routes[0].orderint当前分组显示顺序值,排序规则为asc

Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

示例配置:

knife4j.cloud[0].routes[0].name=用户
knife4j.cloud[0].routes[0].uri=http://192.168.0.152:8999
knife4j.cloud[0].routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

配置好后,无需重启,应用会自动加载

配置属性说明:

属性类型说明
knife4jobject顶级目录
knife4j.cloud[0]arraycloud模式文档,因为disk配置中心模式下以文件夹名称进行了切割,所有这里所有的配置都配置下标为0
knife4j.cloud[0].routesarraycloud模式聚合的文档数量,多个则下标增加即可
knife4j.cloud[0].routes[0].namestring当前文档分组显示名称
knife4j.cloud[0].routes[0].uristringcloud模式下获取OpenAPI信息的服务地址
knife4j.cloud[0].routes[0].locationstring当前文档的实际OpenAPI接口地址
knife4j.cloud[0].routes[0].debugUrlstring当前文档在调试时的HTTP地址(如果不配置,默认走uri的地址),例如:http://192.168.1.1:9090
knife4j.cloud[0].routes[0].orderint当前分组显示顺序值,排序规则为asc

Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties
knife4j.eureka[0].serviceUrl=http://localhost:10000/eureka/
knife4j.eureka[0].username=eureka鉴权账号
knife4j.eureka[0].password=eureka鉴权密码
knife4j.eureka[0].routes[0].name=用户
knife4j.eureka[0].routes[0].serviceName=userService
knife4j.eureka[0].routes[0].location=/v2/api-docs?group=2.X版本

配置好后,无需重启,应用会自动加载

配置属性说明:

属性类型说明
knife4jobject顶级目录
knife4j.eureka[0]arrayeureka模式文档,因为disk配置中心模式下以文件夹名称进行了切割,所有这里所有的配置都配置下标为0
knife4j.eureka[0].serviceUrlstringeureka服务注册中心地址
knife4j.eureka[0].usernamestringeureka服务注册中心用户名
knife4j.eureka[0].passwordstringeureka服务注册中心密码
knife4j.eureka[0].routesarrayeureka模式聚合的文档数量,多个则下标增加即可
knife4j.eureka[0].routes[0].namestring当前文档分组显示名称
knife4j.eureka[0].routes[0].serviceNamestringeureka服务注册中心中的真实服务名称
knife4j.eureka[0].routes[0].locationstring当前文档的实际OpenAPI接口地址
knife4j.eureka[0].routes[0].debugUrlstring当前文档在调试时的HTTP地址(如果不配置,默认走从eureka注册中心解析拿到的服务真实地址)
knife4j.eureka[0].routes[0].orderint当前分组显示顺序值,排序规则为asc

Nacos模式

推荐目标Nacos版本需2.0版本以上

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

示例配置如下:

knife4j.nacos[0].server=127.0.0.1:8848
knife4j.nacos[0].username=nacos
knife4j.nacos[0].password=nacos
knife4j.nacos[0].namespace=dev
knife4j.nacos[0].routes[0].name=用户
knife4j.nacos[0].routes[0].serviceName=userService
knife4j.nacos[0].routes[0].groupName=DEFAULT_GROUP
knife4j.nacos[0].routes[0].location=/v2/api-docs?group=2.X版本

配置好后,无需重启,应用会自动加载

配置属性说明:

属性类型说明
knife4jobject顶级目录
knife4j.nacos[0]arraynacos模式文档,因为disk配置中心模式下以文件夹名称进行了切割,所有这里所有的配置都配置下标为0
knife4j.nacos[0].serverstringnacos服务注册中心地址,规则:ip:port,不需要protocol
knife4j.nacos[0].usernamestringnacos服务注册中心用户名
knife4j.nacos[0].passwordstringnacos服务注册中心密码
knife4j.nacos[0].passwordstringnacos服务注册中心密码
knife4j.nacos[0].namespacestringnacos服务注册namespaceId
knife4j.nacos[0].clustersstring集群,多个以逗号分割
knife4j.nacos[0].routesarraynacos模式聚合的文档数量,多个则下标增加即可
knife4j.nacos[0].routes[0].namestring当前文档分组显示名称
knife4j.nacos[0].routes[0].serviceNamestringnacos服务注册中心中的真实服务名称
knife4j.nacos[0].routes[0].groupNamestringnacos服务注册中心中的真实服务所处分组名称,例如:DEFAULT_GROUP
knife4j.nacos[0].routes[0].namespacestringnacos服务注册中心中的真实服务所处namespace
knife4j.nacos[0].routes[0].locationstring当前文档的实际OpenAPI接口地址
knife4j.nacos[0].routes[0].debugUrlstring当前文档在调试时的HTTP地址(如果不配置,默认走从nacos注册中心解析拿到的服务真实地址)
knife4j.nacos[0].routes[0].orderint当前分组显示顺序值,排序规则为asc
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-introduction.html index 915d5c629..5cd4cdb17 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-introduction.html @@ -10,26 +10,26 @@ - -数据源-配置中心 | Knife4j - - +数据源-配置中心 | Knife4j + +
-

数据源-配置中心

Insight组件自2.0版本开始,针对使用者提的建议,增加了将原所有聚合的配置文件信息存放到独立的配置中心中间件上的功能。

这也使得该组件不管是在云上,或者本地服务器,都能毫无羁绊的独立运行。

架构图:

主要是上面架构图中的Config Data部分。

我们知道,目前的配置中心中间件种类非常多,开源的、商业版,或者企业自研版本,从时间和适用性考虑,目前Insight只对接了Nacos配置中心,如果有朋友有兴趣贡献其他配置中心的代码实现,非常欢迎!!!

主要配置类型:

  • Disk本地配置中心:Disk则代表用户将所有聚合的配置信息都以文件的形式,存放到本地机器
  • Nacos配置中心:所有聚合的配置信息都存放到Nacos配置中心
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-nacos.html b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-nacos.html index d112a13c4..f13c27817 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop/config-nacos.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop/config-nacos.html @@ -10,28 +10,28 @@ - -Nacos配置中心模式 | Knife4j - - +Nacos配置中心模式 | Knife4j + +
-
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/desktop/service-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/desktop/service-introduction.html index 19c194207..368bbf926 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/desktop/service-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/desktop/service-introduction.html @@ -10,26 +10,26 @@ - -数据源-服务中心 | Knife4j - - +数据源-服务中心 | Knife4j + +
-

数据源-服务中心

不管是单体架构、微服务架构等,每一个子服务只要集成了OpenAPI框架,都可以通过Insight组件进行聚合,这和语言无关

架构图:

主要是上面架构图中的Service Data部分。

我们知道,目前的服务中心中间件种类非常多,开源的、商业版,或者企业自研版本,从时间和适用性考虑,目前Insight只对接了Nacos、Eureka服务中心,如果有朋友有兴趣贡献其他服务中心的代码实现,非常欢迎!!!

其核心原理很简单,从服务中心拿到注册服务的真实ip、端口,最终通过HTTP连接代理请求最终的数据源信息,拿到我们所需要的OpenAPI规范数据结构。

主要服务类型:

  • Disk模式:Disk则代表用户将所有的OpenAPI数据结构文件全部存放到本地
  • Cloud模式:所有OpenAPI数据结构来源于外部HTTP RESTFul接口
  • Nacos模式:Nacos服务中心,因为微服务或者容器时代,ip、端口不定,所以可以配置从服务中心进行获取
  • Eureka模式:Eureka服务中心,因为微服务或者容器时代,ip、端口不定,所以可以配置从服务中心进行获取
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregation.html b/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregation.html index f82dccd59..8459f7ab6 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregation.html +++ b/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregation.html @@ -10,20 +10,19 @@ - -4.2 Knife4jAggregation微服务聚合中间件 | Knife4j - - +4.2 Knife4jAggregation微服务聚合中间件 | Knife4j + +
-

4.2 Knife4jAggregation微服务聚合中间件

Knife4j一直致力于将目前的Ui提供给更多的平台或者别的语言使用而努力,经过这么长时间的发展,Knife4j提供的轻量级聚合中间件终于诞生了,自2.0.8版本开始,Knife4j +

4.2 Knife4jAggregation微服务聚合中间件

Knife4j一直致力于将目前的Ui提供给更多的平台或者别的语言使用而努力,经过这么长时间的发展,Knife4j提供的轻量级聚合中间件终于诞生了,自2.0.8版本开始,Knife4j 提供了knife4j-aggregation-spring-boot-starter组件,该组件是一个基于Spring Boot系统的starter,他提供了以下几种能力:

  • 最轻量级、最简单、最方便的聚合OpenApi规范的中间件
  • 让所有的基于Spring Boot的Web体系拥有了轻松聚合OpenApi的能力
  • 提供4种模式供开发者选择
    • 基于本地静态JSON文件的方式聚合OpenAPI
    • 基于云端HTTP接口的方式聚合
    • 基于Eureka注册中心的方式聚合
    • 基于Nacos注册中心的方式聚合
  • 基于该starter发布了Docker镜像,跨平台与语言让开发者基于此Docker镜像轻松进行聚合OpenAPI规范
  • 完美兼容所有Spring Boot版本,没有兼容性问题
  • 开发者可以彻底放弃基于Zuul、Spring Cloud Gateway等复杂的聚合方式
  • 兼容OpenAPI2规范以及OpenAPI3规范

基于Spring Boot引入方式

 <dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索aggregation最新版本号-->
<version>2.0.8</version>
</dependency>

接下来将详细介绍该组件的说明以及不同的聚合方式介绍 [[toc]]

4.2.1 组件属性说明

既然基于Spring Boot的starter组件发布,那么必然提供了很多属性,完整的属性如下:

knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 用户体系
uri: 192.168.0.152:8999
location: /v2/api-docs?group=2.X版本
swaggerVersion: 2.0
servicePath: /abbb/ffe
routeAuth:
enable: true
username: test
password: 12313
routeAuth:
enable: true
username: test
password: 12313
eureka:
enable: false
serviceUrl: http://localhost:10000/eureka/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
nacos:
enable: false
serviceUrl: http://localhost:10000/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
disk:
enable: false
routes:
- name: 用户
location: classpath:openapi/user.json

属性分为5个方面:

  • 开启Knife4jAggregation组件
  • 开启Disk模式
  • 开启Cloud模式
  • 开启Eureka模式
  • 开启Nacos模式
注意

Disk、Cloud、Eureka、Nacos这四种模式只能使用1种,不能混合一起使用(即只能配置这4中模式中的一种属性,然后将其enable属性设置为true,其他三种的enable则必须设置为false)

开启聚合组件

  • knife4j.enableAggregation:该属性是前提条件,如果要启用聚合,那么该属性必须设置为true

4.2.2 Disk模式

更加详细的实战demo请参考基于Disk模式聚合OpenAPI

Disk模式代表的是本地模式,开发者本地存在一个或多个OpenAPI规范的JSON文件,此时可以通过Knife4j的聚合组件将该OpenAPI规范解析并渲染

knife4j:
enableAggregation: true
disk:
enable: true
routes:
- name: 用户
location: classpath:openapi/user.json
  • knife4j.disk.enable:将该属性设置为true,则代表启用Disk模式
  • knife4j.disk.routes:需要聚合的服务集合,可以配置多个
  • knife4j.disk.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.disk.routes.location:本地Disk模式聚合的OpenAPI规范JSON文件,可以是V2也可以是V3版本

4.2.3 Cloud模式

更加详细的实战demo请参考基于Cloud模式聚合OpenAPI

取名Cloud模式代表的是开发者的OpenAPI规范是以HTTP接口的形式存在,开发者可以配置通过调用HTTP接口来获取OpenAPI规范

knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 用户体系
uri: 192.168.0.152:8999
location: /v2/api-docs?group=2.X版本
swaggerVersion: 2.0
servicePath: /abbb/ffe
routeAuth:
enable: true
username: test3
password: 66666
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.cloud.enable:将该属性设置为true,则代表启用Cloud模式
  • knife4j.cloud.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的HTTP接口需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.cloud.routeAuth.enable:是否启用Basic验证
  • knife4j.cloud.routeAuth.usernae:Basic用户名
  • knife4j.cloud.routeAuth.password:Basic密码
  • knife4j.cloud.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.cloud.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.cloud.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.cloud.routes.location::具体资源接口地址,最终Knife4j是通过uri+location的组合路径进行访问
  • knife4j.cloud.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.cloud.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.cloud.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.cloud.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.cloud.routes.routeAuth.usernae:Basic用户名
  • knife4j.cloud.routes.routeAuth.password:Basic密码

4.2.4 Eureka模式

更加详细的实战demo请参考基于Eureka注册中心聚合OpenAPI

开发者可以从Eureka注册中心中聚合已经注册的服务,需要注意的是以及注册的服务必须集成OpenAPI并且能提供接口 该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
eureka:
enable: false
serviceUrl: http://localhost:10000/eureka/
serviceAuth:
enable: false
username: test
password: 12313
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.eureka.enable:将该属性设置为true,则代表启用Eureka模式
  • knife4j.eureka.serviceUrl:Eureka注册中心的地址
  • knife4j.eureka.serviceAuth:该属性是一个公共Basic验证属性(可选),如果Eureka的注册和获取服务需要进行Basic认证,开发者需要配置该属性
  • knife4j.eureka.serviceAuth.enable:是否启用Eureka注册中心Basic验证
  • knife4j.eureka.serviceAuth.usernae:Eureka注册中心Basic用户名
  • knife4j.eureka.serviceAuth.password:Eureka注册中心Basic密码
  • knife4j.eureka.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.eureka.routeAuth.enable:是否启用Basic验证
  • knife4j.eureka.routeAuth.usernae:Basic用户名
  • knife4j.eureka.routeAuth.password:Basic密码
  • knife4j.eureka.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.eureka.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.eureka.routes.serviceName:Eureka注册中心的服务名称
  • knife4j.eureka.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.eureka.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.eureka.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.eureka.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.eureka.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.eureka.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.eureka.routes.routeAuth.usernae:Basic用户名
  • knife4j.eureka.routes.routeAuth.password:Basic密码

4.2.4 Nacos模式

更加详细的实战demo请参考基于Nacos注册中心聚合OpenAPI

开发者可以从Nacos注册中心中聚合已经注册的服务,需要注意的是以及注册的服务必须集成OpenAPI并且能提供接口 -该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
nacos:
enable: true
serviceUrl: http://192.168.0.112:8804/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
groupName: test
namespaceId: test
clusters: test
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.nacos.enable:将该属性设置为true,则代表启用nacos模式
  • knife4j.nacos.serviceUrl:nacos注册中心的地址
  • knife4j.nacos.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.nacos.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routeAuth.password:Basic密码
  • knife4j.nacos.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.nacos.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.nacos.routes.serviceName:nacos注册中心的服务名称
  • knife4j.nacos.routes.groupName:Nacos分组名称,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.namespaceId:命名空间id,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.clusters:集群名称,多个集群用逗号分隔,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.nacos.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.nacos.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.nacos.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.nacos.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.nacos.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routes.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routes.routeAuth.password:Basic密码
- - +该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
nacos:
enable: true
serviceUrl: http://192.168.0.112:8804/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
groupName: test
namespaceId: test
clusters: test
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.nacos.enable:将该属性设置为true,则代表启用nacos模式
  • knife4j.nacos.serviceUrl:nacos注册中心的地址
  • knife4j.nacos.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.nacos.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routeAuth.password:Basic密码
  • knife4j.nacos.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.nacos.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.nacos.routes.serviceName:nacos注册中心的服务名称
  • knife4j.nacos.routes.groupName:Nacos分组名称,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.namespaceId:命名空间id,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.clusters:集群名称,多个集群用逗号分隔,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.nacos.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.nacos.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.nacos.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.nacos.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.nacos.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routes.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routes.routeAuth.password:Basic密码
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregationDesktop.html b/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregationDesktop.html index 2daf6a4f9..110ec051f 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregationDesktop.html +++ b/knife4j-doc/gitee/docs/middleware-sources/knife4jAggregationDesktop.html @@ -10,16 +10,15 @@ - -4.3 Knife4jAggregationDesktop | Knife4j - - +4.3 Knife4jAggregationDesktop | Knife4j + +
-

4.3 Knife4jAggregationDesktop

有了新的想法,然后就开始折腾吧~~!

目前该想法作者正在开发中......

Knife4jAggregationDesktop是一款基于聚合组件Knife4jAggregation特性的独立部署的聚合OpenAPI文档软件,脱离Spring、Spring Boot技术架构体系,开发者下载后独立部署启动。

主要功能作用:

  • 独立部署(依赖Java JDK8环境)
  • 拥有Knife4jAggregation的全部特性
  • 基于动态文件配置方式
  • 支持多个项目动态配置

4.3.1 软件架构

技术架构图如下:

软件目录如下:

|-Knife4jAggregationDesktop
|------bin
|------conf
|------data
|------lib
|-----—logs
|------webapps
|------LICENSE
|------readme.txt

目录说明:

  • bin:启动命令目录
  • conf:配置文件目录,application.properties包含Knife4jAggregationDesktop软件的相关配置,包括端口号,为文档设置basicAuth权限等
  • data:数据目录,默认根目录存放ROOT文件夹,多个项目的OpenAPI聚合,开发者只需要在此目录下建文件夹即可
  • lib:依赖jar包
  • logs:日志
  • webapps:Knife4jUi的静态资源文件

4.3.2 配置文件

conf文件夹下有application.properties配置文件,是Knife4jAggregationDesktop软件的独立配置

目前的配置属性如下:

# Knife4jAggregationDesktop 启动端口号
knife4j.port=18006
# 为所有Knife4jAggregationDesktop开放出去的OpenAPI文档加权,设置BasicAuth访问密码
# enable=true 代表启用
knife4j.basic.enable=true
knife4j.basic.username=zhangsan
knife4j.basic.password=123456

4.3.3 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

4.3.4 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

4.3.4.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json

在ROOT目录下,我们放置了两个OpenAPI文档的静态JSON文件:userOpenAPI以及orderOpenApi,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在两个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

配置好后,无需重启,应用会自动加载

4.3.4.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

4.3.4.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

4.3.4.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式
- - +

4.3 Knife4jAggregationDesktop

有了新的想法,然后就开始折腾吧~~!

目前该想法作者正在开发中......

Knife4jAggregationDesktop是一款基于聚合组件Knife4jAggregation特性的独立部署的聚合OpenAPI文档软件,脱离Spring、Spring Boot技术架构体系,开发者下载后独立部署启动。

主要功能作用:

  • 独立部署(依赖Java JDK8环境)
  • 拥有Knife4jAggregation的全部特性
  • 基于动态文件配置方式
  • 支持多个项目动态配置

4.3.1 软件架构

技术架构图如下:

软件目录如下:

|-Knife4jAggregationDesktop
|------bin
|------conf
|------data
|------lib
|-----—logs
|------webapps
|------LICENSE
|------readme.txt

目录说明:

  • bin:启动命令目录
  • conf:配置文件目录,application.properties包含Knife4jAggregationDesktop软件的相关配置,包括端口号,为文档设置basicAuth权限等
  • data:数据目录,默认根目录存放ROOT文件夹,多个项目的OpenAPI聚合,开发者只需要在此目录下建文件夹即可
  • lib:依赖jar包
  • logs:日志
  • webapps:Knife4jUi的静态资源文件

4.3.2 配置文件

conf文件夹下有application.properties配置文件,是Knife4jAggregationDesktop软件的独立配置

目前的配置属性如下:

# Knife4jAggregationDesktop 启动端口号
knife4j.port=18006
# 为所有Knife4jAggregationDesktop开放出去的OpenAPI文档加权,设置BasicAuth访问密码
# enable=true 代表启用
knife4j.basic.enable=true
knife4j.basic.username=zhangsan
knife4j.basic.password=123456

4.3.3 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

4.3.4 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

4.3.4.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json

在ROOT目录下,我们放置了两个OpenAPI文档的静态JSON文件:userOpenAPI以及orderOpenApi,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在两个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

配置好后,无需重启,应用会自动加载

4.3.4.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

4.3.4.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

4.3.4.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式
+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/knife4jCloud.html b/knife4j-doc/gitee/docs/middleware-sources/knife4jCloud.html index 3180037be..b7fa4022e 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/knife4jCloud.html +++ b/knife4j-doc/gitee/docs/middleware-sources/knife4jCloud.html @@ -10,16 +10,15 @@ - -4.1 Knife4jCloud综合管理平台 | Knife4j - - +4.1 Knife4jCloud综合管理平台 | Knife4j + +
-

4.1 Knife4jCloud综合管理平台

4.1.1 产品介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

4.1.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

4.1.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

4.1.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

4.1.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

4.1.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

4.1.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

4.1.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

4.1.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

4.1.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

4.1.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}

4.1.4 产品试用

可以访问http://cloud.xiaominfo.com进行注册试用吧!!!

- - +

4.1 Knife4jCloud综合管理平台

4.1.1 产品介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

4.1.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

4.1.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

4.1.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

4.1.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

4.1.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

4.1.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

4.1.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

4.1.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

4.1.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

4.1.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}

4.1.4 产品试用

可以访问http://cloud.xiaominfo.com进行注册试用吧!!!

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.html index cedf25107..a22c78db6 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introduction.html @@ -10,26 +10,26 @@ - -Spring Cloud Gateway网关聚合 | Knife4j - - +Spring Cloud Gateway网关聚合 | Knife4j + +
-

Spring Cloud Gateway网关聚合

简介

提示

1、Knife4j 在v4.0版本提供了基于Spring Cloud Gateway网关聚合文档的中间件

2、在使用该组件时,如果开发者在网关层面做了鉴权等操作,需要把Ui资源以及相关的API接口放开,否则会出现无法访问的情况,放开资源清单可以参考文档

3、实战文章请参考:Spring Cloud Gateway网关下的文档聚合?就用它了

自4.0版本后,Knife4j提供了一个针对在Spring Cloud Gateway网关进行聚合的组件,开发者可以基于此组件轻松的聚合各个子服务的OpenAPI文档

值得注意的事项:

  • 生产环境上线时,配置文件通过配置knife4j.gateway.enabled: false进行关闭,避免接口泄漏,造成安全问题
  • 支持服务发现knife4j.gateway.discover.enabled: true,该属性4.1.0后新增
  • 服务发现中注意排除网关服务

使用

Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>

手动配置聚合(manual)

手动配置聚合,顾名思义,开发者只需要在Spring Cloud Gateway网关的yml配置文件中进行配置即可。

application.yml配置文件中配置路由规则(该配置可以配置在Nacos配置中心中,实时生效),配置规则如下:


knife4j:
# 聚合swagger文档
gateway:
enabled: true
# 排序规则(tag/operation排序自4.2.0版本新增)
# 取值:alpha-默认排序规则,官方swagger-ui默认实现,order-Knife4j提供的增强排序规则,开发者可扩展x-order,根据数值来自定义排序
tags-sorter: order
operations-sorter: order
# 指定手动配置的模式(默认为该模式)
strategy: manual
routes:
- name: 用户服务
# 真实子服务访问url地址-提供OpenAPI的文档
url: /user-service/v2/api-docs?group=default
service-name: user-service
# 路由前缀
# 兼容OpenAPI3规范在聚合时丢失contextPath属性的异常情况,由开发者自己配置contextPath,Knife4j的前端Ui做兼容处理,与url属性独立不冲突,仅OpenAPI3规范聚合需要,OpenAPI2规范不需要设置此属性,默认为(apiPathPrefix)
context-path: /
order: 2
- name: 订单服务
url: /order-service/v2/api-docs?group=default
service-name: order-service
# 路由前缀
context-path: /
order: 3

配置属性说明:

配置属性名称类型描述默认值
knife4j.gateway.enabledboolean是否开启使用Gateway网关聚合组件false
knife4j.gateway.strategyenum聚合的策略,主要支持两种,分别是手动配置(manual)、服务发现(discover)manual
knife4j.gateway.routesarray{Router}通过路由注册文档
knife4j.gateway.routes[0].namestring界面显示分组名称null
knife4j.gateway.routes[0].urlstring文档地址子服务的Swagger资源接口地址(Swagger2默认/v2/api-docs,只需要配置group参数即可),因为是从网关层走,开发者配置时别忘记了网关前缀地址。
knife4j.gateway.routes[0].service-namestring访问服务名称null
knife4j.gateway.routes[0].orderint排序0
knife4j.gateway.routes[0].context-pathstring路由前缀,根据实际情况自行配置/

服务发现模式(discover)

如果子服务非常多的情况下,那么手动配置就会显得很累,那么可以通过服务发现的模式,自动从注册中心聚合文档,不过服务发现的模式,有一些注意事项,开发者需要注意:

注意事项
  • 子服务必须统一规范实现,统一使用OpenAPI2或者OpenAPI3的版本
  • 子服务需要提供默认default分组,该分组是服务发现模式下自动聚合的url

配置属性

在服务发现模式下的配置属性如下:

knife4j:
gateway:
# 是否开启
enabled: true
# 排序规则(tag/operation排序自4.2.0版本新增)
# 取值:alpha-默认排序规则,官方swagger-ui默认实现,order-Knife4j提供的增强排序规则,开发者可扩展x-order,根据数值来自定义排序
tags-sorter: order
operations-sorter: order
# 指定服务发现的模式聚合微服务文档,并且是默认`default`分组
strategy: discover
# 子服务存在其他分组情况,聚合其他分组,只能手动配置
routes:
- name: 用户服务-1
# 子服务存在其他分组情况,聚合其他分组
url: /user-service/v2/api-docs?group=用户服务
# 服务名称(Optional)
service-name: user-service
# 路由前缀
context-path: /
# 排序
order: 2
- name: 订单服务-2
url: /order-service/v2/api-docs?group=订单服务
service-name: order-service
# 路由前缀
context-path: /
order: 3
# 服务发现模式的配置
discover:
# 开启
enabled: true
# 指定版本号(swagger2|openapi3)
version : openapi3
# 需要排除的微服务(eg:网关服务)
excluded-services:
- gateway-service
# 如果子服务是OpenAPI3,并且有个性化配置
oas3:
url: /v3/api-docs?group=default
oauth2-redirect-url: ''
validator-url: ''
# 如何子服务是Swagger2,并且个性化配置
swagger2:
url: /v2/api-docs?group=default
# 单个服务的个性化配置,key-服务名称,value-配置信息
service-config:
# 假设order服务(具体真实服务开发者根据自己的情况配置)
order-service:
# 该服务的排序
order: 0
# 分组显示名称
group-name: 订单服务名称
# 兼容OpenAPI3规范在聚合时丢失contextPath属性的异常情况,由开发者自己配置contextPath,Knife4j的前端Ui做兼容处理,与url属性独立不冲突,仅OpenAPI3规范聚合需要,OpenAPI2规范不需要设置此属性,默认为(apiPathPrefix)
context-path: /
# 该属性自4.2.0添加,支持子服务非`default`分组的其他分组聚合
# 参考 https://gitee.com/xiaoym/knife4j/pulls/87
group-names:
- 分组1
- 分组2


排除服务

自4.2.0版本,在Spring Cloud Gateway网关聚合时,开发者可自定义排除服务的规则,实现Knife4j开放的接口即可

主要解决在Dubbo等服务的场景中聚合了不必要的服务。参考Gitee#I6YLMB

@Slf4j
@Component
public class MyExcludeService implements GatewayServiceExcludeService {
@Override
public Set<String> exclude(Environment environment, Knife4jGatewayProperties properties, List<String> services) {
log.info("自定义过滤器.");
if (!CollectionUtils.isEmpty(services)){
// 排除注册中心包含order字眼的服务
return services.stream().filter(s -> s.contains("order")).collect(Collectors.toSet());
}
return new TreeSet<>();
}
}

场景case

2.1 所有子服务全部是OpenAPI3规范

knife4j:
gateway:
enabled: true
# 指定服务发现的模式聚合微服务文档,并且是默认`default`分组
strategy: discover
discover:
enabled: true
# 指定版本号(Swagger2|OpenAPI3)
version : openapi3
# 需要排除的微服务(eg:网关服务)
excluded-services:
- gateway-service

2.2 所有子服务全部是Swagger2规范,并且是默认default分组

knife4j:
gateway:
enabled: true
# 指定服务发现的模式聚合微服务文档
strategy: discover
discover:
enabled: true
# 指定版本号(Swagger2|OpenAPI3)
version : swagger2
# 需要排除的微服务(eg:网关服务)
excluded-services:
- gateway-service

2.3 子服务中除了default分组,还有别的分组,测试,我们需要单独聚合(因为discover模式只聚合默认),此时,则复用routes自定义属性

knife4j:
gateway:
enabled: true
# 指定服务发现的模式聚合微服务文档
strategy: discover
discover:
enabled: true
# 指定版本号(Swagger2|OpenAPI3)
version : swagger2
# 需要排除的微服务(eg:网关服务)
excluded-services:
- gateway-service
# 个性化定制的部分子服务分组情况
routes:
- name: 用户服务
service-name: user-service
url: /user/v2/api-docs?group=组织管理
order: 1
- name: 订单服务
service-name: order-service
url: /order/v2/api-docs?group=订单管理
order: 1

2.4 在discover服务发现模式下,如果我们希望对聚合起来的微服务提供一些个性化配置,例如:排序、分组重命名、context-path配置等等,那么可以通过服务配置对每个服务进行配置,如下:

knife4j:
gateway:
enabled: true
# 指定服务发现的模式聚合微服务文档
strategy: discover
discover:
enabled: true
# 指定版本号(Swagger2|OpenAPI3)
version : openapi3
# 需要排除的微服务(eg:网关服务)
excluded-services:
- gateway-service
# 各个聚合服务的个性化配置,key:注册中心中的服务名称,value:个性化配置
service-config:
user-service:
# 排序
order: 1
# 前端显示名称
group-name : 用户服务
# 重新指定basePath,一般在OpenAPI3规范中需要
context-path: /user
order-service:
# 排序
order: 2
# 前端显示名称
group-name : 订单服务
# 重新指定basePath,一般在OpenAPI3规范中需要
context-path: /order

访问地址

http://{gateway.host}:{gateway.port}/doc.html

+ + diff --git a/knife4j-doc/gitee/docs/middleware-sources/spring-webflux/spring-webflux-introduction.html b/knife4j-doc/gitee/docs/middleware-sources/spring-webflux/spring-webflux-introduction.html index 9d2de79c7..255698b92 100644 --- a/knife4j-doc/gitee/docs/middleware-sources/spring-webflux/spring-webflux-introduction.html +++ b/knife4j-doc/gitee/docs/middleware-sources/spring-webflux/spring-webflux-introduction.html @@ -10,26 +10,26 @@ - -Spring Webflux集成 | Knife4j - - +Spring Webflux集成 | Knife4j + +
-

Spring Webflux集成

注意事项

Spring Webflux模式下的Knife4j仅仅是ui包,目前没有提供Knife4j的增强功能

在目前Knife4j的版本中,虽没有直接提供在Spring Webflux框架下的集成starter包,但是开发者依然可以使用Knife4j的ui组件,这得益于springdoc-openapi项目的支持。

使用方法

1、针对单体Spring Webflux项目,开发者首先需要引入springdoc-openapi模块的jar包,Maven坐标如下:

Spring Boot < 3.0.0-M1
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
<version>1.6.14</version>
</dependency>

参考demo:knife4j-openapi3-spring-webflux-demo

如果你是Spring Boot 3,那么Maven坐标:

Spring Boot >= 3.0.0-M1
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
<version>2.0.2</version>
</dependency>

参考demo:knife4j-openapi3-spring-boot3-webflux-demo

2、引入Knife4j 4.0版本提供的OpenAPI3规范的ui组件包,Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-ui</artifactId>
<version>4.0.0</version>
</dependency>

+ + diff --git a/knife4j-doc/gitee/docs/middleware.html b/knife4j-doc/gitee/docs/middleware.html index f80fe0e83..c1104b014 100644 --- a/knife4j-doc/gitee/docs/middleware.html +++ b/knife4j-doc/gitee/docs/middleware.html @@ -10,16 +10,15 @@ - -生态中间件 | Knife4j - - +生态中间件 | Knife4j + +
-

生态中间件

生态中间件

- - +

生态中间件

生态中间件

+ + diff --git a/knife4j-doc/gitee/docs/middleware/knife4jAggregation.html b/knife4j-doc/gitee/docs/middleware/knife4jAggregation.html index 1dfb7bd3d..9d5ee16e6 100644 --- a/knife4j-doc/gitee/docs/middleware/knife4jAggregation.html +++ b/knife4j-doc/gitee/docs/middleware/knife4jAggregation.html @@ -10,20 +10,19 @@ - -4.2 Knife4jAggregation微服务聚合中间件 | Knife4j - - +4.2 Knife4jAggregation微服务聚合中间件 | Knife4j + +
-

4.2 Knife4jAggregation微服务聚合中间件

友情提示

该文档页介绍已作废,请移步新的文档介绍

Knife4j一直致力于将目前的Ui提供给更多的平台或者别的语言使用而努力,经过这么长时间的发展,Knife4j提供的轻量级聚合中间件终于诞生了,自2.0.8版本开始,Knife4j +

4.2 Knife4jAggregation微服务聚合中间件

友情提示

该文档页介绍已作废,请移步新的文档介绍

Knife4j一直致力于将目前的Ui提供给更多的平台或者别的语言使用而努力,经过这么长时间的发展,Knife4j提供的轻量级聚合中间件终于诞生了,自2.0.8版本开始,Knife4j 提供了knife4j-aggregation-spring-boot-starter组件,该组件是一个基于Spring Boot系统的starter,他提供了以下几种能力:

  • 最轻量级、最简单、最方便的聚合OpenApi规范的中间件
  • 让所有的基于Spring Boot的Web体系拥有了轻松聚合OpenApi的能力
  • 提供4种模式供开发者选择
    • 基于本地静态JSON文件的方式聚合OpenAPI
    • 基于云端HTTP接口的方式聚合
    • 基于Eureka注册中心的方式聚合
    • 基于Nacos注册中心的方式聚合
  • 基于该starter发布了Docker镜像,跨平台与语言让开发者基于此Docker镜像轻松进行聚合OpenAPI规范
  • 完美兼容所有Spring Boot版本,没有兼容性问题
  • 开发者可以彻底放弃基于Zuul、Spring Cloud Gateway等复杂的聚合方式
  • 兼容OpenAPI2规范以及OpenAPI3规范

基于Spring Boot引入方式

 <dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索aggregation最新版本号-->
<version>2.0.8</version>
</dependency>

接下来将详细介绍该组件的说明以及不同的聚合方式介绍 [[toc]]

4.2.1 组件属性说明

既然基于Spring Boot的starter组件发布,那么必然提供了很多属性,完整的属性如下:

knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 用户体系
uri: 192.168.0.152:8999
location: /v2/api-docs?group=2.X版本
swaggerVersion: 2.0
servicePath: /abbb/ffe
routeAuth:
enable: true
username: test
password: 12313
routeAuth:
enable: true
username: test
password: 12313
eureka:
enable: false
serviceUrl: http://localhost:10000/eureka/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
nacos:
enable: false
serviceUrl: http://localhost:10000/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
disk:
enable: false
routes:
- name: 用户
location: classpath:openapi/user.json

属性分为5个方面:

  • 开启Knife4jAggregation组件
  • 开启Disk模式
  • 开启Cloud模式
  • 开启Eureka模式
  • 开启Nacos模式
注意

Disk、Cloud、Eureka、Nacos这四种模式只能使用1种,不能混合一起使用(即只能配置这4中模式中的一种属性,然后将其enable属性设置为true,其他三种的enable则必须设置为false)

开启聚合组件

  • knife4j.enableAggregation:该属性是前提条件,如果要启用聚合,那么该属性必须设置为true

4.2.2 Disk模式

更加详细的实战demo请参考基于Disk模式聚合OpenAPI

Disk模式代表的是本地模式,开发者本地存在一个或多个OpenAPI规范的JSON文件,此时可以通过Knife4j的聚合组件将该OpenAPI规范解析并渲染

knife4j:
enableAggregation: true
disk:
enable: true
routes:
- name: 用户
location: classpath:openapi/user.json
  • knife4j.disk.enable:将该属性设置为true,则代表启用Disk模式
  • knife4j.disk.routes:需要聚合的服务集合,可以配置多个
  • knife4j.disk.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.disk.routes.location:本地Disk模式聚合的OpenAPI规范JSON文件,可以是V2也可以是V3版本

4.2.3 Cloud模式

更加详细的实战demo请参考基于Cloud模式聚合OpenAPI

取名Cloud模式代表的是开发者的OpenAPI规范是以HTTP接口的形式存在,开发者可以配置通过调用HTTP接口来获取OpenAPI规范

knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 用户体系
uri: 192.168.0.152:8999
location: /v2/api-docs?group=2.X版本
swaggerVersion: 2.0
servicePath: /abbb/ffe
routeAuth:
enable: true
username: test3
password: 66666
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.cloud.enable:将该属性设置为true,则代表启用Cloud模式
  • knife4j.cloud.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的HTTP接口需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.cloud.routeAuth.enable:是否启用Basic验证
  • knife4j.cloud.routeAuth.usernae:Basic用户名
  • knife4j.cloud.routeAuth.password:Basic密码
  • knife4j.cloud.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.cloud.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示)
  • knife4j.cloud.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.cloud.routes.location::具体资源接口地址,最终Knife4j是通过uri+location的组合路径进行访问
  • knife4j.cloud.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.cloud.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.cloud.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.cloud.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.cloud.routes.routeAuth.usernae:Basic用户名
  • knife4j.cloud.routes.routeAuth.password:Basic密码

4.2.4 Eureka模式

更加详细的实战demo请参考基于Eureka注册中心聚合OpenAPI

开发者可以从Eureka注册中心中聚合已经注册的服务,需要注意的是以及注册的服务必须集成OpenAPI并且能提供接口 该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
eureka:
enable: false
serviceUrl: http://localhost:10000/eureka/
serviceAuth:
enable: false
username: test
password: 12313
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.eureka.enable:将该属性设置为true,则代表启用Eureka模式
  • knife4j.eureka.serviceUrl:Eureka注册中心的地址
  • knife4j.eureka.serviceAuth:该属性是一个公共Basic验证属性(可选),如果Eureka的注册和获取服务需要进行Basic认证,开发者需要配置该属性
  • knife4j.eureka.serviceAuth.enable:是否启用Eureka注册中心Basic验证
  • knife4j.eureka.serviceAuth.usernae:Eureka注册中心Basic用户名
  • knife4j.eureka.serviceAuth.password:Eureka注册中心Basic密码
  • knife4j.eureka.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.eureka.routeAuth.enable:是否启用Basic验证
  • knife4j.eureka.routeAuth.usernae:Basic用户名
  • knife4j.eureka.routeAuth.password:Basic密码
  • knife4j.eureka.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.eureka.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.eureka.routes.serviceName:Eureka注册中心的服务名称
  • knife4j.eureka.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.eureka.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.eureka.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.eureka.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.eureka.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.eureka.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.eureka.routes.routeAuth.usernae:Basic用户名
  • knife4j.eureka.routes.routeAuth.password:Basic密码

4.2.4 Nacos模式

更加详细的实战demo请参考基于Nacos注册中心聚合OpenAPI

开发者可以从Nacos注册中心中聚合已经注册的服务,需要注意的是以及注册的服务必须集成OpenAPI并且能提供接口 -该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
nacos:
enable: true
serviceUrl: http://192.168.0.112:8804/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
groupName: test
namespaceId: test
clusters: test
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.nacos.enable:将该属性设置为true,则代表启用nacos模式
  • knife4j.nacos.serviceUrl:nacos注册中心的地址
  • knife4j.nacos.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.nacos.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routeAuth.password:Basic密码
  • knife4j.nacos.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.nacos.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.nacos.routes.serviceName:nacos注册中心的服务名称
  • knife4j.nacos.routes.groupName:Nacos分组名称,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.namespaceId:命名空间id,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.clusters:集群名称,多个集群用逗号分隔,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.nacos.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.nacos.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.nacos.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.nacos.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.nacos.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routes.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routes.routeAuth.password:Basic密码
- - +该模式类似于Cloud模式,只是隐藏了服务的地址而已

knife4j:
enableAggregation: true
nacos:
enable: true
serviceUrl: http://192.168.0.112:8804/nacos/
routeAuth:
enable: true
username: test
password: 12313
routes:
- name: 订单服务
serviceName: service-order
groupName: test
namespaceId: test
clusters: test
location: /v2/api-docs?group=default
swaggerVersion: 2.0
servicePath: /order
routeAuth:
enable: true
username: test
password: 12313
  • knife4j.nacos.enable:将该属性设置为true,则代表启用nacos模式
  • knife4j.nacos.serviceUrl:nacos注册中心的地址
  • knife4j.nacos.routeAuth:该属性是一个公共Basic验证属性(可选),如果开发者提供的OpenAPI规范的服务需要以Basic验证进行鉴权访问,那么可以配置该属性,如果配置该属性,则该模式下所有配置的Routes节点接口都会以Basic验证信息访问接口
  • knife4j.nacos.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routeAuth.password:Basic密码
  • knife4j.nacos.routes:需要聚合的服务集合(必选),可以配置多个
  • knife4j.nacos.routes.name:服务名称(显示名称,最终在Ui的左上角下拉框进行显示),如果该属性不配置,最终Ui会显示serviceName
  • knife4j.nacos.routes.serviceName:nacos注册中心的服务名称
  • knife4j.nacos.routes.groupName:Nacos分组名称,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.namespaceId:命名空间id,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.clusters:集群名称,多个集群用逗号分隔,非必须,开发者根据自己的实际情况进行配置
  • knife4j.nacos.routes.uri:该服务的接口URI资源,如果是HTTPS,则需要完整配置
  • knife4j.nacos.routes.location::具体资源接口地址,最终Knife4j是通过注册服务uri+location的组合路径进行访问
  • knife4j.nacos.routes.swaggerVersion:版本号,默认是2.0,可选配置
  • knife4j.nacos.routes.servicePath:该属性是最终在Ui中展示的接口前缀属性,提供该属性的目的也是因为通常开发者在以Gateway等方式聚合时,需要一个前缀路径来进行转发,而最终这个前缀路径会在每个接口中进行追加
  • knife4j.nacos.routes.routeAuth:如果该Route节点的接口开启了Basic,并且和公共配置的Basic不一样,需要单独配置
  • knife4j.nacos.routes.routeAuth.enable:是否启用Basic验证
  • knife4j.nacos.routes.routeAuth.usernae:Basic用户名
  • knife4j.nacos.routes.routeAuth.password:Basic密码
+ + diff --git a/knife4j-doc/gitee/docs/middleware/knife4jAggregationDesktop.html b/knife4j-doc/gitee/docs/middleware/knife4jAggregationDesktop.html index 206c956ca..72c3534bb 100644 --- a/knife4j-doc/gitee/docs/middleware/knife4jAggregationDesktop.html +++ b/knife4j-doc/gitee/docs/middleware/knife4jAggregationDesktop.html @@ -10,16 +10,15 @@ - -4.3 Knife4jAggregationDesktop | Knife4j - - +4.3 Knife4jAggregationDesktop | Knife4j + +
-

4.3 Knife4jAggregationDesktop

有了新的想法,然后就开始折腾吧~~!

目前该想法作者正在开发中......

友情提示

该文档页介绍已作废,请移步新的文档介绍

Knife4jAggregationDesktop是一款基于聚合组件Knife4jAggregation特性的独立部署的聚合OpenAPI文档软件,脱离Spring、Spring Boot技术架构体系,开发者下载后独立部署启动。

主要功能作用:

  • 独立部署(依赖Java JDK8环境)
  • 拥有Knife4jAggregation的全部特性
  • 基于动态文件配置方式
  • 支持多个项目动态配置

4.3.1 软件架构

技术架构图如下:

软件目录如下:

|-Knife4jAggregationDesktop
|------bin
|------conf
|------data
|------lib
|-----—logs
|------webapps
|------LICENSE
|------readme.txt

目录说明:

  • bin:启动命令目录
  • conf:配置文件目录,application.properties包含Knife4jAggregationDesktop软件的相关配置,包括端口号,为文档设置basicAuth权限等
  • data:数据目录,默认根目录存放ROOT文件夹,多个项目的OpenAPI聚合,开发者只需要在此目录下建文件夹即可
  • lib:依赖jar包
  • logs:日志
  • webapps:Knife4jUi的静态资源文件

4.3.2 配置文件

conf文件夹下有application.properties配置文件,是Knife4jAggregationDesktop软件的独立配置

目前的配置属性如下:

# Knife4jAggregationDesktop 启动端口号
knife4j.port=18006
# 为所有Knife4jAggregationDesktop开放出去的OpenAPI文档加权,设置BasicAuth访问密码
# enable=true 代表启用
knife4j.basic.enable=true
knife4j.basic.username=zhangsan
knife4j.basic.password=123456

# 使用者也可以为单个开放出去的OpenAPI文档独立设置Basic验证权限,设置规则是knife4j.basic.项目code.开头
# 例如一个项目文档的访问路径是:http://localhost:18006/bigdata/doc.html,那么bigdata就是该项目的code,为该文档设置BasicAuth
knife4j.basic.bigdata.enable=true
knife4j.basic.bigdata.username=zhangsan
knife4j.basic.bigdata.password=123456

4.3.3 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

4.3.4 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

4.3.4.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json

在ROOT目录下,我们放置了两个OpenAPI文档的静态JSON文件:userOpenAPI以及orderOpenApi,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在两个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

配置好后,无需重启,应用会自动加载

4.3.4.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

4.3.4.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

4.3.4.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式
- - +

4.3 Knife4jAggregationDesktop

有了新的想法,然后就开始折腾吧~~!

目前该想法作者正在开发中......

友情提示

该文档页介绍已作废,请移步新的文档介绍

Knife4jAggregationDesktop是一款基于聚合组件Knife4jAggregation特性的独立部署的聚合OpenAPI文档软件,脱离Spring、Spring Boot技术架构体系,开发者下载后独立部署启动。

主要功能作用:

  • 独立部署(依赖Java JDK8环境)
  • 拥有Knife4jAggregation的全部特性
  • 基于动态文件配置方式
  • 支持多个项目动态配置

4.3.1 软件架构

技术架构图如下:

软件目录如下:

|-Knife4jAggregationDesktop
|------bin
|------conf
|------data
|------lib
|-----—logs
|------webapps
|------LICENSE
|------readme.txt

目录说明:

  • bin:启动命令目录
  • conf:配置文件目录,application.properties包含Knife4jAggregationDesktop软件的相关配置,包括端口号,为文档设置basicAuth权限等
  • data:数据目录,默认根目录存放ROOT文件夹,多个项目的OpenAPI聚合,开发者只需要在此目录下建文件夹即可
  • lib:依赖jar包
  • logs:日志
  • webapps:Knife4jUi的静态资源文件

4.3.2 配置文件

conf文件夹下有application.properties配置文件,是Knife4jAggregationDesktop软件的独立配置

目前的配置属性如下:

# Knife4jAggregationDesktop 启动端口号
knife4j.port=18006
# 为所有Knife4jAggregationDesktop开放出去的OpenAPI文档加权,设置BasicAuth访问密码
# enable=true 代表启用
knife4j.basic.enable=true
knife4j.basic.username=zhangsan
knife4j.basic.password=123456

# 使用者也可以为单个开放出去的OpenAPI文档独立设置Basic验证权限,设置规则是knife4j.basic.项目code.开头
# 例如一个项目文档的访问路径是:http://localhost:18006/bigdata/doc.html,那么bigdata就是该项目的code,为该文档设置BasicAuth
knife4j.basic.bigdata.enable=true
knife4j.basic.bigdata.username=zhangsan
knife4j.basic.bigdata.password=123456

4.3.3 增加文档

Knife4jAggregationDesktop软件启动后,开发者想要增加OpenAPI文档应该怎么办?

从技术架构图可以看到,Knife4jAggregationDesktop提供了MetaDataMonitor组件,该组件是一个监听器,主要监听data目录。当开发者在data目录新建文件夹(文档)后,添加相应的配置文件后自动加载元数据配置,无需重启即可在线访问文档

在data目录下,开发者可以建N个一级文件夹(文档),文件夹名称必须是英文或英文+数组,示例如下:

|-data
|------ROOT
|------project1
|------project2
|------project3
|-----—project4
|-----—more...

ROOT目录代表的是根目录,最终访问文档的地址是:http://ip:port/doc.html

而开发者自建的文件夹目录,例如project1、project2、project3等等,所代表的是一个项目名称,最终访问的地址如下:

项目code文档地址
ROOT根目录,访问地址:http://ip:port/doc.html
project1http://ip:port/project1/doc.html
project2http://ip:port/project2/doc.html
project3http://ip:port/project3/doc.html
project4http://ip:port/project4/doc.html
以此类推http://ip:port/${code}/doc.html

4.3.4 配置文档

在上面的介绍种,我们知道了如何增加多个文档,其实很简单,只需要在data目录建文件夹即可,那么建立好了文件夹后,如何配置呢?

这里需要涉及到Knife4jAggregation提供支持的4种模式了:Disk、Cloud、Eureka、Nacos

一个项目文件夹只支持一种模式

拿ROOT根目录来做示例说明,开发者如何配置。

4.3.4.1 Disk模式

Disk模式在Knife4jAggregationDesktop中是最简单的,如果开发者拥有OpenAPI文档的静态JSON文件,那么就可以直接放在建好的文件夹中,不用任何配置,即可渲染。

目录结构如下:

|-data
|------ROOT
|--------userOpenApi.json
|--------orderOpenApi.json

在ROOT目录下,我们放置了两个OpenAPI文档的静态JSON文件:userOpenAPI以及orderOpenApi,此时访问地址:http://ip:port/doc.html

开发者就能在文档界面中看到会存在两个分组下的OpenAPI文档了。

那么随之问题也来了,在文档中,下拉框的选项名称是以文件的名称来命名显示的,如果要自定义显示应该怎么办?,此时就需要继续在ROOT目录添加一个名为disk.properties的配置文件来进行重命名配置

disk.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的disk模式的route节点配置完全一样):

knife4j.disk.routes[0].name=用户服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[0].location=userOpenApi.json

knife4j.disk.routes[1].name=订单服务
# 此处location需要注意,只需要配置同级的文件名称即可
knife4j.disk.routes[1].location=orderOpenApi.json

配置好后,无需重启,应用会自动加载

4.3.4.1 Cloud模式

Cloud模式则是需要在创建好的文件夹目录下新建cloud.properties配置文件,然后配置Cloud模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------cloud.properties

cloud.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.cloud.routes[0].name=用户
knife4j.cloud.routes[0].uri=192.168.0.152:8999
knife4j.cloud.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Cloud模式

4.3.4.2 Eureka模式

Eureka模式则是需要在创建好的文件夹目录下新建eureka.properties配置文件,然后配置eureka模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------eureka.properties

eureka.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的cloud模式的route节点配置完全一样):

knife4j.eureka.serviceUrl=http://localhost:10000/eureka/
knife4j.eureka.routes[0].name=用户
knife4j.eureka.routes[0].serviceName=userService
knife4j.eureka.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Eureka模式

4.3.4.3 Nacos模式

Nacos模式则是需要在创建好的文件夹目录下新建nacos.properties配置文件,然后配置nacos模式的节点属性

目录结构如下:

|-data
|------ROOT
|--------nacos.properties

nacos.properties配置文件(该配置和Knife4jAggregation聚合组件中声明的nacos模式的route节点配置完全一样):

knife4j.nacos.serviceUrl=http://localhost:10000/nacos/
knife4j.nacos.routes[0].name=用户
knife4j.nacos.routes[0].serviceName=userService
knife4j.nacos.routes[0].location=/v2/api-docs?group=2.X版本
# more...具体参考Knife4jAggregation聚合组件配置Nacos模式
+ + diff --git a/knife4j-doc/gitee/docs/middleware/knife4jCloud.html b/knife4j-doc/gitee/docs/middleware/knife4jCloud.html index aaf402af1..cab1089a1 100644 --- a/knife4j-doc/gitee/docs/middleware/knife4jCloud.html +++ b/knife4j-doc/gitee/docs/middleware/knife4jCloud.html @@ -10,16 +10,15 @@ - -4.1 Knife4jCloud综合管理平台 | Knife4j - - +4.1 Knife4jCloud综合管理平台 | Knife4j + +
-

4.1 Knife4jCloud综合管理平台

友情提示

该文档页介绍已作废,请移步新的文档介绍

4.1.1 产品介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

4.1.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

4.1.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

4.1.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

4.1.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

4.1.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

4.1.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

4.1.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

4.1.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

4.1.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

4.1.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}

4.1.4 产品试用

可以访问http://cloud.xiaominfo.com进行注册试用吧!!!

- - +

4.1 Knife4jCloud综合管理平台

友情提示

该文档页介绍已作废,请移步新的文档介绍

4.1.1 产品介绍

Knife4jCloud是一款独立部署的中间件,基于Spring Boot 2.2.0.RELEASE+Mybatis 3.5进行开发.

将目前开源的Knife4j进行整合,通过云平台对OpenAPI v2的Swagger文档进行云端聚合,在线对Swagger文档进行渲染和调试,非常灵活方便,特别是在微服务盛行的今天,对于使用Swagger的开发者来说,是一款非常轻巧、方便、简单、易用的产品.

产品的主要优势:

1).跨语言

使用Swagger的开发者都知道,OpenAPI是一套标准的规范,在不同的语言中都有相应的实现方式,包括Java、Node、Python、.Net等语言,使用范围非常广泛,特别是Java体系下Spring的生态非常完善,Springfox组件提供了对OpenAPI的支持,将SpringMVC接口和Swagger紧密的联系了起来,方便开发者进行接口的调试

也正是因为这种原因,Knife4j目前经历近3年的发展,OpenAPI2.0版本已经越来越成熟,Java的开发者集成Knife4j非常方便,但是其他语言目前想要使用Knife4j都会有一些难度,需要更改相关的代码才能做到集成,使用上很麻烦

Knife4jCloud平台作为独立的平台,不管是提供OpenAPI的接口还是提供Swagger的JSON,都可以通过在平台上简单操作,即可情况将OpenAPIV2的结构在Knife4j的Ui上展示出来.

2).微服务模式下自动聚合

在目前的Knife4j技术交流群中,经常会碰到各个开发者询问如何在Spring Cloud的微服务技术架构下聚合Swagger文档,有的人聚合成功了,有的人聚合失败了

究其原因,Spring Cloud技术架构发展相当迅速,部分开发人员无暇去通过调试底层代码的方式来解决碰到的问题,特别是Swagger文档的聚合一般都是通过网关的特性进行聚合,而微服务架构的网关从ZuulSpring Cloud Gateway的迭代,都是发展惊人的,新版本的迭代必然会碰到版本兼容的问题,网关的迭代,每一次的迭代新增了那些特性,删除了那些特性,大部分情况下,我们是不会去看迭代日志的.升级就完事了.这也是为什么有人成功,有人失败

那么,通过现象看本质,我们碰到的问题到底是什么?

1、网关版本升级,导致请求Swagger接口失败,或者丢失某个属性

2、网关配置不正确,调试转发失败

3、等等...

我们在Spring Boot单体架构下,引入Swagger文档如此简单,为什么在Spring Cloud的体现这么麻烦?聚合代码写了一大堆,还要调试为何失败,不同的版本有不同的要求.等等

那么,Knife4jCloud是如何解决这些问题的呢?

1、Knife4jCloud把Swagger的特性全部抽象出来,全部放在平台里来做,他充当的也是一个网关的角色,但是是自己扩展实现的,扩展的目的只有一个,就是可以在平台中进行调试

2、Knife4jCloud中会把每一个Swagger文档作为一个服务实例,微服务的IP、端口、Swagger-JSONNeri都会保存在平台中

这样在平台中,对于Swagger文档可以进行任意聚合,和微服务彻底拜拜了~~

3).个性化配置

Knife4jCloud产品本身是拥有用户的角色的,开发者可以将平台部署在和实际同一个网络环境中,对外的Swagger文档可以通过Knife4jCloud做到网络隔离

对于每一份Swagger文档页可以做到是否登录后可看,文档是否可以调试等等个性化的配置都可以在平台中进行操作

4.1.2 功能介绍

Knife4jCloud V1.0版本目前提供的功能主要包括:

  • 个人用户&登录&注册:通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据
  • 工作台:当前项目、服务的简单统计情况
  • 项目管理:可以对项目进行编辑维护
  • 服务管理:可以对服务列表进行编辑维护

4.1.2.1 登录

Knife4jCloud通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据

注册界面:

4.1.2.2 工作台

在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况

4.1.2.3 项目管理

项目管理包含了对当前项目的新增、编辑、删除、查询等功能

项目主要包含的字段:项目编号、项目名称、项目描述

项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成

4.1.2.4 服务管理

服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型:

  • API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染
  • LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例

通过在线API的方式来创建服务实例:

通过本地LOCAL的方式创建

4.1.2.5 预览文档

通过项目管理列表中的操作按钮,可以选择预览文档查看文档

4.1.2.6 个人中心

鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作

其中用户信息中包含了开放注册API接口中的accessKey信息,如下图:

4.1.3 开放API

Knife4jCloud平台对外提供注册Swagger服务的开放API接口,通过该接口,非Java语言的开发者,可以进行独立开发,做到Swagger文档的项目自启动注入平台

4.1.3.1 注册API

接口地址:/knife4j/cloud/upload

接口类型:application/json

接口方式:POST

接口参数:

{
"accessKey":"JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA",
"code":"APIFactory",
"applicationHost":"192.168.0.152",
"applicationPort":"9200",
"ssl":false,
"client":"",
"cloudRoutes":[{
"groupName":"订单服务",
"content":"{....}",
"path":"/aaa/v2/api-docs?group=订单服务"
}]
}

参数说明:

4.1.3.2 Spring Boot自动注册

如果你的项目是通过Spring Boot进行开发,并且不想通过Knife4jCloud提供的界面进行操作,并且已经集成了springfox-swagger组件,那么,你可以引用Knife4jCloud提供的自动注册的jar包组件进行自动注册

1.Maven引用

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-discovery-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库(http://search.maven.org)搜索最新版本号-->
<!-- 该版本必须和Knife4jCloud主版本一致-->
<version>1.0</version>
</dependency>

2、在application.yml或者application.properties配置文件中配置相关参数,以yml为例:

knife4j:
cloud:
## 参考注册API中的accessKey
accessKey: JDUkd1YvSi5zZmUkMHYuSGNmN1hMazJPajJuMjNJVW43dWNyL2tyR3N4bzJaa1A2ZC5mSUlwNA
## 项目编号
code: APITest
## Knife4jCloud的对外域名地址
server: http://127.0.0.1:19011
## 当前服务是否是HTTPS的,默认可以不配置,并且该参数默认为false
ssl: false
## 参考注册API中的client属性,该参数可以不配置,只有在域名的情况下需要进行配置
client: http://test.domain.com

3、在Spring Boot应用中通过注解@EnableKnife4jCloudDiscovery进行启用

@EnableKnife4jCloudDiscovery
@SpringBootApplication
public class Knife4jSpringBootDemoApplication implements WebMvcConfigurer{
//more..
}

4.1.4 产品试用

可以访问http://cloud.xiaominfo.com进行注册试用吧!!!

+ + diff --git a/knife4j-doc/gitee/docs/middleware/middleware-aggregation.html b/knife4j-doc/gitee/docs/middleware/middleware-aggregation.html index 2b7fa1736..967d09fb8 100644 --- a/knife4j-doc/gitee/docs/middleware/middleware-aggregation.html +++ b/knife4j-doc/gitee/docs/middleware/middleware-aggregation.html @@ -10,16 +10,15 @@ - -Knife4jAggregation微服务聚合中间件 | Knife4j - - +Knife4jAggregation微服务聚合中间件 | Knife4j + +
-

Knife4jAggregation微服务聚合中间件

Knife4jAggregation微服务聚合中间件

- - +

Knife4jAggregation微服务聚合中间件

Knife4jAggregation微服务聚合中间件

+ + diff --git a/knife4j-doc/gitee/docs/middleware/middleware-desktop.html b/knife4j-doc/gitee/docs/middleware/middleware-desktop.html index 696b13a53..a1e19890c 100644 --- a/knife4j-doc/gitee/docs/middleware/middleware-desktop.html +++ b/knife4j-doc/gitee/docs/middleware/middleware-desktop.html @@ -10,16 +10,15 @@ - -Knife4jAggregationDesktop | Knife4j - - +Knife4jAggregationDesktop | Knife4j + +
-

Knife4jAggregationDesktop

Knife4jAggregationDesktop

Knife4jAggregationDesktop

- - +

Knife4jAggregationDesktop

Knife4jAggregationDesktop

Knife4jAggregationDesktop

+ + diff --git a/knife4j-doc/gitee/docs/oas.html b/knife4j-doc/gitee/docs/oas.html index 2370b68fe..660134b2b 100644 --- a/knife4j-doc/gitee/docs/oas.html +++ b/knife4j-doc/gitee/docs/oas.html @@ -10,26 +10,26 @@ - -OAS简介 | Knife4j - - +OAS简介 | Knife4j + +
-

OAS简介

主要信息包括:

  • Swagger2规范
  • OpenAPI3规范
  • Java针对Swagger2的注解
  • Java针对OpenAPI3的注解
+ + diff --git a/knife4j-doc/gitee/docs/oas/OpenAPI3-specification.html b/knife4j-doc/gitee/docs/oas/OpenAPI3-specification.html index df7ca045d..e76a9bd2d 100644 --- a/knife4j-doc/gitee/docs/oas/OpenAPI3-specification.html +++ b/knife4j-doc/gitee/docs/oas/OpenAPI3-specification.html @@ -10,16 +10,15 @@ - -OpenAPI 规范 | Knife4j - - +OpenAPI 规范 | Knife4j + +
-

OpenAPI 规范

版本 3.0.3

关键词"MUST","MUST NOT","REQUIRED","SHALL","SHALL NOT","SHOULD","SHOULD NOT","RECOMMENDED","NOT RECOMMENDED","MAY",,"OPTIONAL"当且仅当它们以全部大写字母出现时,本文档中将按照 BCP 14RFC2119RFC8174中的描述进行解释。

本文档翻译了,没有那些关键字。o( ̄︶ ̄)o

以下所说的“工具”是指实现OAS规范的软件,例如knife4J。

修订历史

版本翻译时间翻译人备注
3.0.32022-09-201132454419@qq.com初次翻译

介绍

OpenAPI 规范 (OAS) 为 RESTful API 定义了一个与语言无关的标准接口。它允许人们在不访问源代码的情况下通过网络以文档的形式发现和理解服务的功能。如果定义得当,消费者可以用最少的成本实现与远程服务的交互。 可以使用 OpenAPI 定义来显示 API、用各种编程语言生成服务端、客户端、测试端的代码和其他用例。

定义

OpenAPI Document(OpenAPI文档)

定义或描述API的文档(或一组文档)。OpenAPI的定义使用应符合OpenAPI的规范。

Path Templating(模板路径)

Path Templating是指由花括号 ({})分隔的模板表达式,该表达式使用路径传参将URL路径的一部分标记为可替换的。

路径中的每个模板表达式都必须对应一个Path Item ,该参数包含在 Path Item 本身和/或每个 Path ItemOperations中。

Media Types(媒体类型)

Media type的定义分布在多个资源中,且应符合RFC6838的标准。

部分示例:

text/plain; charset=utf-8
application/json
application/vnd.github+json
application/vnd.github.v3+json
application/vnd.github.v3.raw+json
application/vnd.github.v3.text+json
application/vnd.github.v3.html+json
application/vnd.github.v3.full+json
application/vnd.github.v3.diff
application/vnd.github.v3.patch

HTTP Status Codes(HTTP状态码)

HTTP Status Codes用于展示操作的状态。可用状态码由 RFC7231定义,注册状态码列在 IANA Status Code Registry中。

Specification(规范)

Versions(版本)

OpenAPI规范是是使用 Semantic Versioning 2.0.0 (semver)进行版本控制的,并遵循其规范。

semver 的major、minor部分(例如 3.0)应指定 OAS 功能集。通常.patch版本解决的是本文档中的错误,而不是新增或修改功能集。支持 OAS 3.0 的工具应该与所有 OAS 3.0.* 版本兼容。工具不应考虑补丁版本,例如不区分 3.0.0 和 3.0.1。

OpenAPI规范的每一个新的小版本都应该在相同的主版本中对任何以前有效的OpenAPI文档小版本以同等的语义更新为新的规范版本。这样的更新必须将openapi属性更改为新的小版本。

例如,一个有效的OpenAPI 3.0.2文档,修改openapi的属性为3.1.0之后,应该是一个有效的OpenAPI 3.1.0文档,在语义上与等同于原始的OpenAPI 3.0.2文档。必须编写新的OpenAPI规范的小版本以确保这种形式的向后兼容性。

一个与OAS 3.*.*兼容的 OpenAPI 文档包含一个必需的 openapi 字段,该字段指定它使用的 OAS 的语义版本。(OAS 2.0 文档包含一个名为swagger,其值为“2.0”的顶级版本字段。)

Format(格式)

一个符合OpenAPI规范的OpenAPI文档本身就是一个JSON对象,它可以用JSON或YAML格式表示。

例如,如果一个字段有一个数组,则将使用JSON数组表示为:

{
"field": [ 1, 2, 3 ]
}

规范中的所有字段名称都是区分大小写的。包括map中用作Key的所有字段,除非显式地指出Key是不区分大小写的。

Schema公开了两种类型的字段:分别是Fixed fields(固定字段)和Patterned fields(匹配字段),Patterned fields必须在包含对象中具有唯一名称。

为了保留在 YAML 和 JSON 格式之间互相转换的能力,建议使用 YAML 1.2 版以及一些约束:

注意:虽然 API 可以由 OpenAPI 文档以 YAML 或 JSON 格式定义,但 API 请求、响应正文和其他内容可以不为 JSON 或 YAML。

Document Structure(文档结构)

OpenAPI Document可以由单个或者多个文档组成。 在多个的情况下,规范中必须使用 $ref 字段来引用JSON Schema定义中的这部分。建议将OpenAPI 文档命名为:openapi.json openapi.yaml

Data Types(数据类型)

OAS 中的primitive 数据类型是基于JSON Schema Specification Wright Draft 00支持的类型。注意,integer也可作为一种类型,它被定义为没有分数或指数部分的 JSON 数字。 不支持null作为类型(替代解决方案请参阅nullable)。 模型是使用 Schema Object定义的,它是JSON Schema Specification Wright Draft 00的扩展子集。

primitive 有一个可选的修饰符属性:format。 OAS 使用下列几种格式来详细定义所使用的数据类型。 但是为了支持文档需求,format属性是一个开放的string类型的属性,并且可以具有任何值。 即使本规范未定义,也可以使用比如emailuuid等格式。 没有定义format属性的类型遵循 JSON Schema 中的定义。 不能识别特定format的工具可以默认返回单独的type,就像没有指定format一样。

OAS 定义的格式有:

typeformatComments
integerint3232位有符号数
integerint6464位有符号数(long类型)
numberfloat
numberdouble
string
stringbytebase64编码
stringbinary八位字节序列
boolean
stringdateRFC3339定义的full-date
stringdate-timeRFC3339定义的full-time
stringpassword提示 UI 以隐藏输入

Rich Text Formatting(富文本格式)

整个规范的description字段都被标注为支持 CommonMark markdown 格式。 在工具渲染富文本的时候,必须支持CommonMark 0.27中描述的 markdown 语法。 工具可以选择忽略一些CommonMark功能来解决安全问题。

Relative References in URLs(URL中的相对引用)

如未有另外说明,所有属于URL的属性都可以是 RFC3986定义的相对引用。 使用Server Object中定义的 URL 作为基本 URI 来解析相对引用。

$ref 中使用的相对引用按照 JSON 引用进行处理,使用当前文档的 URL 作为基本 URI。 另请参见参考对象。

Schema(架构)

在下面的描述中,如果一个字段没有明确地被要求必填(REQUIRED、MUST 、SHALL)描述,它可以被认为是可选的(OPTIONAL)。

OpenAPI Object(文档对象)

OpenAPI 文档的根对象。

Fixed fields:
属性名属性类型描述
openapistring必填,该字符串必须是OpenAPI文档使用的OpenAPI Specification version的语义版本号。
infoInfo Object必填,提供有关 API 的metadata,可以根据需要由工具使用。
servers[Server Object]Server Object数组,提供到目标服务器的连接信息。如果未提供servers属性,或为空数组,则默认值将是一个Server Object,其url值为/
pathsPaths Object必填,API的可用path和操作。
componentsComponents Object保存规范里schemas的元素(element)信息。
security[Security Requirement Object]API的安全机制配置。值列表可以使用任意的Security Requirement Object。只需满足其中一个就可以对请求进行授权。单个请求可以重写此定义。如不需要,可配置为{}
tagsTag Object带有附加metadata的tags列表。tags的顺序可用于解析工具展示它们的顺序。 不是每个Operation Objecttags都必须声明。 未声明的tags可以随机展示或基于工具的实现逻辑展示。 列表中的每个tag名称必须是唯一的。
externalDocsExternal Documentation Object其他外部文档。

该对象可以通过Specification Extensions进行扩展。

Info Object(信息对象)

该对象提供有关 API 的metadata 。metadata可以由客户使用也可以在编辑或文档生成工具中使用。

Fixed Fields
属性名属性类型描述
titlestring必填,API的标题。
descriptionstringAPI的简短描述,使用CommonMark syntax可以用于展示富文本。
termsOfServicestring指向API服务条款的URL。必须为URL格式。
contactContact ObjectAPI联系信息。
licenseLicense ObjectAPI许可信息。
versionstring必填,文档的版本(不同于OpenAPI 规范版本或 API 实现版本)。

该对象可以通过Specification Extensions进行扩展。

示例:
{
"title": "Sample Pet Store App",
"description": "This is a sample server for a pet store.",
"termsOfService": "http://example.com/terms/",
"contact": {
"name": "API Support",
"url": "http://www.example.com/support",
"email": "support@example.com"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.1"
}
title: Sample Pet Store App
description: This is a sample server for a pet store.
termsOfService: http://example.com/terms/
contact:
name: API Support
url: http://www.example.com/support
email: support@example.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.1

Contact Object(联系信息对象)

API联系信息

属性名属性类型描述
namestring联系人/组织的名称
urlstring联系人信息的URL。必须为URL格式。
emailstring联系人/组织的电子邮件。 必须采用电子邮件格式。

该对象可以通过Specification Extensions进行扩展。

示例:
{
"name": "API Support",
"url": "http://www.example.com/support",
"email": "support@example.com"
}
name: API Support
url: http://www.example.com/support
email: support@example.com

License Object(许可信息对象)

API许可信息

属性名属性类型描述
namestring必填,API使用的许可证名称。
urlstringAPI使用的许可的URL。必须为URL格式。
示例:
{
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html

Server Object(服务器对象)

表示服务器的对象。

Fixed fields:
属性名属性类型描述
urlstring必填,指向目标主机的URL。可以是相对路径,表示服务器相对于OpenAPI文档的位置。当变量命名在{}中时,将进行变量替换。例如{brackets}则会替换brackets变量。
descriptionstringurl所指向的服务器的描述信息,使用CommonMark syntax可以用于展示富文本。
variablesMap[string,Server Variable Object]变量名与值之间的映射,用于替换serversurl配置信息的模板。

该对象可以通过Specification Extensions进行扩展。

示例:
单个服务器:
{
"url": "https://development.gigantic-server.com/v1",
"description": "Development server"
}
url: https://development.gigantic-server.com/v1
description: Development server
多个服务器:
{
"servers": [
{
"url": "https://development.gigantic-server.com/v1",
"description": "Development server"
},
{
"url": "https://staging.gigantic-server.com/v1",
"description": "Staging server"
},
{
"url": "https://api.gigantic-server.com/v1",
"description": "Production server"
}
]
}
servers:
- url: https://development.gigantic-server.com/v1
description: Development server
- url: https://staging.gigantic-server.com/v1
description: Staging server
- url: https://api.gigantic-server.com/v1
description: Production server
应用变量:
{
"servers": [
{
"url": "https://{username}.gigantic-server.com:{port}/{basePath}",
"description": "The production API server",
"variables": {
"username": {
"default": "demo",
"description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
},
"port": {
"enum": [
"8443",
"443"
],
"default": "8443"
},
"basePath": {
"default": "v2"
}
}
}
]
}
servers:
- url: https://{username}.gigantic-server.com:{port}/{basePath}
description: The production API server
variables:
username:
# note! no enum here means it is an open value
default: demo
description: this value is assigned by the service provider, in this example `gigantic-server.com`
port:
enum:
- '8443'
- '443'
default: '8443'
basePath:
# open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
default: v2

Server Variable Object(可变服务器对象)

表示服务器URL模板替换的Server Variable对象。

Fixed Fields
属性名属性类型描述
enum[string]如果替换选项来自数组,则要使用的字符串值的枚举。且数组不能为空。
defaultstring必填,用于替换的默认值,如果未提供,则应发送该值。请注意,此行为与Schema Object对默认值的处理方式不同,因为在这些情况下,参数值是可选的。 如果定义了枚举,则该值应该存在于枚举的值中。
descriptionstring对服务器变量的描述,使用CommonMark syntax可以展示富文本。

这个对象可以使用Specification Extensions进行扩展。

Components Object(组件对象)

为 OAS保存一组可重用的对象。 Components Object中定义的所有对象都不会对API产生影响,除非它们被Components Object外部的属性显式引用。

Fixed Fields
匹配字段属性类型描述
schemasMap[string, Schema Object | Reference Object]可重复使用的Schema Object.
responsesMap[string, Response Object | Reference Object]可重复使用的Response Object.
parametersMap[string, Parameter Object | Reference Object]可重复使用的Parameter Object.
examplesMap[string, Example Object | Reference Object]可重复使用的Example Object.
requestBodiesMap[string, Request Body Object | Reference Object]可重复使用的Request Body Object.
headersMap[string, Header Object| Reference Object]可重复使用的Header Object.
securitySchemesMap[string, Security Scheme Object| Reference Object]可重复使用的Security Scheme Objects.
linksMap[string, Link Object | Reference Object]可重复使用的Link Object.
callbacksMap[string, Callback Object | Reference Object]可重复使用的Callback Object.

这个对象可以使用Specification Extensions进行扩展。

上面声明的所有字段的key都必须能与正则表达式^[a-zA-Z0-9\.\-_]+$匹配。

key的示例
User
User_1
User_Name
user-name
my.org.User
对象示例
"components": {
"schemas": {
"GeneralError": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
},
"Category": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"Tag": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
}
},
"parameters": {
"skipParam": {
"name": "skip",
"in": "query",
"description": "number of items to skip",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
"limitParam": {
"name": "limit",
"in": "query",
"description": "max records to return",
"required": true,
"schema" : {
"type": "integer",
"format": "int32"
}
}
},
"responses": {
"NotFound": {
"description": "Entity not found."
},
"IllegalInput": {
"description": "Illegal input for operation."
},
"GeneralError": {
"description": "General Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GeneralError"
}
}
}
}
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"name": "api_key",
"in": "header"
},
"petstore_auth": {
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "http://example.org/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
}
}
components:
schemas:
GeneralError:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
Category:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
parameters:
skipParam:
name: skip
in: query
description: number of items to skip
required: true
schema:
type: integer
format: int32
limitParam:
name: limit
in: query
description: max records to return
required: true
schema:
type: integer
format: int32
responses:
NotFound:
description: Entity not found.
IllegalInput:
description: Illegal input for operation.
GeneralError:
description: General Error
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: http://example.org/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets

Paths Object(路径对象)

保存到各个资源及其操作的相对路径。该路径被附加到来Server Object的URL以构建完整的URL。 由于ACL约束,Path Item可能为空。

Patterned fields:
匹配字段属性类型描述
/{path}Path Item Object访问资源的相对路径。 字段名称必须以/开头。 路径从Server Object的url字段拼接成完整的URL。 可以使用模板路径。 匹配 URL 时,将会优先匹配模板路径。 具有相同层次结构但不同名称的路径不能存在,因为它们是相同的。 如果匹配不明确,则由工具决定使用哪一个。

这个对象可以使用Specification Extensions进行扩展。

路径匹配示例:

假设定义/pets/mine路径,匹配顺序为:

/pets/{petId}
/pets/mine

相同且无效的匹配方案:

/pets/{petId}
/pets/{name}

匹配不明确的匹配方案:

/{entity}/me
/books/{id}
示例:
{
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to",
"responses": {
"200": {
"description": "A list of pets.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/pet"
}
}
}
}
}
}
}
}
}
/pets:
get:
description: Returns all pets from the system that the user has access to
responses:
'200':
description: A list of pets.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/pet'

Path Item Object(路径详细信息对象)

描述在单个路径上可用的操作。由于ACL约束,Path Item可能为空,虽然仍可以通过文档查看,但无法确定哪些操作和参数可用。

Fixed Fields

属性名属性类型描述
$refstring允许对此path item进行外部定义。 引用的结构必须是Path Item Object。 如果Path Item Object字段同时出现在已定义对象和引用对象中,则定义无效。
summarystring一个可选的摘要,应用于此路径中的所有操作。
descriptionstring应用于此路径中的所有操作,如使用CommonMark syntax则可以用于展示富文本。
getOperation Objectget请求操作的定义。
putOperation Objectput请求操作的定义。
postOperation Objectpost请求操作的定义。
deleteOperation Objectdelete请求操作的定义。
optionsOperation Objectoptions请求操作的定义。
headOperation Objecthead请求操作的定义。
patchOperation Objectpatch请求操作的定义。
traceOperation Objecttrace请求操作的定义。
servers[Server Object]servers请求操作的定义。
parameters[Parameter Object | Reference Object]适用于此路径下所有请求操作的参数列表。 这些参数可以在Operation Object中配置parameters覆盖,但不能删除。 且列表内同一个位置的参数名不能重复。 该列表可以使用Reference Object链接到OpenAPI Objectcomponents/parameters定义的参数。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"get": {
"description": "Returns pets based on ID",
"summary": "Find pets by ID",
"operationId": "getPetsById",
"responses": {
"200": {
"description": "pet response",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
}
}
}
},
"default": {
"description": "error payload",
"content": {
"text/html": {
"schema": {
"$ref": "#/components/schemas/ErrorModel"
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to use",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "simple"
}
]
}
get:
description: Returns pets based on ID
summary: Find pets by ID
operationId: getPetsById
responses:
'200':
description: pet response
content:
'*/*' :
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
default:
description: error payload
content:
'text/html':
schema:
$ref: '#/components/schemas/ErrorModel'
parameters:
- name: id
in: path
description: ID of pet to use
required: true
schema:
type: array
items:
type: string
style: simple

Operation Object(请求对象)

路径上的单个API请求操作的描述。以下简称“请求”。

Fixed Fields
属性名属性类型描述
tags[string]API文档控制的tags列表。 tag可用于对请求资源进行分组。
summarystring请求的简单说明。
descriptionstring请求的详细描述。使用CommonMark syntax可以展示富文本。
externalDocsExternal Documentation Object该请求附加的外部文档。
operationIdstring用于标识请求的唯一字符串。 在API中描述的所有请求中,id必须是唯一的。 operationId值区分大小写。工具可以使用operationId来标识唯一请求,建议遵循常见的编程命名约定。
parameters[Parameter Object | Reference Object]适用于此请求的参数列表。 如果已经在Path Item中定义了parameters,在这里定义将覆盖它,但不会删除。 且列表内的参数在同一个位置参数名不能重复。 该列表可以使用Reference Object链接到OpenAPI Objectcomponents/parameters定义的参数。
requestBodyRequest Body Object | Reference Object适用于此请求的的requestBodyrequestBody仅在HTTP 1.1 specification RFC7231明确定义的HTTP方法中受支持。在其他HTTP specification定义不明确的情况下,应该忽略此参数。
responsesResponses Object必填, 该请求可能的响应列表。
callbacksMap[string, Callback Object | Reference Object]与请求相关的回调的映射。 key是Callback Object的唯一标识符。其每个值都是一个Callback Object,它描述了API提供者发起的请求和预期的响应。
deprecatedboolean声明过期的请求。 默认值为false。
security[Security Requirement Object]API的安全机制配置。值列表可以使用任意的Security Requirement Object。只需满足其中一个就可以对请求进行授权。在这里定义会覆盖顶级配置的安全机制。如果要忽略顶级的配置,可以使用空数组。
servers[Server Object]提供该请求的服务器数组。如果在Path Item根对象指定了servers,该值会覆盖以上配置。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"tags": [
"pet"
],
"summary": "Updates a pet in the store with form data",
"operationId": "updatePetWithForm",
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Updated name of the pet",
"type": "string"
},
"status": {
"description": "Updated status of the pet",
"type": "string"
}
},
"required": ["status"]
}
}
}
},
"responses": {
"200": {
"description": "Pet updated.",
"content": {
"application/json": {},
"application/xml": {}
}
},
"405": {
"description": "Method Not Allowed",
"content": {
"application/json": {},
"application/xml": {}
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
tags:
- pet
summary: Updates a pet in the store with form data
operationId: updatePetWithForm
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
schema:
type: string
requestBody:
content:
'application/x-www-form-urlencoded':
schema:
properties:
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
required:
- status
responses:
'200':
description: Pet updated.
content:
'application/json': {}
'application/xml': {}
'405':
description: Method Not Allowed
content:
'application/json': {}
'application/xml': {}
security:
- petstore_auth:
- write:pets
- read:pets

External Documentation Object(附加文档信息对象)

引用外部资源的扩展文档。

Fixed Fields
属性名属性类型描述
descriptionstring目标文档的简短描述,使用CommonMark syntax可以用于展示富文本。
urlstring必填,指向目标文档的URL. 必须为URL格式。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"description": "Find more info here",
"url": "https://example.com"
}
description: Find more info here
url: https://example.com

Parameter Object(参数对象)

描述单个请求的参数,在同一个位置参数名不能重复。

参数位置

in字段指定了参数的四个位置::

  • path - 与模板路径一起使用,参数实际上是请求URL的一部分。 但不包括API的host和base path。 例如,在/items/{itemId} 中,路径参数为itemId。
  • query - 附加到URL后面的参数,例如在/items?id=###请求里,query参数为 id.
  • header - 自定义请求头作为请求的一部分。注意,RFC7230规定请求头名称不区分大小写。
  • cookie - 设置特定的cookie值传递给API。
Fixed Fields
属性名属性类型描述
namestring必填, 参数的名称,区分大小写;如果in"path",则名称字段必须在模板路径的表达式中;如果in"header",且名称字段为“Accept”、“Content-Type”或“Authorization”,则定义无效;其他情况则可以直接使用该字段;
instring必填, 参数的位置,有效值为 "query", "header", "path" or "cookie"
descriptionstring参数的简要说明和使用的举例。 使用CommonMark syntax可以用于展示富文本。
requiredboolean是否为必填参数。如果参数的in"path",此属性的值必须为true;否则,该属性默认值为false。
deprecatedboolean指定参数已弃用;默认值为false。
allowEmptyValueboolean设置参数是否可以为空,仅对query参数有效, 默认值为假。 如果使用了 style,并且如果 behavior 为 n/a(不能序列化),则 allowEmptyValue 的值应被忽略;不推荐使用此属性,因为它可能会在以后的版本中被删除。

指定参数的序列化规则以两种方式之一。 对于更简单的场景,schemastyle可以描述参数的结构和语法。

属性名属性类型描述
stylestring描述如何根据参数值的类型对参数值进行序列化。 默认值基于in的值;instyle的对应关系为:query - formpath - simpleheader - simplecookie - form
explodeboolean当属性为true时,会为array的每一个值或object的key-value生成独立的参数放到map里。 对于其他类型,此属性无效。 当styleform时,默认值为true;为其他值时,默认值为 false。
allowReservedboolean参数值是否为保留字,如RFC3986所定义:/?#[]@!$&'()*+,;=在不包含URL编码(percent-encoding)的情况下。 此属性仅适用于in值为query的参数。 默认值为false。
schemaSchema Object | Reference Object该schema定义了用于参数的类型。
exampleAny参数值的示例。 该示例应匹配指定的schema和编码。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。不能用JSON或YAML表示的media types的示例,可以用字符串表示,并在必要时进行转义。
examplesMap[ string, Example Object | Reference Object]参数值的示例。每个示例都应该为参数指定编码的正确格式的值。examples属性和example属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。

针对更复杂的场景, content属性可以定义参数的media type和schema。一个参数配置必须包含schema属性或content属性,但不能同时包含两者。当exampleexamplesschema一起提供时,该示例必须遵循指定的参数序列化策略。

属性名属性类型描述
contentMap[string, Media Type Object]表示参数的map。key为media type,值为它的描述。map有且只能有一个值。
Style 的值:

为了支持简单参数的序列化,定义了一组style 值。

styletypeinComments
matrixprimitive, array, objectpathPath-style参数由RFC6570定义。
labelprimitive, array, objectpathLabel style参数由RFC6570定义。
formprimitive, array, objectquery, cookie该选项将collectionFormat替换为OpenAPI 2.0中的csv(explode为false时)或multi(explode为true时)值。
simplearraypath, headerSimple style参数由RFC6570定义。该选项将collectionFormat替换为OpenAPI 2.0中的csv
spaceDelimitedarrayquery空格分隔的数组值。该选项将collectionFormat替换为OpenAPI 2.0中的ssv
pipeDelimitedarrayquery管道(|)分隔数组值。该选项将collectionFormat替换为OpenAPI 2.0中的pipes
deepObjectobjectquery提供一种使用表单参数嵌套的对象。
Style 示例:

假设color参数为以下值之一:

string -> "blue"
array -> ["blue","black","brown"]
object -> { "R": 100, "G": 200, "B": 150 }

差异对照表:

styleexplodeemptystringarrayobject
matrixfalse;color;color=blue;color=blue,black,brown;color=R,100,G,200,B,150
matrixtrue;color;color=blue;color=blue;color=black;color=brown;R=100;G=200;B=150
labelfalse..blue.blue.black.brown.R.100.G.200.B.150
labeltrue..blue.blue.black.brown.R=100.G=200.B=150
formfalsecolor=color=bluecolor=blue,black,browncolor=R,100,G,200,B,150
formtruecolor=color=bluecolor=blue&color=black&color=brownR=100&G=200&B=150
simplefalsen/ablueblue,black,brownR,100,G,200,B,150
simpletruen/ablueblue,black,brownR=100,G=200,B=150
spaceDelimitedfalsen/an/ablue%20black%20brownR%20100%20G%20200%20B%20150
pipeDelimitedfalsen/an/ablue|black|brownR|100|G|200|B|150
deepObjecttruen/an/an/acolor[R]=100&color[G]=200&color[B]=150

这个对象可以使用Specification Extensions进行扩展。

示例:
64位integer数组的header参数示例:
{
"name": "token",
"in": "header",
"description": "token to be passed as a header",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"style": "simple"
}
name: token
in: header
description: token to be passed as a header
required: true
schema:
type: array
items:
type: integer
format: int64
style: simple
string类型的path参数示例:
{
"name": "username",
"in": "path",
"description": "username to fetch",
"required": true,
"schema": {
"type": "string"
}
}
name: username
in: path
description: username to fetch
required: true
schema:
type: string

字符串类型的query参数,通过重复来实现传递多个值:

{
"name": "id",
"in": "query",
"description": "ID of the object to fetch",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "form",
"explode": true
}
name: id
in: query
description: ID of the object to fetch
required: false
schema:
type: array
items:
type: string
style: form
explode: true

free-form的query参数,允许使用特定类型的undefined参数:

{
"in": "query",
"name": "freeForm",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
},
},
"style": "form"
}
in: query
name: freeForm
schema:
type: object
additionalProperties:
type: integer
style: form

使用content定义序列化的一个complex参数:

{
"in": "query",
"name": "coordinates",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"lat",
"long"
],
"properties": {
"lat": {
"type": "number"
},
"long": {
"type": "number"
}
}
}
}
}
}
in: query
name: coordinates
content:
application/json:
schema:
type: object
required:
- lat
- long
properties:
lat:
type: number
long:
type: number

Request Body Object(请求体对象)

描述单个request body.

Fixed Fields
属性名属性类型描述
descriptionstringrequest body的简短描述. 使用CommonMark syntax可以用于展示富文本。
contentMap[string, Media Type Object]必填. request body的内容。key是media type或media type range和能描述它的值。 对于匹配多个key的请求,只有最具体的key适用。 例如text/plain覆盖 text/*
requiredboolean确定请求中是否需要request body。默认值为false

这个对象可以使用Specification Extensions进行扩展。

示例:
带有model引用的request body
{
"description": "user to add to the system",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
},
"examples": {
"user" : {
"summary": "User Example",
"externalValue": "http://foo.bar/examples/user-example.json"
}
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/User"
},
"examples": {
"user" : {
"summary": "User example in XML",
"externalValue": "http://foo.bar/examples/user-example.xml"
}
}
},
"text/plain": {
"examples": {
"user" : {
"summary": "User example in Plain text",
"externalValue": "http://foo.bar/examples/user-example.txt"
}
}
},
"*/*": {
"examples": {
"user" : {
"summary": "User example in other format",
"externalValue": "http://foo.bar/examples/user-example.whatever"
}
}
}
}
}
description: user to add to the system
content:
'application/json':
schema:
$ref: '#/components/schemas/User'
examples:
user:
summary: User Example
externalValue: 'http://foo.bar/examples/user-example.json'
'application/xml':
schema:
$ref: '#/components/schemas/User'
examples:
user:
summary: User Example in XML
externalValue: 'http://foo.bar/examples/user-example.xml'
'text/plain':
examples:
user:
summary: User example in text plain format
externalValue: 'http://foo.bar/examples/user-example.txt'
'*/*':
examples:
user:
summary: User example in other format
externalValue: 'http://foo.bar/examples/user-example.whatever
字符串数组的body参数:
{
"description": "user to add to the system",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
description: user to add to the system
required: true
content:
text/plain:
schema:
type: array
items:
type: string

Media Type Object(媒体类型对象)

Media Type Object提供标识media type的key的schema和examples。

Fixed Fields
属性名属性类型描述
schemaSchema Object | Reference Object定义请求响应参数content的schema。
exampleAnymedia type示例。 示例应使用media type的正确格式。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。
examplesMap[ string, Example Object | Reference Object]media type示例。如果存在,每个示例对象应该匹配media type和指定的schema。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。
encodingMap[string, Encoding Object]属性名与编码信息的映射。 作为属性名的key必须作为属性存在于schema中。 当media type为multipartapplication/x-www-form-urlencoded时,编码对象应该仅适用于requestBody对象。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
},
"examples": {
"cat" : {
"summary": "An example of a cat",
"value":
{
"name": "Fluffy",
"petType": "Cat",
"color": "White",
"gender": "male",
"breed": "Persian"
}
},
"dog": {
"summary": "An example of a dog with a cat's name",
"value" : {
"name": "Puma",
"petType": "Dog",
"color": "Black",
"gender": "Female",
"breed": "Mixed"
},
"frog": {
"$ref": "#/components/examples/frog-example"
}
}
}
}
}
application/json: 
schema:
$ref: "#/components/schemas/Pet"
examples:
cat:
summary: An example of a cat
value:
name: Fluffy
petType: Cat
color: White
gender: male
breed: Persian
dog:
summary: An example of a dog with a cat's name
value:
name: Puma
petType: Dog
color: Black
gender: Female
breed: Mixed
frog:
$ref: "#/components/examples/frog-example"
文件上传的注意事项

与2.0规范相比,OpenAPI中的file input/output使用与其他schema类型相同的方式进行描述。具体如下:

# content transferred with base64 encoding
schema:
type: string
format: base64
# content transferred in binary (octet-stream):
schema:
type: string
format: binary

这些例子既适用于文件上传的输入载荷,也适用于响应载荷。

POST请求中提交文件的requestBody参考如下:

requestBody:
content:
application/octet-stream:
schema:
# a binary file of any type
type: string
format: binary

指定media types:

# multiple, specific media types may be specified:
requestBody:
content:
# a binary file of type png or jpeg
'image/jpeg':
schema:
type: string
format: binary
'image/png':
schema:
type: string
format: binary

上传多个文件,必须使用multipart的media type:

requestBody:
content:
multipart/form-data:
schema:
properties:
# The property name 'file' will be used for all files.
file:
type: array
items:
type: string
format: binary
支持x-www-form-urlencoded的请求

要使用RFC1866的form url encoding提交内容,可以使用以下方式:

requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
id:
type: string
format: uuid
address:
# complex types are stringified to support RFC 1866
type: object
properties: {}

在这个例子中,requestBody中的content在传递给服务器时必须遵循RFC1866进行字符串化。address字段的复杂对象也将被字符串化。

在传递application/x-www-form-urlencoded类型的complex对象时,这些属性的默认序列化策略在Encoding Objectstyle属性中为form

multipart Content的特殊注意事项

在请求操作时,通常使用Content-Typemultipart/form-data作为请求体。 与 2.0 相比,当使用multipart content时,需要定义一个schema作为请求的输入参数。这样做可以支持complex结构以及多个文件的上传。

当传入multipart类型时,可以使用分界线(—)来分隔正在传输内容的各个部分,以下是为multipart定义的几种默认Content-Type

  • 如果属性是primitive或者数组类型的primitive,默认的Content-Typ是text/plain
  • 如果属性是复杂对象或者是数组类型的复杂对象,默认的Content-Type是application/json
  • 如果属性是type: stringformat: binaryformat: base64(又名 file object),则默认Content-Type为 application/octet-stream

Examples:

requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
id:
type: string
format: uuid
address:
# default Content-Type for objects is `application/json`
type: object
properties: {}
profileImage:
# default Content-Type for string/binary is `application/octet-stream`
type: string
format: binary
children:
# default Content-Type for arrays is based on the `inner` type (text/plain here)
type: array
items:
type: string
addresses:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'

使用encoding 属性可以控制multipart 请求body的部分序列化。 此属性仅适用于multipartapplication/x-www-form-urlencoded 请求的body。

Encoding Object(编码对象)

定义应用于单个schema属性的单个编码。

Fixed Fields
属性名属性类型描述
contentTypestring用于编码特定属性的Content-Type。 默认值取决于属性类型:对stringformatbinaryapplication/octet-stream; 对于其他primitive类型为text/plain; 对objectapplication/json; 对array默认值是根据内部类型定义的。 该值可以是特定媒体类型(例如application/json)、通配符媒体类型(例如image/*)或用逗号分隔的列表。
headersMap[string, Header Object| Reference Object]一个为header提供附加信息的map,例如Content-DispositionContent-Type如果单独描述本属性应该忽略。 如果请求body的media type不是multipart,本属性应该忽略。
stylestring描述如何根据类型序列化属性值。 有关style属性的详细信息,参考Parameter Object。 该行为遵循与query参数相同的值,包括默认值。 如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。
explodeboolean当属性为true时,会为array的每一个值或object的key-value生成独立的参数放到map里。 对于其他类型,此属性无效。 当styleform时,默认值为true;为其他值时,默认值为 false。如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。
allowReservedboolean参数值是否为保留字,如RFC3986所定义:/?#[]@!$&'()*+,;=在不包含URL编码(percent-encoding)的情况下。 默认值为false。如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。

这个对象可以使用Specification Extensions进行扩展。

示例:
requestBody:
content:
multipart/mixed:
schema:
type: object
properties:
id:
# default is text/plain
type: string
format: uuid
address:
# default is application/json
type: object
properties: {}
historyMetadata:
# need to declare XML format!
description: metadata in XML format
type: object
properties: {}
profileImage:
# default is application/octet-stream, need to declare an image type only!
type: string
format: binary
encoding:
historyMetadata:
# require XML Content-Type in utf-8 encoding
contentType: application/xml; charset=utf-8
profileImage:
# only accept png/jpeg
contentType: image/png, image/jpeg
headers:
X-Rate-Limit-Limit:
description: The number of allowed requests in the current period
schema:
type: integer

Responses Object(响应容器对象)

请求预期响应的容器。 容器内为一个或多个map,将HTTP响应码映射到预期响应。

该文档不一定会涵盖所有的HTTP响应码,因为它们可能事先并没有定义或说明。 但是文档应涵盖所有请求成功和错误的响应。

default 属性是如果配置的HTTP响应码没有匹配到,则默认响应的对象。

Responses Object至少应该定义一个成功请求的响应代码。

Fixed Fields
属性名属性类型描述
defaultResponse Object | Reference Object指定响应代码之外的默认响应。 Reference Object可以链接到OpenAPI Object's components/responses部分定义的响应。
Patterned Fields
匹配字段属性类型描述
HTTP Status CodeResponse Object | Reference Object任何 HTTP 状态代码都可以用作属性名称,但每个状态码只能定义一次。链接到OpenAPI Object's components/responses部分定义的响应。 此字段必须用引号引起来(例如"200")以实现 JSON 和 YAML 之间的兼容性。 要定义响应代码的范围,此字段可以包含大写通配符X。例如2XX表示 [200-299] 之间的所有响应代码。 仅允许定义以下范围:1XX, 2XX, 3XX, 4XX, 和5XX。 如果使用显式代码定义响应,则显式代码定义优先于该代码的范围定义。

这个对象可以使用Specification Extensions进行扩展。

Responses Object 示例:
状态码为200和其他(错误)情况的响应示例:
{
"200": {
"description": "a pet to be returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorModel"
}
}
}
}
}
'200':
description: a pet to be returned
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel

Response Object(响应对象)

描述来自API请求的单个响应,包括设计时基于响应请求的静态链接。

Fixed Fields
属性名属性类型描述
descriptionstring必填. response的简短描述. 使用CommonMark syntax可以用于展示富文本。
headersMap[string, Header Object| Reference Object]以header名定义的一个map,header名以RFC7230定义的状态为准,不区分大小写。如果定义的响应名为"Content-Type",这个属性会被忽略。
contentMap[string, Media Type Object]包含响应载荷的map。key是media type或media type range和能描述它的值。 对于匹配多个key的请求,只有最具体的key适用。 例如text/plain覆盖 text/*
linksMap[string, Link Object | Reference Object]链接请求的map。map的key为link的短名称, 遵循Component Object中的命名约束。

这个对象可以使用Specification Extensions进行扩展。

示例:
数组类型的复杂对象响应示例:
{
"description": "A complex object array response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VeryComplexType"
}
}
}
}
}
description: A complex object array response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/VeryComplexType'
string类型的响应示例:
{
"description": "A simple string response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}

}
description: A simple string response
content:
text/plain:
schema:
type: string
带标题的纯文本响应示例:
{
"description": "A simple string response",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "whoa!"
}
}
},
"headers": {
"X-Rate-Limit-Limit": {
"description": "The number of allowed requests in the current period",
"schema": {
"type": "integer"
}
},
"X-Rate-Limit-Remaining": {
"description": "The number of remaining requests in the current period",
"schema": {
"type": "integer"
}
},
"X-Rate-Limit-Reset": {
"description": "The number of seconds left in the current period",
"schema": {
"type": "integer"
}
}
}
}
description: A simple string response
content:
text/plain:
schema:
type: string
example: 'whoa!'
headers:
X-Rate-Limit-Limit:
description: The number of allowed requests in the current period
schema:
type: integer
X-Rate-Limit-Remaining:
description: The number of remaining requests in the current period
schema:
type: integer
X-Rate-Limit-Reset:
description: The number of seconds left in the current period
schema:
type: integer
没有返回值的响应示例:
{
"description": "object created"
}
description: object created

Callback Object(回调对象)

可能与父操作相关的回调map。map中的每个值都是一个Path Item Object,它描述了一组由API提供者发起的请求和预期的响应。用于标识Path Item Object的key是一个运行时表达式(runtime expression),用它标识回调操作的URL。

Patterned Fields
匹配字段属性类型描述
{expression}Path Item Object定义回调请求和响应的Path Item Object对象. A complete example is available.

这个对象可以使用Specification Extensions进行扩展。

Key Expression

标识Path Item Object的key是一个运行时表达式,可以在运行HTTP 请求/响应时,从上下文中获取值以标识要用于回调请求的URL,使用运行时表达式可以访问完整的HTTP请求。这包括访问RFC6901引用正文的任何部分。

如HTTP请求如下:

POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
Host: example.org
Content-Type: application/json
Content-Length: 187

{
"failedUrl" : "http://clientdomain.com/failed",
"successUrls" : [
"http://clientdomain.com/fast",
"http://clientdomain.com/medium",
"http://clientdomain.com/slow"
]
}

201 Created
Location: http://example.org/subscription/1

以下展示了使用表达式的方式,假设回调操作有一个名为eventType 的path参数和一个名为queryUrl的query参数。

ExpressionValue
$urlhttp://example.org/subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning
$methodPOST
$request.path.eventTypemyevent
$request.query.queryUrlhttp://clientdomain.com/stillrunning
$request.header.content-Typeapplication/json
$request.body#/failedUrlhttp://clientdomain.com/failed
$request.body#/successUrls/2http://clientdomain.com/medium
$response.header.Locationhttp://example.org/subscription/1
Callback Object示例:

以下示例使用用户提供的queryUrl查询字符串参数来定义回调 URL。

myCallback:
'{$request.query.queryUrl}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed

服务器是固定的,但查询字符串参数是取请求正文中的idemail 属性填充的回调示例。

transactionCallback:
'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed

Example Object(示例对象)

Fixed Fields
属性名属性类型描述
summarystring示例的简短描述。
descriptionstring示例的完整描述,使用CommonMark syntax可以用于展示富文本。
valueAny嵌入式示例值(直接写在这里的示例)。value 字段和externalValue 字段是互斥的。不能在JSON或YAML中自然表示的媒体类型,请使用字符串值来表示,并在必要时转义。
externalValuestring指向示例的URL(引用示例)。提供了不方便展示示例(如太长了)的引用能力。value 字段和externalValue 字段是互斥的。

这个对象可以使用Specification Extensions进行扩展。

所有情况下,示例值都应该与关联的schema类型兼容。工具实现可以选择自动验证兼容性,如果不兼容则拒绝示例值。

示例:
在request body中的示例:
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/Address'
examples:
foo:
summary: A foo example
value: {"foo": "bar"}
bar:
summary: A bar example
value: {"bar": "baz"}
'application/xml':
examples:
xmlExample:
summary: This is an example in XML
externalValue: 'http://example.org/examples/address-example.xml'
'text/plain':
examples:
textExample:
summary: This is a text example
externalValue: 'http://foo.bar/examples/address-example.txt'
在parameter中的示例:
parameters:
- name: 'zipCode'
in: 'query'
schema:
type: 'string'
format: 'zip-code'
examples:
zip-example:
$ref: '#/components/examples/zip-example'
在response中的示例:
responses:
'200':
description: your car appointment has been booked
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
examples:
confirmation-success:
$ref: '#/components/examples/confirmation-success'

Link object 表示响应的可能设计时链接。链接存在并不能保证能够成功调用,它只是提供了响应和其他操作之间的关系和遍历机制。

Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.

与动态链接(响应负载中提供的链接)不同,运行的时候,OAS链接机制不需要响应中的链接信息。

Runtime表达式用于访问操作中的值,并在调用时将它们作为参数。

Fixed Fields
属性名属性类型描述
operationRefstring对 OAS请求的相对或绝对URI引用。该字段与operationId字段互斥,并且必须指向一个Operation Object 。相对operationRef 值可用于定位OpenAPI定义中的现有Operation Object
operationIdstring已定义并且可解析的OAS请求的名称,由唯一的operationId定义。该字段与operationRef字段互斥。
parametersMap[string, Any | {expression}]表示要传递给请求参数的map,该请求由operationId 指定或通过operationRef标识。key是要使用的参数名称,而值可以是常量或Runtime表达式。对于在不同位置(例如 path.id)使用相同参数名称的请求,可以使用参数位置 [{in}.]{name}来限定参数名称。
requestBodyAny | {expression}调用目标请求时用作请求body的文字值或Runtime表达式
descriptionstring链接的描述,使用CommonMark syntax可以用于展示富文本。
serverServer Object目标请求要使用的服务器对象。

这个对象可以使用Specification Extensions进行扩展。

必须使用operationRefoperationId来标识链接操作。在使用 operationId的情况下,它必须是在OAS文档的范围内唯一定义的。由于名称可能会冲突,因此具有外部引用的规范推荐使用operationRef

示例:

在请求中使用表达式传递link的参数,如$request.path.id

paths:
/users/{id}:
parameters:
- name: id
in: path
required: true
description: the user identifier, as userId
schema:
type: string
get:
responses:
'200':
description: the user being returned
content:
application/json:
schema:
type: object
properties:
uuid: # the unique user id
type: string
format: uuid
links:
address:
# the target link operationId
operationId: getUserAddress
parameters:
# get the `id` field from the request path parameter named `id`
userId: $request.path.id
# the path item of the linked operation
/users/{userid}/address:
parameters:
- name: userid
in: path
required: true
description: the user identifier, as userId
schema:
type: string
# linked operation
get:
operationId: getUserAddress
responses:
'200':
description: the user's address

在运行的时候,当表达式无法计算(错误)时,不会将参数值传递给请求。

response body中的值可用于链接。

links:
address:
operationId: getUserAddressByUUID
parameters:
# get the `uuid` field from the `uuid` field in the response body
userUuid: $response.body#/uuid

工具自行决定是否遵循所有链接。权限和成功调用该链接的能力都不能仅由关系来保证。

OperationRef Examples

由于使用operationId 进行引用时,operationId 可能为空(operationId请求对象中的一个可选字段),因此也可以通过 operationRef进行相对引用:

links:
UserRepositories:
# returns array of '#/components/schemas/repository'
operationRef: '#/paths/~12.0~1repositories~1{username}/get'
parameters:
username: $response.body#/username

或绝对引用:

links:
UserRepositories:
# returns array of '#/components/schemas/repository'
operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get'
parameters:
username: $response.body#/username

请注意,在JSON中使用 operationRef时,正斜杠需要转义。

Runtime Expressions

使用Runtime表达式可以在API调用过程中,从HTTP消息里提取信息来定义值。Link ObjectCallback Object都使用此机制。

Runtime表达式由下列ABNF语法定义:

      expression = ( "$url" / "$method" / "$statusCode" / "$request." source / "$response." source )
source = ( header-reference / query-reference / path-reference / body-reference )
header-reference = "header." token
query-reference = "query." name
path-reference = "path." name
body-reference = "body" ["#" json-pointer ]
json-pointer = *( "/" reference-token )
reference-token = *( unescaped / escaped )
unescaped = %x00-2E / %x30-7D / %x7F-10FFFF
; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'
escaped = "~" ( "0" / "1" )
; representing '~' and '/', respectively
name = *( CHAR )
token = 1*tchar
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
"^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA

这里的 json-pointer来自RFC 6901char来自RFC 7159token来自RFC 7230.

name 标识符区分大小写,而token 不区分大小写。

下表提供了Runtime表达式的示例及其在值中的使用示例:

表达式对照表
数据位置示例表达式说明
HTTP Method$method提取请求的method
Requested media type$request.header.accept提取请求的header
Request parameter$request.path.id提取请求的参数,请求参数必须在请求的parameters中声明,否则无法提取。包括请求header。
Request body property$request.body#/user/uuid提取请求body的值,在请求载荷中,可以对请求body的部分或整个body进行引用。
Request URL$url提取请求的URL
Response value$response.body#/status提取返回值,在返回有效载荷中,可以对响应body部分或整个body进行提取。
Response header$response.header.Server提取返回的header,仅单个header可用

Runtime表达式保留提取值的类型。将表达式放到{}花括号内,可以嵌入到字符串中。

Header Object(头对象)

Header Object遵循Parameter Object的结构,但有下列不同:

  1. 不能指定name ,它在相应的header的map中给出。
  2. 不能指定in,它隐含在header中.
  3. 受位置影响的所有特征必须适用于header 位置(例如 style)。
示例:
integer类型的header示例:
{
"description": "The number of allowed requests in the current period",
"schema": {
"type": "integer"
}
}
description: The number of allowed requests in the current period
schema:
type: integer

Tag Object(标签对象)

将metadata添加到Operation Object使用的单个标签信息。在Operation Object实例中定义的每个标签都不是必填的。

Fixed Fields
属性名属性类型描述
namestring必填,标签的名字。
descriptionstring标签的简短描述, 使用CommonMark syntax可以用于展示富文本。
externalDocsExternal Documentation Object额外的外部文档。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"name": "pet",
"description": "Pets operations"
}
name: pet
description: Pets operations
name: pet
description: Pets operations

Reference Object(引用对象)

一个简单对象,允许在内部和外部引用规范中的其他组件。该对象由JSON Reference定义,遵循相同的结构、行为和规则。关于该规范,引用解析是由JSON Reference定义的,而不是由JSON Schema定义的。

固定字段:

属性名属性类型描述
$refstring必填,引用字符串

此对象不能使用附加属性进行扩展,并且应忽略添加的其他任何属性。

示例:
{
"$ref": "#/components/schemas/Pet"
}
$ref: '#/components/schemas/Pet'
相对Schema文档:
{
"$ref": "Pet.json"
}
$ref: Pet.yaml
相对于Schema文档内的对象
{
"$ref": "definitions.json#/Pet"
}
$ref: definitions.yaml#/Pet

Schema Object(架构对象)

Schema Object 允许定义输入和输出数据类型。 这些类型可以是objects,也可以是primitivesarrays。 此对象是JSON Schema Specification Wright Draft 00的扩展子集。

更多信息请参考 JSON Schema CoreJSON Schema Validation。 如无例外,属性定义遵循 JSON Schema。

Properties

以下属性直接取自JSON Schema定义,遵循相同的规范:

  • title
  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum
  • maxLength
  • minLength
  • pattern (正则表达式字符串,使用Ecma-262 Edition 5.1 regular expression方言)
  • maxItems
  • minItems
  • uniqueItems
  • maxProperties
  • minProperties
  • required
  • enum

以下属性取自JSON Schema 定义,但是根据OpenAPI规范进行了部分调整,调整如下:

  • type - 必须为字符串且不能通过数组传递多个.
  • allOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • oneOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • anyOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • not - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • items -值必须是一个object而不是一个array. 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。如果typearrayitems必须存在
  • properties - 属性定义必须是 Schema Object,而不是标准的 JSON Schema。 (内联或引用).
  • additionalProperties - 值可以为一个boolean或者一个object. 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。和JSON Schema一致,additionalProperties默认为true。
  • description - CommonMark syntax可用富文本表示。
  • format - 参考Data Type Formats。在依赖于JSON Schema的定义格式的同时,OAS还提供了一些额外的预定义格式。
  • default - 如果未提供默认值,则使用该值作为默认值。和 JSON Schema 不同的是该值必须符合在同一级别定义的 Schema Object的定义类型。 例如,如果typestring,那么 default可以是 "foo" 但不能是 1

在任何地方使用Schema Object,都可以在当前位置上使用 Reference Object。在可以使用引用定义的情况下请勿使用内联定义。

除了以上提及的属性,其他由JSON Schema规范定义的属性是不受支持的,另外,可以使用以下字段进一步的描述Schema:

Fixed Fields
属性名属性类型描述
nullablebooleantrue时,type允许为"null",只在同一个Schema Object中明确定义type时有效。 默认值为false
discriminatorDiscriminator Object增加对polymorphism(多态)的支持。discriminator是一个对象名称,用于区分可满足条件的其他schemas。参考Composition and Inheritance了解更多细节。
readOnlyboolean仅与Schema的"properties"定义相关。 将属性声明为只读。如果该属性为true并且在required列表中,则required将仅对响应生效(对请求无效)。 readOnlywriteOnly不能同时为true。 该属性默认值为false
writeOnlyboolean仅与Schema的"properties"定义相关。 将属性声明为只写。 与readOnly相反,则required将仅对请求生效(对响应无效)。readOnlywriteOnly不能同时为true。 该属性默认值为false
xmlXML Object只能用于properties schemas。 对root schemas没有影响。 添加其他的metadata来描述此属性的XML。
externalDocsExternal Documentation Object此schema的其他外部文档。
exampleAny此schema实例示例的free-form属性。 不能用JSON或YAML展示的示例,可以使用字符串表示,并在必要时进行转义。
deprecatedboolean指定schema已被弃用并且应该停止使用。 默认值为false

这个对象可以使用Specification Extensions进行扩展。

组合和继承 (多态)

OpenAPI 规范可以使用JSON Schema的allOf属性来组合和扩展模型(model)的定义。 allOf是一个object的数组,这些object互相独立,但共同组成一个对象。

虽然组合提供了模型(model)可扩展性,但这并不代表模型(model)之间存在层次结构。 为了支持多态性,OpenAPI 规范添加了discriminator字段。 discriminator决定要验证schema定义的哪些属性的名称。 所以discriminator 字段必须为必填字段。 有两种方法可以为继承实例定义discriminator 的值。

  • 使用schema的名字。
  • 重写schema的名字来覆盖老的值,内联模式定义的情况下,如果没有指定id,将不能用于多态性。
XML Modeling

当将JSON转换为xml时,xml属性允许额外的定义。 XML Object包含有关可用属性的其他信息。

示例:
普通值(Primitive)
{
"type": "string",
"format": "email"
}
type: string
format: email
简单模型
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"address": {
"$ref": "#/components/schemas/Address"
},
"age": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
}
type: object
required:
- name
properties:
name:
type: string
address:
$ref: '#/components/schemas/Address'
age:
type: integer
format: int32
minimum: 0
map模型/数据字典
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}
type: object
additionalProperties:
type: string
引用模型
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ComplexModel"
}
}
type: object
additionalProperties:
$ref: '#/components/schemas/ComplexModel'
带示例的模型
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"example": {
"name": "Puma",
"id": 1
}
}
type: object
properties:
id:
type: integer
format: int64
name:
type: string
required:
- name
example:
name: Puma
id: 1
组合的模型
{
"components": {
"schemas": {
"ErrorModel": {
"type": "object",
"required": [
"message",
"code"
],
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "integer",
"minimum": 100,
"maximum": 600
}
}
},
"ExtendedErrorModel": {
"allOf": [
{
"$ref": "#/components/schemas/ErrorModel"
},
{
"type": "object",
"required": [
"rootCause"
],
"properties": {
"rootCause": {
"type": "string"
}
}
}
]
}
}
}
}
components:
schemas:
ErrorModel:
type: object
required:
- message
- code
properties:
message:
type: string
code:
type: integer
minimum: 100
maximum: 600
ExtendedErrorModel:
allOf:
- $ref: '#/components/schemas/ErrorModel'
- type: object
required:
- rootCause
properties:
rootCause:
type: string
支持多台的模型
{
"components": {
"schemas": {
"Pet": {
"type": "object",
"discriminator": {
"propertyName": "petType"
},
"properties": {
"name": {
"type": "string"
},
"petType": {
"type": "string"
}
},
"required": [
"name",
"petType"
]
},
"Cat": {
"description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
"allOf": [
{
"$ref": "#/components/schemas/Pet"
},
{
"type": "object",
"properties": {
"huntingSkill": {
"type": "string",
"description": "The measured skill for hunting",
"default": "lazy",
"enum": [
"clueless",
"lazy",
"adventurous",
"aggressive"
]
}
},
"required": [
"huntingSkill"
]
}
]
},
"Dog": {
"description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
"allOf": [
{
"$ref": "#/components/schemas/Pet"
},
{
"type": "object",
"properties": {
"packSize": {
"type": "integer",
"format": "int32",
"description": "the size of the pack the dog is from",
"default": 0,
"minimum": 0
}
},
"required": [
"packSize"
]
}
]
}
}
}
}
components:
schemas:
Pet:
type: object
discriminator:
propertyName: petType
properties:
name:
type: string
petType:
type: string
required:
- name
- petType
Cat: ## "Cat" will be used as the discriminator value
description: A representation of a cat
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
properties:
huntingSkill:
type: string
description: The measured skill for hunting
enum:
- clueless
- lazy
- adventurous
- aggressive
required:
- huntingSkill
Dog: ## "Dog" will be used as the discriminator value
description: A representation of a dog
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
properties:
packSize:
type: integer
format: int32
description: the size of the pack the dog is from
default: 0
minimum: 0
required:
- packSize

Discriminator Object

当请求body或响应有效载荷是许多不同schema之一时,鉴别器对象(discriminator object)可用于帮助序列化、反序列化和验证。鉴别器是schema的特定对象,用于根据与其关联的值通知消费者替代schema的规范。

当使用discriminator时候,内联模式将会失效。

Fixed Fields
属性名属性类型描述
propertyNamestring必填,鉴别器值的属性的名称。
mappingMap[string, string]用于保存有效负载值(payload value)和schema名称或引用之间映射的的对象。

只有在使用复合关键字oneOf, anyOf, allOf之一时,鉴别器对象才是可用的。

在OAS 3.0中,响应载荷可以被描述为任意数量的类型之一:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'

在上面的例子中,响应的有效载荷必须与 CatDogLizard描述的schema之一完全匹配才可以通过验证。在这种情况下,使用鉴别器可以快速验证和选择匹配schema,这可能是比较消耗资源的操作,具体取决于schema的复杂性。也可以准确地指定字段使用哪个模式:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'
discriminator:
propertyName: petType

在上面例子中,期望是一个名为petType的属性必须出现在响应载荷中,并且该值将对应于OAS文档中定义的schema名称。因此响应有效载荷虚构为:

{
"id": 12345,
"petType": "Cat"
}

这样会指定Cat的schema与此有效载荷一起使用。

在鉴别器字段的值与schema的名称不匹配或不能隐式映射的情况下,可以选择直接定义映射关系:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'
- $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
discriminator:
propertyName: petType
mapping:
dog: '#/components/schemas/Dog'
monster: 'https://gigantic-server.com/schemas/Monster/schema.json'

这里 dog 的鉴别器值将映射到模式#/components/schemas/Dog,而不是 Dog的默认(隐式映射)的值。如果鉴别器值与隐式或显式映射不匹配,则无法确定schema并且应该验证失败。映射key必须是字符串,但工具可以将响应值转换为字符串以进行比较。

当与anyOf构造结合使用时,鉴别器的使用可以避免多个schema可能满足单个有效载荷的歧义。

oneOfanyOf 用例中,必须明确列出所有可能的schema。为了避免重复定义,可以将鉴别器添加到父schema定义中,并且在allOf 构造中包含父schema的所有schema都可以用作替代schema。

举个栗子:

components:
schemas:
Pet:
type: object
required:
- petType
properties:
petType:
type: string
discriminator:
propertyName: petType
mapping:
dog: Dog
Cat:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Cat`
properties:
name:
type: string
Dog:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Dog`
properties:
bark:
type: string
Lizard:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Lizard`
properties:
lovesRocks:
type: boolean

响应载荷虚构如下:

{
"petType": "Cat",
"name": "misty"
}

以上响应载荷将指定Cat schema。另一个响应载荷:

{
"petType": "dog",
"bark": "soft"
}

由于Pet定义了mapping映射元素,所以dog将映射到Dog

XML Object(XML对象)

一个元数据对象(metadata object),可以更使用详细的 XML模型定义。

使用数组时,无法从XML的元素名称推断出是单个还是多个,应该使用name 属性来添加该信息。请参阅示例以了解预期行为。

Fixed Fields
属性名属性类型描述
namestring替换用于描述的模式属性的元素/属性(element/attribute)的名称。在items中定义时,它将影响列表中各个XML元素的名称。当wrappedtrue时,与typearray(在items外)一起定义,它将影响包装元素。如果wrappedfalse,它将被忽略。
namespacestring命名空间(namespace)定义的URI。值必须为绝对地址。
prefixstring用于名称的前缀(prefix)。
attributeboolean声明属性定义是否转换为属性(property)而不是元素(attribute)。默认值为false
wrappedboolean只能用于数组定义。表示数组是被包装的(例如,<books><book/><book/></books>)还是未包装的(<book/><book/>)。默认值为false。该定义仅在typearray并在items外一起定义时生效。

这个对象可以使用Specification Extensions进行扩展。

示例:

XML对象定义的示例包含在Schema Object 的属性定义中,并带有它的XML表示示例。

没有XML元素

基本字符串属性:

{
"animals": {
"type": "string"
}
}
animals:
type: string
<animals>...</animals>

基本字符串数组属性(wrapped 默认为false):

{
"animals": {
"type": "array",
"items": {
"type": "string"
}
}
}
animals:
type: array
items:
type: string
<animals>...</animals>
<animals>...</animals>
<animals>...</animals>
XML名称替换
{
"animals": {
"type": "string",
"xml": {
"name": "animal"
}
}
}
animals:
type: string
xml:
name: animal
<animal>...</animal>
XML 属性、前缀和命名空间

该示例展示了完整的模型定义。

{
"Person": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"xml": {
"attribute": true
}
},
"name": {
"type": "string",
"xml": {
"namespace": "http://example.com/schema/sample",
"prefix": "sample"
}
}
}
}
}
Person:
type: object
properties:
id:
type: integer
format: int32
xml:
attribute: true
name:
type: string
xml:
namespace: http://example.com/schema/sample
prefix: sample
<Person id="123">
<sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
</Person>
XML Arrays

修改元素(element)的名称:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
<animal>value</animal>
<animal>value</animal>

如果没有定义wrappedtrue,外部name属性对XML没有影响:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"name": "aliens"
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
name: aliens
<animal>value</animal>
<animal>value</animal>

如果数组被包装且没有明确定义名称,内部和外部都将使用相同的名称:

{
"animals": {
"type": "array",
"items": {
"type": "string"
},
"xml": {
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
wrapped: true
<animals>
<animals>value</animals>
<animals>value</animals>
</animals>

为了解决上面示例中的命名问题,可以使用以下定义:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
wrapped: true
<animals>
<animal>value</animal>
<animal>value</animal>
</animals>

改变内部和外部名称:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"name": "aliens",
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
name: aliens
wrapped: true
<aliens>
<animal>value</animal>
<animal>value</animal>
</aliens>

只改变外部元素而不改变内部元素:

{
"animals": {
"type": "array",
"items": {
"type": "string"
},
"xml": {
"name": "aliens",
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: aliens
wrapped: true
<aliens>
<aliens>value</aliens>
<aliens>value</aliens>
</aliens>

Security Scheme Object(安全架构对象)

定义操作可以使用的安全方案。 支持的方案有HTTP authentication, API key(header、cookie和query参数)、 RFC6749中定义的OAuth2的常见认证(implicit、password、 client credentials和authorization code)和OpenID Connect Discovery

Fixed Fields
属性名属性类型作用范围描述
typestringAny必填,安全方案的类型。 有效值为"apiKey", "http", "oauth2", "openIdConnect"
descriptionstringAny安全方案的简短描述. 使用CommonMark syntax可以用于展示富文本。
namestringapiKey必填,要使用的header、query或者cookie参数的名称.
instringapiKey必填,API key的所在位置,有效值为"query", "header" or "cookie".
schemestringhttp必填,要在Authorization header as defined in RFC7235中使用的HTTP Authorization scheme名称。 其使用的值应该在IANA Authentication Scheme registry中注册。
bearerFormatstringhttp ("bearer")提示客户端识别bearer token的格式。bearer token通常由授权服务器生成,因此此信息主要用于文档。
flowsOAuth Flows Objectoauth2必填,包含所支持的流类型的配置信息的对象。
openIdConnectUrlstringopenIdConnect必填,OpenId Connect URL以发现OAuth2的配置值。必须为URL格式。

这个对象可以使用Specification Extensions进行扩展。

示例:
Basic Authentication示例
{
"type": "http",
"scheme": "basic"
}
type: http
scheme: basic
API Key示例
{
"type": "apiKey",
"name": "api_key",
"in": "header"
}
type: apiKey
name: api_key
in: header
JWT Bearer示例
{
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
}
type: http
scheme: bearer
bearerFormat: JWT
Implicit OAuth2示例
{
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets

OAuth Flows Object(OAuth流对象)

用于配置支持的OAuth流(OAuth Flows)。

Fixed Fields
属性名属性类型描述
implicitOAuth Flow ObjectOAuth隐式流(OAuth Implicit flow)配置
passwordOAuth Flow ObjectOAuth资源所有者密码流(OAuth Resource Owner Password flow)的配置
clientCredentialsOAuth Flow ObjectOAuth客户端凭据流(OAuth Client Credentials flow)的配置。在OpenAPI 2.0中为application
authorizationCodeOAuth Flow ObjectOAuth授权码流(OAuth Authorization Code flow)配置. 在OpenAPI 2.0中为accessCode

这个对象可以使用Specification Extensions进行扩展。

OAuth Flow Object(OAuth流详情对象)

OAuth流的详细配置信息

Fixed Fields
属性名属性类型适用于描述
authorizationUrlstringoauth2 ("implicit", "authorizationCode")必填,用于此流的授权 URL。必须为 URL 格式。
tokenUrlstringoauth2 ("password", "clientCredentials", "authorizationCode")必填, 用于此流Token的URL。必须为 URL 格式。
refreshUrlstringoauth2获取刷新后Token的URL。必须为 URL 格式。
scopesMap[string, string]oauth2必填,OAuth2安全方案的可用范围,是范围名称和它的简短描述之间的映射。map可以为空。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
},
"authorizationCode": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"tokenUrl": "https://example.com/api/oauth/token",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets
authorizationCode:
authorizationUrl: https://example.com/api/oauth/dialog
tokenUrl: https://example.com/api/oauth/token
scopes:
write:pets: modify pets in your account
read:pets: read your pets

Security Requirement Object(安全要求对象)

执行请求所需的安全方案列表。每个属性的名称必须对应于Components Object下的securitySchemes属性声明的安全方案。

Security Requirement Objects包含多个对象时,要求必须满足所有对象才能使请求获得授权。 这需要传递多个query参数或header参数。

当在OpenAPI ObjectOperation Object上定义Security Requirement Objects列表时,只需满足列表中的一个Security Requirement Object即可授权请求。

Patterned Fields
匹配字段属性类型描述
{name}[string]每个名称必须对应于在Components ObjectsecuritySchemes中声明的安全方案。 如果安全方案的type字段为“oauth2”或“openIdConnect”,则该值是执行范围的名称列表,如果不需要指定范围,则该列表可以为空。 对于其他类型,数组必须为空。
示例:
非OAuth2的情况
{
"api_key": []
}
api_key: []
OAuth2的情况
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
petstore_auth:
- write:pets
- read:pets
OAuth2的可选情况

OpenAPI ObjectOperation Object中定义的一样。

{
"security": [
{},
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
security:
- {}
- petstore_auth:
- write:pets
- read:pets

Specification Extensions(规范扩展)

虽然OpenAPI规范尝试适应大多数的应用场景,但可以添加额外的数据以在某些点扩展规范。

扩展属性的实现始终以"x-"为前缀的模式化字段。

匹配字段类型描述
^x-Any可以对OpenAPI Schema进行扩展。字段名称必须以x-开头,例如x-internal-id。该值可以是 null、基本数据类型(primitive)、数组(array)或对象(object)。可以有任何有效的 JSON 格式值。

可用工具可能支持也可能不支持扩展,但也可以扩展这些扩展以添加请求的支持(如果工具是内部的或开源的)。

Security Filtering(安全过滤)

OpenAPI规范中的一些对象可以被声明并保持为空,或者被完全删除,即使它们是API文档的核心。

原因是因为可以对文档进行额外的访问控制。虽然这不是规范本身的一部分,但某些库可以选择允许基于某种形式的身份验证/授权访问(authentication/authorization)文档的某些部分。

举例如下:

  1. Paths Object可能为空。这是为了告诉查看者他们访问到了正确的位置,但无法访问任何文档。但他们仍然可以访问可能包含有关身份验证附加信息的Info Object
  2. Path Item Object可能为空。在这种情况下,查看者将知道路径存在,但将无法看到它的任何请求或参数。这与从Paths Object,中隐藏路径本身不同,因为用户会知道它的存在。这允许文档提供者更精细地控制查看者可以看到的内容。
- - +

OpenAPI 规范

版本 3.0.3

关键词"MUST","MUST NOT","REQUIRED","SHALL","SHALL NOT","SHOULD","SHOULD NOT","RECOMMENDED","NOT RECOMMENDED","MAY",,"OPTIONAL"当且仅当它们以全部大写字母出现时,本文档中将按照 BCP 14RFC2119RFC8174中的描述进行解释。

本文档翻译了,没有那些关键字。o( ̄︶ ̄)o

以下所说的“工具”是指实现OAS规范的软件,例如knife4J。

修订历史

版本翻译时间翻译人备注
3.0.32022-09-201132454419@qq.com初次翻译

介绍

OpenAPI 规范 (OAS) 为 RESTful API 定义了一个与语言无关的标准接口。它允许人们在不访问源代码的情况下通过网络以文档的形式发现和理解服务的功能。如果定义得当,消费者可以用最少的成本实现与远程服务的交互。 可以使用 OpenAPI 定义来显示 API、用各种编程语言生成服务端、客户端、测试端的代码和其他用例。

定义

OpenAPI Document(OpenAPI文档)

定义或描述API的文档(或一组文档)。OpenAPI的定义使用应符合OpenAPI的规范。

Path Templating(模板路径)

Path Templating是指由花括号 ({})分隔的模板表达式,该表达式使用路径传参将URL路径的一部分标记为可替换的。

路径中的每个模板表达式都必须对应一个Path Item ,该参数包含在 Path Item 本身和/或每个 Path ItemOperations中。

Media Types(媒体类型)

Media type的定义分布在多个资源中,且应符合RFC6838的标准。

部分示例:

text/plain; charset=utf-8
application/json
application/vnd.github+json
application/vnd.github.v3+json
application/vnd.github.v3.raw+json
application/vnd.github.v3.text+json
application/vnd.github.v3.html+json
application/vnd.github.v3.full+json
application/vnd.github.v3.diff
application/vnd.github.v3.patch

HTTP Status Codes(HTTP状态码)

HTTP Status Codes用于展示操作的状态。可用状态码由 RFC7231定义,注册状态码列在 IANA Status Code Registry中。

Specification(规范)

Versions(版本)

OpenAPI规范是是使用 Semantic Versioning 2.0.0 (semver)进行版本控制的,并遵循其规范。

semver 的major、minor部分(例如 3.0)应指定 OAS 功能集。通常.patch版本解决的是本文档中的错误,而不是新增或修改功能集。支持 OAS 3.0 的工具应该与所有 OAS 3.0.* 版本兼容。工具不应考虑补丁版本,例如不区分 3.0.0 和 3.0.1。

OpenAPI规范的每一个新的小版本都应该在相同的主版本中对任何以前有效的OpenAPI文档小版本以同等的语义更新为新的规范版本。这样的更新必须将openapi属性更改为新的小版本。

例如,一个有效的OpenAPI 3.0.2文档,修改openapi的属性为3.1.0之后,应该是一个有效的OpenAPI 3.1.0文档,在语义上与等同于原始的OpenAPI 3.0.2文档。必须编写新的OpenAPI规范的小版本以确保这种形式的向后兼容性。

一个与OAS 3.*.*兼容的 OpenAPI 文档包含一个必需的 openapi 字段,该字段指定它使用的 OAS 的语义版本。(OAS 2.0 文档包含一个名为swagger,其值为“2.0”的顶级版本字段。)

Format(格式)

一个符合OpenAPI规范的OpenAPI文档本身就是一个JSON对象,它可以用JSON或YAML格式表示。

例如,如果一个字段有一个数组,则将使用JSON数组表示为:

{
"field": [ 1, 2, 3 ]
}

规范中的所有字段名称都是区分大小写的。包括map中用作Key的所有字段,除非显式地指出Key是不区分大小写的。

Schema公开了两种类型的字段:分别是Fixed fields(固定字段)和Patterned fields(匹配字段),Patterned fields必须在包含对象中具有唯一名称。

为了保留在 YAML 和 JSON 格式之间互相转换的能力,建议使用 YAML 1.2 版以及一些约束:

注意:虽然 API 可以由 OpenAPI 文档以 YAML 或 JSON 格式定义,但 API 请求、响应正文和其他内容可以不为 JSON 或 YAML。

Document Structure(文档结构)

OpenAPI Document可以由单个或者多个文档组成。 在多个的情况下,规范中必须使用 $ref 字段来引用JSON Schema定义中的这部分。建议将OpenAPI 文档命名为:openapi.json openapi.yaml

Data Types(数据类型)

OAS 中的primitive 数据类型是基于JSON Schema Specification Wright Draft 00支持的类型。注意,integer也可作为一种类型,它被定义为没有分数或指数部分的 JSON 数字。 不支持null作为类型(替代解决方案请参阅nullable)。 模型是使用 Schema Object定义的,它是JSON Schema Specification Wright Draft 00的扩展子集。

primitive 有一个可选的修饰符属性:format。 OAS 使用下列几种格式来详细定义所使用的数据类型。 但是为了支持文档需求,format属性是一个开放的string类型的属性,并且可以具有任何值。 即使本规范未定义,也可以使用比如emailuuid等格式。 没有定义format属性的类型遵循 JSON Schema 中的定义。 不能识别特定format的工具可以默认返回单独的type,就像没有指定format一样。

OAS 定义的格式有:

typeformatComments
integerint3232位有符号数
integerint6464位有符号数(long类型)
numberfloat
numberdouble
string
stringbytebase64编码
stringbinary八位字节序列
boolean
stringdateRFC3339定义的full-date
stringdate-timeRFC3339定义的full-time
stringpassword提示 UI 以隐藏输入

Rich Text Formatting(富文本格式)

整个规范的description字段都被标注为支持 CommonMark markdown 格式。 在工具渲染富文本的时候,必须支持CommonMark 0.27中描述的 markdown 语法。 工具可以选择忽略一些CommonMark功能来解决安全问题。

Relative References in URLs(URL中的相对引用)

如未有另外说明,所有属于URL的属性都可以是 RFC3986定义的相对引用。 使用Server Object中定义的 URL 作为基本 URI 来解析相对引用。

$ref 中使用的相对引用按照 JSON 引用进行处理,使用当前文档的 URL 作为基本 URI。 另请参见参考对象。

Schema(架构)

在下面的描述中,如果一个字段没有明确地被要求必填(REQUIRED、MUST 、SHALL)描述,它可以被认为是可选的(OPTIONAL)。

OpenAPI Object(文档对象)

OpenAPI 文档的根对象。

Fixed fields:
属性名属性类型描述
openapistring必填,该字符串必须是OpenAPI文档使用的OpenAPI Specification version的语义版本号。
infoInfo Object必填,提供有关 API 的metadata,可以根据需要由工具使用。
servers[Server Object]Server Object数组,提供到目标服务器的连接信息。如果未提供servers属性,或为空数组,则默认值将是一个Server Object,其url值为/
pathsPaths Object必填,API的可用path和操作。
componentsComponents Object保存规范里schemas的元素(element)信息。
security[Security Requirement Object]API的安全机制配置。值列表可以使用任意的Security Requirement Object。只需满足其中一个就可以对请求进行授权。单个请求可以重写此定义。如不需要,可配置为{}
tagsTag Object带有附加metadata的tags列表。tags的顺序可用于解析工具展示它们的顺序。 不是每个Operation Objecttags都必须声明。 未声明的tags可以随机展示或基于工具的实现逻辑展示。 列表中的每个tag名称必须是唯一的。
externalDocsExternal Documentation Object其他外部文档。

该对象可以通过Specification Extensions进行扩展。

Info Object(信息对象)

该对象提供有关 API 的metadata 。metadata可以由客户使用也可以在编辑或文档生成工具中使用。

Fixed Fields
属性名属性类型描述
titlestring必填,API的标题。
descriptionstringAPI的简短描述,使用CommonMark syntax可以用于展示富文本。
termsOfServicestring指向API服务条款的URL。必须为URL格式。
contactContact ObjectAPI联系信息。
licenseLicense ObjectAPI许可信息。
versionstring必填,文档的版本(不同于OpenAPI 规范版本或 API 实现版本)。

该对象可以通过Specification Extensions进行扩展。

示例:
{
"title": "Sample Pet Store App",
"description": "This is a sample server for a pet store.",
"termsOfService": "http://example.com/terms/",
"contact": {
"name": "API Support",
"url": "http://www.example.com/support",
"email": "support@example.com"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.1"
}
title: Sample Pet Store App
description: This is a sample server for a pet store.
termsOfService: http://example.com/terms/
contact:
name: API Support
url: http://www.example.com/support
email: support@example.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.1

Contact Object(联系信息对象)

API联系信息

属性名属性类型描述
namestring联系人/组织的名称
urlstring联系人信息的URL。必须为URL格式。
emailstring联系人/组织的电子邮件。 必须采用电子邮件格式。

该对象可以通过Specification Extensions进行扩展。

示例:
{
"name": "API Support",
"url": "http://www.example.com/support",
"email": "support@example.com"
}
name: API Support
url: http://www.example.com/support
email: support@example.com

License Object(许可信息对象)

API许可信息

属性名属性类型描述
namestring必填,API使用的许可证名称。
urlstringAPI使用的许可的URL。必须为URL格式。
示例:
{
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html

Server Object(服务器对象)

表示服务器的对象。

Fixed fields:
属性名属性类型描述
urlstring必填,指向目标主机的URL。可以是相对路径,表示服务器相对于OpenAPI文档的位置。当变量命名在{}中时,将进行变量替换。例如{brackets}则会替换brackets变量。
descriptionstringurl所指向的服务器的描述信息,使用CommonMark syntax可以用于展示富文本。
variablesMap[string,Server Variable Object]变量名与值之间的映射,用于替换serversurl配置信息的模板。

该对象可以通过Specification Extensions进行扩展。

示例:
单个服务器:
{
"url": "https://development.gigantic-server.com/v1",
"description": "Development server"
}
url: https://development.gigantic-server.com/v1
description: Development server
多个服务器:
{
"servers": [
{
"url": "https://development.gigantic-server.com/v1",
"description": "Development server"
},
{
"url": "https://staging.gigantic-server.com/v1",
"description": "Staging server"
},
{
"url": "https://api.gigantic-server.com/v1",
"description": "Production server"
}
]
}
servers:
- url: https://development.gigantic-server.com/v1
description: Development server
- url: https://staging.gigantic-server.com/v1
description: Staging server
- url: https://api.gigantic-server.com/v1
description: Production server
应用变量:
{
"servers": [
{
"url": "https://{username}.gigantic-server.com:{port}/{basePath}",
"description": "The production API server",
"variables": {
"username": {
"default": "demo",
"description": "this value is assigned by the service provider, in this example `gigantic-server.com`"
},
"port": {
"enum": [
"8443",
"443"
],
"default": "8443"
},
"basePath": {
"default": "v2"
}
}
}
]
}
servers:
- url: https://{username}.gigantic-server.com:{port}/{basePath}
description: The production API server
variables:
username:
# note! no enum here means it is an open value
default: demo
description: this value is assigned by the service provider, in this example `gigantic-server.com`
port:
enum:
- '8443'
- '443'
default: '8443'
basePath:
# open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2`
default: v2

Server Variable Object(可变服务器对象)

表示服务器URL模板替换的Server Variable对象。

Fixed Fields
属性名属性类型描述
enum[string]如果替换选项来自数组,则要使用的字符串值的枚举。且数组不能为空。
defaultstring必填,用于替换的默认值,如果未提供,则应发送该值。请注意,此行为与Schema Object对默认值的处理方式不同,因为在这些情况下,参数值是可选的。 如果定义了枚举,则该值应该存在于枚举的值中。
descriptionstring对服务器变量的描述,使用CommonMark syntax可以展示富文本。

这个对象可以使用Specification Extensions进行扩展。

Components Object(组件对象)

为 OAS保存一组可重用的对象。 Components Object中定义的所有对象都不会对API产生影响,除非它们被Components Object外部的属性显式引用。

Fixed Fields
匹配字段属性类型描述
schemasMap[string, Schema Object | Reference Object]可重复使用的Schema Object.
responsesMap[string, Response Object | Reference Object]可重复使用的Response Object.
parametersMap[string, Parameter Object | Reference Object]可重复使用的Parameter Object.
examplesMap[string, Example Object | Reference Object]可重复使用的Example Object.
requestBodiesMap[string, Request Body Object | Reference Object]可重复使用的Request Body Object.
headersMap[string, Header Object| Reference Object]可重复使用的Header Object.
securitySchemesMap[string, Security Scheme Object| Reference Object]可重复使用的Security Scheme Objects.
linksMap[string, Link Object | Reference Object]可重复使用的Link Object.
callbacksMap[string, Callback Object | Reference Object]可重复使用的Callback Object.

这个对象可以使用Specification Extensions进行扩展。

上面声明的所有字段的key都必须能与正则表达式^[a-zA-Z0-9\.\-_]+$匹配。

key的示例
User
User_1
User_Name
user-name
my.org.User
对象示例
"components": {
"schemas": {
"GeneralError": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
},
"Category": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"Tag": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
}
},
"parameters": {
"skipParam": {
"name": "skip",
"in": "query",
"description": "number of items to skip",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
},
"limitParam": {
"name": "limit",
"in": "query",
"description": "max records to return",
"required": true,
"schema" : {
"type": "integer",
"format": "int32"
}
}
},
"responses": {
"NotFound": {
"description": "Entity not found."
},
"IllegalInput": {
"description": "Illegal input for operation."
},
"GeneralError": {
"description": "General Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GeneralError"
}
}
}
}
},
"securitySchemes": {
"api_key": {
"type": "apiKey",
"name": "api_key",
"in": "header"
},
"petstore_auth": {
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "http://example.org/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
}
}
components:
schemas:
GeneralError:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
Category:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
parameters:
skipParam:
name: skip
in: query
description: number of items to skip
required: true
schema:
type: integer
format: int32
limitParam:
name: limit
in: query
description: max records to return
required: true
schema:
type: integer
format: int32
responses:
NotFound:
description: Entity not found.
IllegalInput:
description: Illegal input for operation.
GeneralError:
description: General Error
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: http://example.org/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets

Paths Object(路径对象)

保存到各个资源及其操作的相对路径。该路径被附加到来Server Object的URL以构建完整的URL。 由于ACL约束,Path Item可能为空。

Patterned fields:
匹配字段属性类型描述
/{path}Path Item Object访问资源的相对路径。 字段名称必须以/开头。 路径从Server Object的url字段拼接成完整的URL。 可以使用模板路径。 匹配 URL 时,将会优先匹配模板路径。 具有相同层次结构但不同名称的路径不能存在,因为它们是相同的。 如果匹配不明确,则由工具决定使用哪一个。

这个对象可以使用Specification Extensions进行扩展。

路径匹配示例:

假设定义/pets/mine路径,匹配顺序为:

/pets/{petId}
/pets/mine

相同且无效的匹配方案:

/pets/{petId}
/pets/{name}

匹配不明确的匹配方案:

/{entity}/me
/books/{id}
示例:
{
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to",
"responses": {
"200": {
"description": "A list of pets.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/pet"
}
}
}
}
}
}
}
}
}
/pets:
get:
description: Returns all pets from the system that the user has access to
responses:
'200':
description: A list of pets.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/pet'

Path Item Object(路径详细信息对象)

描述在单个路径上可用的操作。由于ACL约束,Path Item可能为空,虽然仍可以通过文档查看,但无法确定哪些操作和参数可用。

Fixed Fields

属性名属性类型描述
$refstring允许对此path item进行外部定义。 引用的结构必须是Path Item Object。 如果Path Item Object字段同时出现在已定义对象和引用对象中,则定义无效。
summarystring一个可选的摘要,应用于此路径中的所有操作。
descriptionstring应用于此路径中的所有操作,如使用CommonMark syntax则可以用于展示富文本。
getOperation Objectget请求操作的定义。
putOperation Objectput请求操作的定义。
postOperation Objectpost请求操作的定义。
deleteOperation Objectdelete请求操作的定义。
optionsOperation Objectoptions请求操作的定义。
headOperation Objecthead请求操作的定义。
patchOperation Objectpatch请求操作的定义。
traceOperation Objecttrace请求操作的定义。
servers[Server Object]servers请求操作的定义。
parameters[Parameter Object | Reference Object]适用于此路径下所有请求操作的参数列表。 这些参数可以在Operation Object中配置parameters覆盖,但不能删除。 且列表内同一个位置的参数名不能重复。 该列表可以使用Reference Object链接到OpenAPI Objectcomponents/parameters定义的参数。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"get": {
"description": "Returns pets based on ID",
"summary": "Find pets by ID",
"operationId": "getPetsById",
"responses": {
"200": {
"description": "pet response",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
}
}
}
},
"default": {
"description": "error payload",
"content": {
"text/html": {
"schema": {
"$ref": "#/components/schemas/ErrorModel"
}
}
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to use",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "simple"
}
]
}
get:
description: Returns pets based on ID
summary: Find pets by ID
operationId: getPetsById
responses:
'200':
description: pet response
content:
'*/*' :
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
default:
description: error payload
content:
'text/html':
schema:
$ref: '#/components/schemas/ErrorModel'
parameters:
- name: id
in: path
description: ID of pet to use
required: true
schema:
type: array
items:
type: string
style: simple

Operation Object(请求对象)

路径上的单个API请求操作的描述。以下简称“请求”。

Fixed Fields
属性名属性类型描述
tags[string]API文档控制的tags列表。 tag可用于对请求资源进行分组。
summarystring请求的简单说明。
descriptionstring请求的详细描述。使用CommonMark syntax可以展示富文本。
externalDocsExternal Documentation Object该请求附加的外部文档。
operationIdstring用于标识请求的唯一字符串。 在API中描述的所有请求中,id必须是唯一的。 operationId值区分大小写。工具可以使用operationId来标识唯一请求,建议遵循常见的编程命名约定。
parameters[Parameter Object | Reference Object]适用于此请求的参数列表。 如果已经在Path Item中定义了parameters,在这里定义将覆盖它,但不会删除。 且列表内的参数在同一个位置参数名不能重复。 该列表可以使用Reference Object链接到OpenAPI Objectcomponents/parameters定义的参数。
requestBodyRequest Body Object | Reference Object适用于此请求的的requestBodyrequestBody仅在HTTP 1.1 specification RFC7231明确定义的HTTP方法中受支持。在其他HTTP specification定义不明确的情况下,应该忽略此参数。
responsesResponses Object必填, 该请求可能的响应列表。
callbacksMap[string, Callback Object | Reference Object]与请求相关的回调的映射。 key是Callback Object的唯一标识符。其每个值都是一个Callback Object,它描述了API提供者发起的请求和预期的响应。
deprecatedboolean声明过期的请求。 默认值为false。
security[Security Requirement Object]API的安全机制配置。值列表可以使用任意的Security Requirement Object。只需满足其中一个就可以对请求进行授权。在这里定义会覆盖顶级配置的安全机制。如果要忽略顶级的配置,可以使用空数组。
servers[Server Object]提供该请求的服务器数组。如果在Path Item根对象指定了servers,该值会覆盖以上配置。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"tags": [
"pet"
],
"summary": "Updates a pet in the store with form data",
"operationId": "updatePetWithForm",
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Updated name of the pet",
"type": "string"
},
"status": {
"description": "Updated status of the pet",
"type": "string"
}
},
"required": ["status"]
}
}
}
},
"responses": {
"200": {
"description": "Pet updated.",
"content": {
"application/json": {},
"application/xml": {}
}
},
"405": {
"description": "Method Not Allowed",
"content": {
"application/json": {},
"application/xml": {}
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
tags:
- pet
summary: Updates a pet in the store with form data
operationId: updatePetWithForm
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
schema:
type: string
requestBody:
content:
'application/x-www-form-urlencoded':
schema:
properties:
name:
description: Updated name of the pet
type: string
status:
description: Updated status of the pet
type: string
required:
- status
responses:
'200':
description: Pet updated.
content:
'application/json': {}
'application/xml': {}
'405':
description: Method Not Allowed
content:
'application/json': {}
'application/xml': {}
security:
- petstore_auth:
- write:pets
- read:pets

External Documentation Object(附加文档信息对象)

引用外部资源的扩展文档。

Fixed Fields
属性名属性类型描述
descriptionstring目标文档的简短描述,使用CommonMark syntax可以用于展示富文本。
urlstring必填,指向目标文档的URL. 必须为URL格式。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"description": "Find more info here",
"url": "https://example.com"
}
description: Find more info here
url: https://example.com

Parameter Object(参数对象)

描述单个请求的参数,在同一个位置参数名不能重复。

参数位置

in字段指定了参数的四个位置::

  • path - 与模板路径一起使用,参数实际上是请求URL的一部分。 但不包括API的host和base path。 例如,在/items/{itemId} 中,路径参数为itemId。
  • query - 附加到URL后面的参数,例如在/items?id=###请求里,query参数为 id.
  • header - 自定义请求头作为请求的一部分。注意,RFC7230规定请求头名称不区分大小写。
  • cookie - 设置特定的cookie值传递给API。
Fixed Fields
属性名属性类型描述
namestring必填, 参数的名称,区分大小写;如果in"path",则名称字段必须在模板路径的表达式中;如果in"header",且名称字段为“Accept”、“Content-Type”或“Authorization”,则定义无效;其他情况则可以直接使用该字段;
instring必填, 参数的位置,有效值为 "query", "header", "path" or "cookie"
descriptionstring参数的简要说明和使用的举例。 使用CommonMark syntax可以用于展示富文本。
requiredboolean是否为必填参数。如果参数的in"path",此属性的值必须为true;否则,该属性默认值为false。
deprecatedboolean指定参数已弃用;默认值为false。
allowEmptyValueboolean设置参数是否可以为空,仅对query参数有效, 默认值为假。 如果使用了 style,并且如果 behavior 为 n/a(不能序列化),则 allowEmptyValue 的值应被忽略;不推荐使用此属性,因为它可能会在以后的版本中被删除。

指定参数的序列化规则以两种方式之一。 对于更简单的场景,schemastyle可以描述参数的结构和语法。

属性名属性类型描述
stylestring描述如何根据参数值的类型对参数值进行序列化。 默认值基于in的值;instyle的对应关系为:query - formpath - simpleheader - simplecookie - form
explodeboolean当属性为true时,会为array的每一个值或object的key-value生成独立的参数放到map里。 对于其他类型,此属性无效。 当styleform时,默认值为true;为其他值时,默认值为 false。
allowReservedboolean参数值是否为保留字,如RFC3986所定义:/?#[]@!$&'()*+,;=在不包含URL编码(percent-encoding)的情况下。 此属性仅适用于in值为query的参数。 默认值为false。
schemaSchema Object | Reference Object该schema定义了用于参数的类型。
exampleAny参数值的示例。 该示例应匹配指定的schema和编码。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。不能用JSON或YAML表示的media types的示例,可以用字符串表示,并在必要时进行转义。
examplesMap[ string, Example Object | Reference Object]参数值的示例。每个示例都应该为参数指定编码的正确格式的值。examples属性和example属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。

针对更复杂的场景, content属性可以定义参数的media type和schema。一个参数配置必须包含schema属性或content属性,但不能同时包含两者。当exampleexamplesschema一起提供时,该示例必须遵循指定的参数序列化策略。

属性名属性类型描述
contentMap[string, Media Type Object]表示参数的map。key为media type,值为它的描述。map有且只能有一个值。
Style 的值:

为了支持简单参数的序列化,定义了一组style 值。

styletypeinComments
matrixprimitive, array, objectpathPath-style参数由RFC6570定义。
labelprimitive, array, objectpathLabel style参数由RFC6570定义。
formprimitive, array, objectquery, cookie该选项将collectionFormat替换为OpenAPI 2.0中的csv(explode为false时)或multi(explode为true时)值。
simplearraypath, headerSimple style参数由RFC6570定义。该选项将collectionFormat替换为OpenAPI 2.0中的csv
spaceDelimitedarrayquery空格分隔的数组值。该选项将collectionFormat替换为OpenAPI 2.0中的ssv
pipeDelimitedarrayquery管道(|)分隔数组值。该选项将collectionFormat替换为OpenAPI 2.0中的pipes
deepObjectobjectquery提供一种使用表单参数嵌套的对象。
Style 示例:

假设color参数为以下值之一:

string -> "blue"
array -> ["blue","black","brown"]
object -> { "R": 100, "G": 200, "B": 150 }

差异对照表:

styleexplodeemptystringarrayobject
matrixfalse;color;color=blue;color=blue,black,brown;color=R,100,G,200,B,150
matrixtrue;color;color=blue;color=blue;color=black;color=brown;R=100;G=200;B=150
labelfalse..blue.blue.black.brown.R.100.G.200.B.150
labeltrue..blue.blue.black.brown.R=100.G=200.B=150
formfalsecolor=color=bluecolor=blue,black,browncolor=R,100,G,200,B,150
formtruecolor=color=bluecolor=blue&color=black&color=brownR=100&G=200&B=150
simplefalsen/ablueblue,black,brownR,100,G,200,B,150
simpletruen/ablueblue,black,brownR=100,G=200,B=150
spaceDelimitedfalsen/an/ablue%20black%20brownR%20100%20G%20200%20B%20150
pipeDelimitedfalsen/an/ablue|black|brownR|100|G|200|B|150
deepObjecttruen/an/an/acolor[R]=100&color[G]=200&color[B]=150

这个对象可以使用Specification Extensions进行扩展。

示例:
64位integer数组的header参数示例:
{
"name": "token",
"in": "header",
"description": "token to be passed as a header",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"style": "simple"
}
name: token
in: header
description: token to be passed as a header
required: true
schema:
type: array
items:
type: integer
format: int64
style: simple
string类型的path参数示例:
{
"name": "username",
"in": "path",
"description": "username to fetch",
"required": true,
"schema": {
"type": "string"
}
}
name: username
in: path
description: username to fetch
required: true
schema:
type: string

字符串类型的query参数,通过重复来实现传递多个值:

{
"name": "id",
"in": "query",
"description": "ID of the object to fetch",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"style": "form",
"explode": true
}
name: id
in: query
description: ID of the object to fetch
required: false
schema:
type: array
items:
type: string
style: form
explode: true

free-form的query参数,允许使用特定类型的undefined参数:

{
"in": "query",
"name": "freeForm",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
},
},
"style": "form"
}
in: query
name: freeForm
schema:
type: object
additionalProperties:
type: integer
style: form

使用content定义序列化的一个complex参数:

{
"in": "query",
"name": "coordinates",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"lat",
"long"
],
"properties": {
"lat": {
"type": "number"
},
"long": {
"type": "number"
}
}
}
}
}
}
in: query
name: coordinates
content:
application/json:
schema:
type: object
required:
- lat
- long
properties:
lat:
type: number
long:
type: number

Request Body Object(请求体对象)

描述单个request body.

Fixed Fields
属性名属性类型描述
descriptionstringrequest body的简短描述. 使用CommonMark syntax可以用于展示富文本。
contentMap[string, Media Type Object]必填. request body的内容。key是media type或media type range和能描述它的值。 对于匹配多个key的请求,只有最具体的key适用。 例如text/plain覆盖 text/*
requiredboolean确定请求中是否需要request body。默认值为false

这个对象可以使用Specification Extensions进行扩展。

示例:
带有model引用的request body
{
"description": "user to add to the system",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
},
"examples": {
"user" : {
"summary": "User Example",
"externalValue": "http://foo.bar/examples/user-example.json"
}
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/User"
},
"examples": {
"user" : {
"summary": "User example in XML",
"externalValue": "http://foo.bar/examples/user-example.xml"
}
}
},
"text/plain": {
"examples": {
"user" : {
"summary": "User example in Plain text",
"externalValue": "http://foo.bar/examples/user-example.txt"
}
}
},
"*/*": {
"examples": {
"user" : {
"summary": "User example in other format",
"externalValue": "http://foo.bar/examples/user-example.whatever"
}
}
}
}
}
description: user to add to the system
content:
'application/json':
schema:
$ref: '#/components/schemas/User'
examples:
user:
summary: User Example
externalValue: 'http://foo.bar/examples/user-example.json'
'application/xml':
schema:
$ref: '#/components/schemas/User'
examples:
user:
summary: User Example in XML
externalValue: 'http://foo.bar/examples/user-example.xml'
'text/plain':
examples:
user:
summary: User example in text plain format
externalValue: 'http://foo.bar/examples/user-example.txt'
'*/*':
examples:
user:
summary: User example in other format
externalValue: 'http://foo.bar/examples/user-example.whatever
字符串数组的body参数:
{
"description": "user to add to the system",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
description: user to add to the system
required: true
content:
text/plain:
schema:
type: array
items:
type: string

Media Type Object(媒体类型对象)

Media Type Object提供标识media type的key的schema和examples。

Fixed Fields
属性名属性类型描述
schemaSchema Object | Reference Object定义请求响应参数content的schema。
exampleAnymedia type示例。 示例应使用media type的正确格式。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。
examplesMap[ string, Example Object | Reference Object]media type示例。如果存在,每个示例对象应该匹配media type和指定的schema。example属性和examples属性互斥。如果引用的schema包含示例,则该示例应覆盖schema提供的示例。
encodingMap[string, Encoding Object]属性名与编码信息的映射。 作为属性名的key必须作为属性存在于schema中。 当media type为multipartapplication/x-www-form-urlencoded时,编码对象应该仅适用于requestBody对象。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
},
"examples": {
"cat" : {
"summary": "An example of a cat",
"value":
{
"name": "Fluffy",
"petType": "Cat",
"color": "White",
"gender": "male",
"breed": "Persian"
}
},
"dog": {
"summary": "An example of a dog with a cat's name",
"value" : {
"name": "Puma",
"petType": "Dog",
"color": "Black",
"gender": "Female",
"breed": "Mixed"
},
"frog": {
"$ref": "#/components/examples/frog-example"
}
}
}
}
}
application/json: 
schema:
$ref: "#/components/schemas/Pet"
examples:
cat:
summary: An example of a cat
value:
name: Fluffy
petType: Cat
color: White
gender: male
breed: Persian
dog:
summary: An example of a dog with a cat's name
value:
name: Puma
petType: Dog
color: Black
gender: Female
breed: Mixed
frog:
$ref: "#/components/examples/frog-example"
文件上传的注意事项

与2.0规范相比,OpenAPI中的file input/output使用与其他schema类型相同的方式进行描述。具体如下:

# content transferred with base64 encoding
schema:
type: string
format: base64
# content transferred in binary (octet-stream):
schema:
type: string
format: binary

这些例子既适用于文件上传的输入载荷,也适用于响应载荷。

POST请求中提交文件的requestBody参考如下:

requestBody:
content:
application/octet-stream:
schema:
# a binary file of any type
type: string
format: binary

指定media types:

# multiple, specific media types may be specified:
requestBody:
content:
# a binary file of type png or jpeg
'image/jpeg':
schema:
type: string
format: binary
'image/png':
schema:
type: string
format: binary

上传多个文件,必须使用multipart的media type:

requestBody:
content:
multipart/form-data:
schema:
properties:
# The property name 'file' will be used for all files.
file:
type: array
items:
type: string
format: binary
支持x-www-form-urlencoded的请求

要使用RFC1866的form url encoding提交内容,可以使用以下方式:

requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
id:
type: string
format: uuid
address:
# complex types are stringified to support RFC 1866
type: object
properties: {}

在这个例子中,requestBody中的content在传递给服务器时必须遵循RFC1866进行字符串化。address字段的复杂对象也将被字符串化。

在传递application/x-www-form-urlencoded类型的complex对象时,这些属性的默认序列化策略在Encoding Objectstyle属性中为form

multipart Content的特殊注意事项

在请求操作时,通常使用Content-Typemultipart/form-data作为请求体。 与 2.0 相比,当使用multipart content时,需要定义一个schema作为请求的输入参数。这样做可以支持complex结构以及多个文件的上传。

当传入multipart类型时,可以使用分界线(—)来分隔正在传输内容的各个部分,以下是为multipart定义的几种默认Content-Type

  • 如果属性是primitive或者数组类型的primitive,默认的Content-Typ是text/plain
  • 如果属性是复杂对象或者是数组类型的复杂对象,默认的Content-Type是application/json
  • 如果属性是type: stringformat: binaryformat: base64(又名 file object),则默认Content-Type为 application/octet-stream

Examples:

requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
id:
type: string
format: uuid
address:
# default Content-Type for objects is `application/json`
type: object
properties: {}
profileImage:
# default Content-Type for string/binary is `application/octet-stream`
type: string
format: binary
children:
# default Content-Type for arrays is based on the `inner` type (text/plain here)
type: array
items:
type: string
addresses:
# default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example)
type: array
items:
type: '#/components/schemas/Address'

使用encoding 属性可以控制multipart 请求body的部分序列化。 此属性仅适用于multipartapplication/x-www-form-urlencoded 请求的body。

Encoding Object(编码对象)

定义应用于单个schema属性的单个编码。

Fixed Fields
属性名属性类型描述
contentTypestring用于编码特定属性的Content-Type。 默认值取决于属性类型:对stringformatbinaryapplication/octet-stream; 对于其他primitive类型为text/plain; 对objectapplication/json; 对array默认值是根据内部类型定义的。 该值可以是特定媒体类型(例如application/json)、通配符媒体类型(例如image/*)或用逗号分隔的列表。
headersMap[string, Header Object| Reference Object]一个为header提供附加信息的map,例如Content-DispositionContent-Type如果单独描述本属性应该忽略。 如果请求body的media type不是multipart,本属性应该忽略。
stylestring描述如何根据类型序列化属性值。 有关style属性的详细信息,参考Parameter Object。 该行为遵循与query参数相同的值,包括默认值。 如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。
explodeboolean当属性为true时,会为array的每一个值或object的key-value生成独立的参数放到map里。 对于其他类型,此属性无效。 当styleform时,默认值为true;为其他值时,默认值为 false。如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。
allowReservedboolean参数值是否为保留字,如RFC3986所定义:/?#[]@!$&'()*+,;=在不包含URL编码(percent-encoding)的情况下。 默认值为false。如果请求正文媒体类型不是application/x-www-form-urlencoded,则应忽略此属性。

这个对象可以使用Specification Extensions进行扩展。

示例:
requestBody:
content:
multipart/mixed:
schema:
type: object
properties:
id:
# default is text/plain
type: string
format: uuid
address:
# default is application/json
type: object
properties: {}
historyMetadata:
# need to declare XML format!
description: metadata in XML format
type: object
properties: {}
profileImage:
# default is application/octet-stream, need to declare an image type only!
type: string
format: binary
encoding:
historyMetadata:
# require XML Content-Type in utf-8 encoding
contentType: application/xml; charset=utf-8
profileImage:
# only accept png/jpeg
contentType: image/png, image/jpeg
headers:
X-Rate-Limit-Limit:
description: The number of allowed requests in the current period
schema:
type: integer

Responses Object(响应容器对象)

请求预期响应的容器。 容器内为一个或多个map,将HTTP响应码映射到预期响应。

该文档不一定会涵盖所有的HTTP响应码,因为它们可能事先并没有定义或说明。 但是文档应涵盖所有请求成功和错误的响应。

default 属性是如果配置的HTTP响应码没有匹配到,则默认响应的对象。

Responses Object至少应该定义一个成功请求的响应代码。

Fixed Fields
属性名属性类型描述
defaultResponse Object | Reference Object指定响应代码之外的默认响应。 Reference Object可以链接到OpenAPI Object's components/responses部分定义的响应。
Patterned Fields
匹配字段属性类型描述
HTTP Status CodeResponse Object | Reference Object任何 HTTP 状态代码都可以用作属性名称,但每个状态码只能定义一次。链接到OpenAPI Object's components/responses部分定义的响应。 此字段必须用引号引起来(例如"200")以实现 JSON 和 YAML 之间的兼容性。 要定义响应代码的范围,此字段可以包含大写通配符X。例如2XX表示 [200-299] 之间的所有响应代码。 仅允许定义以下范围:1XX, 2XX, 3XX, 4XX, 和5XX。 如果使用显式代码定义响应,则显式代码定义优先于该代码的范围定义。

这个对象可以使用Specification Extensions进行扩展。

Responses Object 示例:
状态码为200和其他(错误)情况的响应示例:
{
"200": {
"description": "a pet to be returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorModel"
}
}
}
}
}
'200':
description: a pet to be returned
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel

Response Object(响应对象)

描述来自API请求的单个响应,包括设计时基于响应请求的静态链接。

Fixed Fields
属性名属性类型描述
descriptionstring必填. response的简短描述. 使用CommonMark syntax可以用于展示富文本。
headersMap[string, Header Object| Reference Object]以header名定义的一个map,header名以RFC7230定义的状态为准,不区分大小写。如果定义的响应名为"Content-Type",这个属性会被忽略。
contentMap[string, Media Type Object]包含响应载荷的map。key是media type或media type range和能描述它的值。 对于匹配多个key的请求,只有最具体的key适用。 例如text/plain覆盖 text/*
linksMap[string, Link Object | Reference Object]链接请求的map。map的key为link的短名称, 遵循Component Object中的命名约束。

这个对象可以使用Specification Extensions进行扩展。

示例:
数组类型的复杂对象响应示例:
{
"description": "A complex object array response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VeryComplexType"
}
}
}
}
}
description: A complex object array response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/VeryComplexType'
string类型的响应示例:
{
"description": "A simple string response",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}

}
description: A simple string response
content:
text/plain:
schema:
type: string
带标题的纯文本响应示例:
{
"description": "A simple string response",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "whoa!"
}
}
},
"headers": {
"X-Rate-Limit-Limit": {
"description": "The number of allowed requests in the current period",
"schema": {
"type": "integer"
}
},
"X-Rate-Limit-Remaining": {
"description": "The number of remaining requests in the current period",
"schema": {
"type": "integer"
}
},
"X-Rate-Limit-Reset": {
"description": "The number of seconds left in the current period",
"schema": {
"type": "integer"
}
}
}
}
description: A simple string response
content:
text/plain:
schema:
type: string
example: 'whoa!'
headers:
X-Rate-Limit-Limit:
description: The number of allowed requests in the current period
schema:
type: integer
X-Rate-Limit-Remaining:
description: The number of remaining requests in the current period
schema:
type: integer
X-Rate-Limit-Reset:
description: The number of seconds left in the current period
schema:
type: integer
没有返回值的响应示例:
{
"description": "object created"
}
description: object created

Callback Object(回调对象)

可能与父操作相关的回调map。map中的每个值都是一个Path Item Object,它描述了一组由API提供者发起的请求和预期的响应。用于标识Path Item Object的key是一个运行时表达式(runtime expression),用它标识回调操作的URL。

Patterned Fields
匹配字段属性类型描述
{expression}Path Item Object定义回调请求和响应的Path Item Object对象. A complete example is available.

这个对象可以使用Specification Extensions进行扩展。

Key Expression

标识Path Item Object的key是一个运行时表达式,可以在运行HTTP 请求/响应时,从上下文中获取值以标识要用于回调请求的URL,使用运行时表达式可以访问完整的HTTP请求。这包括访问RFC6901引用正文的任何部分。

如HTTP请求如下:

POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1
Host: example.org
Content-Type: application/json
Content-Length: 187

{
"failedUrl" : "http://clientdomain.com/failed",
"successUrls" : [
"http://clientdomain.com/fast",
"http://clientdomain.com/medium",
"http://clientdomain.com/slow"
]
}

201 Created
Location: http://example.org/subscription/1

以下展示了使用表达式的方式,假设回调操作有一个名为eventType 的path参数和一个名为queryUrl的query参数。

ExpressionValue
$urlhttp://example.org/subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning
$methodPOST
$request.path.eventTypemyevent
$request.query.queryUrlhttp://clientdomain.com/stillrunning
$request.header.content-Typeapplication/json
$request.body#/failedUrlhttp://clientdomain.com/failed
$request.body#/successUrls/2http://clientdomain.com/medium
$response.header.Locationhttp://example.org/subscription/1
Callback Object示例:

以下示例使用用户提供的queryUrl查询字符串参数来定义回调 URL。

myCallback:
'{$request.query.queryUrl}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed

服务器是固定的,但查询字符串参数是取请求正文中的idemail 属性填充的回调示例。

transactionCallback:
'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed

Example Object(示例对象)

Fixed Fields
属性名属性类型描述
summarystring示例的简短描述。
descriptionstring示例的完整描述,使用CommonMark syntax可以用于展示富文本。
valueAny嵌入式示例值(直接写在这里的示例)。value 字段和externalValue 字段是互斥的。不能在JSON或YAML中自然表示的媒体类型,请使用字符串值来表示,并在必要时转义。
externalValuestring指向示例的URL(引用示例)。提供了不方便展示示例(如太长了)的引用能力。value 字段和externalValue 字段是互斥的。

这个对象可以使用Specification Extensions进行扩展。

所有情况下,示例值都应该与关联的schema类型兼容。工具实现可以选择自动验证兼容性,如果不兼容则拒绝示例值。

示例:
在request body中的示例:
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/Address'
examples:
foo:
summary: A foo example
value: {"foo": "bar"}
bar:
summary: A bar example
value: {"bar": "baz"}
'application/xml':
examples:
xmlExample:
summary: This is an example in XML
externalValue: 'http://example.org/examples/address-example.xml'
'text/plain':
examples:
textExample:
summary: This is a text example
externalValue: 'http://foo.bar/examples/address-example.txt'
在parameter中的示例:
parameters:
- name: 'zipCode'
in: 'query'
schema:
type: 'string'
format: 'zip-code'
examples:
zip-example:
$ref: '#/components/examples/zip-example'
在response中的示例:
responses:
'200':
description: your car appointment has been booked
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
examples:
confirmation-success:
$ref: '#/components/examples/confirmation-success'

Link object 表示响应的可能设计时链接。链接存在并不能保证能够成功调用,它只是提供了响应和其他操作之间的关系和遍历机制。

Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.

与动态链接(响应负载中提供的链接)不同,运行的时候,OAS链接机制不需要响应中的链接信息。

Runtime表达式用于访问操作中的值,并在调用时将它们作为参数。

Fixed Fields
属性名属性类型描述
operationRefstring对 OAS请求的相对或绝对URI引用。该字段与operationId字段互斥,并且必须指向一个Operation Object 。相对operationRef 值可用于定位OpenAPI定义中的现有Operation Object
operationIdstring已定义并且可解析的OAS请求的名称,由唯一的operationId定义。该字段与operationRef字段互斥。
parametersMap[string, Any | {expression}]表示要传递给请求参数的map,该请求由operationId 指定或通过operationRef标识。key是要使用的参数名称,而值可以是常量或Runtime表达式。对于在不同位置(例如 path.id)使用相同参数名称的请求,可以使用参数位置 [{in}.]{name}来限定参数名称。
requestBodyAny | {expression}调用目标请求时用作请求body的文字值或Runtime表达式
descriptionstring链接的描述,使用CommonMark syntax可以用于展示富文本。
serverServer Object目标请求要使用的服务器对象。

这个对象可以使用Specification Extensions进行扩展。

必须使用operationRefoperationId来标识链接操作。在使用 operationId的情况下,它必须是在OAS文档的范围内唯一定义的。由于名称可能会冲突,因此具有外部引用的规范推荐使用operationRef

示例:

在请求中使用表达式传递link的参数,如$request.path.id

paths:
/users/{id}:
parameters:
- name: id
in: path
required: true
description: the user identifier, as userId
schema:
type: string
get:
responses:
'200':
description: the user being returned
content:
application/json:
schema:
type: object
properties:
uuid: # the unique user id
type: string
format: uuid
links:
address:
# the target link operationId
operationId: getUserAddress
parameters:
# get the `id` field from the request path parameter named `id`
userId: $request.path.id
# the path item of the linked operation
/users/{userid}/address:
parameters:
- name: userid
in: path
required: true
description: the user identifier, as userId
schema:
type: string
# linked operation
get:
operationId: getUserAddress
responses:
'200':
description: the user's address

在运行的时候,当表达式无法计算(错误)时,不会将参数值传递给请求。

response body中的值可用于链接。

links:
address:
operationId: getUserAddressByUUID
parameters:
# get the `uuid` field from the `uuid` field in the response body
userUuid: $response.body#/uuid

工具自行决定是否遵循所有链接。权限和成功调用该链接的能力都不能仅由关系来保证。

OperationRef Examples

由于使用operationId 进行引用时,operationId 可能为空(operationId请求对象中的一个可选字段),因此也可以通过 operationRef进行相对引用:

links:
UserRepositories:
# returns array of '#/components/schemas/repository'
operationRef: '#/paths/~12.0~1repositories~1{username}/get'
parameters:
username: $response.body#/username

或绝对引用:

links:
UserRepositories:
# returns array of '#/components/schemas/repository'
operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get'
parameters:
username: $response.body#/username

请注意,在JSON中使用 operationRef时,正斜杠需要转义。

Runtime Expressions

使用Runtime表达式可以在API调用过程中,从HTTP消息里提取信息来定义值。Link ObjectCallback Object都使用此机制。

Runtime表达式由下列ABNF语法定义:

      expression = ( "$url" / "$method" / "$statusCode" / "$request." source / "$response." source )
source = ( header-reference / query-reference / path-reference / body-reference )
header-reference = "header." token
query-reference = "query." name
path-reference = "path." name
body-reference = "body" ["#" json-pointer ]
json-pointer = *( "/" reference-token )
reference-token = *( unescaped / escaped )
unescaped = %x00-2E / %x30-7D / %x7F-10FFFF
; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'
escaped = "~" ( "0" / "1" )
; representing '~' and '/', respectively
name = *( CHAR )
token = 1*tchar
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
"^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA

这里的 json-pointer来自RFC 6901char来自RFC 7159token来自RFC 7230.

name 标识符区分大小写,而token 不区分大小写。

下表提供了Runtime表达式的示例及其在值中的使用示例:

表达式对照表
数据位置示例表达式说明
HTTP Method$method提取请求的method
Requested media type$request.header.accept提取请求的header
Request parameter$request.path.id提取请求的参数,请求参数必须在请求的parameters中声明,否则无法提取。包括请求header。
Request body property$request.body#/user/uuid提取请求body的值,在请求载荷中,可以对请求body的部分或整个body进行引用。
Request URL$url提取请求的URL
Response value$response.body#/status提取返回值,在返回有效载荷中,可以对响应body部分或整个body进行提取。
Response header$response.header.Server提取返回的header,仅单个header可用

Runtime表达式保留提取值的类型。将表达式放到{}花括号内,可以嵌入到字符串中。

Header Object(头对象)

Header Object遵循Parameter Object的结构,但有下列不同:

  1. 不能指定name ,它在相应的header的map中给出。
  2. 不能指定in,它隐含在header中.
  3. 受位置影响的所有特征必须适用于header 位置(例如 style)。
示例:
integer类型的header示例:
{
"description": "The number of allowed requests in the current period",
"schema": {
"type": "integer"
}
}
description: The number of allowed requests in the current period
schema:
type: integer

Tag Object(标签对象)

将metadata添加到Operation Object使用的单个标签信息。在Operation Object实例中定义的每个标签都不是必填的。

Fixed Fields
属性名属性类型描述
namestring必填,标签的名字。
descriptionstring标签的简短描述, 使用CommonMark syntax可以用于展示富文本。
externalDocsExternal Documentation Object额外的外部文档。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"name": "pet",
"description": "Pets operations"
}
name: pet
description: Pets operations
name: pet
description: Pets operations

Reference Object(引用对象)

一个简单对象,允许在内部和外部引用规范中的其他组件。该对象由JSON Reference定义,遵循相同的结构、行为和规则。关于该规范,引用解析是由JSON Reference定义的,而不是由JSON Schema定义的。

固定字段:

属性名属性类型描述
$refstring必填,引用字符串

此对象不能使用附加属性进行扩展,并且应忽略添加的其他任何属性。

示例:
{
"$ref": "#/components/schemas/Pet"
}
$ref: '#/components/schemas/Pet'
相对Schema文档:
{
"$ref": "Pet.json"
}
$ref: Pet.yaml
相对于Schema文档内的对象
{
"$ref": "definitions.json#/Pet"
}
$ref: definitions.yaml#/Pet

Schema Object(架构对象)

Schema Object 允许定义输入和输出数据类型。 这些类型可以是objects,也可以是primitivesarrays。 此对象是JSON Schema Specification Wright Draft 00的扩展子集。

更多信息请参考 JSON Schema CoreJSON Schema Validation。 如无例外,属性定义遵循 JSON Schema。

Properties

以下属性直接取自JSON Schema定义,遵循相同的规范:

  • title
  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum
  • maxLength
  • minLength
  • pattern (正则表达式字符串,使用Ecma-262 Edition 5.1 regular expression方言)
  • maxItems
  • minItems
  • uniqueItems
  • maxProperties
  • minProperties
  • required
  • enum

以下属性取自JSON Schema 定义,但是根据OpenAPI规范进行了部分调整,调整如下:

  • type - 必须为字符串且不能通过数组传递多个.
  • allOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • oneOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • anyOf - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • not - 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。
  • items -值必须是一个object而不是一个array. 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。如果typearrayitems必须存在
  • properties - 属性定义必须是 Schema Object,而不是标准的 JSON Schema。 (内联或引用).
  • additionalProperties - 值可以为一个boolean或者一个object. 内联或引用的schema 必须是 Schema Object,而不是标准的 JSON Schema。和JSON Schema一致,additionalProperties默认为true。
  • description - CommonMark syntax可用富文本表示。
  • format - 参考Data Type Formats。在依赖于JSON Schema的定义格式的同时,OAS还提供了一些额外的预定义格式。
  • default - 如果未提供默认值,则使用该值作为默认值。和 JSON Schema 不同的是该值必须符合在同一级别定义的 Schema Object的定义类型。 例如,如果typestring,那么 default可以是 "foo" 但不能是 1

在任何地方使用Schema Object,都可以在当前位置上使用 Reference Object。在可以使用引用定义的情况下请勿使用内联定义。

除了以上提及的属性,其他由JSON Schema规范定义的属性是不受支持的,另外,可以使用以下字段进一步的描述Schema:

Fixed Fields
属性名属性类型描述
nullablebooleantrue时,type允许为"null",只在同一个Schema Object中明确定义type时有效。 默认值为false
discriminatorDiscriminator Object增加对polymorphism(多态)的支持。discriminator是一个对象名称,用于区分可满足条件的其他schemas。参考Composition and Inheritance了解更多细节。
readOnlyboolean仅与Schema的"properties"定义相关。 将属性声明为只读。如果该属性为true并且在required列表中,则required将仅对响应生效(对请求无效)。 readOnlywriteOnly不能同时为true。 该属性默认值为false
writeOnlyboolean仅与Schema的"properties"定义相关。 将属性声明为只写。 与readOnly相反,则required将仅对请求生效(对响应无效)。readOnlywriteOnly不能同时为true。 该属性默认值为false
xmlXML Object只能用于properties schemas。 对root schemas没有影响。 添加其他的metadata来描述此属性的XML。
externalDocsExternal Documentation Object此schema的其他外部文档。
exampleAny此schema实例示例的free-form属性。 不能用JSON或YAML展示的示例,可以使用字符串表示,并在必要时进行转义。
deprecatedboolean指定schema已被弃用并且应该停止使用。 默认值为false

这个对象可以使用Specification Extensions进行扩展。

组合和继承 (多态)

OpenAPI 规范可以使用JSON Schema的allOf属性来组合和扩展模型(model)的定义。 allOf是一个object的数组,这些object互相独立,但共同组成一个对象。

虽然组合提供了模型(model)可扩展性,但这并不代表模型(model)之间存在层次结构。 为了支持多态性,OpenAPI 规范添加了discriminator字段。 discriminator决定要验证schema定义的哪些属性的名称。 所以discriminator 字段必须为必填字段。 有两种方法可以为继承实例定义discriminator 的值。

  • 使用schema的名字。
  • 重写schema的名字来覆盖老的值,内联模式定义的情况下,如果没有指定id,将不能用于多态性。
XML Modeling

当将JSON转换为xml时,xml属性允许额外的定义。 XML Object包含有关可用属性的其他信息。

示例:
普通值(Primitive)
{
"type": "string",
"format": "email"
}
type: string
format: email
简单模型
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"address": {
"$ref": "#/components/schemas/Address"
},
"age": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
}
type: object
required:
- name
properties:
name:
type: string
address:
$ref: '#/components/schemas/Address'
age:
type: integer
format: int32
minimum: 0
map模型/数据字典
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}
type: object
additionalProperties:
type: string
引用模型
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ComplexModel"
}
}
type: object
additionalProperties:
$ref: '#/components/schemas/ComplexModel'
带示例的模型
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"example": {
"name": "Puma",
"id": 1
}
}
type: object
properties:
id:
type: integer
format: int64
name:
type: string
required:
- name
example:
name: Puma
id: 1
组合的模型
{
"components": {
"schemas": {
"ErrorModel": {
"type": "object",
"required": [
"message",
"code"
],
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "integer",
"minimum": 100,
"maximum": 600
}
}
},
"ExtendedErrorModel": {
"allOf": [
{
"$ref": "#/components/schemas/ErrorModel"
},
{
"type": "object",
"required": [
"rootCause"
],
"properties": {
"rootCause": {
"type": "string"
}
}
}
]
}
}
}
}
components:
schemas:
ErrorModel:
type: object
required:
- message
- code
properties:
message:
type: string
code:
type: integer
minimum: 100
maximum: 600
ExtendedErrorModel:
allOf:
- $ref: '#/components/schemas/ErrorModel'
- type: object
required:
- rootCause
properties:
rootCause:
type: string
支持多台的模型
{
"components": {
"schemas": {
"Pet": {
"type": "object",
"discriminator": {
"propertyName": "petType"
},
"properties": {
"name": {
"type": "string"
},
"petType": {
"type": "string"
}
},
"required": [
"name",
"petType"
]
},
"Cat": {
"description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
"allOf": [
{
"$ref": "#/components/schemas/Pet"
},
{
"type": "object",
"properties": {
"huntingSkill": {
"type": "string",
"description": "The measured skill for hunting",
"default": "lazy",
"enum": [
"clueless",
"lazy",
"adventurous",
"aggressive"
]
}
},
"required": [
"huntingSkill"
]
}
]
},
"Dog": {
"description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
"allOf": [
{
"$ref": "#/components/schemas/Pet"
},
{
"type": "object",
"properties": {
"packSize": {
"type": "integer",
"format": "int32",
"description": "the size of the pack the dog is from",
"default": 0,
"minimum": 0
}
},
"required": [
"packSize"
]
}
]
}
}
}
}
components:
schemas:
Pet:
type: object
discriminator:
propertyName: petType
properties:
name:
type: string
petType:
type: string
required:
- name
- petType
Cat: ## "Cat" will be used as the discriminator value
description: A representation of a cat
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
properties:
huntingSkill:
type: string
description: The measured skill for hunting
enum:
- clueless
- lazy
- adventurous
- aggressive
required:
- huntingSkill
Dog: ## "Dog" will be used as the discriminator value
description: A representation of a dog
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
properties:
packSize:
type: integer
format: int32
description: the size of the pack the dog is from
default: 0
minimum: 0
required:
- packSize

Discriminator Object

当请求body或响应有效载荷是许多不同schema之一时,鉴别器对象(discriminator object)可用于帮助序列化、反序列化和验证。鉴别器是schema的特定对象,用于根据与其关联的值通知消费者替代schema的规范。

当使用discriminator时候,内联模式将会失效。

Fixed Fields
属性名属性类型描述
propertyNamestring必填,鉴别器值的属性的名称。
mappingMap[string, string]用于保存有效负载值(payload value)和schema名称或引用之间映射的的对象。

只有在使用复合关键字oneOf, anyOf, allOf之一时,鉴别器对象才是可用的。

在OAS 3.0中,响应载荷可以被描述为任意数量的类型之一:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'

在上面的例子中,响应的有效载荷必须与 CatDogLizard描述的schema之一完全匹配才可以通过验证。在这种情况下,使用鉴别器可以快速验证和选择匹配schema,这可能是比较消耗资源的操作,具体取决于schema的复杂性。也可以准确地指定字段使用哪个模式:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'
discriminator:
propertyName: petType

在上面例子中,期望是一个名为petType的属性必须出现在响应载荷中,并且该值将对应于OAS文档中定义的schema名称。因此响应有效载荷虚构为:

{
"id": 12345,
"petType": "Cat"
}

这样会指定Cat的schema与此有效载荷一起使用。

在鉴别器字段的值与schema的名称不匹配或不能隐式映射的情况下,可以选择直接定义映射关系:

MyResponseType:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Lizard'
- $ref: 'https://gigantic-server.com/schemas/Monster/schema.json'
discriminator:
propertyName: petType
mapping:
dog: '#/components/schemas/Dog'
monster: 'https://gigantic-server.com/schemas/Monster/schema.json'

这里 dog 的鉴别器值将映射到模式#/components/schemas/Dog,而不是 Dog的默认(隐式映射)的值。如果鉴别器值与隐式或显式映射不匹配,则无法确定schema并且应该验证失败。映射key必须是字符串,但工具可以将响应值转换为字符串以进行比较。

当与anyOf构造结合使用时,鉴别器的使用可以避免多个schema可能满足单个有效载荷的歧义。

oneOfanyOf 用例中,必须明确列出所有可能的schema。为了避免重复定义,可以将鉴别器添加到父schema定义中,并且在allOf 构造中包含父schema的所有schema都可以用作替代schema。

举个栗子:

components:
schemas:
Pet:
type: object
required:
- petType
properties:
petType:
type: string
discriminator:
propertyName: petType
mapping:
dog: Dog
Cat:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Cat`
properties:
name:
type: string
Dog:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Dog`
properties:
bark:
type: string
Lizard:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
# all other properties specific to a `Lizard`
properties:
lovesRocks:
type: boolean

响应载荷虚构如下:

{
"petType": "Cat",
"name": "misty"
}

以上响应载荷将指定Cat schema。另一个响应载荷:

{
"petType": "dog",
"bark": "soft"
}

由于Pet定义了mapping映射元素,所以dog将映射到Dog

XML Object(XML对象)

一个元数据对象(metadata object),可以更使用详细的 XML模型定义。

使用数组时,无法从XML的元素名称推断出是单个还是多个,应该使用name 属性来添加该信息。请参阅示例以了解预期行为。

Fixed Fields
属性名属性类型描述
namestring替换用于描述的模式属性的元素/属性(element/attribute)的名称。在items中定义时,它将影响列表中各个XML元素的名称。当wrappedtrue时,与typearray(在items外)一起定义,它将影响包装元素。如果wrappedfalse,它将被忽略。
namespacestring命名空间(namespace)定义的URI。值必须为绝对地址。
prefixstring用于名称的前缀(prefix)。
attributeboolean声明属性定义是否转换为属性(property)而不是元素(attribute)。默认值为false
wrappedboolean只能用于数组定义。表示数组是被包装的(例如,<books><book/><book/></books>)还是未包装的(<book/><book/>)。默认值为false。该定义仅在typearray并在items外一起定义时生效。

这个对象可以使用Specification Extensions进行扩展。

示例:

XML对象定义的示例包含在Schema Object 的属性定义中,并带有它的XML表示示例。

没有XML元素

基本字符串属性:

{
"animals": {
"type": "string"
}
}
animals:
type: string
<animals>...</animals>

基本字符串数组属性(wrapped 默认为false):

{
"animals": {
"type": "array",
"items": {
"type": "string"
}
}
}
animals:
type: array
items:
type: string
<animals>...</animals>
<animals>...</animals>
<animals>...</animals>
XML名称替换
{
"animals": {
"type": "string",
"xml": {
"name": "animal"
}
}
}
animals:
type: string
xml:
name: animal
<animal>...</animal>
XML 属性、前缀和命名空间

该示例展示了完整的模型定义。

{
"Person": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32",
"xml": {
"attribute": true
}
},
"name": {
"type": "string",
"xml": {
"namespace": "http://example.com/schema/sample",
"prefix": "sample"
}
}
}
}
}
Person:
type: object
properties:
id:
type: integer
format: int32
xml:
attribute: true
name:
type: string
xml:
namespace: http://example.com/schema/sample
prefix: sample
<Person id="123">
<sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
</Person>
XML Arrays

修改元素(element)的名称:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
<animal>value</animal>
<animal>value</animal>

如果没有定义wrappedtrue,外部name属性对XML没有影响:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"name": "aliens"
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
name: aliens
<animal>value</animal>
<animal>value</animal>

如果数组被包装且没有明确定义名称,内部和外部都将使用相同的名称:

{
"animals": {
"type": "array",
"items": {
"type": "string"
},
"xml": {
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
wrapped: true
<animals>
<animals>value</animals>
<animals>value</animals>
</animals>

为了解决上面示例中的命名问题,可以使用以下定义:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
wrapped: true
<animals>
<animal>value</animal>
<animal>value</animal>
</animals>

改变内部和外部名称:

{
"animals": {
"type": "array",
"items": {
"type": "string",
"xml": {
"name": "animal"
}
},
"xml": {
"name": "aliens",
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: animal
xml:
name: aliens
wrapped: true
<aliens>
<animal>value</animal>
<animal>value</animal>
</aliens>

只改变外部元素而不改变内部元素:

{
"animals": {
"type": "array",
"items": {
"type": "string"
},
"xml": {
"name": "aliens",
"wrapped": true
}
}
}
animals:
type: array
items:
type: string
xml:
name: aliens
wrapped: true
<aliens>
<aliens>value</aliens>
<aliens>value</aliens>
</aliens>

Security Scheme Object(安全架构对象)

定义操作可以使用的安全方案。 支持的方案有HTTP authentication, API key(header、cookie和query参数)、 RFC6749中定义的OAuth2的常见认证(implicit、password、 client credentials和authorization code)和OpenID Connect Discovery

Fixed Fields
属性名属性类型作用范围描述
typestringAny必填,安全方案的类型。 有效值为"apiKey", "http", "oauth2", "openIdConnect"
descriptionstringAny安全方案的简短描述. 使用CommonMark syntax可以用于展示富文本。
namestringapiKey必填,要使用的header、query或者cookie参数的名称.
instringapiKey必填,API key的所在位置,有效值为"query", "header" or "cookie".
schemestringhttp必填,要在Authorization header as defined in RFC7235中使用的HTTP Authorization scheme名称。 其使用的值应该在IANA Authentication Scheme registry中注册。
bearerFormatstringhttp ("bearer")提示客户端识别bearer token的格式。bearer token通常由授权服务器生成,因此此信息主要用于文档。
flowsOAuth Flows Objectoauth2必填,包含所支持的流类型的配置信息的对象。
openIdConnectUrlstringopenIdConnect必填,OpenId Connect URL以发现OAuth2的配置值。必须为URL格式。

这个对象可以使用Specification Extensions进行扩展。

示例:
Basic Authentication示例
{
"type": "http",
"scheme": "basic"
}
type: http
scheme: basic
API Key示例
{
"type": "apiKey",
"name": "api_key",
"in": "header"
}
type: apiKey
name: api_key
in: header
JWT Bearer示例
{
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
}
type: http
scheme: bearer
bearerFormat: JWT
Implicit OAuth2示例
{
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets

OAuth Flows Object(OAuth流对象)

用于配置支持的OAuth流(OAuth Flows)。

Fixed Fields
属性名属性类型描述
implicitOAuth Flow ObjectOAuth隐式流(OAuth Implicit flow)配置
passwordOAuth Flow ObjectOAuth资源所有者密码流(OAuth Resource Owner Password flow)的配置
clientCredentialsOAuth Flow ObjectOAuth客户端凭据流(OAuth Client Credentials flow)的配置。在OpenAPI 2.0中为application
authorizationCodeOAuth Flow ObjectOAuth授权码流(OAuth Authorization Code flow)配置. 在OpenAPI 2.0中为accessCode

这个对象可以使用Specification Extensions进行扩展。

OAuth Flow Object(OAuth流详情对象)

OAuth流的详细配置信息

Fixed Fields
属性名属性类型适用于描述
authorizationUrlstringoauth2 ("implicit", "authorizationCode")必填,用于此流的授权 URL。必须为 URL 格式。
tokenUrlstringoauth2 ("password", "clientCredentials", "authorizationCode")必填, 用于此流Token的URL。必须为 URL 格式。
refreshUrlstringoauth2获取刷新后Token的URL。必须为 URL 格式。
scopesMap[string, string]oauth2必填,OAuth2安全方案的可用范围,是范围名称和它的简短描述之间的映射。map可以为空。

这个对象可以使用Specification Extensions进行扩展。

示例:
{
"type": "oauth2",
"flows": {
"implicit": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
},
"authorizationCode": {
"authorizationUrl": "https://example.com/api/oauth/dialog",
"tokenUrl": "https://example.com/api/oauth/token",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
}
}
}
type: oauth2
flows:
implicit:
authorizationUrl: https://example.com/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets
authorizationCode:
authorizationUrl: https://example.com/api/oauth/dialog
tokenUrl: https://example.com/api/oauth/token
scopes:
write:pets: modify pets in your account
read:pets: read your pets

Security Requirement Object(安全要求对象)

执行请求所需的安全方案列表。每个属性的名称必须对应于Components Object下的securitySchemes属性声明的安全方案。

Security Requirement Objects包含多个对象时,要求必须满足所有对象才能使请求获得授权。 这需要传递多个query参数或header参数。

当在OpenAPI ObjectOperation Object上定义Security Requirement Objects列表时,只需满足列表中的一个Security Requirement Object即可授权请求。

Patterned Fields
匹配字段属性类型描述
{name}[string]每个名称必须对应于在Components ObjectsecuritySchemes中声明的安全方案。 如果安全方案的type字段为“oauth2”或“openIdConnect”,则该值是执行范围的名称列表,如果不需要指定范围,则该列表可以为空。 对于其他类型,数组必须为空。
示例:
非OAuth2的情况
{
"api_key": []
}
api_key: []
OAuth2的情况
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
petstore_auth:
- write:pets
- read:pets
OAuth2的可选情况

OpenAPI ObjectOperation Object中定义的一样。

{
"security": [
{},
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
security:
- {}
- petstore_auth:
- write:pets
- read:pets

Specification Extensions(规范扩展)

虽然OpenAPI规范尝试适应大多数的应用场景,但可以添加额外的数据以在某些点扩展规范。

扩展属性的实现始终以"x-"为前缀的模式化字段。

匹配字段类型描述
^x-Any可以对OpenAPI Schema进行扩展。字段名称必须以x-开头,例如x-internal-id。该值可以是 null、基本数据类型(primitive)、数组(array)或对象(object)。可以有任何有效的 JSON 格式值。

可用工具可能支持也可能不支持扩展,但也可以扩展这些扩展以添加请求的支持(如果工具是内部的或开源的)。

Security Filtering(安全过滤)

OpenAPI规范中的一些对象可以被声明并保持为空,或者被完全删除,即使它们是API文档的核心。

原因是因为可以对文档进行额外的访问控制。虽然这不是规范本身的一部分,但某些库可以选择允许基于某种形式的身份验证/授权访问(authentication/authorization)文档的某些部分。

举例如下:

  1. Paths Object可能为空。这是为了告诉查看者他们访问到了正确的位置,但无法访问任何文档。但他们仍然可以访问可能包含有关身份验证附加信息的Info Object
  2. Path Item Object可能为空。在这种情况下,查看者将知道路径存在,但将无法看到它的任何请求或参数。这与从Paths Object,中隐藏路径本身不同,因为用户会知道它的存在。这允许文档提供者更精细地控制查看者可以看到的内容。
+ + diff --git a/knife4j-doc/gitee/docs/oas/annotation-introduction.html b/knife4j-doc/gitee/docs/oas/annotation-introduction.html index 156b7a4ff..bb65c770a 100644 --- a/knife4j-doc/gitee/docs/oas/annotation-introduction.html +++ b/knife4j-doc/gitee/docs/oas/annotation-introduction.html @@ -10,26 +10,26 @@ - -说明 | Knife4j - - +说明 | Knife4j + +

说明

+ + diff --git a/knife4j-doc/gitee/docs/oas/oas-text.html b/knife4j-doc/gitee/docs/oas/oas-text.html index 7c9f0691e..aacff7e5b 100644 --- a/knife4j-doc/gitee/docs/oas/oas-text.html +++ b/knife4j-doc/gitee/docs/oas/oas-text.html @@ -10,16 +10,15 @@ - -OAS简介111111 | Knife4j - - +OAS简介111111 | Knife4j + +
-

OAS简介111111

- - +

OAS简介111111

+ + diff --git a/knife4j-doc/gitee/docs/oas/openapi-spe.html b/knife4j-doc/gitee/docs/oas/openapi-spe.html index e6b16a857..ed29e198b 100644 --- a/knife4j-doc/gitee/docs/oas/openapi-spe.html +++ b/knife4j-doc/gitee/docs/oas/openapi-spe.html @@ -10,26 +10,26 @@ - -简介 | Knife4j - - +简介 | Knife4j + +

简介

主要包括Swagger2以及OpenAPI3

+ + diff --git a/knife4j-doc/gitee/docs/oas/openapi2-annotation.html b/knife4j-doc/gitee/docs/oas/openapi2-annotation.html index 96f7e8300..6aca3cb25 100644 --- a/knife4j-doc/gitee/docs/oas/openapi2-annotation.html +++ b/knife4j-doc/gitee/docs/oas/openapi2-annotation.html @@ -10,26 +10,26 @@ - -Swagger2注解 | Knife4j - - +Swagger2注解 | Knife4j + +
-

Swagger2注解

主要包含注解:

  • @Api:定义接口分组名称
  • @ApiImplicitParam: 单个参数注释
  • @ApiImplicitParams:多个参数注释
  • @ApiModel:实体类定义
  • @ApiModelProperty:实体属性定义
  • @ApiOperation:接口定义
  • @ApiParam:参数注释
  • @ApiResponse:响应码
  • @ApiResponses:多个响应码
+ + diff --git a/knife4j-doc/gitee/docs/oas/openapi2.html b/knife4j-doc/gitee/docs/oas/openapi2.html index 3f3232733..d728dd537 100644 --- a/knife4j-doc/gitee/docs/oas/openapi2.html +++ b/knife4j-doc/gitee/docs/oas/openapi2.html @@ -10,26 +10,26 @@ - -Swagger2 | Knife4j - - +Swagger2 | Knife4j + +
+ + diff --git a/knife4j-doc/gitee/docs/oas/openapi3-annotation.html b/knife4j-doc/gitee/docs/oas/openapi3-annotation.html index 6b975f48f..f1ab02d1f 100644 --- a/knife4j-doc/gitee/docs/oas/openapi3-annotation.html +++ b/knife4j-doc/gitee/docs/oas/openapi3-annotation.html @@ -10,26 +10,26 @@ - -OpenAPI3注解 | Knife4j - - +OpenAPI3注解 | Knife4j + +
-

OpenAPI3注解

Swagger3注解说明
@Tag(name = “接口类描述”)Controller 类
@Operation(summary =“接口方法描述”)Controller 方法
@ParametersController 方法
@Parameter(description=“参数描述”)Controller 方法上 @Parameters 里Controller 方法的参数
@Parameter(hidden = true) 、@Operation(hidden = true)@Hidden排除或隐藏api
@SchemaDTO实体DTO实体属性
+ + diff --git a/knife4j-doc/gitee/docs/oas/openapi3.html b/knife4j-doc/gitee/docs/oas/openapi3.html index ad3fe9ad7..992adcdee 100644 --- a/knife4j-doc/gitee/docs/oas/openapi3.html +++ b/knife4j-doc/gitee/docs/oas/openapi3.html @@ -10,26 +10,26 @@ - -OpenAPI3 | Knife4j - - +OpenAPI3 | Knife4j + +
+ + diff --git a/knife4j-doc/gitee/docs/quick-start.html b/knife4j-doc/gitee/docs/quick-start.html index c1ed3768c..0740db44d 100644 --- a/knife4j-doc/gitee/docs/quick-start.html +++ b/knife4j-doc/gitee/docs/quick-start.html @@ -10,26 +10,26 @@ - -快速开始 | Knife4j - - +快速开始 | Knife4j + +
-

快速开始

如果你对选择Knife4j的版本存在疑惑,可以参考文档Knife4j版本参考

Spring Boot 3

提示
  • Spring Boot 3 只支持OpenAPI3规范
  • Knife4j提供的starter已经引用springdoc-openapi的jar,开发者需注意避免jar包冲突
  • JDK版本必须 >= 17
  • 详细Demo请参考knife4j-spring-boot3-demo

首先,引用Knife4j的starter,Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>

引入之后,其余的配置,开发者即可完全参考springdoc-openapi的项目说明,Knife4j只提供了增强部分,如果要启用Knife4j的增强功能,可以在配置文件中进行开启

部分配置如下:

# springdoc-openapi项目配置
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
api-docs:
path: /v3/api-docs
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: com.xiaominfo.knife4j.demo.web
# knife4j的增强配置,不需要增强可以不配
knife4j:
enable: true
setting:
language: zh_cn

Knife4j更多增强配置明细,请移步文档进行查看

最后,使用OpenAPI3的规范注解,注释各个Spring的REST接口,示例代码如下:

@RestController
@RequestMapping("body")
@Tag(name = "body参数")
public class BodyController {

@Operation(summary = "普通body请求")
@PostMapping("/body")
public ResponseEntity<FileResp> body(@RequestBody FileResp fileResp){
return ResponseEntity.ok(fileResp);
}

@Operation(summary = "普通body请求+Param+Header+Path")
@Parameters({
@Parameter(name = "id",description = "文件id",in = ParameterIn.PATH),
@Parameter(name = "token",description = "请求token",required = true,in = ParameterIn.HEADER),
@Parameter(name = "name",description = "文件名称",required = true,in=ParameterIn.QUERY)
})
@PostMapping("/bodyParamHeaderPath/{id}")
public ResponseEntity<FileResp> bodyParamHeaderPath(@PathVariable("id") String id,@RequestHeader("token") String token, @RequestParam("name")String name,@RequestBody FileResp fileResp){
fileResp.setName(fileResp.getName()+",receiveName:"+name+",token:"+token+",pathID:"+id);
return ResponseEntity.ok(fileResp);
}
}

最后,访问Knife4j的文档地址:http://ip:port/doc.html即可查看文档

Spring Boot 2

提示

OpenAPI2

OpenAPI2(Swagger)规范是Knife4j之前一直提供支持的版本,底层依赖框架为Springfox,此次在4.0版本开始

Knife4j有了新的变化,主要有以下几点:

  • Springfox版本选择的依然是2.10.5版本,而并非springfox最新3.0.0版本
  • 不支持以Springfox框架为基础的OpenAPI3规范,放弃Springfox项目的后续版本适配支持工作
  • Spring Boot 版本建议 2.4.0~3.0.0之间

可以使用 knife4j-openapi2-spring-boot-starter,maven 坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>

配置yml属性,如下:

knife4j:
enable: true
openapi:
title: Knife4j官方文档
description: "`我是测试`,**你知道吗**
# aaa"
email: xiaoymin@foxmail.com
concat: 八一菜刀
url: https://docs.xiaominfo.com
version: v4.0
license: Apache 2.0
license-url: https://stackoverflow.com/
terms-of-service-url: https://stackoverflow.com/
group:
test1:
group-name: 分组名称
api-rule: package
api-rule-resources:
- com.knife4j.demo.new3

最后,访问Knife4j的文档地址:http://ip:port/doc.html即可查看文档

OpenAPI3

OpenAPI3的规范,目前针对Java的Spring Boot项目,主要支持的有2个版本

  • springfox 3.0.0: 同时兼容OpenAPI2以及OpenAPI3,但是停更很久了
  • springdoc-openapi: 兼容OpenAPI3规范,更新速度频繁

Knife4j在只有的OpenAPI3规范中,底层基础框架选择springdoc-openapi项目

针对Springfox3.0.0版本会放弃。

建议开发者如果使用OpenAPI3规范的话,也尽快迁移过来。

可以使用 knife4j-openapi3-spring-boot-starter,maven 坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>

引入jar包后,同上面的Spring Boot 3版本使用方式一样,进行配置即可。

+ + diff --git a/knife4j-doc/gitee/docs/quick-start/start-knife4j-version.html b/knife4j-doc/gitee/docs/quick-start/start-knife4j-version.html new file mode 100644 index 000000000..a4f57aac2 --- /dev/null +++ b/knife4j-doc/gitee/docs/quick-start/start-knife4j-version.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + +Knife4j版本参考 | Knife4j + + + + +
+

Knife4j版本参考

以下是关于Knife4j适配不同Spring Boot版本的说明文档

版本规范说明

本文档旨在帮助开发者选择适合其项目的Knife4j版本与Spring Boot版本的适配。请根据您的项目要求和使用的Spring Boot版本选择适当的Knife4j版本。

1.前世今生

在更名为Knife4j之前,原来的名称是叫swagger-bootstrap-ui,这是两种不一样风格的Ui,对比情况如下:

名称开发语言&框架状态最后版本风格
Knife4jJava、JavaScript、Vue持续更新中...黑色
swagger-bootstrap-uiJava、JavaScript、jQuery停更1.9.6蓝色

Knife4j从开源至今,目前主要经历版本的变化,分别如下:

版本说明
1.0~1.9.6名称是叫swagger-bootstrap-ui,蓝色风格Ui
1.9.6蓝色皮肤风格,开始更名,增加更多后端模块
2.0~2.0.5Ui基于Vue2.0+AntdV重写,黑色风格,参考示例,底层依赖的springfox框架版本是2.9.2,仅提供Swagger2规范的适配
2.0.6~2.0.9底层springfox框架版本升级知2.10.5,,仅提供Swagger2规范的适配
3.0~3.0.3底层依赖springfox框架版本升级至3.0.3,OpenAPI规范是v3,过度版本,建议开发者不要使用
4.0~区分OpenAPI2和Swagger3的Maven坐标artifactId
OpenAPI2规范服务端解析框架稳定在springfox2.10.5
OpenAPI3框架服务端解析跟随springdoc项目更新迭代
建议开发者使用该版本,请参考4.x升级文档

2.Spring Boot版本兼容性

首先,确保您了解您的项目所使用的Spring Boot版本。

以下是一些常见的Spring Boot版本及其对应的Knife4j版本兼容推荐:

Spring Boot版本Knife4j Swagger2规范Knife4j OpenAPI3规范
1.5.x~2.0.0<Knife4j 2.0.0>=Knife4j 4.0.0
2.0~2.2Knife4j 2.0.0 ~ 2.0.6>=Knife4j 4.0.0
2.2.x~2.4.0Knife4j 2.0.6 ~ 2.0.9>=Knife4j 4.0.0
2.4.0~2.7.x>=Knife4j 4.0.0>=Knife4j 4.0.0
>= 3.0>=Knife4j 4.0.0>=Knife4j 4.0.0

Knife4j在之前的版本更新中,逐渐提供了一些服务端适配的增强特性功能。

但是开发者应该明白,不管是Swagger2规范还是OpenAPI3规范,Knife4j的最新版本的纯Ui版本,是可以适配Spring Boot所有版本的。

如果你不考虑使用Knife4j提供的服务端增强功能,引入Knife4j的纯Ui版本没有任何限制。只需要考虑不同的规范即可

2.1 Spring Boot 2.x

在Knife4j的4.0版本之前,开发者引用的方式是通过knife4j-spring-boot-starter进行使用,但是在4.0版本之后,开发者在引用时需要对选择不同的规范版本进行区分

Knife4j在组件中针对不同的规范版本做了区分,maven组件的artifactId已经发生了变化。

2.1.1 Swagger2规范

在4.0版本之前,应用坐标:

引用组件maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>{<4.0.0版本}</version>
</dependency>

自4.0版本开始,maven组件的artifactId已经发生了变化。

引用组件maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>{maven仓库最新版本}</version>
</dependency>

2.1.2 OpenAPI3规范

自4.0版本开始,Knife4j提供对OpenAPI3规范的适配,底层规范解析框架依赖springdoc-openapi项目

引用组件maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>{maven仓库最新版本}</version>
</dependency>

2.2 Spring Boot 3.x

由于springfox长久未更新,并且Swagger2规范在目前来看,一定程度上也并未升级,规范已经全部往OpenAPI3规范靠拢,因此,在Spring Boot 3.x版本中,开发者应该选择OpenAPI3规范来作为应用框架的开发首选方案。

Knife4j自4.0版本为Spring Boot 3框架提供了适配

引用组件maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>{maven仓库最新版本}</version>
</dependency>

3.规范说明

针对Swagger2规范OpenAPI3规范的说明:

服务端规范解析说明

在Spring Boot框架中,Knife4j对于服务端将Spring的开放接口解析成Swagger2或者OpenAPI3规范的框架,也是依赖的第三方框架组件。说明如下:

  • Swagger2规范:依赖Springfox项目,该项目目前几乎处于停更状态,但很多老项目依然使用的是该规范,所以Knife4j在更新前端Ui的同时也继续保持了兼容
  • OpenAPI3规范:依赖Springdoc项目,更新发版频率非常快,建议开发者尽快迁移过来使用OpenAPI3规范,Knife4j后面的重心也会在这里。
Knife4j版本Swagger2规范OpenAPI3规范说明
1.0~1.9.6springfox 2.9.2Knife4j的前身,名称为swagger-bootstrap-ui
1.9.6~2.0.5springfox 2.9.2
2.0.6~2.0.9springfox 2.10.5
3.0.0~3.0.3springfox 3.0.3过度版本,建议开发者不要使用
4.0.0~springfox 2.10.5>=springdoc-openapi 1.6.9Swagger2规范稳定使用springfox2.10.5保持不变。开发者应该尽早迁移到OpenAPI3规范上来,请参考4.x升级文档

4.网关聚合

自4.0版本后,Knife4j提供了一个针对在Spring Cloud Gateway网关进行聚合的组件knife4j-gateway,开发者可以基于此组件轻松的聚合各个子服务的OpenAPI文档

Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
<version>{大于4.0.0版本}</version>
</dependency>

由于开发网关聚合组件时,Knife4j所引用的Spring Cloud Gateway的依赖全部为Optional类型,常规操作下,开发者应该是在Gateway的任意版本中都能使用,但还是给出最低的推荐版本配置:

Spring Boot版本Knife4j Gateway网关聚合版本
>=2.4.8~3.x>=4.0.0

5.最后

如果您在选择使用Knife4j的版本过程中仍然存在疑惑,可以通过关注文档底部的微信公众号,点击菜单加入微信交流群,与作者当面对话。

+ + + + + + \ No newline at end of file diff --git a/knife4j-doc/gitee/docs/solution.html b/knife4j-doc/gitee/docs/solution.html index 13408ee6e..cf6f50bf9 100644 --- a/knife4j-doc/gitee/docs/solution.html +++ b/knife4j-doc/gitee/docs/solution.html @@ -10,17 +10,16 @@ - -README | Knife4j - - +README | Knife4j + +
-
- - +
+ + diff --git a/knife4j-doc/gitee/docs/solution/admin.html b/knife4j-doc/gitee/docs/solution/admin.html index 61a8abb09..54d1c0c6b 100644 --- a/knife4j-doc/gitee/docs/solution/admin.html +++ b/knife4j-doc/gitee/docs/solution/admin.html @@ -10,17 +10,16 @@ - -简介 | Knife4j - - +简介 | Knife4j + +
-

简介

knife4j-admin是一个基于Spring Cloud Gateway网关,通过网关的特性,结合knife4j对Swagger的文档进行动态聚合的管理平台

大家好,我在GitChat中写了一篇关于《Knife4j 及 Swagger 在企业开发中的实践》 -地址:https://gitbook.cn/gitchat/activity/5f86b4cb1772090f20e13b03

欢迎对 SpringFox、Swagger、Knife4j 感兴趣以及想了解的人员一起来chat

平台特点:

  • 跨语言、跨平台
  • 任意聚合Swagger文档,动态发布,调试
  • 文档个性化配置、权限等
  • 彻底告别聚合网关文档等由于软件版本等造成的技术集成问题
  • 独立部署

目前V1.0版本提供的功能:

  • 项目管理:查看项目列表,新增项目文档

  • 文档预览:通过项目的JSON结构,解析动态添加至Spring Cloud Gateway网关进行文档聚合,并且可以在线调试

项目新增

1、添加项目必须按照如下格式进行

{
"name": "大数据测试平台",
"code":"test1",
"description":"我是描述信息",
"groups": [
{
"name": "用户模块",
"uri":"http://knife4j.xiaominfo.com",
"header":"server1",
"url": "/v2/api-docs?group=2.X版本",
"swaggerVersion": "2.0"
},{
"name": "订单模块",
"uri":"http://swagger-bootstrap-ui.xiaominfo.com",
"header":"server2",
"url": "/v2/api-docs?group=1.8.X版本接口",
"swaggerVersion": "2.0"
}
//more..
]
}

2、平台会根据用户上传的JSON文件在服务端保存一个.json文件,每一个项目代表内容都是以上一个完整的json文件

3、项目code必须唯一

4、项目下的服务列表信息中,header必须全局唯一,该参数值用户可以随机生成,只需要保证唯一性即可,作为Spring Cloud Gateway网关组件的转发依据

5、groups集合中,所提供的Swagger接口必须保证可以访问,完整的访问路径是uri+url

解决痛点

1、多语言使用Swagger时,集成Knife4j较麻烦

虽然Knife4j提供了其他语言的前端版本,但是从总体上还需要自己打包构建,而且依赖于其他Web容器进行单独部署,使用上叫复杂

Knife4j-admin目前是根据OpenAPI V2的Swagger规范文档聚合平台,不同的语言在使用Knife4j时也可以很方便的使用

2、以Spring Cloud的微服务体系聚合Swagger困难重重

在Knife4j的技术交流群中,目前问的最多的就是Spring Cloud微服务架构如何聚合Swagger文档,要么是文档聚合失败,无法显示,要么是由于网关组件(Gateway|zuul)等组件本身的版本问题导致文档显示异常

Knife4j-admin是独立部署,只需要提供微服务的接口既可以通过admin来很方便的集成

3、个性化配置

个性化的配置问题同样也是开发者关心的,例如:

1).Swagger文档能否登陆?

2).如何在生产环境屏蔽Swagger文档

3).文档界面中的XXX功能能否不显示

4).more...

对于个性化的需求,由于Knife4j-admin是独立的平台,对于文档的安全性等方面,可以做到很精准的控制,平台有用户,有可视化操作,有授权,并且可以作为唯一的对外文档发布平台,结合自身的服务器网络环境,做到内外网的环境隔离,文档安全输出.

更多有趣的功能等你来发掘~~!!!

试用

目前,在服务器上部署了一个版本,开发者如果有兴趣可以去体验

访问地址:http://kadmin.xiaominfo.com/index.html#/home

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

- - +

简介

knife4j-admin是一个基于Spring Cloud Gateway网关,通过网关的特性,结合knife4j对Swagger的文档进行动态聚合的管理平台

大家好,我在GitChat中写了一篇关于《Knife4j 及 Swagger 在企业开发中的实践》 +地址:https://gitbook.cn/gitchat/activity/5f86b4cb1772090f20e13b03

欢迎对 SpringFox、Swagger、Knife4j 感兴趣以及想了解的人员一起来chat

平台特点:

  • 跨语言、跨平台
  • 任意聚合Swagger文档,动态发布,调试
  • 文档个性化配置、权限等
  • 彻底告别聚合网关文档等由于软件版本等造成的技术集成问题
  • 独立部署

目前V1.0版本提供的功能:

  • 项目管理:查看项目列表,新增项目文档

  • 文档预览:通过项目的JSON结构,解析动态添加至Spring Cloud Gateway网关进行文档聚合,并且可以在线调试

项目新增

1、添加项目必须按照如下格式进行

{
"name": "大数据测试平台",
"code":"test1",
"description":"我是描述信息",
"groups": [
{
"name": "用户模块",
"uri":"http://knife4j.xiaominfo.com",
"header":"server1",
"url": "/v2/api-docs?group=2.X版本",
"swaggerVersion": "2.0"
},{
"name": "订单模块",
"uri":"http://swagger-bootstrap-ui.xiaominfo.com",
"header":"server2",
"url": "/v2/api-docs?group=1.8.X版本接口",
"swaggerVersion": "2.0"
}
//more..
]
}

2、平台会根据用户上传的JSON文件在服务端保存一个.json文件,每一个项目代表内容都是以上一个完整的json文件

3、项目code必须唯一

4、项目下的服务列表信息中,header必须全局唯一,该参数值用户可以随机生成,只需要保证唯一性即可,作为Spring Cloud Gateway网关组件的转发依据

5、groups集合中,所提供的Swagger接口必须保证可以访问,完整的访问路径是uri+url

解决痛点

1、多语言使用Swagger时,集成Knife4j较麻烦

虽然Knife4j提供了其他语言的前端版本,但是从总体上还需要自己打包构建,而且依赖于其他Web容器进行单独部署,使用上叫复杂

Knife4j-admin目前是根据OpenAPI V2的Swagger规范文档聚合平台,不同的语言在使用Knife4j时也可以很方便的使用

2、以Spring Cloud的微服务体系聚合Swagger困难重重

在Knife4j的技术交流群中,目前问的最多的就是Spring Cloud微服务架构如何聚合Swagger文档,要么是文档聚合失败,无法显示,要么是由于网关组件(Gateway|zuul)等组件本身的版本问题导致文档显示异常

Knife4j-admin是独立部署,只需要提供微服务的接口既可以通过admin来很方便的集成

3、个性化配置

个性化的配置问题同样也是开发者关心的,例如:

1).Swagger文档能否登陆?

2).如何在生产环境屏蔽Swagger文档

3).文档界面中的XXX功能能否不显示

4).more...

对于个性化的需求,由于Knife4j-admin是独立的平台,对于文档的安全性等方面,可以做到很精准的控制,平台有用户,有可视化操作,有授权,并且可以作为唯一的对外文档发布平台,结合自身的服务器网络环境,做到内外网的环境隔离,文档安全输出.

更多有趣的功能等你来发掘~~!!!

试用

目前,在服务器上部署了一个版本,开发者如果有兴趣可以去体验

访问地址:http://kadmin.xiaominfo.com/index.html#/home

Star & Issue

感谢各位朋友的支持,前往https://gitee.com/xiaoym/knife4j点个Star吧~~ :)

+ + diff --git a/knife4j-doc/gitee/docs/solution/extension.html b/knife4j-doc/gitee/docs/solution/extension.html index c4c1e25df..52f43c2fb 100644 --- a/knife4j-doc/gitee/docs/solution/extension.html +++ b/knife4j-doc/gitee/docs/solution/extension.html @@ -10,16 +10,15 @@ - -extension | Knife4j - - +extension | Knife4j + +
-

extension

简介

swagger-bootstrap-ui-extension是基于Chrome浏览器的Swagger渲染扩展程序.简称sbue,该扩展程序提供根据Swagger JSON标准文件及RESTful Api接口方式进行Swagger的ui渲染,帮助开发人员可以在本地浏览器中快速预览Swagger接口文档.

功能效果如下:

原型设计

功能原型设想

JSON

提供根据输入的Swagger标准JSON文件进行ui渲染

RESTFul API

提供根据请求Swagger资源接口的方式进行UI渲染

功能实现

主要包括功能如下:

  • JSON:提供根据输入的Swagger标准JSON文件进行ui渲染
  • RESTful API:提供根据请求Swagger资源接口的方式进行UI渲染
  • 源码:sbue的Gitee源码包地址
  • 文档:sbue的相关文档介绍说明
  • 用户中心:用户中心管理界面,云端sbue管理中心
  • 清理缓存:清理sbue产生的缓存
  • 选项:sbue的相关选项配置,个性化信息

功能效果图菜单:

JSON

提供根据输入的Swagger标准JSON文件进行ui渲染

RESTFul API

提供根据请求Swagger资源接口的方式进行UI渲染

- - +

extension

简介

swagger-bootstrap-ui-extension是基于Chrome浏览器的Swagger渲染扩展程序.简称sbue,该扩展程序提供根据Swagger JSON标准文件及RESTful Api接口方式进行Swagger的ui渲染,帮助开发人员可以在本地浏览器中快速预览Swagger接口文档.

功能效果如下:

原型设计

功能原型设想

JSON

提供根据输入的Swagger标准JSON文件进行ui渲染

RESTFul API

提供根据请求Swagger资源接口的方式进行UI渲染

功能实现

主要包括功能如下:

  • JSON:提供根据输入的Swagger标准JSON文件进行ui渲染
  • RESTful API:提供根据请求Swagger资源接口的方式进行UI渲染
  • 源码:sbue的Gitee源码包地址
  • 文档:sbue的相关文档介绍说明
  • 用户中心:用户中心管理界面,云端sbue管理中心
  • 清理缓存:清理sbue产生的缓存
  • 选项:sbue的相关选项配置,个性化信息

功能效果图菜单:

JSON

提供根据输入的Swagger标准JSON文件进行ui渲染

RESTFul API

提供根据请求Swagger资源接口的方式进行UI渲染

+ + diff --git a/knife4j-doc/gitee/docs/solution/knife4j-admin-deploy.html b/knife4j-doc/gitee/docs/solution/knife4j-admin-deploy.html index 29f81c8bc..13f8222f0 100644 --- a/knife4j-doc/gitee/docs/solution/knife4j-admin-deploy.html +++ b/knife4j-doc/gitee/docs/solution/knife4j-admin-deploy.html @@ -10,16 +10,15 @@ - -部署手册 | Knife4j - - +部署手册 | Knife4j + +
-

部署手册

knife4j-admin采用前后端分离的方式进行部署

java环境

[root@iZbt ~]# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Linux:

[root@iZbt ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core

安装Nginx

服务端必须安装Nginx,具体的安装教程可以自行搜索,这里不再说明.

下载最新发行版

前往发行版地址进行下载

发行版一般是以zip压缩包形式进行发布,压缩包中包含jar可运行文件以及一个front的前端文件

安装部署

假设部署路径在服务器的/mnt/application/kadmin目录下

文件的整体结构如下:

|-kadmin
|----data //数据目录,可以为空,在部署时该目录必须先手工创建
|----front //由zip包解压得到
|----logs //程序的日志目录,在部署时该目录必须先手工创建
|----startup.sh //启动脚本,必须使用chmod+x startup.sh 命令赋予可执行权限
|----knife4j-admin-1.0.jar //由zip包解压得到

修改配置文件

在knife4j-admin程序中,如果你的部署目录不是/mnt/application/kadmin,那么需要修改jar包中的application-prod.yml配置文件

application-prod.yml:

server:
# 端口号
port: 17808
knife4j:
# 监听项目目录
monitor: /mnt/application/kadmin/data

必须修改knife4j.monitor中的监测目录,该目录是可以由开发者自行更改,更改后在替换jar包中的文件即可

当然,程序的端口号开发者也可自行更改

启动程序

knife4j-admin提供的是一个Spring Boot的可执行jar包,因此,startup.sh的可执行文件内容如下:

nohup java -Xms512m -Xmx512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:MaxNewSize=256m -jar /mnt/application/kadmin/knife4j-admin-1.0.jar >> /dev/null 2>&1 &

通过Linux终端执行命令进行启动

[root@izbt kadmin]# ./startup.sh

配置Nginx

当我们的后台服务启动好之后,我们还需要配置一个对外的Nginx端口

kadmin.conf

server {
listen 80;
server_name kadmin.xiaominfo.com;
# 后台服务
location / {
proxy_pass http://127.0.0.1:17808;
client_max_body_size 300m;
}
# 前端文件
location ~*^.+\.(icon|gif|jpg|jpeg|png|html|css|js|txt|xml|swf|wav)$ {
root /mnt/application/kadmin/front;
}

}

此Nginx的配置是目前knife4j提供的测试地址,开发者如果没有域名,可以自行使用端口号等进行配置即可

启动Nginx

Nginx的环境配置好后,启动Nginx即可

服务启动

[root@izbt kadmin]# service nginx start

如果Nginx未安装成系统服务,则可以命令行启动

[root@izbt kadmin]# cd /usr/local/nginx
[root@izbt nginx]# sbin/nginx
- - +

部署手册

knife4j-admin采用前后端分离的方式进行部署

java环境

[root@iZbt ~]# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Linux:

[root@iZbt ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core

安装Nginx

服务端必须安装Nginx,具体的安装教程可以自行搜索,这里不再说明.

下载最新发行版

前往发行版地址进行下载

发行版一般是以zip压缩包形式进行发布,压缩包中包含jar可运行文件以及一个front的前端文件

安装部署

假设部署路径在服务器的/mnt/application/kadmin目录下

文件的整体结构如下:

|-kadmin
|----data //数据目录,可以为空,在部署时该目录必须先手工创建
|----front //由zip包解压得到
|----logs //程序的日志目录,在部署时该目录必须先手工创建
|----startup.sh //启动脚本,必须使用chmod+x startup.sh 命令赋予可执行权限
|----knife4j-admin-1.0.jar //由zip包解压得到

修改配置文件

在knife4j-admin程序中,如果你的部署目录不是/mnt/application/kadmin,那么需要修改jar包中的application-prod.yml配置文件

application-prod.yml:

server:
# 端口号
port: 17808
knife4j:
# 监听项目目录
monitor: /mnt/application/kadmin/data

必须修改knife4j.monitor中的监测目录,该目录是可以由开发者自行更改,更改后在替换jar包中的文件即可

当然,程序的端口号开发者也可自行更改

启动程序

knife4j-admin提供的是一个Spring Boot的可执行jar包,因此,startup.sh的可执行文件内容如下:

nohup java -Xms512m -Xmx512m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:MaxNewSize=256m -jar /mnt/application/kadmin/knife4j-admin-1.0.jar >> /dev/null 2>&1 &

通过Linux终端执行命令进行启动

[root@izbt kadmin]# ./startup.sh

配置Nginx

当我们的后台服务启动好之后,我们还需要配置一个对外的Nginx端口

kadmin.conf

server {
listen 80;
server_name kadmin.xiaominfo.com;
# 后台服务
location / {
proxy_pass http://127.0.0.1:17808;
client_max_body_size 300m;
}
# 前端文件
location ~*^.+\.(icon|gif|jpg|jpeg|png|html|css|js|txt|xml|swf|wav)$ {
root /mnt/application/kadmin/front;
}

}

此Nginx的配置是目前knife4j提供的测试地址,开发者如果没有域名,可以自行使用端口号等进行配置即可

启动Nginx

Nginx的环境配置好后,启动Nginx即可

服务启动

[root@izbt kadmin]# service nginx start

如果Nginx未安装成系统服务,则可以命令行启动

[root@izbt kadmin]# cd /usr/local/nginx
[root@izbt nginx]# sbin/nginx
+ + diff --git a/knife4j-doc/gitee/docs/solution/knife4j-admin-download.html b/knife4j-doc/gitee/docs/solution/knife4j-admin-download.html index 4eaf5ec9c..18a031a1d 100644 --- a/knife4j-doc/gitee/docs/solution/knife4j-admin-download.html +++ b/knife4j-doc/gitee/docs/solution/knife4j-admin-download.html @@ -10,16 +10,15 @@ - -发行版 | Knife4j - - +发行版 | Knife4j + +
-

发行版

v1.0版本

发布日期:2020/05/19

下载地址:knife4j-admin-v1.0.zip

- - +

发行版

v1.0版本

发布日期:2020/05/19

下载地址:knife4j-admin-v1.0.zip

+ + diff --git a/knife4j-doc/gitee/docs/solution/service.html b/knife4j-doc/gitee/docs/solution/service.html index a85022dd1..4eec69694 100644 --- a/knife4j-doc/gitee/docs/solution/service.html +++ b/knife4j-doc/gitee/docs/solution/service.html @@ -10,16 +10,15 @@ - -简介 | Knife4j - - +简介 | Knife4j + +
-

简介

提供一系列根据Swagger资源输出目标资源的开放接口,作者正在开发中.....

comment/>
- - +

简介

提供一系列根据Swagger资源输出目标资源的开放接口,作者正在开发中.....

comment/>
+ + diff --git a/knife4j-doc/gitee/docs/solution/ui-front-gateway.html b/knife4j-doc/gitee/docs/solution/ui-front-gateway.html index 5ee4ca1c6..486a4ea18 100644 --- a/knife4j-doc/gitee/docs/solution/ui-front-gateway.html +++ b/knife4j-doc/gitee/docs/solution/ui-front-gateway.html @@ -10,16 +10,15 @@ - -基于Spring Cloud Gateway | Knife4j - - +基于Spring Cloud Gateway | Knife4j + +
-

基于Spring Cloud Gateway

本篇博客主要讲解通过knife4j项目如何集成Spring Cloud Gateway网关,通过网关聚合所有的Swagger微服务文档

源码地址请参考:knife4j-spring-cloud-gateway

整体项目结构如下:

|-knife4j-spring-cloud-gateway
|-----service-doc //文档聚合中心,是所有微服务文档的出口
|-----service-order //订单服务,包含所有与订单业务模块相关的接口
|-----service-server //eureka 注册中心
|-----service-user //用户服务,包含所有的用户接口

eureka注册中心

注册中心几乎没有代码,只是在pom.xml文件中引入了eureka服务的jar包

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>

项目的application.yml配置文件如下:

server:
port: 10000
eureka:
instance:
hostname: localhost
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
spring:
application:
name: knife4j-gateway-server

定义注册中心访问地址,端口号等属性

最后通过注解@EnableEurekaServer来启用注册中心

@EnableEurekaServer
@SpringBootApplication
public class ServiceServerApplication {


}

服务接口(订单order & 用户User)

由于服务接口订单和用户两个模块其实属性是差不多,只是接口不一样,因此就随便挑一个服务的配置来说吧

service-user:用户服务的接口

每个微服务只需要引入和swagger相关的后端jar包即可,不需要引入swagger的前端Ui包,knife4j为我们提供了微服务项的starter,供开发者使用

当然,作为子服务,还需要引入eureka-client的jar包,所以,pom.xml文件相关配置如下:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
</dependency>

项目的jar包引入完成后,接下来是配置swagger的相关配置,SwaggerConfiguration.java配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUi
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build();
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}


}

配置扫描目录包

通过@EnableSwagger2@EnableSwaggerBootstrapUi来开启swagger和增强特性

配置项目的application.yml文件,如下:

server:
port: 10001
spring:
application:
name: service-user
eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

指定注册中心地址即可

最后,启用eureka客户端

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {
}

当然,在服务的模块中还有和自己服务相关的业务接口(Controller代码),在这里就不列举了

订单模块(service-order)的代码配置和用户是类似的

文档聚合

有了eureka注册中心,服务模块的接口也已完成,最后一步是把我们所有的微服务都聚合到一个文档,统一输出到前端,供开发者调用了

pom引入相关jar包

service-doc也是一个eureka客户端,首先引入相关的jar包,pom.xml配置文件如下:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
  • spring-cloud-starter-netflix-eureka-client:eureka客户端
  • spring-cloud-starter-gateway:gateway网关
  • knife4j-spring-boot-starter:knife4j提供的前端ui和后端代码

另外,其实在文档这里,如果没有后端代码编写的话,仅仅引入一个swagger的前端ui模块也是可以的

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
</dependency>

application文件配置

配置我们的网关属性,路由规则等,application.yml配置文件如下:

server:
port: 10003
spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1


eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

logging:
level:
org.springframework:cloud.gateway: debug

文档聚合业务编码

在我们使用Spring Boot等单体架构集成swagger项目时,是通过对包路径进行业务分组,然后在前端进行不同模块的展示,而在微服务架构下,我们的一个服务就类似于原来我们写的一个业务组

springfox-swagger提供的分组接口是swagger-resource,返回的是分组接口名称、地址等信息

在Spring Cloud微服务架构下,我们需要重写该接口,主要是通过网关的注册中心动态发现所有的微服务文档,代码如下:

@Slf4j
@Component
@Primary
@AllArgsConstructor
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

private final RouteLocator routeLocator;
private final GatewayProperties gatewayProperties;


@Override
public List<SwaggerResource> get() {
List<SwaggerResource> resources = new ArrayList<>();
List<String> routes = new ArrayList<>();
routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {
route.getPredicates().stream()
.filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
.forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
.replace("**", "v2/api-docs"))));
});

return resources;
}

private SwaggerResource swaggerResource(String name, String location) {
log.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

接口:

@RestController
public class SwaggerHandler {

@Autowired(required = false)
private SecurityConfiguration securityConfiguration;

@Autowired(required = false)
private UiConfiguration uiConfiguration;

private final SwaggerResourcesProvider swaggerResources;

@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
this.swaggerResources = swaggerResources;
}


@GetMapping("/swagger-resources/configuration/security")
public Mono<ResponseEntity<SecurityConfiguration>> securityConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources/configuration/ui")
public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources")
public Mono<ResponseEntity> swaggerResources() {
return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));
}
}

启动配置

最后,项目启动类添加相关注解,代码如下:

@EnableDiscoveryClient
@EnableEurekaClient
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

文档展示

最后分别依次启动项目:

  • service-server
  • service-user
  • service-order
  • service-doc

打开文档地址:http://localhost:10003/doc.html

查看文档效果如下:

注意点

在集成Spring Cloud Gateway网关的时候,会出现没有basePath的情况(即定义的例如/user、/order等微服务的前缀),这个情况在使用zuul网关的时候不会出现此问题,因此,在Gateway网关需要添加一个Filter实体Bean,代码如下:

@Component
public class SwaggerHeaderFilter extends AbstractGatewayFilterFactory {
private static final String HEADER_NAME = "X-Forwarded-Prefix";

private static final String URI = "/v2/api-docs";

@Override
public GatewayFilter apply(Object config) {
return (exchange, chain) -> {
ServerHttpRequest request = exchange.getRequest();
String path = request.getURI().getPath();
if (!StringUtils.endsWithIgnoreCase(path,URI )) {
return chain.filter(exchange);
}
String basePath = path.substring(0, path.lastIndexOf(URI));
ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, basePath).build();
ServerWebExchange newExchange = exchange.mutate().request(newRequest).build();
return chain.filter(newExchange);
};
}
}

然后在配置文件指定这个filter

spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter //指定filter
- StripPrefix=1
- - +

基于Spring Cloud Gateway

本篇博客主要讲解通过knife4j项目如何集成Spring Cloud Gateway网关,通过网关聚合所有的Swagger微服务文档

源码地址请参考:knife4j-spring-cloud-gateway

整体项目结构如下:

|-knife4j-spring-cloud-gateway
|-----service-doc //文档聚合中心,是所有微服务文档的出口
|-----service-order //订单服务,包含所有与订单业务模块相关的接口
|-----service-server //eureka 注册中心
|-----service-user //用户服务,包含所有的用户接口

eureka注册中心

注册中心几乎没有代码,只是在pom.xml文件中引入了eureka服务的jar包

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>

项目的application.yml配置文件如下:

server:
port: 10000
eureka:
instance:
hostname: localhost
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
spring:
application:
name: knife4j-gateway-server

定义注册中心访问地址,端口号等属性

最后通过注解@EnableEurekaServer来启用注册中心

@EnableEurekaServer
@SpringBootApplication
public class ServiceServerApplication {


}

服务接口(订单order & 用户User)

由于服务接口订单和用户两个模块其实属性是差不多,只是接口不一样,因此就随便挑一个服务的配置来说吧

service-user:用户服务的接口

每个微服务只需要引入和swagger相关的后端jar包即可,不需要引入swagger的前端Ui包,knife4j为我们提供了微服务项的starter,供开发者使用

当然,作为子服务,还需要引入eureka-client的jar包,所以,pom.xml文件相关配置如下:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-micro-spring-boot-starter</artifactId>
</dependency>

项目的jar包引入完成后,接下来是配置swagger的相关配置,SwaggerConfiguration.java配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUi
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build();
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}


}

配置扫描目录包

通过@EnableSwagger2@EnableSwaggerBootstrapUi来开启swagger和增强特性

配置项目的application.yml文件,如下:

server:
port: 10001
spring:
application:
name: service-user
eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

指定注册中心地址即可

最后,启用eureka客户端

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {
}

当然,在服务的模块中还有和自己服务相关的业务接口(Controller代码),在这里就不列举了

订单模块(service-order)的代码配置和用户是类似的

文档聚合

有了eureka注册中心,服务模块的接口也已完成,最后一步是把我们所有的微服务都聚合到一个文档,统一输出到前端,供开发者调用了

pom引入相关jar包

service-doc也是一个eureka客户端,首先引入相关的jar包,pom.xml配置文件如下:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
  • spring-cloud-starter-netflix-eureka-client:eureka客户端
  • spring-cloud-starter-gateway:gateway网关
  • knife4j-spring-boot-starter:knife4j提供的前端ui和后端代码

另外,其实在文档这里,如果没有后端代码编写的话,仅仅引入一个swagger的前端ui模块也是可以的

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
</dependency>

application文件配置

配置我们的网关属性,路由规则等,application.yml配置文件如下:

server:
port: 10003
spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1


eureka:
client:
serviceUrl:
defaultZone: http://localhost:10000/eureka/

logging:
level:
org.springframework:cloud.gateway: debug

文档聚合业务编码

在我们使用Spring Boot等单体架构集成swagger项目时,是通过对包路径进行业务分组,然后在前端进行不同模块的展示,而在微服务架构下,我们的一个服务就类似于原来我们写的一个业务组

springfox-swagger提供的分组接口是swagger-resource,返回的是分组接口名称、地址等信息

在Spring Cloud微服务架构下,我们需要重写该接口,主要是通过网关的注册中心动态发现所有的微服务文档,代码如下:

@Slf4j
@Component
@Primary
@AllArgsConstructor
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

private final RouteLocator routeLocator;
private final GatewayProperties gatewayProperties;


@Override
public List<SwaggerResource> get() {
List<SwaggerResource> resources = new ArrayList<>();
List<String> routes = new ArrayList<>();
routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> {
route.getPredicates().stream()
.filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
.forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
.replace("**", "v2/api-docs"))));
});

return resources;
}

private SwaggerResource swaggerResource(String name, String location) {
log.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

接口:

@RestController
public class SwaggerHandler {

@Autowired(required = false)
private SecurityConfiguration securityConfiguration;

@Autowired(required = false)
private UiConfiguration uiConfiguration;

private final SwaggerResourcesProvider swaggerResources;

@Autowired
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
this.swaggerResources = swaggerResources;
}


@GetMapping("/swagger-resources/configuration/security")
public Mono<ResponseEntity<SecurityConfiguration>> securityConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources/configuration/ui")
public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() {
return Mono.just(new ResponseEntity<>(
Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));
}

@GetMapping("/swagger-resources")
public Mono<ResponseEntity> swaggerResources() {
return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));
}
}

启动配置

最后,项目启动类添加相关注解,代码如下:

@EnableDiscoveryClient
@EnableEurekaClient
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

文档展示

最后分别依次启动项目:

  • service-server
  • service-user
  • service-order
  • service-doc

打开文档地址:http://localhost:10003/doc.html

查看文档效果如下:

注意点

在集成Spring Cloud Gateway网关的时候,会出现没有basePath的情况(即定义的例如/user、/order等微服务的前缀),这个情况在使用zuul网关的时候不会出现此问题,因此,在Gateway网关需要添加一个Filter实体Bean,代码如下:

@Component
public class SwaggerHeaderFilter extends AbstractGatewayFilterFactory {
private static final String HEADER_NAME = "X-Forwarded-Prefix";

private static final String URI = "/v2/api-docs";

@Override
public GatewayFilter apply(Object config) {
return (exchange, chain) -> {
ServerHttpRequest request = exchange.getRequest();
String path = request.getURI().getPath();
if (!StringUtils.endsWithIgnoreCase(path,URI )) {
return chain.filter(exchange);
}
String basePath = path.substring(0, path.lastIndexOf(URI));
ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, basePath).build();
ServerWebExchange newExchange = exchange.mutate().request(newRequest).build();
return chain.filter(newExchange);
};
}
}

然后在配置文件指定这个filter

spring:
application:
name: service-doc
cloud:
gateway:
discovery:
locator:
# enabled: true
lowerCaseServiceId: true
routes:
- id: service-user
uri: lb://service-user
predicates:
- Path=/user/**
# - Header=Cookie,Set-Cookie
filters:
- SwaggerHeaderFilter
- StripPrefix=1
- id: service-order
uri: lb://service-order
predicates:
- Path=/order/**
filters:
- SwaggerHeaderFilter //指定filter
- StripPrefix=1
+ + diff --git a/knife4j-doc/gitee/docs/solution/ui-front-nginx.html b/knife4j-doc/gitee/docs/solution/ui-front-nginx.html index 593a1988d..7f06cc4ce 100644 --- a/knife4j-doc/gitee/docs/solution/ui-front-nginx.html +++ b/knife4j-doc/gitee/docs/solution/ui-front-nginx.html @@ -10,16 +10,15 @@ - -基于Nginx反向代理 | Knife4j - - +基于Nginx反向代理 | Knife4j + +
-

基于Nginx反向代理

在静态部署预览Swagger JSON章节中我们已经讲过如何通过nginx来部署静态文件预览文档,但此时我们会发现存在一个问题,即无法进行接口的调试。

我们借助于nginx的反向代理功能,帮助我们实现接口的调试功能

假设还是提供静态JSON的方式,我们只需要在nginx的配置节点中添加一层location即可

如下:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
root /mnt/application/swagger-static;
}
location /api/ {
// Swagger JSON文件中所有以api开头的接口全部走8999的代理
proxy_pass http://127.0.0.1:8999/api/;
client_max_body_size 200m;
}

}

通过以上配置,我们即可预览及调试我们的接口文档

但是

我们又会发现问题,很多时候,我们所写的接口可能并不规范,并非所有的接口都是以/api开头的,或者以固定的其他格式开头的接口,那此时如果我们以上面的配置方式来配置,当我们的接口以/admin/test这种形式出现时,我们就无法调试该接口

那或许我们可以换一种方式,我们将该服务下的所有接口理解为一个服务,我们给一个服务取一个特点的名称,然后通过聚合服务的方式,将文档聚合显示出来,这样既可进行调试

例如:

127.0.0.1:8999理解为service1

我们在访问该服务的接口时加上服务前缀:/service1/api/xxx,此时,不管我们的接口又多么不规范,只要是service1下的接口,nginx都会将它转发到127.0.0.1:8999这台服务上,这样我们也完成了接口的调试

nginx配置:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
root /mnt/application/swagger-static;
}
location /service1 {
proxy_pass http://127.0.0.1:8999/;

}
location /service2 {
proxy_pass http://127.0.0.1:8998/;

}

}

很显然,通过以上配置,最终能达到我们的预期,但是在我们的文档界面中,没有service1这样的basePath属性供我们配置,此时,我们应该如何处理

针对这种情况,swagger-bootstrap-ui在分组属性中,扩展了一个basePath属性值

此时,我们的group.json文件如下:

[
{
"name": "微服务-用户模块",
"url": "/service1/v2/api-docs?group=分组接口",
"swaggerVersion": "2.0",
"location": "/service1/v2/api-docs?group=分组接口",
"basePath":"/service1"
},
{
"name": "微服务-订单模块",
"url": "/service2/v2/api-docs?group=默认接口",
"swaggerVersion": "2.0",
"location": "/service2/v2/api-docs?group=默认接口",
"basePath":"/service2"
}
]

此时,我们的Swagger的JSON路径地址,我们也可以使用我们服务提供给我们的接口地址,只需要加上为服务名称,分组名称即可得到该服务的Swagger JSON文件

通过这种方式,我们可以在group.json文件中聚合所有后端的Swagger服务接口,最终一致输出显示

效果如下:

- - +

基于Nginx反向代理

在静态部署预览Swagger JSON章节中我们已经讲过如何通过nginx来部署静态文件预览文档,但此时我们会发现存在一个问题,即无法进行接口的调试。

我们借助于nginx的反向代理功能,帮助我们实现接口的调试功能

假设还是提供静态JSON的方式,我们只需要在nginx的配置节点中添加一层location即可

如下:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
root /mnt/application/swagger-static;
}
location /api/ {
// Swagger JSON文件中所有以api开头的接口全部走8999的代理
proxy_pass http://127.0.0.1:8999/api/;
client_max_body_size 200m;
}

}

通过以上配置,我们即可预览及调试我们的接口文档

但是

我们又会发现问题,很多时候,我们所写的接口可能并不规范,并非所有的接口都是以/api开头的,或者以固定的其他格式开头的接口,那此时如果我们以上面的配置方式来配置,当我们的接口以/admin/test这种形式出现时,我们就无法调试该接口

那或许我们可以换一种方式,我们将该服务下的所有接口理解为一个服务,我们给一个服务取一个特点的名称,然后通过聚合服务的方式,将文档聚合显示出来,这样既可进行调试

例如:

127.0.0.1:8999理解为service1

我们在访问该服务的接口时加上服务前缀:/service1/api/xxx,此时,不管我们的接口又多么不规范,只要是service1下的接口,nginx都会将它转发到127.0.0.1:8999这台服务上,这样我们也完成了接口的调试

nginx配置:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
root /mnt/application/swagger-static;
}
location /service1 {
proxy_pass http://127.0.0.1:8999/;

}
location /service2 {
proxy_pass http://127.0.0.1:8998/;

}

}

很显然,通过以上配置,最终能达到我们的预期,但是在我们的文档界面中,没有service1这样的basePath属性供我们配置,此时,我们应该如何处理

针对这种情况,swagger-bootstrap-ui在分组属性中,扩展了一个basePath属性值

此时,我们的group.json文件如下:

[
{
"name": "微服务-用户模块",
"url": "/service1/v2/api-docs?group=分组接口",
"swaggerVersion": "2.0",
"location": "/service1/v2/api-docs?group=分组接口",
"basePath":"/service1"
},
{
"name": "微服务-订单模块",
"url": "/service2/v2/api-docs?group=默认接口",
"swaggerVersion": "2.0",
"location": "/service2/v2/api-docs?group=默认接口",
"basePath":"/service2"
}
]

此时,我们的Swagger的JSON路径地址,我们也可以使用我们服务提供给我们的接口地址,只需要加上为服务名称,分组名称即可得到该服务的Swagger JSON文件

通过这种方式,我们可以在group.json文件中聚合所有后端的Swagger服务接口,最终一致输出显示

效果如下:

+ + diff --git a/knife4j-doc/gitee/docs/solution/ui-front-static.html b/knife4j-doc/gitee/docs/solution/ui-front-static.html index fce1864d2..ee5854d5b 100644 --- a/knife4j-doc/gitee/docs/solution/ui-front-static.html +++ b/knife4j-doc/gitee/docs/solution/ui-front-static.html @@ -10,16 +10,15 @@ - -基于静态Swagger JSON文件 | Knife4j - - +基于静态Swagger JSON文件 | Knife4j + +
-

基于静态Swagger JSON文件

基于静态Swagger JSON文件的方式预览很简单,首先需要一个HTTP的web服务即可

两种选择:

  • Nginx
  • IIS

不管是基于nginx还是IIS,首先都需要先本地生成一个静态的Swagger JSON文件结构

swagger-bootstrap-ui此处提供了一个简单的示例

修改项目json目录下的group.json

[
{
"name": "swagger",
"url": "/json/swagger.json",
"swaggerVersion": "2.0",
"location": "/json/swagger.json"
},
{
"name": "swagger1",
"url": "/json/swagger1.json",
"swaggerVersion": "2.0",
"location": "/json/swagger1.json"
}
]

我们在静态的group.json文件中预定义了两个静态的swagger JSON文件,也同时存放在json文件夹中

swagger.json的内容为swagger接口/v2/api-docs中响应的内容

{
"swagger": "2.0",
"info": {
"description": "<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>",
"version": "1.0",
"title": "swagger-bootstrap-ui很棒~~~!!!",
"termsOfService": "http://www.group.com/",
"contact": {
"name": "group@qq.com"
}
},
"host": "127.0.0.1:8999",
"basePath": "/"
//more.....
}

当我们完成以上步骤后,即可通过nginx或者IIS部署静态文件浏览我们的接口文档了

基于nginx

基于nginx的方式,只需要将swagger-bootstrap-ui的所有静态文件拷贝到响应目录,然后再nginx的conf配置文件中配置server节点即可

参考信息如下:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
#此处为swagger-bootstrap-ui项目中resources目录中的静态资源;
root /mnt/application/swagger-static;
}

}

基于IIS

在Windows系统中,可以使用IIS部署我们的静态站点,快速预览Swagger文档

具体路径:

控制面板 -> 管理工具 -> Internet Information Services (IIS)管理器 -> 添加网站 -> 选择静态目录 -> 浏览

如果没有IIS管理器,你首先需要自行安装该服务,至于如何安装IIS,自行搜索解决,此处不再骜述.

- - +

基于静态Swagger JSON文件

基于静态Swagger JSON文件的方式预览很简单,首先需要一个HTTP的web服务即可

两种选择:

  • Nginx
  • IIS

不管是基于nginx还是IIS,首先都需要先本地生成一个静态的Swagger JSON文件结构

swagger-bootstrap-ui此处提供了一个简单的示例

修改项目json目录下的group.json

[
{
"name": "swagger",
"url": "/json/swagger.json",
"swaggerVersion": "2.0",
"location": "/json/swagger.json"
},
{
"name": "swagger1",
"url": "/json/swagger1.json",
"swaggerVersion": "2.0",
"location": "/json/swagger1.json"
}
]

我们在静态的group.json文件中预定义了两个静态的swagger JSON文件,也同时存放在json文件夹中

swagger.json的内容为swagger接口/v2/api-docs中响应的内容

{
"swagger": "2.0",
"info": {
"description": "<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>",
"version": "1.0",
"title": "swagger-bootstrap-ui很棒~~~!!!",
"termsOfService": "http://www.group.com/",
"contact": {
"name": "group@qq.com"
}
},
"host": "127.0.0.1:8999",
"basePath": "/"
//more.....
}

当我们完成以上步骤后,即可通过nginx或者IIS部署静态文件浏览我们的接口文档了

基于nginx

基于nginx的方式,只需要将swagger-bootstrap-ui的所有静态文件拷贝到响应目录,然后再nginx的conf配置文件中配置server节点即可

参考信息如下:

server {
listen 18001;
server_name 192.168.0.112;
#charset koi8-r;

location / {
#此处为swagger-bootstrap-ui项目中resources目录中的静态资源;
root /mnt/application/swagger-static;
}

}

基于IIS

在Windows系统中,可以使用IIS部署我们的静态站点,快速预览Swagger文档

具体路径:

控制面板 -> 管理工具 -> Internet Information Services (IIS)管理器 -> 添加网站 -> 选择静态目录 -> 浏览

如果没有IIS管理器,你首先需要自行安装该服务,至于如何安装IIS,自行搜索解决,此处不再骜述.

+ + diff --git a/knife4j-doc/gitee/docs/solution/ui-front-zuul.html b/knife4j-doc/gitee/docs/solution/ui-front-zuul.html index 69d9d8482..2ab43337e 100644 --- a/knife4j-doc/gitee/docs/solution/ui-front-zuul.html +++ b/knife4j-doc/gitee/docs/solution/ui-front-zuul.html @@ -10,16 +10,15 @@ - -基于Spring Cloud Zuul方式 | Knife4j - - +基于Spring Cloud Zuul方式 | Knife4j + +
-

基于Spring Cloud Zuul方式

在基于nginx配置的环节,其实我们已经可以利用nginx的配置,帮助我们聚合文档服务了,而通过代码的方式该如何实现?

在Spring Cloud微服务架构中,各个子服务都是分散的,每个服务集成了Swagger文档,但是接口对接时需要单独分别访问,很麻烦,效率低下,

而Zuul可以帮助我们解决此难题,将多个微服务的Swagger接口聚合到一个文档中,这样整个微服务架构下只会存在一个文档出口,统一文档口径

本文档只涉及如何整合Swagger及Zuul,其他相关知识点请自行搜索解决.

项目结构

整个项目结构如下:

swagger-bootstrap-ui-zuul
├── service-server -- eureka服务中心
├── service-order -- 微服务之一订单服务模块
├── service-user -- 微服务之一用户服务模块
├── service-doc -- 文档中心,整合微服务Swagger文档

eureka注册服务中心以及微服务模块Swagger的配置集成使用这里不过多骜述,和常规无异.

我们在eureka服务中心可以看到整个微服务模块,如下图:

微服务模块

订单、用户两个微服务模块配置没有什么区别,都是将自己的服务注册到eureka中,并且每个微服务都集成Swagger的配置

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {

static Logger logger= LoggerFactory.getLogger(ServiceUserApplication.class);
//...

}

此处需要注意的是Swagger的配置中,不需要设置groupName属性

Swagger配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build().securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}



private ApiKey apiKey() {
return new ApiKey("BearerToken", "Authorization", "header");
}
private ApiKey apiKey1() {
return new ApiKey("BearerToken1", "Authorization-x", "header");
}

private SecurityContext securityContext() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("/.*"))
.build();
}
private SecurityContext securityContext1() {
return SecurityContext.builder()
.securityReferences(defaultAuth1())
.forPaths(PathSelectors.regex("/.*"))
.build();
}

List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));
}
List<SecurityReference> defaultAuth1() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));
}

}

文档整合

service-doc模块是最终整合user、order两个微服务文档的统一文档出口,而本身也注册到eureka服务中心中.

@EnableDiscoveryClient
@EnableEurekaClient
@EnableZuulProxy
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

最后重写SwaggerResource,代码如下:

@Component
@Primary
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

Logger logger= LoggerFactory.getLogger(SwaggerResourceConfig.class);


@Autowired
RouteLocator routeLocator;

@Override
public List<SwaggerResource> get() {
//获取所有router
List<SwaggerResource> resources = new ArrayList<>();
List<Route> routes = routeLocator.getRoutes();
logger.info("Route Size:{}",routes.size());
for (Route route:routes) {
resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs")));
}
return resources;
}
private SwaggerResource swaggerResource(String name, String location) {
logger.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

最终效果如下:

示例源码

以上源码可参考swagger-bootstrap-ui-demo中的子项目swagger-bootstrap-ui-zuul

- - +

基于Spring Cloud Zuul方式

在基于nginx配置的环节,其实我们已经可以利用nginx的配置,帮助我们聚合文档服务了,而通过代码的方式该如何实现?

在Spring Cloud微服务架构中,各个子服务都是分散的,每个服务集成了Swagger文档,但是接口对接时需要单独分别访问,很麻烦,效率低下,

而Zuul可以帮助我们解决此难题,将多个微服务的Swagger接口聚合到一个文档中,这样整个微服务架构下只会存在一个文档出口,统一文档口径

本文档只涉及如何整合Swagger及Zuul,其他相关知识点请自行搜索解决.

项目结构

整个项目结构如下:

swagger-bootstrap-ui-zuul
├── service-server -- eureka服务中心
├── service-order -- 微服务之一订单服务模块
├── service-user -- 微服务之一用户服务模块
├── service-doc -- 文档中心,整合微服务Swagger文档

eureka注册服务中心以及微服务模块Swagger的配置集成使用这里不过多骜述,和常规无异.

我们在eureka服务中心可以看到整个微服务模块,如下图:

微服务模块

订单、用户两个微服务模块配置没有什么区别,都是将自己的服务注册到eureka中,并且每个微服务都集成Swagger的配置

@EnableEurekaClient
@SpringBootApplication
public class ServiceUserApplication {

static Logger logger= LoggerFactory.getLogger(ServiceUserApplication.class);
//...

}

此处需要注意的是Swagger的配置中,不需要设置groupName属性

Swagger配置如下:


@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfiguration {

@Bean(value = "userApi")
@Order(value = 1)
public Docket groupRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(groupApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xiaominfo.swagger.service.user.controller"))
.paths(PathSelectors.any())

.build().securityContexts(Lists.newArrayList(securityContext(),securityContext1())).securitySchemes(Lists.<SecurityScheme>newArrayList(apiKey(),apiKey1()));
}

private ApiInfo groupApiInfo(){
return new ApiInfoBuilder()
.title("swagger-bootstrap-ui很棒~~~!!!")
.description("<div style='font-size:14px;color:red;'>swagger-bootstrap-ui-demo RESTful APIs</div>")
.termsOfServiceUrl("http://www.group.com/")
.contact("group@qq.com")
.version("1.0")
.build();
}



private ApiKey apiKey() {
return new ApiKey("BearerToken", "Authorization", "header");
}
private ApiKey apiKey1() {
return new ApiKey("BearerToken1", "Authorization-x", "header");
}

private SecurityContext securityContext() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("/.*"))
.build();
}
private SecurityContext securityContext1() {
return SecurityContext.builder()
.securityReferences(defaultAuth1())
.forPaths(PathSelectors.regex("/.*"))
.build();
}

List<SecurityReference> defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken", authorizationScopes));
}
List<SecurityReference> defaultAuth1() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Lists.newArrayList(new SecurityReference("BearerToken1", authorizationScopes));
}

}

文档整合

service-doc模块是最终整合user、order两个微服务文档的统一文档出口,而本身也注册到eureka服务中心中.

@EnableDiscoveryClient
@EnableEurekaClient
@EnableZuulProxy
@SpringBootApplication
public class ServiceDocApplication {

public static void main(String[] args) {
SpringApplication.run(ServiceDocApplication.class, args);
}

}

最后重写SwaggerResource,代码如下:

@Component
@Primary
public class SwaggerResourceConfig implements SwaggerResourcesProvider {

Logger logger= LoggerFactory.getLogger(SwaggerResourceConfig.class);


@Autowired
RouteLocator routeLocator;

@Override
public List<SwaggerResource> get() {
//获取所有router
List<SwaggerResource> resources = new ArrayList<>();
List<Route> routes = routeLocator.getRoutes();
logger.info("Route Size:{}",routes.size());
for (Route route:routes) {
resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs")));
}
return resources;
}
private SwaggerResource swaggerResource(String name, String location) {
logger.info("name:{},location:{}",name,location);
SwaggerResource swaggerResource = new SwaggerResource();
swaggerResource.setName(name);
swaggerResource.setLocation(location);
swaggerResource.setSwaggerVersion("2.0");
return swaggerResource;
}
}

最终效果如下:

示例源码

以上源码可参考swagger-bootstrap-ui-demo中的子项目swagger-bootstrap-ui-zuul

+ + diff --git a/knife4j-doc/gitee/docs/solution/ui-front.html b/knife4j-doc/gitee/docs/solution/ui-front.html index 7c22a2e77..75d96e0f6 100644 --- a/knife4j-doc/gitee/docs/solution/ui-front.html +++ b/knife4j-doc/gitee/docs/solution/ui-front.html @@ -10,16 +10,15 @@ - -说明 | Knife4j - - +说明 | Knife4j + +
-

说明

swagger-bootstrap-ui1.9.2版本后,提供了前后端分离的解决方案,目前主要有以下几种方式:

目前主要有以上四种解决方案,开发者自行选择,具体可参考相应文档说明.

基于前端静态部署的版本请使用swagger-bootstrap-ui-front

- - +

说明

swagger-bootstrap-ui1.9.2版本后,提供了前后端分离的解决方案,目前主要有以下几种方式:

目前主要有以上四种解决方案,开发者自行选择,具体可参考相应文档说明.

基于前端静态部署的版本请使用swagger-bootstrap-ui-front

+ + diff --git a/knife4j-doc/gitee/docs/upgrading.html b/knife4j-doc/gitee/docs/upgrading.html index 9d5bbc8f4..49cb87806 100644 --- a/knife4j-doc/gitee/docs/upgrading.html +++ b/knife4j-doc/gitee/docs/upgrading.html @@ -10,26 +10,26 @@ - -升级 | Knife4j - - +升级 | Knife4j + +
+ + diff --git a/knife4j-doc/gitee/docs/upgrading/upgrading-to-v2.html b/knife4j-doc/gitee/docs/upgrading/upgrading-to-v2.html index d2385d4ba..83eed9ed5 100644 --- a/knife4j-doc/gitee/docs/upgrading/upgrading-to-v2.html +++ b/knife4j-doc/gitee/docs/upgrading/upgrading-to-v2.html @@ -10,26 +10,26 @@ - -升级到v2.x版本 | Knife4j - - +升级到v2.x版本 | Knife4j + +
-

升级到v2.x版本

在更名为Knife4j之前,原来的名称是叫swagger-bootstrap-ui,这是两种不一样风格的Ui,对比情况如下:

软件开发语言&框架状态最后版本风格
Knife4jJava、JavaScript、Vue持续更新中黑色
swagger-bootstrap-uiJava、JavaScript、jQuery停更1.9.6蓝色

Knife4j从开源至今,目前主要经历版本的变化,分别如下:

版本说明
1.9.6蓝色皮肤风格,开始更名,增加更多后端模块
2.0~2.0.5Ui重写,底层依赖的springfox框架版本是2.9.2
2.0.6~底层springfox框架版本升级知2.10.5,OpenAPI规范是v2
3.0~底层依赖springfox框架版本升级至3.0.3,OpenAPI规范是v3

需要注意的是,目前Knife4j的主版本依然是沿用2.x的版本号,也就是从2.0.6版本开始逐步升级,迭代发布时版本会随之升级,但同时3.x版本也会同步更新发布,主要是满足开发者对于springfox3以及OpenAPI3规范的使用

特别注意

1、目前已经发行的Knife4j版本,Knife4j本身已经引入了springfox,开发者在使用时不用再单独引入Springfox的具体版本,否额会导致版本冲突。另外在网关层聚合(例如gateway)时,必须禁用Knife4j的增强模式

2、使用Knife4j2.0.6及以上的版本,Spring Boot的版本必须大于等于2.2.x

自2.0.6版本开始,2.x与3.x的版本主要变化是底层springfox所引用的版本不同,但Knife4j提供的Ui其实是同一个,同时兼容OpenAPI2以及OpenAPI3规范,源码请参考knife4j-vue,如果开发者依然想沿用以前Knife4j一直以来发布的2.x版本,请继续更随Knife4j的更新步伐使用2.x的版本即可,如果开发者想尝鲜,则可以考虑3.x的版本

提示

3.x的版本依赖springfox3.0.0,springfox3.0目前也只更新发布了一个版本,从功能稳定性来说,可能不如2.x系列,所以开发者慎重使用,当然,如果是Ui上的一些功能性问题或者Bug,也欢迎开发者向Knife4j发起ISSUE,等springfox3版本趋于稳定后,knife4j的2.x版本就不会在更新,会并向3.x

具体的对应关系如下:

2.x版本3.x版本
2.0.63.0
2.0.73.0.1
2.0.83.0.2
以此类推...以此类推...

如果开发者底层框架使用的是springdoc-openapi框架而非springfox,则需要使用Knife4j提供的对应3.x版本,需要注意的是该版本没有Knife4j提供的部分增强功能,是一个纯Ui。

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-springdoc-ui</artifactId>
<!--在引用时请在maven中央仓库搜索3.X最新版本号-->
<version>3.0.2</version>
</dependency>

每一个版本的更详细的更新日志,开发者可参考更新日志

+ + diff --git a/knife4j-doc/gitee/docs/upgrading/upgrading-to-v4.html b/knife4j-doc/gitee/docs/upgrading/upgrading-to-v4.html index 8edf93543..7f288eeb7 100644 --- a/knife4j-doc/gitee/docs/upgrading/upgrading-to-v4.html +++ b/knife4j-doc/gitee/docs/upgrading/upgrading-to-v4.html @@ -10,26 +10,26 @@ - -升级到v4.0.0版本 | Knife4j - - +升级到v4.0.0版本 | Knife4j + +
-

升级到v4.0.0版本

Knife4j 4.0.0版本目前已经发布!!

项目结构(New)

目前knife4j的项目结构:

模块名称说明
knife4j-aggregation-spring-boot-starter基于 Servlet 体系下的聚合中间件
knife4j-core核心类,包含一些工具包、增强注解等
knife4j-dependenciesKnife4j 提供的 dependencies 工程,引入该工程后,knife4j\springfox\swagger\springdoc-openapi 等版本号不用在独自声明
knife4j-openapi2-ui增强 UI 文档,该包是一个 webjar,只包含前端代码,支持 OpenAPI2
knife4j-openapi3-ui增强 UI 文档,该包是一个 webjar,只包含前端代码,支持 OpenAPI3
knife4j-gateway-spring-boot-starter基于Spring Cloud Gateway网关的项目可以引用该组件实现简单的文档聚合,参考文档
knife4j-openapi2-spring-boot-starter基于 OpenAPI2 规范,在 Spring Boot < 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层依赖 springfox-swagger 2.10.5 项目
knife4j-openapi3-spring-boot-starter基于 OpenAPI3 规范,在 Spring Boot < 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层基于 springdoc-openapi 项目
knife4j-openapi3-jakarta-spring-boot-starter基于 OpenAPI3 规范,在 Spring Boot >= 3.0.0-M1 的单体架构下可以直接引用此 starter,该模块包含了 Ui 部分,底层基于 springdoc-openapi 项目

Spring Boot 2

提示

如果开发者目前仍然使用的是Spring Boot 2.x的主版本号,那么不管是使用OpenAPI2(Swagger)的规范,还是使用OpenAPI3的规范,需要按下面不同的规范类型按需进行引用

开发者在使用的时候必须2选1,不能说使用2的注解,但是想用OpenAPI3的规范,这是不允许的。

OpenAPI2(Swagger)

OpenAPI2的规范在开发者中,使用应该是最广的,开发者从一开始使用springfox项目开始一直使用,Knife4j在之前的版本中也是依赖springfox项目.

此次Knife4j 4.0版本针对OpenAPI2的规范依然提供了Ui及后端增强功能的增强,但是有所不同的是,Knife4j底层依赖的springfox版本停留在2.10.5版本,并没有使用springfox最新的3.0.0版本

springfox 3.0.0版本同时提供了OpenAPI2及OpenAPI3规范的兼容处理,但是开发者依然可以混用不同规范的注解,springfox在底层做了兼容处理,这种方式对于OpenAPI3规范的发展以及适配其工作量是巨大的,另外,springfox 3.0.0 版本也停更了很久了,在目前3.0.0版本中也存在大量的异常或者兼容性问题,所以开发者在以后的版本中,应该尽快迁移到OpenAPI3规范上来.

Knife4j在后面的发展中,会全力投入到OpenAPI3的规范兼容处理上面.

继续用OpenAPI2规范的情况下使用Knife4j 4.0版本没有太大的变化,只需要在引入的时候,更改artifactId即可

Maven坐标:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

如果开发者使用的是springfox3.0.0版本,那么则不能使用Knife4j提供的增强功能,可以单独引用knife4j提供的ui包,

Maven坐标:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-ui</artifactId>
<version>4.0.0</version>
</dependency>

OpenAPI3(New)

OpenAPI3规范Knife4j底层依赖了springdoc-openapi项目,该项目针对Spring 项目提供了OpenAPI3规范的解析适配,Knife4j提供了Ui界面以及之前在OpenAPI2的同样的增强功能(包括自定义文档、个性化配置等等)

如果开发者当前的Spring Boot项目已经引用了springdoc-openapi项目,那么直接引入当前Knife4j提供的starter即可

注意,knife4j-openapi3-spring-boot-starter中已经有依赖springdoc-openapi的jar,开发者要避免jar包版本冲突

Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

Spring Boot 3(New)

Knife4j在后面的版本中会全面切入OpenAPI3的规范中,因此在以后的版本迭代中,只会提供给OpenAPI3规范的适配,开发者应该尽快迁移到3的规范上来。

Spring Boot 3的版本,knife4j依赖springdoc-openapi项目2.0版本

需要注意的是JDK版本必须大于17,这是由Spring Boot 3.0版本所决定的。

Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

Gateway网关聚合(New)

在4.0版本中,Knife4j提供了一个针对在Spring Cloud Gateway网关进行聚合的简单小组件,开发者可以基于此组件轻松的聚合各个子服务的OpenAPI文档

Maven坐标如下:

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

在application.yml配置文件中配置路由规则(该配置可以配置在Nacos配置中心中,实时生效),配置规则如下:


knife4j:
# 聚合swagger文档
gateway:
enable: true
routes:
- name: 用户服务
url: /user-service/v2/api-docs?group=default
service-name: user-service
order: 2
- name: 订单服务
url: /order-service/v2/api-docs?group=default
service-name: order-service
order: 3

配置属性说明:

属性类型说明
knife4j.gateway.enableBoolean是否开启使用Gateway网关聚合组件,默认false
knife4j.gateway.routesList聚合Swagger分组集合,可以添加多个,无上限
knife4j.gateway.routes[0].nameString界面显示分组名称
knife4j.gateway.routes[0].urlString子服务的Swagger资源接口地址(Swagger2默认/v2/api-docs,只需要配置group参数即可),因为是从网关层走,开发者配置时别忘记了网关前缀地址。
knife4j.gateway.routes[0].service-nameString服务名称
knife4j.gateway.routes[0].orderInt界面分组显示顺序,按正序(asc)排序
+ + diff --git a/knife4j-doc/gitee/docs/v4.html b/knife4j-doc/gitee/docs/v4.html index ddd33cbf8..a368de731 100644 --- a/knife4j-doc/gitee/docs/v4.html +++ b/knife4j-doc/gitee/docs/v4.html @@ -10,19 +10,18 @@ - -Knife4j 4.0迭代计划 | Knife4j - - +Knife4j 4.0迭代计划 | Knife4j + +
-

Knife4j 4.0迭代计划

关联issues:https://gitee.com/xiaoym/knife4j/issues/I5LIQZ

关注公众号"Knife4j",点击菜单“V4.0”获取加群二维码 +

Knife4j 4.0迭代计划

关联issues:https://gitee.com/xiaoym/knife4j/issues/I5LIQZ

关注公众号"Knife4j",点击菜单“V4.0”获取加群二维码 输入图片说明

几个待处理事项: 一图胜千言 -输入图片说明

一、前端部分

1、目前knife4j-ui的版本虽然提供了swagger2、oas3的兼容,但是对于oas3兼容性可能还不太好,需要对照oas3规范捋一遍

2、oas3规范对oauth2的支持,目前还没有做

二、后端部分

1、虽然提供了starter,但是使用起来还是需要创建一些Config配置文件,没有真正的简化使用人员的工作量,需要加强starter的范围,提供基于配置文件即可以快速使用,需要兼容springfox、springdoc-openapi两个版本

2、提供对springdoc-openapi框架的兼容适配,knife4j提供的部分增强功能需要在springdoc-openapi找到突破口,类似于springfox的Plugin扩展机制一样

3、主流API网关的聚合,比如zuul、gateway等组件,目前聚合起来对开发者而言比较吃力或者不同网关版本之间,总是存在各种各样的问题,提供统一的网关聚合starter解决方案

三、生态发展

1、提供独立的中间件,虽然knife4j提供了knife4j-aggregation-desktop组件,但使用起来还是不太方便,需要考虑和目前主流的一些配置中心结合使用,nacos、apoll等等

2、提供Docker官方镜像,一键部署独立中间件,配合k8s,简化独立中间件的使用成本&学习成本

3、各种云原生场景下的适配集成,特别是k8s环境下,目前k8s发展已经成为主流,knife4j在k8s环境下的独立中间件能否出一份力

四、文档

1、官方文档缺乏版本机制,从目前的版本发版,需要将不同的文档-版本进行对应起来

2、各个Spring Boot、Spring Cloud等环境集成knife4j的实战适配

3、FAQ完善

4、Swagger2、OAS3等规范的说明、包括对springfox、springdoc-openapi等框架的说明文档

- - +输入图片说明

一、前端部分

1、目前knife4j-ui的版本虽然提供了swagger2、oas3的兼容,但是对于oas3兼容性可能还不太好,需要对照oas3规范捋一遍

2、oas3规范对oauth2的支持,目前还没有做

二、后端部分

1、虽然提供了starter,但是使用起来还是需要创建一些Config配置文件,没有真正的简化使用人员的工作量,需要加强starter的范围,提供基于配置文件即可以快速使用,需要兼容springfox、springdoc-openapi两个版本

2、提供对springdoc-openapi框架的兼容适配,knife4j提供的部分增强功能需要在springdoc-openapi找到突破口,类似于springfox的Plugin扩展机制一样

3、主流API网关的聚合,比如zuul、gateway等组件,目前聚合起来对开发者而言比较吃力或者不同网关版本之间,总是存在各种各样的问题,提供统一的网关聚合starter解决方案

三、生态发展

1、提供独立的中间件,虽然knife4j提供了knife4j-aggregation-desktop组件,但使用起来还是不太方便,需要考虑和目前主流的一些配置中心结合使用,nacos、apoll等等

2、提供Docker官方镜像,一键部署独立中间件,配合k8s,简化独立中间件的使用成本&学习成本

3、各种云原生场景下的适配集成,特别是k8s环境下,目前k8s发展已经成为主流,knife4j在k8s环境下的独立中间件能否出一份力

四、文档

1、官方文档缺乏版本机制,从目前的版本发版,需要将不同的文档-版本进行对应起来

2、各个Spring Boot、Spring Cloud等环境集成knife4j的实战适配

3、FAQ完善

4、Swagger2、OAS3等规范的说明、包括对springfox、springdoc-openapi等框架的说明文档

+ + diff --git a/knife4j-doc/gitee/googlec6cff42b3d782a78.html b/knife4j-doc/gitee/googlec6cff42b3d782a78.html new file mode 100644 index 000000000..8fc2c509e --- /dev/null +++ b/knife4j-doc/gitee/googlec6cff42b3d782a78.html @@ -0,0 +1 @@ +google-site-verification: googlec6cff42b3d782a78.html \ No newline at end of file diff --git a/knife4j-doc/gitee/images/action/others/image-20230531084614527.png b/knife4j-doc/gitee/images/action/others/image-20230531084614527.png new file mode 100644 index 000000000..97e493a01 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531084614527.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531084806837.png b/knife4j-doc/gitee/images/action/others/image-20230531084806837.png new file mode 100644 index 000000000..f697c4952 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531084806837.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531085415798.png b/knife4j-doc/gitee/images/action/others/image-20230531085415798.png new file mode 100644 index 000000000..f85bc5c95 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531085415798.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531085636057.png b/knife4j-doc/gitee/images/action/others/image-20230531085636057.png new file mode 100644 index 000000000..a3be0f834 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531085636057.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531085907655.png b/knife4j-doc/gitee/images/action/others/image-20230531085907655.png new file mode 100644 index 000000000..93590c114 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531085907655.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531090016683.png b/knife4j-doc/gitee/images/action/others/image-20230531090016683.png new file mode 100644 index 000000000..2d120fcdb Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531090016683.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531090327502.png b/knife4j-doc/gitee/images/action/others/image-20230531090327502.png new file mode 100644 index 000000000..7c78be8e5 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531090327502.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531090727879.png b/knife4j-doc/gitee/images/action/others/image-20230531090727879.png new file mode 100644 index 000000000..5ee059999 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531090727879.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531091127138.png b/knife4j-doc/gitee/images/action/others/image-20230531091127138.png new file mode 100644 index 000000000..c28c775db Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531091127138.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531093722644.png b/knife4j-doc/gitee/images/action/others/image-20230531093722644.png new file mode 100644 index 000000000..4ee82d6d5 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531093722644.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531093833450.png b/knife4j-doc/gitee/images/action/others/image-20230531093833450.png new file mode 100644 index 000000000..dab4d1a58 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531093833450.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531094244587.png b/knife4j-doc/gitee/images/action/others/image-20230531094244587.png new file mode 100644 index 000000000..bd282921c Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531094244587.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531095255948.png b/knife4j-doc/gitee/images/action/others/image-20230531095255948.png new file mode 100644 index 000000000..4be928a34 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531095255948.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531095409479.png b/knife4j-doc/gitee/images/action/others/image-20230531095409479.png new file mode 100644 index 000000000..88a2ff1bc Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531095409479.png differ diff --git a/knife4j-doc/gitee/images/action/others/image-20230531095906380.png b/knife4j-doc/gitee/images/action/others/image-20230531095906380.png new file mode 100644 index 000000000..210145032 Binary files /dev/null and b/knife4j-doc/gitee/images/action/others/image-20230531095906380.png differ diff --git a/knife4j-doc/gitee/images/blog/customer-api/customer-api-preview.jpg b/knife4j-doc/gitee/images/blog/customer-api/customer-api-preview.jpg new file mode 100644 index 000000000..fd7e9e958 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/customer-api/customer-api-preview.jpg differ diff --git a/knife4j-doc/gitee/images/blog/handler-enum/enum-common.jpg b/knife4j-doc/gitee/images/blog/handler-enum/enum-common.jpg new file mode 100644 index 000000000..4287bb3b6 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/handler-enum/enum-common.jpg differ diff --git a/knife4j-doc/gitee/images/blog/handler-enum/enum-form-debug.jpg b/knife4j-doc/gitee/images/blog/handler-enum/enum-form-debug.jpg new file mode 100644 index 000000000..8bd1843d5 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/handler-enum/enum-form-debug.jpg differ diff --git a/knife4j-doc/gitee/images/blog/handler-enum/enum-form.png b/knife4j-doc/gitee/images/blog/handler-enum/enum-form.png new file mode 100644 index 000000000..e1af6c2ac Binary files /dev/null and b/knife4j-doc/gitee/images/blog/handler-enum/enum-form.png differ diff --git a/knife4j-doc/gitee/images/blog/handler-enum/enum-json.jpg b/knife4j-doc/gitee/images/blog/handler-enum/enum-json.jpg new file mode 100644 index 000000000..448bb0513 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/handler-enum/enum-json.jpg differ diff --git a/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service.png b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service.png new file mode 100644 index 000000000..aaae14bb3 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service.png differ diff --git a/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service2.png b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service2.png new file mode 100644 index 000000000..90a6e4388 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service2.png differ diff --git a/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service3.png b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service3.png new file mode 100644 index 000000000..a7d3d0791 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/knife4j-gateway/knife4j-gateway-service3.png differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/Knife4jInsight.png b/knife4j-doc/gitee/images/blog/product-new-idea/Knife4jInsight.png new file mode 100644 index 000000000..359e0d2de Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/Knife4jInsight.png differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/api-info.png b/knife4j-doc/gitee/images/blog/product-new-idea/api-info.png new file mode 100644 index 000000000..1618c299a Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/api-info.png differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/api.jpg b/knife4j-doc/gitee/images/blog/product-new-idea/api.jpg new file mode 100644 index 000000000..a1638bf78 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/api.jpg differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/llm2.png b/knife4j-doc/gitee/images/blog/product-new-idea/llm2.png new file mode 100644 index 000000000..caba05c3b Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/llm2.png differ diff --git "a/knife4j-doc/gitee/images/blog/product-new-idea/llm\345\244\247\346\250\241\345\236\213.png" "b/knife4j-doc/gitee/images/blog/product-new-idea/llm\345\244\247\346\250\241\345\236\213.png" new file mode 100644 index 000000000..38d9b6f6b Binary files /dev/null and "b/knife4j-doc/gitee/images/blog/product-new-idea/llm\345\244\247\346\250\241\345\236\213.png" differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/namespace-show.jpg b/knife4j-doc/gitee/images/blog/product-new-idea/namespace-show.jpg new file mode 100644 index 000000000..6a293bc8e Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/namespace-show.jpg differ diff --git a/knife4j-doc/gitee/images/blog/product-new-idea/namespace.jpg b/knife4j-doc/gitee/images/blog/product-new-idea/namespace.jpg new file mode 100644 index 000000000..fedac523f Binary files /dev/null and b/knife4j-doc/gitee/images/blog/product-new-idea/namespace.jpg differ diff --git a/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a1.png b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a1.png new file mode 100644 index 000000000..af60089bd Binary files /dev/null and b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a1.png differ diff --git a/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a2.png b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a2.png new file mode 100644 index 000000000..a624ce7d6 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/Claude-a2.png differ diff --git a/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/js-fun.jpg b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/js-fun.jpg new file mode 100644 index 000000000..3c6d0c438 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/js-fun.jpg differ diff --git a/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/show.jpg b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/show.jpg new file mode 100644 index 000000000..741d604b1 Binary files /dev/null and b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/show.jpg differ diff --git a/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/source-property.jpg b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/source-property.jpg new file mode 100644 index 000000000..454b7794b Binary files /dev/null and b/knife4j-doc/gitee/images/blog/use-claude-fixed-issues/source-property.jpg differ diff --git a/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo.png b/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo.png new file mode 100644 index 000000000..59705c05a Binary files /dev/null and b/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo.png differ diff --git a/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo1.png b/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo1.png new file mode 100644 index 000000000..7c1aa7ce8 Binary files /dev/null and b/knife4j-doc/gitee/images/sponsor/tiaocanshu/logo1.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/1522755_tianchaohongyu_1578953588.png b/knife4j-doc/gitee/images/website/contributor/1522755_tianchaohongyu_1578953588.png new file mode 100644 index 000000000..24850840d Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/1522755_tianchaohongyu_1578953588.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/17865425.png b/knife4j-doc/gitee/images/website/contributor/17865425.png new file mode 100644 index 000000000..819f324cc Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/17865425.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/3351027.jpeg b/knife4j-doc/gitee/images/website/contributor/3351027.jpeg new file mode 100644 index 000000000..84c567bd7 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/3351027.jpeg differ diff --git a/knife4j-doc/gitee/images/website/contributor/33949826.png b/knife4j-doc/gitee/images/website/contributor/33949826.png new file mode 100644 index 000000000..119e7e800 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/33949826.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/398866_fengshi20102010_1578922679.jpg b/knife4j-doc/gitee/images/website/contributor/398866_fengshi20102010_1578922679.jpg new file mode 100644 index 000000000..114b9fc4b Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/398866_fengshi20102010_1578922679.jpg differ diff --git a/knife4j-doc/gitee/images/website/contributor/46189785.jpeg b/knife4j-doc/gitee/images/website/contributor/46189785.jpeg new file mode 100644 index 000000000..dc38e8f75 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/46189785.jpeg differ diff --git a/knife4j-doc/gitee/images/website/contributor/486046_xiejinwei_1578925361.png b/knife4j-doc/gitee/images/website/contributor/486046_xiejinwei_1578925361.png new file mode 100644 index 000000000..918542456 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/486046_xiejinwei_1578925361.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/5102563_chenshifeng001_1616486639.png b/knife4j-doc/gitee/images/website/contributor/5102563_chenshifeng001_1616486639.png new file mode 100644 index 000000000..c2b9f6e84 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/5102563_chenshifeng001_1616486639.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/5228318_moil-xm_1614837793.png b/knife4j-doc/gitee/images/website/contributor/5228318_moil-xm_1614837793.png new file mode 100644 index 000000000..3e32c9a1c Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/5228318_moil-xm_1614837793.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/57865422.jpeg b/knife4j-doc/gitee/images/website/contributor/57865422.jpeg new file mode 100644 index 000000000..62a130c27 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/57865422.jpeg differ diff --git a/knife4j-doc/gitee/images/website/contributor/604134_miaoyinjun_1641539847.png b/knife4j-doc/gitee/images/website/contributor/604134_miaoyinjun_1641539847.png new file mode 100644 index 000000000..3fdfd3878 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/604134_miaoyinjun_1641539847.png differ diff --git a/knife4j-doc/gitee/images/website/contributor/63706387.jpeg b/knife4j-doc/gitee/images/website/contributor/63706387.jpeg new file mode 100644 index 000000000..76d3792e6 Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/63706387.jpeg differ diff --git a/knife4j-doc/gitee/images/website/contributor/71577061.jpeg b/knife4j-doc/gitee/images/website/contributor/71577061.jpeg new file mode 100644 index 000000000..449dcd02c Binary files /dev/null and b/knife4j-doc/gitee/images/website/contributor/71577061.jpeg differ diff --git a/knife4j-doc/gitee/index.html b/knife4j-doc/gitee/index.html index 3c3d6754c..6e096c057 100644 --- a/knife4j-doc/gitee/index.html +++ b/knife4j-doc/gitee/index.html @@ -10,16 +10,15 @@ - -Knife4j · 集Swagger2及OpenAPI3为一体的增强解决方案. | Knife4j - - +Knife4j · 集Swagger2及OpenAPI3为一体的增强解决方案. | Knife4j + +
-

Knife4j是一个集Swagger2 和 OpenAPI3
为一体的增强解决方案

Knife4j是一个集Swagger2OpenAPI3
为一体的增强解决方案

帮助开发者快速聚合使用OpenAPI规范.

基础特性

  • 兼容OpenAPI 2.0
  • 兼容OpenAPI 3.0

增强扩展

  • 基础ui组件(自定义文档、动态参数调试、I18n、接口排序、导出等)
  • 基于Springfox框架+Swagger2规范的自动注入starter
  • 基于Springdoc-openapi+OAS3规范的自动注入starter
  • 提供对主流网关组件的统一聚合OpenAPI接口文档的解决方案

框架适配

  • 适配兼容Spring MVC
  • 适配兼容Spring Boot 2.2、2.3、2.4、2.5、2.6、2.7、3.0
  • 适配兼容Spring WebFlux
  • 基于SpringFox2.x版本提供Swagger2规范的增强扩展
  • 基于Springdoc-openapi项目提供OAS3规范的增强扩展

社区生态

  • 基于Servlet体系的微服务聚合中间件Knife4jAggregation
  • 基于Spring Cloud Gateway网关聚合的微服务聚合中间件
  • 独立运行的中间件Knife4jDesktop

云原生

  • 提供基于K8S+Docker的云原生的聚合OpenAPI文档的解决方案
  • 简化Knife4j的使用及学习成本,一键部署&集成&使用

Contributors

Knife4j的发展离不开每一位Contributor的无私奉献~~!

快速开始(Spring Boot 2 + OpenAPI2)

不同规范以及Spring Boot3 OpenAPI3的使用请移步详细文档

第一步:创建Spring Boot项目并且在pom.xml中引入Knife4j的依赖包,代码如下:

<!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

第二步:创建Swagger配置依赖,代码如下::

@Configuration
@EnableSwagger2WebMvc
public class Knife4jConfiguration {

@Bean(value = "dockerBean")
public Docket dockerBean() {
//指定使用Swagger2规范
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfoBuilder()
//描述字段支持Markdown语法
.description("# Knife4j RESTful APIs")
.termsOfServiceUrl("https://doc.xiaominfo.com/")
.contact("xiaoymin@foxmail.com")
.version("1.0")
.build())
//分组名称
.groupName("用户服务")
.select()
//这里指定Controller扫描包路径
.apis(RequestHandlerSelectors.basePackage("com.github.xiaoymin.knife4j.controller"))
.paths(PathSelectors.any())
.build();
return docket;
}
}

第三步:新建一个接口Controller类,如下:

@Api(tags = "首页模块")
@RestController
public class IndexController {

@ApiImplicitParam(name = "name",value = "姓名",required = true)
@ApiOperation(value = "向客人问好")
@GetMapping("/sayHi")
public ResponseEntity<String> sayHi(@RequestParam(value = "name")String name){
return ResponseEntity.ok("Hi:"+name);
}
}

万事俱备,启动Spring Boot项目,浏览器访问Knife4j的文档地址即可查看效果

http://localhost:8080/doc.html
- - +

Knife4j是一个集Swagger2 和 OpenAPI3
为一体的增强解决方案

Knife4j是一个集Swagger2OpenAPI3
为一体的增强解决方案

帮助开发者快速聚合使用OpenAPI规范.

基础特性

  • 兼容OpenAPI 2.0
  • 兼容OpenAPI 3.0

增强扩展

  • 基础ui组件(自定义文档、动态参数调试、I18n、接口排序、导出等)
  • 基于Springfox框架+Swagger2规范的自动注入starter
  • 基于Springdoc-openapi+OAS3规范的自动注入starter
  • 提供对主流网关组件的统一聚合OpenAPI接口文档的解决方案

框架适配

  • 适配兼容Spring MVC
  • 适配兼容Spring Boot 2.2、2.3、2.4、2.5、2.6、2.7、3.0
  • 适配兼容Spring WebFlux
  • 基于SpringFox2.x版本提供Swagger2规范的增强扩展
  • 基于Springdoc-openapi项目提供OAS3规范的增强扩展

社区生态

  • 基于Servlet体系的微服务聚合中间件Knife4jAggregation
  • 基于Spring Cloud Gateway网关聚合的微服务聚合中间件
  • 独立运行的中间件Knife4jDesktop

云原生

  • 提供基于K8S+Docker的云原生的聚合OpenAPI文档的解决方案
  • 简化Knife4j的使用及学习成本,一键部署&集成&使用

Contributors

Knife4j的发展离不开每一位Contributor的无私奉献~~!

快速开始(Spring Boot 2 + OpenAPI2)

不同规范以及Spring Boot3 OpenAPI3的使用请移步详细文档

第一步:创建Spring Boot项目并且在pom.xml中引入Knife4j的依赖包,代码如下:

<!--引入Knife4j的官方start包,该指南选择Spring Boot版本<3.0,开发者需要注意-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.0.0</version>
</dependency>

第二步:创建Swagger配置依赖,代码如下::

@Configuration
@EnableSwagger2WebMvc
public class Knife4jConfiguration {

@Bean(value = "dockerBean")
public Docket dockerBean() {
//指定使用Swagger2规范
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfoBuilder()
//描述字段支持Markdown语法
.description("# Knife4j RESTful APIs")
.termsOfServiceUrl("https://doc.xiaominfo.com/")
.contact("xiaoymin@foxmail.com")
.version("1.0")
.build())
//分组名称
.groupName("用户服务")
.select()
//这里指定Controller扫描包路径
.apis(RequestHandlerSelectors.basePackage("com.github.xiaoymin.knife4j.controller"))
.paths(PathSelectors.any())
.build();
return docket;
}
}

第三步:新建一个接口Controller类,如下:

@Api(tags = "首页模块")
@RestController
public class IndexController {

@ApiImplicitParam(name = "name",value = "姓名",required = true)
@ApiOperation(value = "向客人问好")
@GetMapping("/sayHi")
public ResponseEntity<String> sayHi(@RequestParam(value = "name")String name){
return ResponseEntity.ok("Hi:"+name);
}
}

万事俱备,启动Spring Boot项目,浏览器访问Knife4j的文档地址即可查看效果

http://localhost:8080/doc.html
+ + diff --git a/knife4j-doc/gitee/json/contributors1.json b/knife4j-doc/gitee/json/contributors1.json index 95ad70ae7..615fcd411 100644 --- a/knife4j-doc/gitee/json/contributors1.json +++ b/knife4j-doc/gitee/json/contributors1.json @@ -4,6 +4,76 @@ "url": "https://gitee.com/xiaoym", "avatar": "/images/website/contributor/八一菜刀.png" }, + { + "name": "鬼剑士", + "url": "https://github.com/4379711", + "avatar": "/images/website/contributor/33949826.png" + }, + { + "name": "lhzsdnu", + "url": "https://gitee.com/lhzsdnu", + "avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAvtJREFUeF7t3D1qlWEUxPEnELCxEsRSEMTSzjKtSxG0cAeWFtZ2LsAdWImde1CwFDEE0cKA4scVBKsgd4q5LzOHf+rDeefMjyfpcvTh0Y3d4mdsA0cAj7X9exjAs30BHu4LMMDTGxh+H3+DAR7ewPDzeMEAD29g+Hm8YICHNzD8PF4wwMMbGH4eLxjg4Q0MP48XDPDwBoafxwsGeHgDw8/jBQM8vIHh5/GCAR7ewPDzeMEAD29g+Hm8YICHNzD8PF4wwMMbGH4eLxjg4Q0MP48XDPDwBoafxwsGeHgDw8/jBQOc28Dlkwfr0s2TCwG/vXm5zl8/yw2+YbLqF3z14at1fOX6hbp+nr1bZ0/vblhj7qcAzrWxJAPYUmPuEoBzbSzJALbUmLsE4FwbSzKALTXmLgE418aSDGBLjblLAM61sSQD2FJj7hKAc20syQC21Ji7BOBcG0sygC015i4BONfGkgxgS425SwDOtbEkA9hSY+4SgHNtLMkAttSYuwTgXBtLMoAtNeYuATjXxpIMYEuNuUsAzrWxJAPYUmPuEoBzbSzJALbUmLsE4FwbSzKALTXmLgE418aSDGBLjblLAM61sSQD2FJj7hKAc20syQC21Ji7ZCTw2u3Wry/vra3/OH27Pj+/Z925xbKZwAdobvf96/r4+PYBNh92JcBivwCLRTnH/vd/spzf+LcL4EO0umcnwPtL7/4Vff/FOr52a/+Vhonf55/W6ZM7hk3brqgG3raqzq8B3OkmpwZYrqpzEOBONzk1wHJVnYMAd7rJqQGWq+ocBLjTTU4NsFxV5yDAnW5yaoDlqjoHAe50k1MDLFfVOQhwp5ucGmC5qs5BgDvd5NQAy1V1DgLc6SanBliuqnMQ4E43OTXAclWdgwB3usmpAZar6hwEuNNNTg2wXFXnIMCdbnJqgOWqOgcB7nSTUwMsV9U5CHCnm5waYLmqzkGAO93k1ADLVXUOAtzpJqcGWK6qcxDgTjc5NcByVZ2DAHe6yakBlqvqHPwDHxY77+1XXMgAAAAASUVORK5CYII=" + }, + { + "name": "谢进伟", + "url": "https://gitee.com/xiejinwei", + "avatar": "/images/website/contributor/486046_xiejinwei_1578925361.png" + }, + { + "name": "最怕的、其实是孤单。。。", + "url": "https://gitee.com/sky-0914", + "avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAACBBJREFUeF7tnXlsFHUUx9+W3geUtlBpgVIK5bKHoRyttdwggoDEcBgOQQgYYtQYEhM1BBUJiWIwqCgiIoLBAAbFylGwUA9AaEsplh5QpBaKsFy92XbXvA21Ozu701+Z2Xb29f2S/rXv9+b3vp95v/ldMzVsnptuAS5kFTAwYLJsrYExYNp8GTBxvgyYAVNXgHh8/AxmwMQVIB4eZzADJq4A8fA4gxkwcQWIh8cZzICJK0A8PM5gBkxcAeLhcQYzYOIKEA+PM5gBE1eAeHicwQyYuALEw+MMZsDEFSAeHmcwAyauAPHwOIMZMHEFiIfHGcyAiStAPDzOYAZMXAHi4XEGM+D2VcDb3xOeWBrXvo1wcHWz2QK/bz0P9VUm3bXNtkG6z+Cgbn4we8NoXYpYklUOmZ/m6bJtTY1iwCrwlPx2FTI/PqvCg+urMmAVGjNgFeI1VXXURZvqGqDoWLkG3sVdRMaFQXBEgKQCAxbXz6mlI8D3rtfAd68e08C7uIv4qdEw/LmBDFhcMjFLBiymkzMrt3wGmxvMUHCkTF3krazNXXQrBRM11/U0iUfRohid2zFgdRq6ZRetLmTtavMoWgMtHWUwLg/m7C3RwLu4i8j4MOiV2I1H0eKSiVnyKFpMJ1KjaJ4Hi0N3y2ewudECp3cVikepgWVUUjiEx3blLloDLSUueBStTlG3zGB1IWtXm0fRGmgZEOILczeO0cCT9i4YsEaaxk2Jhq49AzXypp2b0lMVUJZzQzuHLvCk+y7aBTF3KJcMmDhuXQDuFtMFOof7k5L6fk0DlOW2f/etC8DPvp8mOy3h7rQb6hvhq0WH2j0MXQDGUTKOlikVBmxDkwG77tbWRQbPXJsKwZHSA20YsoenhzRyC4C50Syshqw+AOBpkLYodZUm2LniaFtcSvEaugDsrIVLdkwGMDT/+m/xHfhh1R/Cor2w40kwGJod4Br2l/MPCNenYMiAKVBUiIEBM+D2U8C+i668UQs5e4qFG5S2PF5ia9tFj34xHvCkpFYF/4UrvsZy9bxRK5ea+HGrDFYbsS3gZ9Y+DqFRndW6lNQvPVkBRzbkaOpTrTMGrFZBm/oMuJVi2nfRrawuM7fN4BlrUiAsuotal5zBahS0B4yrQ3crqoVd2nfBtoBx7TtxRgzEpERAJy/pfPvSiWuA11IqUUPDwSfQS2Jy9sdL8Oe3bXuUqCUx3KqLdsU8OHF6DCTNjpXoVPhLGWRtzlfUbuGWCeDl59lsYwHYvixDd2/8d3jAXr6dYOGWiZIFFVzt2vr8IbCYcWwsL32Te8DYlxIlP9wpr4LdK7NaSqg2/73DA0bFZ65LhZBeQRLxz+wudnq4ftaHo2Tbm79+kQ8XjrbtC3Eid4tbATbVNsD1otsicVlteiZI30RwtlQZMSQUnnpjuMQvvmT+9ZIMWRbj3vX0d1Iktuh364KDYLE4znjhBrvA0K0Aq41faS3aUVZezTdC+nun/r+swcMA8zaNkw2uyvON8LONndp2almfAT9QE989mvz6MJm22XtKIPvB6tmE14ZC1NDuMpv9q09ARaF4z6IlwJZ8MWAbhaa8ORx6DA6VaXZg3WnA73XZD6zQ8NpfRvjp3eYsb0nwtv7drQBX3ayF/PTLwhqNnD9IOjpuYbsQR9TzPhsvmxfjs9WA+5Y2W5fYiEaTGb5ZlgGmOuU5s3CDXWDoVoBdMQ+21zR6xCMw7uXHhKTGdWdcntRz6XCAcbQb2qczhA8IhoqC22D8+56Mz7DZsZAwPUaRG+4apa/Rb9fc1HhygPEER2CYLwRHBsKklUmybtWW2rn9pXBy5wWHIKe9nQzd+wU7hbxt8SFdd81uCbiu8j7kfn8R/EN8wT/YB/y6eINvkDd4B3iBT4AnePp4gkcnuwelQh46A5zwdF9ImhMrOe5j76bmTj0cXHfaYQ+gpy5bFxmcsmgI9E+NAJxn4kE5gwcoiquVgPaAcfMAFzyE94ktAEXH/4Gsz/N1uciBOukC8Kjl8dA/LVIrbkJ+cAR8YnsBFGRcsdoPnhgFI+cNlJ/kFPB2v8YEp3YW8lKlM60endwHrFMaFxec7hz+INs6d22a2gwa39u6m+QTIN36s20KfvQFXxVFW6VHAILO3lvSqqmci0PWRwZ37x8M01YnC8WKy42422OqbwRcm8bncvWtOqi6UQv47Y6716oBd3bwGal0bHbg2F4wbM4A2bKjfSPw9dDD688AXjcwzA+mvDUC8KsDSgVvnrP7LkLuvotCMbnSSBddNGbF1FUjrZvsmC34h+AQUrWxDqqMtVaA9dWt+7q6M8CONhfsRUagWZvPQfFx+VdtkxcMhiGTohRH6LhZsW3xYVeyE/KtC8BCLX0II6UMxq/IO8tE3LE6+lGutWdwVnAuPWZFgnU65qgc35QHRQ5ujocIQ1WVDgsYj+zMWj9KkoU3S+9C5id51i5etOAmRdrSOAgIbX55Tk+b/x0WMALEZ3DCtL5w60olHNuUB8bL8lUtUdD9UiMAu24crO16JRPwDLceCmnAIb2DrHPrpoLP1dtllRLdEUhrn+1K4LT2p/YmIQ1YrTgU6jNgChQVYmDADJi4AsTD4wxmwMQVIB4eZzADJq4A8fA4gxkwcQWIh8cZzICJK0A8PM5gBkxcAeLhcQYzYOIKEA+PM5gBE1eAeHicwQyYuALEw+MMZsDEFSAeHmcwAyauAPHwOIMZMHEFiIfHGcyAiStAPDzOYAZMXAHi4XEGM2DiChAP7z9TKHPtm4jO6AAAAABJRU5ErkJggg==" + }, + { + "name": "当幸福碰错了头", + "url": "https://gitee.com/chenshifeng001", + "avatar": "/images/website/contributor/5102563_chenshifeng001_1616486639.png" + }, + { + "name": "fengshi20102010", + "url": "https://gitee.com/fengshi20102010", + "avatar": "/images/website/contributor/398866_fengshi20102010_1578922679.jpg" + }, + { + "name": "wear工程师", + "url": "https://github.com/zskzskabcd", + "avatar": "/images/website/contributor/63706387.jpeg" + }, + { + "name": "King-Run", + "url": "https://github.com/King-Run", + "avatar": "/images/website/contributor/57865422.jpeg" + }, + { + "name": "liuyd-cc", + "url": "https://github.com/liuyd-cc", + "avatar": "/images/website/contributor/17865425.png" + }, + { + "name": "1990lsf", + "url": "https://github.com/1990lsf", + "avatar": "/images/website/contributor/3351027.jpeg" + }, + { + "name": "ocean-zhc", + "url": "https://github.com/ocean-zhc", + "avatar": "/images/website/contributor/46189785.jpeg" + }, + { + "name": "Pastor0370", + "url": "https://github.com/Pastor0370", + "avatar": "/images/website/contributor/71577061.jpeg" + }, + { + "name": "milo-xm", + "url": "https://gitee.com/moil-xm", + "avatar": "/images/website/contributor/5228318_moil-xm_1614837793.png" + }, + { + "name": "暇享", + "url": "https://gitee.com/iot2000x", + "avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAACKNJREFUeF7tnGlsVFUUx890o1BaWsrSFroAxYBCaBTCjgiRIkGWUGkxKEsEIRpwQyGCHzQkJsgHiUYQUEC2sAhBApQdUZCwSRCRsJQW22kLtNB9m6k5U4pz37zpvPfuTPvunXM/ztxz59z/b857566W/qtv1gMVaRWwEGBp2To6RoDl5kuAJedLgAmw7ApI3j96BxNgyRWQvHsUwQRYcgUk7x5FMAGWXAHJu0cRTIAlV0Dy7lEEE2DJFZC8exTBBFhyBSTvHkUwAZZcAcm7RxFMgCVXQPLuUQQTYMkVkLx7FMEEWHIFJO8eRTABllwBybtHEUyAJVdA8u5RBBNgyRWQvHsUwQRYLAXiwoMhLjzIkNOXrJVgrwcICbTAS93aGmoDjU5klUGNzRzn6qWL4FXj4mBwfBtDcI7dKYPFR/KhW1QI7JiaYKgNNJq4NRvySmsN23vT0DSAX+7RFlKTw3X3rbLWDj9cLoas4hqHLQ/gqwVVMHvvvwRYNwUNBl+M6gxje+oHjE2vPl8E6y8VEWAVnU0TwQRYQxQYqOIXgC/mVcKV/CoXeWY/H8V81viIbhMcABN6RWiSc0ZKJHRowyZ19A5Wkc6XEbzqj4fw05Vil189/3ayKmBNZJ9U2pIWD89Et2JMCLBGwIsyrXDmXgVT+41+UTBvQHvmM+d38Nfj4mCIIosmwHr+sj6qqxbB7x3Mg99zXAEvGBTtFrBaFk2AfQRNT7MEWI9a2uuaOsmiCNYO0l1NAuykTGMWrUdWSrI0qkWPaI1C6axGEUwRrPMvY7C6LyO41l4P+aV1Lp7FtwtWHQd3DAuCNa920dSTmPAgCA6w0DjYk1q+BOzptxu/p8UGrUoZqEeADYimwcQv3sEadHBUoQjWqpSBer6MYJu9HrRssDiTUwGLDlsBFxt+zkiE8FYBBnoCMHlbNhSWu77zDTXGaeQXEexuqpJTOyHMCbAQmIw7aWrAOLyx2dnOtQqyADso8byjgyLY+B/Ea5YtsR7sNedN3JCpI1irbp72ZOmJ4MjQQAhSTFxo9cO53oMKSrIY3cwQwRN7RcDSFzsZ4eliM2DNLa+0w9uIqSO4oKwOymrYl3BseJBjGONcPEUw7grZe72kSa1w++2wxDBI79OOV1OHPQFWyOjLcbAWYngSYc/1EgKsRSwjdQiwEdU825j6Ee2tHR2eZQDHWSI8tpL2XDsY1LUNKPMs5eY/5zaVm/zwfNPA7+kd7DHJam7AQ9fddvi0Kz0BEiNDnvpXUm2D0RuyVP8nYSEBcGJWd2ZsfquoBqbtzNHyv/J5Hb+I4BsPquF8bmWTYj6qssHGPxv2Ti8e3hGmPMsmW8PX34aqOtcTg7h5fv4AdpfnmgtFsO5iw1Gali5+AVjPOBiB9I9rDd8pFvyXHiuAzFulLrx2ZyRCgmLjwJiNWVBcZWtpto7fJ8BuMJybm8y8h4/eLoMlR/OZ2jhcOzmbfTwXVdogdZP647wliBNgN6rvez0JcMzdWHBMPn7LXab2jJQoeHcg+3g+dKsUlh0raAmWqr9JgN2g+HxUZ3hFcZx1wtZssDod7M58sxu0bx3ItDB3Xy5ctjb9vm9O+gTYjdojk8JgRWos8+3ZexWw4ECe47NJvSPg0xHstCaufg1Z25CJm6UQYDckcBz821s9mB2TmENjAoUZ9/FZ3SE8hJ0yxWOq837JNQtb/0mycJh0Iqu8SeEfV9lg19+PmTq48IALEM4Fk61rhVWwcHAHl/ambM+GnMfmuJuj0Tm/iGCtIaUcCuEkxvGZ3ZlsGmep6uz1jpt4nMuFvEqYb7LoRf9MDfivwirIL2PXVXtEhTguSXEunlaTtAL+8vR92K2I4pWpsTAiKazJJvDRPWHLXRdftf6uL+uZGrDWjvsScKewINg/Pcllm5CzbzhPvfBJ8qXV5+aqR4CdlFaLYPx67cSukBITqsoEo3fspizACQ4zFr8AfOpuOey5ziZQajCuFVY7MmRl6RkdAlvT1C9GO3m3HPCqCbMWvwCsdy7aGRYOlzZPiYeeiotWGuvgxMekbdmOKxDNWEwNGLPas/fY4U1G30iY8wJ7CYvz6o2eOzo8AcFMeftrCaA8hai0y35UAxk77zmya7MVUwP21nqwkQjGIdLOqQmAR0m1FBz/pu/IMR1k4QDjBWXLFDsfvR3BXSKCYcPkroBbaPUUhIwL/Wa5aRZ9Nw1gtUV2tQhGp3GZLshplrCitv5p5PA+oj8c2gHS+0S6HRbh2NxaWgd4eapaqayzwyeH8wHnrc1QTAMYkxl8vwZa/p8h2n+jRPfCuVHA/WJC4avU2Caj9nR2OXxwqCFjXj46BsYku79TGrPrJUfyW/yRbRrA3vq3GwG8YkwsjOzW9GzV3n9KYPmpQsZNT5DLa+wwf38uXL9f7a3u6W7H7wHjk+PsHHb3hlJFvKoYZ8vUiifIK888gO1XH+kG4y0DvweMQr4zMBpmprA3z+LnODv1UabVcfK/qTK5dwR8PKyjy5mm0ho7jPrxjrdYGWqHAD+R7cD0pKdDIhzO4u2035x7qFnUqNBA+HZ8HDMh8tnxAjh403WjnuZGvVDRLwAv/7XQ49kkvBJ4c1o83HxYDe8ftBq+gmFa30hYOCgaCsttMGEru4fLC7x0NyEdYBxCOR9Ow200uJjfnCWiVQBYLJZm/121PkoHuDlBivBbBFgEShw+EmAO8UQwJcAiUOLwkQBziCeCKQEWgRKHjwSYQzwRTAmwCJQ4fCTAHOKJYEqARaDE4SMB5hBPBFMCLAIlDh8JMId4IpgSYBEocfhIgDnEE8GUAItAicNHAswhngimBFgEShw+EmAO8UQwJcAiUOLwkQBziCeCKQEWgRKHjwSYQzwRTAmwCJQ4fCTAHOKJYEqARaDE4SMB5hBPBFMCLAIlDh8JMId4IpgSYBEocfhIgDnEE8GUAItAicPH/wB3AmujrVrcpAAAAABJRU5ErkJggg==" + }, { "name": "linghengqian", "url": "https://github.com/linghengqian", @@ -42,12 +112,12 @@ { "name": "tianchaohongyu", "url": "https://gitee.com/tianchaohongyu", - "avatar": "https://portrait.gitee.com/uploads/avatars/user/507/1522755_tianchaohongyu_1578953588.png!avatar200" + "avatar": "/images/website/contributor/1522755_tianchaohongyu_1578953588.png" }, { "name": "miaoyinjun", "url": "https://gitee.com/miaoyinjun", - "avatar": "https://portrait.gitee.com/uploads/avatars/user/201/604134_miaoyinjun_1641539847.png!avatar200" + "avatar": "/images/website/contributor/604134_miaoyinjun_1641539847.png" }, { "name": "mhuang", diff --git a/knife4j-doc/gitee/search.html b/knife4j-doc/gitee/search.html index ae53ba9f6..fdbef3756 100644 --- a/knife4j-doc/gitee/search.html +++ b/knife4j-doc/gitee/search.html @@ -10,16 +10,15 @@ - -在文档中搜索 | Knife4j - - +在文档中搜索 | Knife4j + +
-

在文档中搜索

- - +

在文档中搜索

+ + diff --git a/knife4j-doc/gitee/sitemap.xml b/knife4j-doc/gitee/sitemap.xml index ce695449f..fa3959b29 100644 --- a/knife4j-doc/gitee/sitemap.xml +++ b/knife4j-doc/gitee/sitemap.xml @@ -1 +1 @@ -https://doc.xiaominfo.com/searchweekly0.5https://doc.xiaominfo.com/versionsweekly0.5https://doc.xiaominfo.com/docs/actionweekly0.5https://doc.xiaominfo.com/docs/action/action-simpleweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-cloudweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-diskweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-dockerweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-eurekaweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-nacosweekly0.5https://doc.xiaominfo.com/docs/action/dotnetcore-knife4j-guidweekly0.5https://doc.xiaominfo.com/docs/action/dotnetcore-knife4j-howweekly0.5https://doc.xiaominfo.com/docs/action/mavenbomweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-authorization_codeweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-client_credentialsweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-implicitweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-passwordweekly0.5https://doc.xiaominfo.com/docs/action/springbootweekly0.5https://doc.xiaominfo.com/docs/action/springcloud-gatewayweekly0.5https://doc.xiaominfo.com/docs/action/springcloud-zuulweekly0.5https://doc.xiaominfo.com/docs/action/springfoxweekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox1weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox10weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox11weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox12weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox13weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox14weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox15weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox16weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox17weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox18weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox19weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox2weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox20weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox21weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox3weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox4weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox5weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox6weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox7weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox8weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox9weekly0.5https://doc.xiaominfo.com/docs/action/springmvcweekly0.5https://doc.xiaominfo.com/docs/changelogweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-openweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-12-16-knife4j-2.0.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-12-23-knife4j-2.0.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-03-08-knife4j-2.0.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-05-24-knife4j-2.0.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-06-28-knife4j-2.0.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-09-14-knife4j-2.0.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-10-26-knife4j-2.0.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-11-02-knife4j-2.0.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-11-22-knife4j-2.0.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2021-06-28-knife4j-2.0.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.0weekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.1weekly0.5https://doc.xiaominfo.com/docs/communityweekly0.5https://doc.xiaominfo.com/docs/community/apacheweekly0.5https://doc.xiaominfo.com/docs/community/changelogweekly0.5https://doc.xiaominfo.com/docs/community/community-get-helpsweekly0.5https://doc.xiaominfo.com/docs/community/contributingweekly0.5https://doc.xiaominfo.com/docs/community/donateweekly0.5https://doc.xiaominfo.com/docs/community/joinusweekly0.5https://doc.xiaominfo.com/docs/community/simple-demoweekly0.5https://doc.xiaominfo.com/docs/community/sourcecodeweekly0.5https://doc.xiaominfo.com/docs/donateweekly0.5https://doc.xiaominfo.com/docs/faqweekly0.5https://doc.xiaominfo.com/docs/faq/format-exceptionweekly0.5https://doc.xiaominfo.com/docs/faq/knife4j-exceptionweekly0.5https://doc.xiaominfo.com/docs/faq/md-format-errorweekly0.5https://doc.xiaominfo.com/docs/faq/sp-nmerrorweekly0.5https://doc.xiaominfo.com/docs/faq/springboot-404weekly0.5https://doc.xiaominfo.com/docs/faq/springmvc-404weekly0.5https://doc.xiaominfo.com/docs/faq/springmvc-notshowweekly0.5https://doc.xiaominfo.com/docs/faq/swagger-des-not-foundweekly0.5https://doc.xiaominfo.com/docs/faq/swaggerResourceInvalidweekly0.5https://doc.xiaominfo.com/docs/faq/upload-errorweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-base64-responseweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-no-openapiweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-paramweekly0.5https://doc.xiaominfo.com/docs/featuresweekly0.5https://doc.xiaominfo.com/docs/features/accessControlweekly0.5https://doc.xiaominfo.com/docs/features/afterScriptweekly0.5https://doc.xiaominfo.com/docs/features/apiSortweekly0.5https://doc.xiaominfo.com/docs/features/authorweekly0.5https://doc.xiaominfo.com/docs/features/clearCacheweekly0.5https://doc.xiaominfo.com/docs/features/customFooterweekly0.5https://doc.xiaominfo.com/docs/features/customHomeweekly0.5https://doc.xiaominfo.com/docs/features/dynamicRequestDescriptionweekly0.5https://doc.xiaominfo.com/docs/features/dynamicRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/dynamicResponseDescriptionweekly0.5https://doc.xiaominfo.com/docs/features/enhanceweekly0.5https://doc.xiaominfo.com/docs/features/exportDocumentweekly0.5https://doc.xiaominfo.com/docs/features/filterRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/forbidDebugweekly0.5https://doc.xiaominfo.com/docs/features/forbidOpenApiweekly0.5https://doc.xiaominfo.com/docs/features/forbidSearchweekly0.5https://doc.xiaominfo.com/docs/features/gitVersionweekly0.5https://doc.xiaominfo.com/docs/features/globalParameterweekly0.5https://doc.xiaominfo.com/docs/features/hostweekly0.5https://doc.xiaominfo.com/docs/features/i18nweekly0.5https://doc.xiaominfo.com/docs/features/includeRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/jsr303weekly0.5https://doc.xiaominfo.com/docs/features/oauth2weekly0.5https://doc.xiaominfo.com/docs/features/postmanweekly0.5https://doc.xiaominfo.com/docs/features/requestCacheweekly0.5https://doc.xiaominfo.com/docs/features/searchweekly0.5https://doc.xiaominfo.com/docs/features/selfdocumentweekly0.5https://doc.xiaominfo.com/docs/features/springSecurityweekly0.5https://doc.xiaominfo.com/docs/features/swaggermodelsweekly0.5https://doc.xiaominfo.com/docs/features/tagSortweekly0.5https://doc.xiaominfo.com/docs/introductionweekly0.5https://doc.xiaominfo.com/docs/introduction/gvpweekly0.5https://doc.xiaominfo.com/docs/introduction/introduction-backgroundweekly0.5https://doc.xiaominfo.com/docs/introduction/milestoneweekly0.5https://doc.xiaominfo.com/docs/introduction/supportweekly0.5https://doc.xiaominfo.com/docs/introduction/uiweekly0.5https://doc.xiaominfo.com/docs/middlewareweekly0.5https://doc.xiaominfo.com/docs/middleware-sourcesweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-cloudweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-diskweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-eurekaweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-nacosweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-functionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-openapiweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-useweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-installweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-modeweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-service-modeweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-testweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-useweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-diskweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-nacosweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/service-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jAggregationweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jAggregationDesktopweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jCloudweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/spring-webflux/spring-webflux-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jAggregationweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jAggregationDesktopweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jCloudweekly0.5https://doc.xiaominfo.com/docs/middleware/middleware-aggregationweekly0.5https://doc.xiaominfo.com/docs/middleware/middleware-desktopweekly0.5https://doc.xiaominfo.com/docs/oasweekly0.5https://doc.xiaominfo.com/docs/oas/annotation-introductionweekly0.5https://doc.xiaominfo.com/docs/oas/oas-textweekly0.5https://doc.xiaominfo.com/docs/oas/openapi-speweekly0.5https://doc.xiaominfo.com/docs/oas/openapi2weekly0.5https://doc.xiaominfo.com/docs/oas/openapi2-annotationweekly0.5https://doc.xiaominfo.com/docs/oas/openapi3weekly0.5https://doc.xiaominfo.com/docs/oas/openapi3-annotationweekly0.5https://doc.xiaominfo.com/docs/oas/OpenAPI3-specificationweekly0.5https://doc.xiaominfo.com/docs/quick-startweekly0.5https://doc.xiaominfo.com/docs/solutionweekly0.5https://doc.xiaominfo.com/docs/solution/adminweekly0.5https://doc.xiaominfo.com/docs/solution/extensionweekly0.5https://doc.xiaominfo.com/docs/solution/knife4j-admin-deployweekly0.5https://doc.xiaominfo.com/docs/solution/knife4j-admin-downloadweekly0.5https://doc.xiaominfo.com/docs/solution/serviceweekly0.5https://doc.xiaominfo.com/docs/solution/ui-frontweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-gatewayweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-nginxweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-staticweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-zuulweekly0.5https://doc.xiaominfo.com/docs/upgradingweekly0.5https://doc.xiaominfo.com/docs/upgrading/upgrading-to-v2weekly0.5https://doc.xiaominfo.com/docs/upgrading/upgrading-to-v4weekly0.5https://doc.xiaominfo.com/docs/v4weekly0.5https://doc.xiaominfo.com/weekly0.5 \ No newline at end of file +https://doc.xiaominfo.com/searchweekly0.5https://doc.xiaominfo.com/versionsweekly0.5https://doc.xiaominfo.com/docs/actionweekly0.5https://doc.xiaominfo.com/docs/action/action-simpleweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-cloudweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-diskweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-dockerweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-eurekaweekly0.5https://doc.xiaominfo.com/docs/action/aggregation-nacosweekly0.5https://doc.xiaominfo.com/docs/action/dotnetcore-knife4j-guidweekly0.5https://doc.xiaominfo.com/docs/action/dotnetcore-knife4j-howweekly0.5https://doc.xiaominfo.com/docs/action/mavenbomweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-authorization_codeweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-client_credentialsweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-implicitweekly0.5https://doc.xiaominfo.com/docs/action/oauth2-passwordweekly0.5https://doc.xiaominfo.com/docs/action/others/doc-searchweekly0.5https://doc.xiaominfo.com/docs/action/springbootweekly0.5https://doc.xiaominfo.com/docs/action/springcloud-gatewayweekly0.5https://doc.xiaominfo.com/docs/action/springcloud-zuulweekly0.5https://doc.xiaominfo.com/docs/action/springfoxweekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox1weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox10weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox11weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox12weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox13weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox14weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox15weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox16weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox17weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox18weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox19weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox2weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox20weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox21weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox3weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox4weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox5weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox6weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox7weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox8weekly0.5https://doc.xiaominfo.com/docs/action/springfox/springfox9weekly0.5https://doc.xiaominfo.com/docs/action/springmvcweekly0.5https://doc.xiaominfo.com/docs/blogweekly0.5https://doc.xiaominfo.com/docs/blog/customer-add-apiweekly0.5https://doc.xiaominfo.com/docs/blog/gateway/knife4j-gateway-introduceweekly0.5https://doc.xiaominfo.com/docs/blog/handler-enumweekly0.5https://doc.xiaominfo.com/docs/blog/product/knife4j-new-product-ideaweekly0.5https://doc.xiaominfo.com/docs/blog/production-forbidden-uiweekly0.5https://doc.xiaominfo.com/docs/blog/use-claude-fixed-issuesweekly0.5https://doc.xiaominfo.com/docs/changelogweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-04-19-swagger-bootstrap-ui-openweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-04-27-swagger-bootstrap-ui-1.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-05-14-swagger-bootstrap-ui-1.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-07-05-swagger-bootstrap-ui-1.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-07-11-swagger-bootstrap-ui-1.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-09-01-swagger-bootstrap-ui-1.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-09-06-swagger-bootstrap-ui-1.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2017-12-18-swagger-bootstrap-ui-1.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-01-20-swagger-bootstrap-ui-1.7.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-04-28-swagger-bootstrap-ui-1.7.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-16-swagger-bootstrap-ui-1.7.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-18-swagger-bootstrap-ui-1.7.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-07-25-swagger-bootstrap-ui-1.7.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-03-swagger-bootstrap-ui-1.7.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-06-swagger-bootstrap-ui-1.7.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-10-swagger-bootstrap-ui-1.8.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-14-swagger-bootstrap-ui-1.8.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-08-26-swagger-bootstrap-ui-1.8.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-09-17-swagger-bootstrap-ui-1.8.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-09-25-swagger-bootstrap-ui-1.8.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-10-16-swagger-bootstrap-ui-1.8.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-10-31-swagger-bootstrap-ui-1.8.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-11-12-swagger-bootstrap-ui-1.8.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2018-12-17-swagger-bootstrap-ui-1.8.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-01-11-swagger-bootstrap-ui-1.8.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-02-25-swagger-bootstrap-ui-1.9.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-03-11-swagger-bootstrap-ui-1.9.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-04-08-swagger-bootstrap-ui-1.9.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-04-23-swagger-bootstrap-ui-1.9.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-05-20-knife4j-admin-1.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-06-10-swagger-bootstrap-ui-1.9.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-07-31-swagger-bootstrap-ui-1.9.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-08-28-swagger-bootstrap-ui-1.9.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-12-16-knife4j-2.0.0-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2019-12-23-knife4j-2.0.1-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-03-08-knife4j-2.0.2-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-05-24-knife4j-2.0.3-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-06-28-knife4j-2.0.4-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-09-14-knife4j-2.0.5-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-10-26-knife4j-2.0.6-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-11-02-knife4j-2.0.7-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2020-11-22-knife4j-2.0.8-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/2021-06-28-knife4j-2.0.9-issueweekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.0weekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.1weekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.2weekly0.5https://doc.xiaominfo.com/docs/changelog/x/4.3weekly0.5https://doc.xiaominfo.com/docs/communityweekly0.5https://doc.xiaominfo.com/docs/community/apacheweekly0.5https://doc.xiaominfo.com/docs/community/changelogweekly0.5https://doc.xiaominfo.com/docs/community/community-get-helpsweekly0.5https://doc.xiaominfo.com/docs/community/contributingweekly0.5https://doc.xiaominfo.com/docs/community/donateweekly0.5https://doc.xiaominfo.com/docs/community/joinusweekly0.5https://doc.xiaominfo.com/docs/community/simple-demoweekly0.5https://doc.xiaominfo.com/docs/community/sourcecodeweekly0.5https://doc.xiaominfo.com/docs/donateweekly0.5https://doc.xiaominfo.com/docs/faqweekly0.5https://doc.xiaominfo.com/docs/faq/format-exceptionweekly0.5https://doc.xiaominfo.com/docs/faq/knife4j-exceptionweekly0.5https://doc.xiaominfo.com/docs/faq/md-format-errorweekly0.5https://doc.xiaominfo.com/docs/faq/sp-nmerrorweekly0.5https://doc.xiaominfo.com/docs/faq/springboot-404weekly0.5https://doc.xiaominfo.com/docs/faq/springmvc-404weekly0.5https://doc.xiaominfo.com/docs/faq/springmvc-notshowweekly0.5https://doc.xiaominfo.com/docs/faq/swagger-des-not-foundweekly0.5https://doc.xiaominfo.com/docs/faq/swaggerResourceInvalidweekly0.5https://doc.xiaominfo.com/docs/faq/upload-errorweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-base64-responseweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-no-openapiweekly0.5https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-paramweekly0.5https://doc.xiaominfo.com/docs/featuresweekly0.5https://doc.xiaominfo.com/docs/features/accessControlweekly0.5https://doc.xiaominfo.com/docs/features/afterScriptweekly0.5https://doc.xiaominfo.com/docs/features/apiSortweekly0.5https://doc.xiaominfo.com/docs/features/authorweekly0.5https://doc.xiaominfo.com/docs/features/clearCacheweekly0.5https://doc.xiaominfo.com/docs/features/customFooterweekly0.5https://doc.xiaominfo.com/docs/features/customHomeweekly0.5https://doc.xiaominfo.com/docs/features/dynamicRequestDescriptionweekly0.5https://doc.xiaominfo.com/docs/features/dynamicRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/dynamicResponseDescriptionweekly0.5https://doc.xiaominfo.com/docs/features/enhanceweekly0.5https://doc.xiaominfo.com/docs/features/exportDocumentweekly0.5https://doc.xiaominfo.com/docs/features/filterRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/forbidDebugweekly0.5https://doc.xiaominfo.com/docs/features/forbidOpenApiweekly0.5https://doc.xiaominfo.com/docs/features/forbidSearchweekly0.5https://doc.xiaominfo.com/docs/features/gitVersionweekly0.5https://doc.xiaominfo.com/docs/features/globalParameterweekly0.5https://doc.xiaominfo.com/docs/features/hostweekly0.5https://doc.xiaominfo.com/docs/features/i18nweekly0.5https://doc.xiaominfo.com/docs/features/includeRequestParameterweekly0.5https://doc.xiaominfo.com/docs/features/jsr303weekly0.5https://doc.xiaominfo.com/docs/features/oauth2weekly0.5https://doc.xiaominfo.com/docs/features/postmanweekly0.5https://doc.xiaominfo.com/docs/features/requestCacheweekly0.5https://doc.xiaominfo.com/docs/features/searchweekly0.5https://doc.xiaominfo.com/docs/features/selfdocumentweekly0.5https://doc.xiaominfo.com/docs/features/springSecurityweekly0.5https://doc.xiaominfo.com/docs/features/swaggermodelsweekly0.5https://doc.xiaominfo.com/docs/features/tagSortweekly0.5https://doc.xiaominfo.com/docs/introductionweekly0.5https://doc.xiaominfo.com/docs/introduction/gvpweekly0.5https://doc.xiaominfo.com/docs/introduction/introduction-backgroundweekly0.5https://doc.xiaominfo.com/docs/introduction/milestoneweekly0.5https://doc.xiaominfo.com/docs/introduction/supportweekly0.5https://doc.xiaominfo.com/docs/introduction/uiweekly0.5https://doc.xiaominfo.com/docs/middlewareweekly0.5https://doc.xiaominfo.com/docs/middleware-sourcesweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-cloudweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-diskweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-eurekaweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/aggregation-nacosweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-functionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-openapiweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/cloud-useweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-installweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-modeweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-service-modeweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-testweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop-useweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-diskweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/config-nacosweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/desktop/service-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jAggregationweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jAggregationDesktopweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/knife4jCloudweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/spring-cloud-gateway/spring-gateway-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware-sources/spring-webflux/spring-webflux-introductionweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jAggregationweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jAggregationDesktopweekly0.5https://doc.xiaominfo.com/docs/middleware/knife4jCloudweekly0.5https://doc.xiaominfo.com/docs/middleware/middleware-aggregationweekly0.5https://doc.xiaominfo.com/docs/middleware/middleware-desktopweekly0.5https://doc.xiaominfo.com/docs/oasweekly0.5https://doc.xiaominfo.com/docs/oas/annotation-introductionweekly0.5https://doc.xiaominfo.com/docs/oas/oas-textweekly0.5https://doc.xiaominfo.com/docs/oas/openapi-speweekly0.5https://doc.xiaominfo.com/docs/oas/openapi2weekly0.5https://doc.xiaominfo.com/docs/oas/openapi2-annotationweekly0.5https://doc.xiaominfo.com/docs/oas/openapi3weekly0.5https://doc.xiaominfo.com/docs/oas/openapi3-annotationweekly0.5https://doc.xiaominfo.com/docs/oas/OpenAPI3-specificationweekly0.5https://doc.xiaominfo.com/docs/quick-startweekly0.5https://doc.xiaominfo.com/docs/quick-start/start-knife4j-versionweekly0.5https://doc.xiaominfo.com/docs/solutionweekly0.5https://doc.xiaominfo.com/docs/solution/adminweekly0.5https://doc.xiaominfo.com/docs/solution/extensionweekly0.5https://doc.xiaominfo.com/docs/solution/knife4j-admin-deployweekly0.5https://doc.xiaominfo.com/docs/solution/knife4j-admin-downloadweekly0.5https://doc.xiaominfo.com/docs/solution/serviceweekly0.5https://doc.xiaominfo.com/docs/solution/ui-frontweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-gatewayweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-nginxweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-staticweekly0.5https://doc.xiaominfo.com/docs/solution/ui-front-zuulweekly0.5https://doc.xiaominfo.com/docs/upgradingweekly0.5https://doc.xiaominfo.com/docs/upgrading/upgrading-to-v2weekly0.5https://doc.xiaominfo.com/docs/upgrading/upgrading-to-v4weekly0.5https://doc.xiaominfo.com/docs/v4weekly0.5https://doc.xiaominfo.com/weekly0.5 \ No newline at end of file diff --git a/knife4j-doc/gitee/versions.html b/knife4j-doc/gitee/versions.html index 7aadfac7c..552cb4b99 100644 --- a/knife4j-doc/gitee/versions.html +++ b/knife4j-doc/gitee/versions.html @@ -10,16 +10,15 @@ - -Knife4j - - +Knife4j + +
-

Knife4j Versions

New versions of Apify SDK are released once a month or so. With major releases once a year.

Current version (Stable)

DocumentationRelease Notes

This is the version that is configured automatically when you first install Apify SDK.

Pre-release versions

masterDocumentationSource Code

Past Versions

Here you can find previous versions of the documentation.

You can find past versions of this project on GitHub.

- - +

Knife4j Versions

New versions of Apify SDK are released once a month or so. With major releases once a year.

Current version (Stable)

DocumentationRelease Notes

This is the version that is configured automatically when you first install Apify SDK.

Pre-release versions

masterDocumentationSource Code

Past Versions

Here you can find previous versions of the documentation.

You can find past versions of this project on GitHub.

+ +