类 AbstractEndpoint<T>
- java.lang.Object
- org.springframework.boot.actuate.endpoint.AbstractEndpoint<T>
- 类型参数:
T- the endpoint data type
- 所有已实现的接口:
org.springframework.beans.factory.Aware,Endpoint<T>,org.springframework.context.EnvironmentAware
- 直接已知子类:
AutoConfigurationReportEndpoint,BeansEndpoint,ConfigurationPropertiesReportEndpoint,DumpEndpoint,EnvironmentEndpoint,FlywayEndpoint,HealthEndpoint,InfoEndpoint,LiquibaseEndpoint,LoggersEndpoint,MetricsEndpoint,RequestMappingEndpoint,ShutdownEndpoint,TraceEndpoint
public abstract class AbstractEndpoint<T> extends Object implements Endpoint<T>, org.springframework.context.EnvironmentAware
Abstract base forEndpointimplementations.
构造器概要
构造器 构造器 说明 AbstractEndpoint(String id)Create a new sensitive endpoint instance.AbstractEndpoint(String id, boolean sensitive)Create a new endpoint instance.AbstractEndpoint(String id, boolean sensitive, boolean enabled)Create a new endpoint instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected org.springframework.core.env.EnvironmentgetEnvironment()StringgetId()The logical ID of the endpoint.booleanisEnabled()Return if the endpoint is enabled.booleanisSensitive()Return if the endpoint is sensitive, i.e. may return data that the average user should not see.voidsetEnabled(Boolean enabled)voidsetEnvironment(org.springframework.core.env.Environment environment)voidsetId(String id)voidsetSensitive(Boolean sensitive)
构造器详细资料
AbstractEndpoint
public AbstractEndpoint(String id)
Create a new sensitive endpoint instance. The endpoint will enabled flag will be based on the springEnvironmentunless explicitly set.- 参数:
id- the endpoint ID
AbstractEndpoint
public AbstractEndpoint(String id, boolean sensitive)
Create a new endpoint instance. The endpoint will enabled flag will be based on the springEnvironmentunless explicitly set.- 参数:
id- the endpoint IDsensitive- if the endpoint is sensitive by default
AbstractEndpoint
public AbstractEndpoint(String id, boolean sensitive, boolean enabled)
Create a new endpoint instance.- 参数:
id- the endpoint IDsensitive- if the endpoint is sensitiveenabled- if the endpoint is enabled or not.
方法详细资料
getEnvironment
protected final org.springframework.core.env.Environment getEnvironment()
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- 指定者:
setEnvironment在接口中org.springframework.context.EnvironmentAware
getId
public String getId()
从接口复制的说明:EndpointThe logical ID of the endpoint. Must only contain simple letters, numbers and '_' characters (i.e. a "\w" regex).
setEnabled
public void setEnabled(Boolean enabled)
isSensitive
public boolean isSensitive()
从接口复制的说明:EndpointReturn if the endpoint is sensitive, i.e. may return data that the average user should not see. Mappings can use this as a security hint.- 指定者:
isSensitive在接口中Endpoint<T>- 返回:
- if the endpoint is sensitive
setSensitive
public void setSensitive(Boolean sensitive)