"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[6073],{2241:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>o});var i=s(5893),r=s(1151);const c={id:"appsettings",title:"1. \u5e94\u7528\u914d\u7f6e",sidebar_label:"1. \u5e94\u7528\u914d\u7f6e"},t=void 0,d={id:"settings/appsettings",title:"1. \u5e94\u7528\u914d\u7f6e",description:"\u5982\u9700\u7f16\u5199\u914d\u7f6e\u7684\u65f6\u5019\u63d0\u4f9b\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c\uff0c\u53ef\u67e5\u770b \u30102.7 JSON Schema \u4f7f\u7528\u3011",source:"@site/docs/settings/appsettings.mdx",sourceDirName:"settings",slug:"/settings/appsettings",permalink:"/docs/settings/appsettings",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/settings/appsettings.mdx",tags:[],version:"current",lastUpdatedBy:"MonkSoul",lastUpdatedAt:1663034296,formattedLastUpdatedAt:"Sep 13, 2022",frontMatter:{id:"appsettings",title:"1. \u5e94\u7528\u914d\u7f6e",sidebar_label:"1. \u5e94\u7528\u914d\u7f6e"},sidebar:"settings",next:{title:"2. \u8de8\u57df\u914d\u7f6e",permalink:"/docs/settings/corsaccessorsettings"}},l={},o=[{value:"1.1 \u5173\u4e8e\u914d\u7f6e",id:"11-\u5173\u4e8e\u914d\u7f6e",level:2},{value:"1.2 \u914d\u7f6e\u4fe1\u606f",id:"12-\u914d\u7f6e\u4fe1\u606f",level:2},{value:"1.3 \u914d\u7f6e\u793a\u4f8b",id:"13-\u914d\u7f6e\u793a\u4f8b",level:2},{value:"1.4 \u7279\u522b\u6ce8\u610f",id:"14-\u7279\u522b\u6ce8\u610f",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.admonition,{title:"\u914d\u7f6e\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c",type:"tip",children:[(0,i.jsxs)(n.p,{children:["\u5982\u9700\u7f16\u5199\u914d\u7f6e\u7684\u65f6\u5019\u63d0\u4f9b\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c\uff0c\u53ef\u67e5\u770b \u3010",(0,i.jsx)(n.a,{href:"../jsonschema",children:"2.7 JSON Schema \u4f7f\u7528"}),"\u3011"]}),(0,i.jsxs)(n.p,{children:["\u53ea\u9700\u8981\u5728 ",(0,i.jsx)(n.code,{children:".json"})," \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4e0b\u5217\u914d\u7f6e\u5373\u53ef\uff1a"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2}",children:'{\r\n "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json"\r\n}\n'})})]}),"\n",(0,i.jsx)(n.h2,{id:"11-\u5173\u4e8e\u914d\u7f6e",children:"1.1 \u5173\u4e8e\u914d\u7f6e"}),"\n",(0,i.jsxs)(n.p,{children:["\u5e94\u7528\u914d\u7f6e\u6307\u7684\u662f ",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u5168\u5c40\u914d\u7f6e\u9009\u9879\u3002"]}),"\n",(0,i.jsx)(n.h2,{id:"12-\u914d\u7f6e\u4fe1\u606f",children:"1.2 \u914d\u7f6e\u4fe1\u606f"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"AppSettings"}),"\uff1a\u914d\u7f6e\u6839\u8282\u70b9","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"InjectMiniProfiler"}),"\uff1a\u662f\u5426\u6ce8\u5165 ",(0,i.jsx)(n.code,{children:"MiniProfiler"}),"\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u5173\u95ed Swagger \u5de6\u4e0a\u89d2\u76d1\u542c"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"InjectSpecificationDocument"}),"\uff1a\u662f\u5426\u542f\u7528 ",(0,i.jsx)(n.code,{children:"Swagger"})," \u6587\u6863\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"}),"\uff0c",(0,i.jsx)(n.strong,{children:"\u751f\u4ea7\u73af\u5883\u53ef\u5173\u95ed"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"EnabledReferenceAssemblyScan"}),"\uff1a\u662f\u5426\u542f\u7528\u901a\u8fc7 ",(0,i.jsx)(n.code,{children:"dll"})," \u65b9\u5f0f\u6dfb\u52a0\u7684\u5f15\u7528\u7a0b\u5e8f\u96c6\u626b\u63cf\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ExternalAssemblies"}),"\uff1a\u914d\u7f6e\u5916\u90e8\u7a0b\u5e8f\u96c6\u5b8c\u6574\u8def\u5f84\uff0c\u652f\u6301\u52a8\u6001\u52a0\u8f7d\uff0c",(0,i.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ExcludeAssemblies"}),"\uff1a\u6392\u9664\u626b\u63cf\u7684\u7a0b\u5e8f\u96c6\u540d\u79f0\uff0c",(0,i.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"PrintDbConnectionInfo"}),"\uff1a\u662f\u5426\u6253\u5370\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f\u5230 ",(0,i.jsx)(n.code,{children:"MiniProfiler"})," \u4e2d\uff0c",(0,i.jsx)(n.code,{children:"bool"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"SupportPackageNamePrefixs"}),"\uff1a\u914d\u7f6e\u652f\u6301\u7684\u5305\u524d\u7f00\u540d\uff0c",(0,i.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"[]"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"OutputOriginalSqlExecuteLog"}),"\uff1a\u662f\u5426\u8f93\u51fa\u539f\u59cb Sql \u6267\u884c\u65e5\u5fd7\uff08ADO.NET\uff09\uff0c\u9ed8\u8ba4 ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"VirtualPath"}),"\uff1a\u914d\u7f6e\u865a\u62df\u76ee\u5f55\uff0c\u5fc5\u987b\u4ee5 ",(0,i.jsx)(n.code,{children:"/"})," \u5f00\u5934"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"13-\u914d\u7f6e\u793a\u4f8b",children:"1.3 \u914d\u7f6e\u793a\u4f8b"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "AppSettings": {\r\n "InjectMiniProfiler": false\r\n }\r\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"14-\u7279\u522b\u6ce8\u610f",children:"1.4 \u7279\u522b\u6ce8\u610f"}),"\n",(0,i.jsxs)(n.p,{children:["\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c",(0,i.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u4f1a\u81ea\u52a8\u626b\u63cf\u6839\u76ee\u5f55\u4e0b\u7684 ",(0,i.jsx)(n.code,{children:"*.json"})," \u548c ",(0,i.jsx)(n.code,{children:"*.config.xml"})," \u6587\u4ef6\u8f7d\u5165\u914d\u7f6e\u4e2d\uff0c\u5982\u9700\u5ffd\u7565\u4e2a\u522b\u6587\u4ef6\uff0c\u9700\u5728 ",(0,i.jsx)(n.code,{children:"appsettings.json"})," \u914d\u7f6e\u6587\u4ef6\u6839\u8282\u70b9\u4e0b\u914d\u7f6e ",(0,i.jsx)(n.code,{children:"IgnoreConfigurationFiles"})," \u8282\u70b9\u5373\u53ef\uff0c",(0,i.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b\uff0c\u5982\uff1a"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "IgnoreConfigurationFiles": ["runtime.json"]\r\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u9700\u8981\u81ea\u5b9a\u4e49\u626b\u63cf\u76ee\u5f55\uff08\u975e\u6839\u76ee\u5f55\uff09\uff0c\u9700\u5728 ",(0,i.jsx)(n.code,{children:"appsettings.json"})," \u4e2d\u6dfb\u52a0\u4e0b\u9762\u914d\u7f6e\uff1a"]}),"\n",(0,i.jsx)(n.admonition,{title:"\u652f\u6301\u7248\u672c",type:"important",children:(0,i.jsxs)(n.p,{children:["\u5728 ",(0,i.jsx)(n.code,{children:"v2.16.7+"})," \u7248\u672c\u6709\u6548"]})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "ConfigurationScanDirectories": ["\u76ee\u5f551\u540d\u79f0", "\u76ee\u5f551\u540d\u79f0/\u5b50\u76ee\u5f55\u540d\u79f0"]\r\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsxs)(n.strong,{children:["\u5fc5\u987b\u5728 ",(0,i.jsx)(n.code,{children:"appsettings.json"})," \u6587\u4ef6\u4e2d\u914d\u7f6e\u624d\u6709\u6548"]})})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>d,a:()=>t});var i=s(7294);const r={},c=i.createContext(r);function t(e){const n=i.useContext(c);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]);