微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – Spring boot 2 – Actuator端点,其中是/ beans端点

spring boot 2应用程序中,我正在尝试访问执行器端点/ bean,就像之前在Spring boot 1.5.*应用程序中所做的那样.但我无能为力.
此外,我没有看到在log.INFO中创建端点.

我的pom.xml包含:

在application.properties中我只有关于数据库连接的信息:

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/somedb
spring.datasource.username=someuser
spring.datasource.password=somepass

作为映射的端点,我在信息日志中看到:

/actuator/health
/actuator/info
/actuator

应用程序正在运行但未创建/ application / beans端点.

为什么我的/ beans或/ application / beans端点没有生成,我应该更改它以使其存在?

最佳答案
根据参考文档,默认情况下,此端点不再通过“web”公开.

首先,您需要确保实际启用了“beans”端点:

management.endpoint.beans.enabled=true

在你的spring-boot-configuration中.然后,您需要将其包含在“网络”曝光中:

management.endpoints.web.exposure.include=beans

或者甚至是

management.endpoints.web.exposure.include=*

有关详细信息,请参见https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/htmlsingle/#production-ready-endpoints-enabling-endpoints.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐