0

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

Seydazimov Nurbol
  • 1,404
  • 3
  • 10
  • 25

1 Answers1

0

Couldn't post in comments

can you try below yml, as Star(*) without double quotes was not valid in my IDE, might be your problem is same

management:
  endpoints:
    enabled-by-default: true
    web:
      exposure:
        include:
        - "*"
Shailesh Chandra
  • 2,164
  • 2
  • 17
  • 25