Class AbstractMvcEndpoint
- java.lang.Object
- org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
- org.springframework.boot.actuate.endpoint.mvc.AbstractMvcEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,MvcEndpoint
,org.springframework.context.EnvironmentAware
,org.springframework.web.servlet.config.annotation.WebMvcConfigurer
- Direct Known Subclasses:
AbstractNamedMvcEndpoint
public abstract class AbstractMvcEndpoint extends org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter implements MvcEndpoint, org.springframework.context.EnvironmentAware
Abstract base class forMvcEndpoint
implementations without a backingEndpoint
.- Since:
- 1.4.0
Field Summary
Fields inherited from interface org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
DISABLED_RESPONSE
Constructor Summary
Constructors Constructor Description AbstractMvcEndpoint(String path, boolean sensitive)
AbstractMvcEndpoint(String path, boolean sensitive, boolean enabled)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Endpoint>
getEndpointType()
Return the type ofEndpoint
exposed, ornull
if thisMvcEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.protected org.springframework.core.env.Environment
getEnvironment()
String
getPath()
Return the MVC path of the endpoint.boolean
isEnabled()
boolean
isSensitive()
Return if the endpoint exposes sensitive information.void
setEnabled(Boolean enabled)
void
setEnvironment(org.springframework.core.env.Environment environment)
void
setPath(String path)
void
setSensitive(Boolean sensitive)
Methods inherited from class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
Constructor Detail
AbstractMvcEndpoint
public AbstractMvcEndpoint(String path, boolean sensitive)
AbstractMvcEndpoint
public AbstractMvcEndpoint(String path, boolean sensitive, boolean enabled)
Method Detail
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
getEnvironment
protected final org.springframework.core.env.Environment getEnvironment()
getPath
public String getPath()
Description copied from interface:MvcEndpoint
Return the MVC path of the endpoint.- Specified by:
getPath
in interfaceMvcEndpoint
- Returns:
- the endpoint path
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(Boolean enabled)
isSensitive
public boolean isSensitive()
Description copied from interface:MvcEndpoint
Return if the endpoint exposes sensitive information.- Specified by:
isSensitive
in interfaceMvcEndpoint
- Returns:
- if the endpoint is sensitive
setSensitive
public void setSensitive(Boolean sensitive)
getEndpointType
public Class<? extends Endpoint> getEndpointType()
Description copied from interface:MvcEndpoint
Return the type ofEndpoint
exposed, ornull
if thisMvcEndpoint
exposes information that cannot be represented as a traditionalEndpoint
.- Specified by:
getEndpointType
in interfaceMvcEndpoint
- Returns:
- the endpoint type