【发布时间】:2018-01-11 02:15:08
【问题描述】:
我已在 Dropwizard 中使用此配置禁用请求访问日志记录:
server:
requestLog:
appenders: []
我想通过命令行覆盖它,但我不知道空数组的正确语法是什么。我试过-Ddw.server.requestLog.appenders=[] 或-Ddw.server.requestLog.appenders= 或-Ddw.server.requestLog.appenders='' 但都失败了:
* Failed to parse configuration at: server.requestLog.appenders; Unexpected token (VALUE_STRING), expected FIELD_NAME: missing property 'type' that is to contain type id (for class io.dropwizard.logging.AppenderFactory)
at [Source: N/A; line: -1, column: -1] (through reference chain: metrics.Config["server"]->io.dropwizard.server.DefaultServerFactory["requestLog"]->io.dropwizard.request.logging.LogbackAccessRequestLogFactory["appenders"])
传递空数组的正确方法是什么?
【问题讨论】:
标签: java arrays command-line command-line-arguments dropwizard