Spring Boot 2 yml文件读取异常
2019-08-21 本文已影响0人
一生逍遥一生
在Spring Boot 2 中可以使用properties文件或者yml文件作为配置文件,在使用yml文件的过程中,碰到的问题,以及解决方法:
例如:
management:
endpoints:
web:
exposure:
include: *
这样的话,就会报错,需要田间单引号或者双引号进行注释,防止报错,解决方案为:
management:
endpoints:
web:
exposure:
include: '*' #单引号或者双引号都可以