问题标签 [spring-boot-actuator]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
4932 浏览

security - Spring Boot - 仅安全执行器端点

我正在将 Spring Boot ( 1.3.0) 与 Jersey 一起使用(pom 依赖项:spring-boot-starter-jersey、、、、spring-boot-starter-actuator)。spring-boot-starter-webspring-boot-starter-security

我有一个 Jersey 端点(见下文),它非常简单:

server.servlet-path=/system我通过为 Spring MVC url ( )设置特定路径来启用 Spring Boot Actuator ,如Spring Boot guide中所述。
多亏了spring-boot-starter-security,Actuator 端点通过基本身份验证得到保护。

我的问题是它/helloworld也是安全的,但我想让它不安全。

我怎样才能做到这一点 ?

谢谢 !

0 投票
0 回答
647 浏览

spring-boot - Turbine AMQP 未从服务接收到 hystrix.stream

我正在尝试实现 Turbine AMQP 以将来自多个服务的所有 hystrix.stream 合并为一个并将其显示在 hystrix 仪表板中。

我的服务中的 Hystrix.stream 看起来不错:-

我在客户端服务的流中看到的示例:- localhost:4444/hystrix.stream

来自客户端的 Gradle 依赖项:-

所以我确实有一个正在运行的 Rabbit MQ 服务器和 TurboAMQP 项目。

我的turtleAMQP 注释类:-

应用程序.yml

gradle 对 Turbine 的依赖:-

当我尝试点击http://localhost:8989/turbine.stream时,它只会显示 ping,这就是我在尝试放置 turbione.stream 时在日志中看到的内容,尽管它在 hystrix 仪表板中不起作用。

我在这里做错了什么来让turtle.stream工作。

我的涡轮机知道 RabbitMQ,但客户端服务不知道。我是否需要告诉服务我也知道涡轮机知道来自尤里卡的所有 hystrix.stream(s),所以涡轮机负责在 Rabbit MQ 中对 hystrix.stream 进行排队。

感谢您提供任何帮助我已经被困了一段时间了,并且没有很好的例子可以提供帮助。

0 投票
2 回答
12740 浏览

spring - 在 Spring Boot Actuator 中为 /health 端点启用 CORS

/health我们希望为Spring Boot 执行器提供的对端点的所有 GET 请求启用 Cors 。

我们尝试添加以下bean但没有成功

0 投票
1 回答
5465 浏览

spring-boot - 2 部署在同一台服务器上的 Spring Boot 应用程序

我有 2 个 spring boot 应用程序(maven 项目),其中包含“spring-boot-starter-actuator”依赖项,用于检查每个应用程序的运行状况。在 tomcat 服务器中部署这两个应用程序时,我得到以下异常 -

谁能帮我解决这个异常?提前致谢。

0 投票
1 回答
974 浏览

spring-mvc - Spring Boot 执行器信息

我有一个 spring boot 项目,我想为 info 端点添加一些信息。

要添加 spring-boot-actuator,我将它添加到 gradle.build。现在,我想要这样的东西:

}

我想从可以在编译时填写的属性文件中获取大部分值。我的第一种方法是:

但是当我调用 /info 时得到的 JSON 响应是这样的:

首先,我不知道为什么没有替换这些值。我究竟做错了什么?

我最初的想法是在 Manifest.mf 文件中填写我需要的所有值,你知道怎么做吗?

0 投票
2 回答
900 浏览

spring-boot - Spring Boot Actuator Liquibase 端点失败

我正在尝试将 Liquibase 与 Spring Boot 一起使用。这是我的application.properties文件:

更改集应用得很好(可以创建表)。

当我访问/liquibase执行器的端点时出现问题,出现 500 错误:

无法获取 Liquibase 更改日志

我还得到以下日志:

org.postgresql.util.PSQLException:错误:关系“public.databasechangelog”不存在

如果问题是用于访问更改日志表的模式前缀:“public”与“my_schema”。

我认为spring.datasource.schema设置的参数正确吗?

0 投票
1 回答
861 浏览

java - 如何在 Spring Boot Actuator 中注册匿名 HealthIndicators

此链接writing_custom_healthindicators描述了如何注册自定义HealthIndicators以便它们可以与 Spring Boot Actuator 一起使用。链接中的示例用于注册实现接口@Component的自定义类。HealthIndicator

但我正在创建匿名HealthIndicator实例。下面是如何创建这些匿名HealthIndicators实例的示例。

可以说上面的代码在一个 for 循环中,其中HealthIndicators正在创建许多代码。它们如何在 Spring 中注册,以便 Spring Boot Actuator 能够按照链接中的说明识别它们?

0 投票
1 回答
165 浏览

spring - 执行器不工作

我正在尝试在我的 spring boot 应用程序中设置执行器端点,但我无法获得我在 application.yml 中设置的值。这是我到目前为止的配置:

但是,当我尝试访问端点时,我只会得到这个:

那么,我做错了什么?

0 投票
1 回答
895 浏览

java - Springboot端点返回文件

我正在编写一个自定义 Springboot Actuator Endpoint,我想返回一个 File。但是,我找不到返回 JSON 字符串以外的任何内容的方法。

我的端点是:

当我访问 localhost:8080/custoendpoint 时,我收到了我的文件的路径...

任何想法 ?

0 投票
1 回答
450 浏览

spring-boot-actuator - 将 Spring 执行器插件添加到 build.gradle 会引发 BeanCreationException -EndpointAutoConfiguration$InfoPropertiesConfiguration

我有一个工作的 Spring Boot 微服务。应用程序正常启动。我想在我的微服务中实现健康检查,并将 spring 执行器依赖项添加到 build.gradle。现在,添加依赖项后应用程序没有启动。我已经粘贴了下面的堆栈跟踪。