Class 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 Detail

      • EntityScanConfiguration

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

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface io.micronaut.core.util.Toggleable
      • isClasspath

        @Deprecated
        public boolean isClasspath()
        Deprecated.
        Runtime classpath scanning is no longer supported. Use Introspected to 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. Use Introspected to 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