Class IncludeExcludeEndpointFilter<E extends org.springframework.boot.actuate.endpoint.ExposableEndpoint<?>>

java.lang.Object
org.springframework.boot.actuate.autoconfigure.endpoint.expose.IncludeExcludeEndpointFilter<E>
Type Parameters:
E - the endpoint type
All Implemented Interfaces:
org.springframework.boot.actuate.endpoint.EndpointFilter<E>

public class IncludeExcludeEndpointFilter<E extends org.springframework.boot.actuate.endpoint.ExposableEndpoint<?>> extends Object implements org.springframework.boot.actuate.endpoint.EndpointFilter<E>
EndpointFilter that will filter endpoints based on include and exclude patterns.
Since:
2.2.7
  • Constructor Details

    • IncludeExcludeEndpointFilter

      public IncludeExcludeEndpointFilter(Class<E> endpointType, org.springframework.core.env.Environment environment, String prefix, String... defaultIncludes)
      Create a new IncludeExcludeEndpointFilter with include/exclude rules bound from the Environment.
      Parameters:
      endpointType - the endpoint type that should be considered (other types always match)
      environment - the environment containing the properties
      prefix - the property prefix to bind
      defaultIncludes - the default includes to use when none are specified.
    • IncludeExcludeEndpointFilter

      public IncludeExcludeEndpointFilter(Class<E> endpointType, Collection<String> include, Collection<String> exclude, String... defaultIncludes)
      Create a new IncludeExcludeEndpointFilter with specific include/exclude rules.
      Parameters:
      endpointType - the endpoint type that should be considered (other types always match)
      include - the include patterns
      exclude - the exclude patterns
      defaultIncludes - the default includes to use when none are specified.
  • Method Details

    • match

      public boolean match(E endpoint)
      Specified by:
      match in interface org.springframework.boot.actuate.endpoint.EndpointFilter<E extends org.springframework.boot.actuate.endpoint.ExposableEndpoint<?>>
    • match

      public final boolean match(org.springframework.boot.actuate.endpoint.EndpointId endpointId)
      Return true if the filter matches.
      Parameters:
      endpointId - the endpoint ID to check
      Returns:
      true if the filter matches
      Since:
      2.6.0