Spring Cloud使用yml配置时,* 报错 Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning

文章目录

    • yml配置
    • 报错信息
    • 解决方案

yml配置

Spring Cloud使用yml配置时,* 报错 Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning_第1张图片

报错信息

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an alias
 in 'reader', line 14, column 18:
            include: *
                     ^
expected alphabetic or numeric character, but found 
(10)
 in 'reader', line 14, column 19:
            include: *
                      ^

Spring Cloud使用yml配置时,* 报错 Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning_第2张图片

解决方案

yml中配置 * ,需要加 ’ ’

management:
  endpoints:
    web:
      exposure:
        include: ‘*‘

你可能感兴趣的:(Spring,Cloud)