网上看到是写在properties的
management.endpoints.web.exposure.include=*
在自己的项目是yml的
management:
endpoints:
web:
exposure:
include: *
写成这样会报错:
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an alias in 'reader', line 69, column 18: include: * ^ expected alphabetic or numeric character, but found
后来找了原因,原来不能直接写 * ,要双引号括起来的
management:
endpoints:
web:
exposure:
include: "*"
当前共有 0 条评论