@ConfigurationProperties(value="entity-scan")
public static class JpaConfiguration.EntityScanConfiguration
extends java.lang.Object
implements io.micronaut.core.util.Toggleable
Constructor and Description |
---|
EntityScanConfiguration(io.micronaut.context.env.Environment environment)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.Class<?>> |
findEntities()
Find entities for the current configuration.
|
java.lang.String[] |
getPackages()
The packages to limit the scan to.
|
boolean |
isClasspath() |
boolean |
isEnabled() |
void |
setClasspath(boolean classpath)
Sets whether to scan the whole classpath including external JAR files using classpath scanning or just look for introspected beans compiled by this application.
|
void |
setEnabled(boolean enabled)
Set whether entity scan is enabled.
|
void |
setPackages(java.lang.String[] packages) |
public EntityScanConfiguration(io.micronaut.context.env.Environment environment)
environment
- The environmentpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public boolean isClasspath()
public void setClasspath(boolean classpath)
classpath
- True if extensive classpath scanning should be usedpublic void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic java.lang.String[] getPackages()
public void setPackages(java.lang.String[] packages)
packages
- The packagespublic java.util.Collection<java.lang.Class<?>> findEntities()