spring-boot-actuator

How can I use RequestHeader with actuator endpoint?

这一生的挚爱 提交于 2020-08-24 10:31:30
问题 I have customized my actuator/info endpoint and I want to use information from the header to authorize a RestTemplate call to another service. I am implementing the InfoContributor as here: https://www.baeldung.com/spring-boot-info-actuator-custom I want to accept request headers in the contribute() method. For any user defined REST endpoint, I can define a @RequestHeader parameter and access headers. But unfortunately, the InfoContributor 's contribute() method takes only one parameter. How

@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) vs ManagementServerProperties.ACCESS_OVERRIDE_ORDER in Spring Security

久未见 提交于 2020-08-21 05:33:50
问题 Question1: In Spring Security, what exactly is the function @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) Spring Documentation States the below, but I am not sure I understand it clearly To override the access rules without changing any other autoconfigured features add a @Bean of type WebSecurityConfigurerAdapter with @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) . The ordering of various security features in Spring Security are as below as per my understanding (LowestValue i.e.

@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) vs ManagementServerProperties.ACCESS_OVERRIDE_ORDER in Spring Security

大城市里の小女人 提交于 2020-08-21 05:33:08
问题 Question1: In Spring Security, what exactly is the function @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) Spring Documentation States the below, but I am not sure I understand it clearly To override the access rules without changing any other autoconfigured features add a @Bean of type WebSecurityConfigurerAdapter with @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) . The ordering of various security features in Spring Security are as below as per my understanding (LowestValue i.e.

Spring Cloud Stream - Actuator endpoint

孤街浪徒 提交于 2020-08-11 05:09:43
问题 I'm trying to expose Spring Boot actuator endpoint for my binding configuration. My app is quite simple just with couple of KStream bindings. It is written in functional way without any "binding" annotations like @EnableBinding or @StreamListener . It is up and running and when I access /actuator/bindings it crashes with following exception: Binding implementation `org.springframework.cloud.stream.binder.DefaultBinding` must implement this operation before it is called (through reference

Spring Cloud Stream - Actuator endpoint

前提是你 提交于 2020-08-11 05:09:09
问题 I'm trying to expose Spring Boot actuator endpoint for my binding configuration. My app is quite simple just with couple of KStream bindings. It is written in functional way without any "binding" annotations like @EnableBinding or @StreamListener . It is up and running and when I access /actuator/bindings it crashes with following exception: Binding implementation `org.springframework.cloud.stream.binder.DefaultBinding` must implement this operation before it is called (through reference

Kubernetes liveness - Reserve threads/memory for a specific endpoint with Spring Boot

那年仲夏 提交于 2020-08-08 06:08:53
问题 Do you know (if it is possible) how to reserve threads/memory for a specific endpoint in a spring boot microservice? I've one microservice that accepts HTTP Requests via Spring MVC , and those requests trigger http calls to 3rd system , which sometimes is partially degraded, and it responds very slow. I can't reduce the timeout time because there are some calls that are very slow by nature. I've the spring-boot-actuator /health endpoint enabled and I use it like a container livenessProbe in a

Whitelabel Error coming when trying to integrate @ManagementContextConfiguration in META-INF/spring.factories

冷暖自知 提交于 2020-07-23 06:43:05
问题 I am building Spring boot gradle application. I am trying to add an additional port for the actuator endpoint with Undertow. Code : SecondActuatorPortConfiguration.java package com.test.config; import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration; import org.springframework.boot.actuate.autoconfigure.web.ManagementContextType; import org.springframework.boot.web.embedded.undertow.UndertowBuilderCustomizer; import org.springframework.context.annotation.Bean;

Whitelabel Error coming when trying to integrate @ManagementContextConfiguration in META-INF/spring.factories

纵然是瞬间 提交于 2020-07-23 06:42:32
问题 I am building Spring boot gradle application. I am trying to add an additional port for the actuator endpoint with Undertow. Code : SecondActuatorPortConfiguration.java package com.test.config; import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration; import org.springframework.boot.actuate.autoconfigure.web.ManagementContextType; import org.springframework.boot.web.embedded.undertow.UndertowBuilderCustomizer; import org.springframework.context.annotation.Bean;

Spring Boot app + Kubernetes liveness/readiness checks

青春壹個敷衍的年華 提交于 2020-07-04 07:54:17
问题 I'm building a few Spring Boot microservices that are getting deployed in a Kubernetes (AKS specifically) cluster. I was planning on setting the probePaths for the liveness & readiness check to both point at the actuator health endpoint, but was wondering if that may not be the best option. My original thinking was that checking the path would be useful (at least for readiness) so that traffic wouldn't be sent to it until Spring has started up and is capable of handling requests. Since these

Prometheus config doesn't work with Spring boot 2.3.0: ClassNotFoundException: io.micrometer.prometheus.HistogramFlavor

北战南征 提交于 2020-06-17 00:09:32
问题 Application was working correctly with version 2.2.6 but as the application is upgraded to latest version of spring boot 2.3.0 it stopped working and fails during startup. 2020-05-20T08:43:04.408+01:00 [APP/PROC/WEB/0] [OUT] 2020-05-20 07:43:04.407 ERROR 15 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class