Class EntityScanPackages
- java.lang.Object
- org.springframework.boot.autoconfigure.domain.EntityScanPackages
public class EntityScanPackages extends Object
Class for storing@EntityScan
specified packages for reference later (e.g. by JPA auto-configuration).- Since:
- 1.4.0
- See Also:
EntityScan
,EntityScanner
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EntityScanPackages
get(org.springframework.beans.factory.BeanFactory beanFactory)
Return theEntityScanPackages
for the given bean factory.List<String>
getPackageNames()
Return the package names specified from all@EntityScan
annotations.static void
register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String... packageNames)
Register the specified entity scan packages with the system.static void
register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, Collection<String> packageNames)
Register the specified entity scan packages with the system.
Method Detail
getPackageNames
public List<String> getPackageNames()
Return the package names specified from all@EntityScan
annotations.- Returns:
- the entity scan package names
get
public static EntityScanPackages get(org.springframework.beans.factory.BeanFactory beanFactory)
Return theEntityScanPackages
for the given bean factory.- Parameters:
beanFactory
- the source bean factory- Returns:
- the
EntityScanPackages
for 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.- Parameters:
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.- Parameters:
registry
- the source registrypackageNames
- the package names to register