美文网首页
Spring Boot 2 yml文件读取异常

Spring Boot 2 yml文件读取异常

作者: 一生逍遥一生 | 来源:发表于2019-08-21 15:53 被阅读0次

在Spring Boot 2 中可以使用properties文件或者yml文件作为配置文件,在使用yml文件的过程中,碰到的问题,以及解决方法:
例如:

management:
  endpoints:
    web:
      exposure:
        include: *

这样的话,就会报错,需要田间单引号或者双引号进行注释,防止报错,解决方案为:

management:
  endpoints:
    web:
      exposure:
        include: '*'  #单引号或者双引号都可以

相关文章

网友评论

      本文标题:Spring Boot 2 yml文件读取异常

      本文链接:https://www.haomeiwen.com/subject/ojcisctx.html