Every time I get 404 error while asking for localhost:60001/info
, localhost:60001/actuator
or others.
{"timestamp":1570711643410,"status":404,"error":"Not Found","message":"No message available","path":"/loginfo"}
It works only for localhost:60001/metrics
and localhost:60001/health
.
In my application.yml file, I added all settings to enable all possible endpoints.
management:
server:
port: 60001
security:
enabled: false
endpoint:
beans:
enabled: true
health:
show-details: ALWAYS
endpoints:
sensitive: true
web:
exposure:
include: *
PS: I am also questioned about, why JAR file builds successfully even if I will write management settings in application.yml with mistakes. For example, show-details: SOME_NOT_EXISTING_THING
instead of show-details: ALWAYS
I also added SecurityWebFilterChain
bean which I saw in Baeldung tutorial for Spring Boot 2.x Actuator
@Bean
public SecurityWebFilterChain securityWebFilterChain(
ServerHttpSecurity http) {
return http.authorizeExchange()
.pathMatchers("/actuator/**").permitAll()
.anyExchange().authenticated()
.and().build();
}
I tried all possible localhost:60001/
links which have been written in this stackoverflow issue.
PS: http://hostname:portnumber/applicationroot/actuator/health
, http://localhost:60001/loginfo
and others. But it still doesn't work.
I use Spring Boot 2.1.6:RELEASE