@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()
Deprecated.
Runtime classpath scanning is not longer supported. Use
Introspected to declare the packages you
want to index at build time. Example @Introspected(packages="foo.bar", includedAnnotations=Entity.class) |
boolean |
isEnabled() |
void |
setClasspath(boolean classpath)
Deprecated.
Runtime classpath scanning is not longer supported. Use
Introspected to declare the packages you
want to index at build time. Example @Introspected(packages="foo.bar", includedAnnotations=Entity.class) |
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@Deprecated public boolean isClasspath()
Introspected to declare the packages you
want to index at build time. Example @Introspected(packages="foo.bar", includedAnnotations=Entity.class)@Deprecated public void setClasspath(boolean classpath)
Introspected to declare the packages you
want to index at build time. Example @Introspected(packages="foo.bar", includedAnnotations=Entity.class)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()