text: (window.webpackJsonp=window.webpackJsonp||[]).push([[293],{386:function(t,s,a){"use strict";a.r(s);var e=a(42),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"_1-2-disk模式"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-2-disk模式"}},[t._v("#")]),t._v(" 1.2 Disk模式")]),t._v(" "),a("blockquote",[a("p",[t._v("更加详细的实战demo请参考"),a("RouterLink",{attrs:{to:"/action/aggregation-disk.html"}},[t._v("基于Disk模式聚合OpenAPI")])],1)]),t._v(" "),a("p",[t._v("Disk模式即代表你拥有OpenAPI规范的静态JSON文件,那么可以考虑使用Knife4jAggregation组件进行聚合展示,目前只支持JSON文件的格式")]),t._v(" "),a("p",[t._v("Disk模式的配置如下：")]),t._v(" "),a("div",{staticClass:"language-yml extra-class"},[a("pre",{pre:!0,attrs:{class:"language-yml"}},[a("code",[a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("knife4j")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("enableAggregation")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("disk")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("enable")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("routes")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 用户\n        "),a("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("location")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" classpath"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("openapi/user.json\n")])])]),a("ul",[a("li",[a("code",[t._v("knife4j.disk.enable")]),t._v(":将该属性设置为true，则代表启用Disk模式")]),t._v(" "),a("li",[a("code",[t._v("knife4j.disk.routes")]),t._v(":需要聚合的服务集合，可以配置多个")]),t._v(" "),a("li",[a("code",[t._v("knife4j.disk.routes.name")]),t._v(":服务名称(显示名称，最终在Ui的左上角下拉框进行显示)")]),t._v(" "),a("li",[a("code",[t._v("knife4j.disk.routes.location")]),t._v(":本地Disk模式聚合的OpenAPI规范JSON文件,可以是V2也可以是V3版本")])]),t._v(" "),a("comment-comment")],1)}),[],!1,null,null,null);s.default=n.exports}}]);