Class JpaConfiguration.EntityScanConfiguration
- java.lang.Object
-
- io.micronaut.configuration.hibernate.jpa.JpaConfiguration.EntityScanConfiguration
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Enclosing class:
- JpaConfiguration
@ConfigurationProperties("entity-scan") public static class JpaConfiguration.EntityScanConfiguration extends Object implements io.micronaut.core.util.ToggleableThe entity scan configuration.
-
-
Constructor Summary
Constructors Constructor Description EntityScanConfiguration(io.micronaut.context.env.Environment environment)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Collection<Class<?>>findEntities()Find entities for the current configuration.String[]getPackages()The packages to limit the scan to.booleanisClasspath()Deprecated.Runtime classpath scanning is no longer supported.booleanisEnabled()voidsetClasspath(boolean classpath)Deprecated.Runtime classpath scanning is no longer supported.voidsetEnabled(boolean enabled)Set whether entity scan is enabled.voidsetPackages(String[] packages)
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
isClasspath
@Deprecated public boolean isClasspath()
Deprecated.Runtime classpath scanning is no longer supported. UseIntrospectedto declare the packages you want to index at build time. Example@Introspected(packages="foo.bar", includedAnnotations=Entity.class)- Returns:
- Whether to scan the whole classpath or just look for introspected beans compiled by this application.
-
setClasspath
@Deprecated public void setClasspath(boolean classpath)
Deprecated.Runtime classpath scanning is no longer supported. UseIntrospectedto declare the packages you want to index at build time. Example@Introspected(packages="foo.bar", includedAnnotations=Entity.class)Sets whether to scan the whole classpath including external JAR files using classpath scanning or just look for introspected beans compiled by this application.- Parameters:
classpath- True if extensive classpath scanning should be used
-
setEnabled
public void setEnabled(boolean enabled)
Set whether entity scan is enabled. Defaults to true.- Parameters:
enabled- True if it is enabled
-
getPackages
public String[] getPackages()
The packages to limit the scan to.- Returns:
- The packages to limit the scan to
-
setPackages
public void setPackages(String[] packages)
- Parameters:
packages- The packages
-
findEntities
public Collection<Class<?>> findEntities()
Find entities for the current configuration.- Returns:
- The entities
-
-