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.Toggleable
The entity scan configuration.
  • Constructor Details

    • EntityScanConfiguration

      public EntityScanConfiguration(io.micronaut.context.env.Environment environment)
      Default constructor.
      Parameters:
      environment - The environment
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • 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