如何启用执行器中的所有端点(Spring Boot 2.0.0 RC1)

如何启用执行器中的所有端点(Spring Boot 2.0.0 RC1),第1张

如何启用执行器中的所有端点(Spring Boot 2.0.0 RC1)

对于Spring Boot 2.0.0.RC1,必须启用执行器端点并暴露2)执行器端点。

默认情况下,所有端点

shutdown
都被启用且仅被启用,
health
并且
info
被公开。

在您的情况下,以下方法应该起作用:

management.endpoints.web.expose=*# if you'd like to expose shutdown:# management.endpoint.shutdown.enabled=true

请注意,从Spring Boot 2.0.0.RC2开始,这再次发生了变化

management.endpoints.web.exposure.include=*# if you'd like to expose shutdown:# management.endpoint.shutdown.enabled=true

毫无疑问,专用的迁移指南始终是最新的变化。

编辑

为了方便复制和粘贴,以下是“ yaml”版本-从Spring Boot 2.0.0.RC2开始:

management:  endpoints:    web:      exposure:        include: "*"

之前:

management:  endpoints:    web:      expose: "*"


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5666469.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存