Java Dropwizard-部署时,由于yml文件格式错误,应用程序无法运行

Java Dropwizard-部署时,由于yml文件格式错误,应用程序无法运行,java,format,dropwizard,metrics,Java,Format,Dropwizard,Metrics,我们正在尝试使用Dropwizard metrics将自动化度量添加到Java应用程序中。到目前为止,config.yml文件如下所示: metrics: reporters: - type: log logger: metrics frequency: 5 minute includes: "io.dropwizard.jetty.MutableServletContextHandler.active-requests","io.dropwizard.jetty

我们正在尝试使用Dropwizard metrics将自动化度量添加到Java应用程序中。到目前为止,config.yml文件如下所示:

metrics:
  reporters:
  - type: log
    logger: metrics
    frequency: 5 minute
    includes: "io.dropwizard.jetty.MutableServletContextHandler.active-requests","io.dropwizard.jetty.MutableServletContextHandler.active-dispatches","io.dropwizard.jetty.MutableServletContextHandler.active-suspended"
运行此项目时,我们收到一个错误,指出yaml文件格式不正确:

io.dropwizard.configuration.ConfigurationParsingException: test/config.yml has an error:
  * Malformed YAML at line: 24, column: 82; while parsing a block mapping
 in 'reader', line 20, column 5:
      - type: log
        ^
expected <block end>, but found FlowEntry
 in 'reader', line 23, column 81:
     ... tContextHandler.active-requests","io.dropwizard.jetty.MutableSer ...
                                         ^
io.dropwizard.configuration.ConfigurationParsingException:test/config.yml有一个错误:
*第24行第82列的YAML格式不正确;在分析块映射时
在“阅读器”第20行第5列:
-类型:原木
^
应为,但找到FlowEntry
在“阅读器”第23行第81列:
... tContextHandler.active requests“,”io.dropwizard.jetty.MutableSer。。。
^
yaml的书写方式到底有什么问题?我的理解是,缩进、空格和引号中没有逗号是正确的,我们无法找到任何其他问题。

只需将第6行更改为


包括:[io.dropwizard.jetty.MutableServletContextHandler.active requests,io.dropwizard.jetty.MutableServletContextHandler.active dispatches,io.dropwizard.jetty.MutableServletContextHandler.active suspended]

似乎表示值的
集有其他格式: