Spring Boot app with just below configuration for web security:
@EnableWebSecurity
@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter
{
@Override
public void configure(WebSecurity web) throws Exception
{
web.ignoring().antMatchers("/actuator/**");
}
@Override
protected void configure(HttpSecurity http) throws Exception
{
http.authorizeRequests().antMatchers("/").permitAll();
http.csrf().disable();
}
}
application.properites:
management.endpoints.web.exposure.include=health,info,loggers
management.endpoints.web.base-path=/actuator
management.endpoint.health.show-details=always
After starting the app I can see in the logs:
[ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 3 endpoint(s) beneath base path '/actuator'
but then:
bash-5.1$ curl -I --header 'Content-Type: application/json' -X "GET" "http://localhost:8083/actuator/health"
HTTP/1.1 200
Content-Type: application/vnd.spring-boot.actuator.v3+json
Transfer-Encoding: chunked
Date: Thu, 09 Dec 2021 22:26:48 GMT
Any thoughts on why it coming back empty?