Interface AutoConfigurationImportFilter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AutoConfigurationImportFilter
Filter that can be registered in spring.factories to limit the auto-configuration classes considered. This interface is designed to allow fast removal of auto-configuration classes before their bytecode is even read.

An AutoConfigurationImportFilter may implement any of the following Aware interfaces, and their respective methods will be called prior to match(java.lang.String[], org.springframework.boot.autoconfigure.AutoConfigurationMetadata):

Since:
1.5.0
Author:
Phillip Webb
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean[]
    match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata)
    Apply the filter to the given auto-configuration class candidates.
  • Method Details

    • match

      boolean[] match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata)
      Apply the filter to the given auto-configuration class candidates.
      Parameters:
      autoConfigurationClasses - the auto-configuration classes being considered. This array may contain null elements. Implementations should not change the values in this array.
      autoConfigurationMetadata - access to the meta-data generated by the auto-configure annotation processor
      Returns:
      a boolean array indicating which of the auto-configuration classes should be imported. The returned array must be the same size as the incoming autoConfigurationClasses parameter. Entries containing false will not be imported.