@ConfigurationProperties(value="entity-scan") public static class JpaConfiguration.EntityScanConfiguration extends 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 |
---|---|
Collection<Class<?>> |
findEntities()
Find entities for the current configuration.
|
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(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 String[] getPackages()
public void setPackages(String[] packages)
packages
- The packagespublic Collection<Class<?>> findEntities()