类 EntityScanPackages
- java.lang.Object
- org.springframework.boot.autoconfigure.domain.EntityScanPackages
public class EntityScanPackages extends Object
Class for storing@EntityScanspecified packages for reference later (e.g. by JPA auto-configuration).- 从以下版本开始:
- 1.4.0
- 另请参阅:
EntityScan,EntityScanner
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static EntityScanPackagesget(org.springframework.beans.factory.BeanFactory beanFactory)Return theEntityScanPackagesfor the given bean factory.List<String>getPackageNames()Return the package names specified from all@EntityScanannotations.static voidregister(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String... packageNames)Register the specified entity scan packages with the system.static voidregister(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, Collection<String> packageNames)Register the specified entity scan packages with the system.
方法详细资料
getPackageNames
public List<String> getPackageNames()
Return the package names specified from all@EntityScanannotations.- 返回:
- the entity scan package names
get
public static EntityScanPackages get(org.springframework.beans.factory.BeanFactory beanFactory)
Return theEntityScanPackagesfor the given bean factory.- 参数:
beanFactory- the source bean factory- 返回:
- the
EntityScanPackagesfor the bean factory (nevernull)
register
public static void register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String... packageNames)
Register the specified entity scan packages with the system.- 参数:
registry- the source registrypackageNames- the package names to register
register
public static void register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, Collection<String> packageNames)
Register the specified entity scan packages with the system.- 参数:
registry- the source registrypackageNames- the package names to register