Class JpaConfiguration.EntityScanConfiguration

  • All Implemented Interfaces:
    io.micronaut.core.util.Toggleable
    Enclosing class:
    JpaConfiguration

    @ConfigurationProperties("entity-scan")
    public static class JpaConfiguration.EntityScanConfiguration
    extends java.lang.Object
    implements io.micronaut.core.util.Toggleable
    The entity scan configuration.
    • Constructor Summary

      Constructors 
      Constructor Description
      EntityScanConfiguration​(io.micronaut.context.env.Environment environment)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method 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 no longer supported.
      boolean isEnabled()  
      void setClasspath​(boolean classpath)
      Deprecated.
      Runtime classpath scanning is no longer supported.
      void setEnabled​(boolean enabled)
      Set whether entity scan is enabled.
      void setPackages​(java.lang.String[] packages)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.lang.String[] getPackages()
        The packages to limit the scan to.
        Returns:
        The packages to limit the scan to
      • setPackages

        public void setPackages​(java.lang.String[] packages)
        Parameters:
        packages - The packages
      • findEntities

        public java.util.Collection<java.lang.Class<?>> findEntities()
        Find entities for the current configuration.
        Returns:
        The entities