Annotation Interface AutoConfigurationPackage


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @Import(org.springframework.boot.autoconfigure.AutoConfigurationPackages.Registrar.class) public @interface AutoConfigurationPackage
Registers packages with AutoConfigurationPackages. When no base packages or base package classes are specified, the package of the annotated class is registered.
Since:
1.3.0
Author:
Phillip Webb
See Also:
  • Element Details

    • basePackages

      String[] basePackages
      Base packages that should be registered with AutoConfigurationPackages.

      Use basePackageClasses() for a type-safe alternative to String-based package names.

      Returns:
      the back package names
      Since:
      2.3.0
      Default:
      {}
    • basePackageClasses

      Class<?>[] basePackageClasses
      Type-safe alternative to basePackages() for specifying the packages to be registered with AutoConfigurationPackages.

      Consider creating a special no-op marker class or interface in each package that serves no purpose other than being referenced by this attribute.

      Returns:
      the base package classes
      Since:
      2.3.0
      Default:
      {}