加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

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

发布时间:2020-12-15 01:47:07 所属栏目:大数据 来源:网络整理
导读:在spring boot 2应用程序中,我正在尝试访问执行器端点/ bean,就像之前在Spring boot 1.5.*应用程序中所做的那样.但我无能为力. 此外,我没有看到在log.INFO中创建端点. 我的pom.xml包含: 在application.properties中我只有关于数据库连接的信息: spring.jpa

在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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读