批注接口 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.- 从以下版本开始:
- 1.3.0
- 作者:
- Phillip Webb
- 另请参阅:
-
可选元素概要
可选元素修饰符和类型可选元素说明Class<?>[]
Type-safe alternative tobasePackages()
for specifying the packages to be registered withAutoConfigurationPackages
.String[]
Base packages that should be registered withAutoConfigurationPackages
.
-
元素详细资料
-
basePackages
String[] basePackagesBase packages that should be registered withAutoConfigurationPackages
.Use
basePackageClasses()
for a type-safe alternative to String-based package names.- 返回:
- the back package names
- 从以下版本开始:
- 2.3.0
- 默认值:
{}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages()
for specifying the packages to be registered withAutoConfigurationPackages
.Consider creating a special no-op marker class or interface in each package that serves no purpose other than being referenced by this attribute.
- 返回:
- the base package classes
- 从以下版本开始:
- 2.3.0
- 默认值:
{}
-