appsettings.json 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. {
  2. "Sers": {
  3. /* 通讯层配置 */
  4. "CL": {
  5. /* 共用配置,子项共用,覆写子项未指定的配置 */
  6. "Config": {
  7. "workThread": {
  8. // 模式,可为 LongTask(默认)、LongTask_TimeLimit、AsyncTask、ConsumerCascade。对应threadCount默认值分别为: 16、16、1000、16
  9. "mode": "LongTask",
  10. /* 后台处理消息的线程个数(单位个)(0代表不开启服务) */
  11. "threadCount": 2,
  12. /* 请求超时时间(单位ms,默认300000),仅当mode为LongTask_TimeLimit、AsyncTask时有效 */
  13. "timeoutMs": 300000
  14. },
  15. /* 请求超时时间(单位ms,默认300000) */
  16. "requestTimeoutMs": 300000,
  17. //HeartBeat
  18. /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
  19. "heartBeatIntervalMs": 10000,
  20. /* 心跳检测超时时间(单位ms,默认30000) */
  21. "heartBeatTimeoutMs": 30000,
  22. /* 心跳检测失败重试次数(单位次,默认10) */
  23. "heartBeatRetryCount": 10,
  24. /* 数据传输 加密协议,可多个,可不指定 */
  25. "//security": [
  26. {
  27. // SampleSecurity
  28. /* 在此Assembly中查找security */
  29. "assemblyFile": "Sers.Core.dll",
  30. /* the class of security in assemblyFile. 必须继承接口 Sers.Core.Util.StreamSecurity.ISecurity */
  31. "className": "Sers.Core.Util.StreamSecurity.Security.SampleSecurity",
  32. /* (x.2) config */
  33. /* 加密密钥 */
  34. "secret": "security"
  35. },
  36. {
  37. // SampleSecurity
  38. /* 若不指定assemblyFile和className 则默认为Sers.Core.Util.StreamSecurity.Security.SampleSecurity */
  39. "secret": "Two layer encryption"
  40. }
  41. ],
  42. /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
  43. "secretKey": "SersCL"
  44. },
  45. /* one conn is one channel.can be multiable */
  46. "Server": [
  47. {
  48. //Ipc.NamedPipe
  49. /* (x.1) type */
  50. /* 在此Assembly中查找builder */
  51. "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
  52. /* the class of builder in assemblyFile */
  53. //"className": "Sers.CL.Ipc.NamedPipe.OrganizeServerBuilder",
  54. /* (x.2) config */
  55. /* 命名管道名称。例如: "Sers.CL.Ipc" */
  56. "pipeName": "Sers.CL.Ipc.4501"
  57. },
  58. {
  59. // Socket.Iocp
  60. /* (x.1) type - Iocp */
  61. /* the class of builder in assemblyFile */
  62. "className": "Sers.CL.Socket.Iocp.OrganizeServerBuilder",
  63. /* 通信模式(默认值:Simple)。可为 Simple、Timer、ThreadWait */
  64. //"mode": "ThreadWait",
  65. /* 接收缓存区大小(单位:byte,默认:8192) */
  66. //"receiveBufferSize": 8192,
  67. /* 发送缓冲区刷新间隔(单位:毫秒,默认:1)(仅当mode为Timer和ThreadWait时有效) */
  68. //"sendFlushInterval": 1,
  69. /* 发送缓冲区数据块的最小大小(单位:byte,默认 1000000)(仅当mode为Timer和ThreadWait时有效) */
  70. //"sendBufferSize": 1000000,
  71. /* 发送缓冲区个数(默认1024)(仅当mode为Timer和ThreadWait时有效) */
  72. //"sendBufferCount": 1024,
  73. /* (x.2) config */
  74. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
  75. //"host": "127.0.0.1",
  76. /* 服务端 监听端口号。例如: 4501 */
  77. "port": 4501
  78. },
  79. {
  80. // Socket.ThreadWait
  81. /* (x.1) type - Socket */
  82. /* the class of builder in assemblyFile */
  83. //"className": "Sers.CL.Socket.ThreadWait.OrganizeServerBuilder",
  84. /* (x.2) config */
  85. /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
  86. //"host": "127.0.0.1",
  87. /* 服务端 监听端口号。例如: 4501 */
  88. "port": 4501
  89. },
  90. {
  91. // Zmq.ThreadWait
  92. /* (x.1) type */
  93. /* 在此Assembly中查找builder */
  94. "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
  95. /* the class of builder in assemblyFile */
  96. //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeServerBuilder",
  97. /* (x.2) config */
  98. /* 地址。例如: "tcp://*:4502" 、 "ipc://4502" */
  99. "endpoint": "tcp://*:4502"
  100. },
  101. {
  102. // WebSocket
  103. /* (x.1) type - Iocp */
  104. /* 在此Assembly中查找builder */
  105. "assemblyFile": "Sers.CL.WebSocket.dll",
  106. /* the class of builder in assemblyFile */
  107. //"className": "Sers.CL.WebSocket.OrganizeServerBuilder",
  108. /* (x.2) config */
  109. /* 服务端地址(默认为 "ws://0.0.0.0:4503") */
  110. "host": "ws://0.0.0.0:4503"
  111. },
  112. {
  113. // Zmq.FullDuplex
  114. /* (x.1) type */
  115. /* 在此Assembly中查找builder */
  116. "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
  117. /* the class of builder in assemblyFile */
  118. //"className": "Sers.CL.Zmq.FullDuplex.OrganizeServerBuilder",
  119. /* (x.2) config */
  120. /* 地址。例如: "tcp://*:4504" 、 "ipc://4504" */
  121. "endpoint": "tcp://*:4504"
  122. },
  123. {
  124. //Ipc.SharedMemory
  125. /* (x.1) type - Ipc.SharedMemory */
  126. /* 在此Assembly中查找builder */
  127. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  128. /* the class of builder in assemblyFile */
  129. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
  130. /* (x.2) config */
  131. /* 共享内存名称。例如: "ipcTest" */
  132. "name": "ipcForStationDemo",
  133. /* 共享内存节点个数。例如: 64 */
  134. "nodeCount": 128,
  135. /* 共享内存节点大小。例如: 2048 */
  136. "nodeBufferSize": 102400
  137. },
  138. {
  139. /* (x.1) type - Ipc.SharedMemory */
  140. /* 在此Assembly中查找builder */
  141. "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
  142. /* the class of builder in assemblyFile */
  143. //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
  144. /* (x.2) config */
  145. /* 共享内存名称。例如: "ipcTest" */
  146. "name": "ipcForRobot",
  147. /* 共享内存节点个数。例如: 64 */
  148. "nodeCount": 128,
  149. /* 共享内存节点大小。例如: 2048 */
  150. "nodeBufferSize": 102400
  151. }
  152. ]
  153. },
  154. // RpcData序列化模式。可不指定。默认为Text。
  155. // 可为 Newtonsoft、Text、BytePointor。
  156. // 效率依次递增。BytePointor 序列化为二进制数据而不是json字符串。
  157. "RpcDataSerializeMode": "Text",
  158. /* LocalApiService 配置,可不指定 */
  159. "LocalApiService": {
  160. /* 是否 输出本地Api的调用信息到(ApiTrace)Log文件。默认:false */
  161. "PrintTrace": false,
  162. "workThread": {
  163. // 模式,可为 LongTask(默认)、LongTask_TimeLimit、AsyncTask、ConsumerCascade。对应threadCount默认值分别为: 16、16、1000、16
  164. "mode": "LongTask",
  165. /* 后台处理消息的线程个数(单位个)(0代表不开启服务) */
  166. "//threadCount": 16,
  167. /* 请求超时时间(单位ms,默认300000),仅当mode为LongTask_TimeLimit、AsyncTask时有效 */
  168. "timeoutMs": 300000
  169. },
  170. /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
  171. "//staticFiles": [
  172. {
  173. /* api路由前缀,例如 "/demo/ui/*" */
  174. "route": "/demo/ui/*",
  175. /* api描述,静态文件描述 */
  176. "apiName": "demo站点静态文件",
  177. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
  178. "rootPath": "wwwroot/demo",
  179. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  180. "contentTypeMapFile": "contentTypeMap.json",
  181. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  182. "responseHeaders": {
  183. //设置浏览器静态文件缓存3600秒
  184. "Cache-Control": "public,max-age=3600"
  185. }
  186. }
  187. ],
  188. /* 默认站点名称,可多个,可不指定 */
  189. //"apiStationNames": [ "demo" ],
  190. /* Api加载器配置 */
  191. "//ApiLoaders": [
  192. {
  193. /* 在此Assembly中查找api加载器(如 Sers.Core.dll 、Sers.NetcoreLoader.dll 、 Sers.Serslot.dll ) */
  194. //"loader_assemblyFile": "Sers.Core.dll",
  195. /* 加载器的类名,可为 Sers.SersLoader.ApiLoader 、 Sers.NetcoreLoader.ApiLoader、 Sers.Serslot.ApiLoader 等。若不指定则默认为"Sers.SersLoader.ApiLoader" */
  196. //"loader_className": "Sers.SersLoader.ApiLoader",
  197. //(通过反射从此包中获取要加载的api)
  198. /* 在此Assembly中查找服务(如 Did.SersLoader.Demo.dll)(assembly、assemblyFile、assemblyName 指定任一即可) */
  199. "assemblyFile": "Did.SersLoader.Demo.dll",
  200. /* 在此Assembly中查找服务(如 Did.SersLoader.Demo)(assembly、assemblyFile、assemblyName 指定任一即可) */
  201. //"assemblyName": "Did.SersLoader.Demo",
  202. /* 强制指定ApiStation名称。可不指定。(优先级从高到低: apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
  203. //"apiStationName_Force": "",
  204. /* ApiStation名称。可不指定。(优先级从高到低: apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
  205. "apiStationName": "demo"
  206. /* 强制路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低: routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix) */
  207. //"routePrefix_Force": "",
  208. /* 路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低: routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix ) */
  209. //"routePrefix": ""
  210. }
  211. ],
  212. /* 调用Api时的自定义Scope对象。可不指定。事件顺序为 OnCreateScope -> BeforeCallApi -> OnDispose */
  213. "//OnCreateScope": [
  214. {
  215. /* 在此Assembly中加载类 */
  216. "assemblyFile": "Sers.ApiTrace.dll",
  217. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScopeEvent */
  218. "className": "Sers.ApiTrace.ApiScope"
  219. }
  220. ],
  221. /* 调用api前的事件,可不指定。事件顺序为 OnCreateScope -> BeforeCallApi -> OnDispose */
  222. "//BeforeCallApi": [
  223. {
  224. /* 在此Assembly中加载类 */
  225. "assemblyFile": "Sers.Core.dll",
  226. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  227. "className": "Bearer",
  228. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  229. /* 验证at接口的地址 */
  230. "api_verifyAt": "/AuthCenter/account/verifyAt",
  231. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  232. "api_httpMethod": "POST"
  233. },
  234. {
  235. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  236. "className": "AccountInCookie",
  237. "account": [
  238. {
  239. "userToken": "admin_123456",
  240. //"CallerSource": "Internal",
  241. "userInfo": {
  242. "name": "超级管理员",
  243. "入口": "Gover网关"
  244. }
  245. }
  246. ]
  247. }
  248. ]
  249. },
  250. /* ServiceStation配置,可不指定 */
  251. "ServiceStation": {
  252. /* 自动上报cpu Usage。不指定则不上报 */
  253. "//UsageReporter": {
  254. /* 上报时间间隔(单位:秒) */
  255. "intervalSecond": 2
  256. },
  257. /* serviceStation站点信息 */
  258. "serviceStationInfo": {
  259. /* 服务站点名称 */
  260. "serviceStationName": "ServiceCenter",
  261. /* 服务站点版本信息,若不指定则为入口链接库的版本号 */
  262. //"stationVersion": "2.1.1",
  263. /* [json]服务站点额外信息,可不指定 */
  264. "info": null
  265. }
  266. },
  267. /* ServiceCenter 配置,可不指定 */
  268. "ServiceCenter": {
  269. /* 是否 输出Api注册事件到(Info)Log文件。默认:true */
  270. "ApiRegistEvent_Print": true,
  271. /* api路由管理方式,可不指定。可为:"RESTful","IgnoreHttpMethod"。若不指定或未指定有效值,则默认为"RESTful" */
  272. //"ApiRouteType": "IgnoreHttpMethod",
  273. //调用api前的事件,可不指定
  274. "//BeforeCallApi": [
  275. {
  276. /* 在此Assembly中加载类 */
  277. "assemblyFile": "Sers.Core.dll",
  278. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  279. "className": "Bearer",
  280. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  281. /* 验证at接口的地址 */
  282. "api_verifyAt": "/AuthCenter/account/verifyAt",
  283. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  284. "api_httpMethod": "POST"
  285. },
  286. {
  287. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  288. //"className": "AccountInCookie",
  289. "account": [
  290. {
  291. "userToken": "admin_123456",
  292. //"CallerSource": "Internal",
  293. "userInfo": {
  294. "name": "超级管理员",
  295. "入口": "Gover网关"
  296. }
  297. }
  298. ]
  299. }
  300. ]
  301. },
  302. /* 动态加载的App事件 */
  303. "AppEvent": [
  304. { //记录请求Trace到Zipkin
  305. /* 在此Assembly中加载类 */
  306. "assemblyFile": "Sers.Gover.Apm.Zipkin.dll",
  307. /* 动态加载的类名,必须继承接口 Sers.Core.Module.App.AppEvent.IAppEvent */
  308. //"className": "Sers.Gover.Apm.Zipkin.AppEvent",
  309. //启用Zipkin链路追踪(自动提交应用调用信息)
  310. /* 配置 */
  311. "SamplingRate": "1.0",
  312. "zipkinCollectorUrl": "http://sers.cloud:9411",
  313. /* 若不指定则默认为ServiceCenter */
  314. "rpcName": "ServiceCenter",
  315. "tags": {
  316. // 可为 requestRpc requestData responseRpc responseData
  317. "traceName": "demoTrace",
  318. "route": "{{requestRpc.route}}",
  319. "{{requestRpc.route}}": "route",
  320. "url": "{{requestRpc.http.url}}",
  321. "method": "{{requestRpc.http.method}}",
  322. "requestRpc": "{{requestRpc}}",
  323. //"requestData": "{{requestData}}",
  324. "responseRpc": "{{responseRpc}}",
  325. "responseState": "{{responseRpc.http.headers.responseState}}",
  326. "responseError_Base64": "{{responseRpc.http.headers.responseError_Base64}}"
  327. //"responseData": "{{responseData}}",
  328. //"responseData.error": "{{responseData.error}}"
  329. }
  330. },
  331. { //记录请求Trace到 Log/{yyyy-MM}/[{yyyy-MM-dd}]ApiTrace.txt文件
  332. /* 在此Assembly中加载类 */
  333. "assemblyFile": "Sers.Gover.Apm.Txt.dll",
  334. /* 动态加载的类名,必须继承接口 Sers.Core.Module.App.AppEvent.IAppEvent */
  335. //"className": "Sers.Gover.Apm.Txt.AppEvent",
  336. "tags": {
  337. // 可为 requestRpc requestData responseRpc responseData
  338. "From": "Sers.Gover.Apm.Txt",
  339. "route": "{{requestRpc.route}}",
  340. //"{{requestRpc.route}}": "route",
  341. "url": "{{requestRpc.http.url}}",
  342. "method": "{{requestRpc.http.method}}",
  343. "requestRpc": "{{requestRpc}}",
  344. //"requestData": "{{requestData}}",
  345. "responseRpc": "{{responseRpc}}",
  346. "responseState": "{{responseRpc.http.headers.responseState}}"
  347. //"responseError_Base64": "{{responseRpc.http.headers.responseError_Base64}}"
  348. //"responseData": "{{responseData}}",
  349. //"responseData.error": "{{responseData.error}}"
  350. }
  351. }
  352. ],
  353. /* 网关配置。若不指定,则不开启网关服务 */
  354. "Gateway": {
  355. /* Rpc配置,可不指定 */
  356. "Rpc": {
  357. /* 网关转发的请求中的rpc 信息中的 CallerSource。(暗指调用来源,默认"OutSide") */
  358. //"CallerSource": "OutSide"
  359. },
  360. "WebHost": {
  361. /* url,可多个 */
  362. "urls": [ "http://*:4580" ],
  363. /* 是否允许跨域访问,默认true */
  364. "allowAnyOrigin": true,
  365. /* 把请求的ip地址、端口号复制到请求头中的前缀。若不指定则不复制。 */
  366. "prefixOfCopyIpToHeader": "Sers-Gateway-",
  367. /* http回应中的默认Content-Type。若不指定则默认为 "application/json; charset="+Serialization.Instance.charset */
  368. "//ResponseDefaultContentType": "application/json; charset=UTF-8",
  369. /* 映射静态文件。若不指定则不映射静态文件 */
  370. "staticFiles": {
  371. /* 请求路径(可不指定)。demo:"/file/static"。The relative request path that maps to static resources */
  372. //"requestPath": "/file",
  373. /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
  374. //"rootPath": "wwwroot",
  375. /* 默认页面(可不指定)。An ordered list of file names to select by default. List length and ordering may affect performance */
  376. "defaultFileNames": [ "index.html" ],
  377. /* 是否可浏览目录(default false)。Enables directory browsing */
  378. //"useDirectoryBrowser": false,
  379. /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
  380. "contentTypeMapFile": "contentTypeMap.json",
  381. /* 回应静态文件时额外添加的http回应头。可不指定。 */
  382. "responseHeaders": {
  383. //设置浏览器静态文件缓存3600秒
  384. "Cache-Control": "public,max-age=3600"
  385. }
  386. }
  387. },
  388. //调用api前的事件,可不指定
  389. "BeforeCallApi": [
  390. {
  391. /* 在此Assembly中加载类 */
  392. "assemblyFile": "Sers.Core.dll",
  393. /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
  394. //"className": "Bearer",
  395. //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
  396. /* 验证at接口的地址 */
  397. "api_verifyAt": "/AuthCenter/account/verifyAt",
  398. /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
  399. "api_httpMethod": "POST"
  400. },
  401. {
  402. //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
  403. "className": "AccountInCookie",
  404. "account": [
  405. {
  406. "userToken": "admin_123456",
  407. "CallerSource": "Internal",
  408. "userInfo": {
  409. "name": "Gover管理员",
  410. "入口": "Gover网关"
  411. }
  412. }
  413. ]
  414. }
  415. ],
  416. /* 服务限流配置,可不指定 */
  417. "rateLimit": [
  418. {
  419. /* 服务限流key,标识一个限流服务,必须唯一 */
  420. "rateLimitKey": "rate",
  421. /* 固定时间窗口限流。在单位时间(msInterval)内限制最大请求数量为reqLimit。超出数量的请求将被拒绝 */
  422. "rateLimitType": "FixedWindow",
  423. /* 单位时间内最大请求数量(个)*/
  424. "reqLimit": 100000,
  425. /* 单位时间长度(单位:ms)*/
  426. "msInterval": 1000
  427. }
  428. ]
  429. }
  430. },
  431. /* Vit工具配置,可不指定 */
  432. "Vit": {
  433. /* 日志配置,可不指定 */
  434. "Logger": {
  435. /* print the log to Log/*.txt default:true */
  436. "PrintToTxt": true,
  437. /* print the log to console. default:true */
  438. "PrintToConsole": true
  439. },
  440. /* 队列模式,可不指定。可为 BlockingCollection(默认)、 ConsumerCache_BlockingCollection(高性能) */
  441. "ConsumerMode": "BlockingCollection",
  442. /* 序列化配置,可不指定 */
  443. "Serialization": {
  444. /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
  445. "Encoding": "UTF8",
  446. /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
  447. "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
  448. },
  449. "//Kestrel": {
  450. /* (int64) the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. */
  451. "MaxRequestBodySize": 2000000000,
  452. /* (int32) A limit on the length of individual form values. Forms containing values that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  453. "ValueLengthLimit": 2000000000,
  454. /* (int64) A limit for the length of each multipart body. Forms sections that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
  455. "MultipartBodyLengthLimit": 2000000000
  456. }
  457. }
  458. }