Package io.hawt.springboot
Class EndpointPathResolver
java.lang.Object
io.hawt.springboot.EndpointPathResolver
-
Constructor Summary
ConstructorsConstructorDescriptionEndpointPathResolver(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 TypeMethodDescriptionConverts 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)
-
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
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.pathandmanagement.endpoints.web.base-path). Context path (configured withserver.servlet.context-pathormanagement.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.portproperty) - Management server (with port configured using
management.server.portproperty)
management.server.portvalue, there's only one server.Both servers may have customized context path:
- Main server - with
server.servlet.context-pathproperty - Management server - with
management.server.base-pathproperty
management.endpoints.web.base-pathproperty to change default/actuatorprefix. And finally, when there's no separate Management server, management endpoints use additional prefix configured withspring.mvc.servlet.pathproperty.- Parameters:
endpointName-- Returns:
- Main server (with port configured using
-
resolveUrlMapping
-
resolveContextPath
-