Class EndpointPathResolver

java.lang.Object
io.hawt.springboot.EndpointPathResolver

public class EndpointPathResolver extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    EndpointPathResolver(org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties webEndpointProperties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties managementServerProperties, org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath dispatcherServletPath)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(String endpointName)
    Converts Spring actuator endpoint's name/id (See: Endpoints) (standard endpoints: health, info, ..., Hawtio endpoints: hawtio, jolokia) into an absolute path (starting with /) within Spring Boot context path.
     
    resolveUrlMapping(String endpointName, String... mappings)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EndpointPathResolver

      public EndpointPathResolver(org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties webEndpointProperties, org.springframework.boot.autoconfigure.web.ServerProperties serverProperties, org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties managementServerProperties, org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath dispatcherServletPath)
  • Method Details

    • resolve

      public String resolve(String endpointName)

      Converts Spring actuator endpoint's name/id (See: Endpoints) (standard endpoints: health, info, ..., Hawtio endpoints: hawtio, jolokia) into an absolute path (starting with /) within Spring Boot context path. Spring Boot configuration is taken into account (spring.mvc.servlet.path and management.endpoints.web.base-path). Context path (configured with server.servlet.context-path or management.server.base-path) is not a part of the returned path, as all resolved paths are relative to the context.

      Spring Boot may run two separate web containers:

      • Main server (with port configured using server.port property)
      • Management server (with port configured using management.server.port property)
      If there's no distinct management.server.port value, there's only one server.

      Both servers may have customized context path:

      • Main server - with server.servlet.context-path property
      • Management server - with management.server.base-path property
      Additionally, Management server can use management.endpoints.web.base-path property to change default /actuator prefix. And finally, when there's no separate Management server, management endpoints use additional prefix configured with spring.mvc.servlet.path property.

      Parameters:
      endpointName -
      Returns:
    • resolveUrlMapping

      public String resolveUrlMapping(String endpointName, String... mappings)
    • resolveContextPath

      public String resolveContextPath()