Package: grails.boot

## [Groovy] Class GrailsApp

- grails.boot.GrailsApp

-     @groovy.transform.CompileStatic
      @groovy.util.logging.Slf4j
      class GrailsApp
      extends org.springframework.boot.SpringApplication

  Extends the org.springframework.boot.SpringApplication with reloading behavior and other Grails features

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `class` | `GrailsApp.1` |
    `class` | `GrailsApp.2` |
    `class` | `GrailsApp.3` |
    `static class` | `GrailsApp.MicronautShutdownListener` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.String` | `GRAILS_BANNER` |
    `private static java.lang.String` | `SPRING_PROFILES` |
    `private org.springframework.core.env.ConfigurableEnvironment` | `configuredEnvironment` |
    `private static boolean` | `developmentModeActive` |
    `private static DirectoryWatcher` | `directoryWatcher` |
    `private boolean` | `enableBeanCreationProfiler` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class org.springframework.boot.SpringApplication` | `BANNER_LOCATION_PROPERTY_VALUE, BANNER_LOCATION_PROPERTY`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `org.springframework.core.env.ConfigurableEnvironment` | `configuredEnvironment`
    `boolean` | `developmentModeActive`
    `boolean` | `enableBeanCreationProfiler`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsApp (java.lang.Class<?>[] sources)` Create a new GrailsApp instance.
    `GrailsApp (org.springframework.core.io.ResourceLoader resourceLoader, java.lang.Class<?>[] sources)` Create a new GrailsApp instance.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `compileGroovyFile(org.codehaus.groovy.control.CompilerConfiguration compilerConfig, java.io.File changedFile)`
    `` | `protected void` | `configureDirectoryWatcher(DirectoryWatcher directoryWatcher, java.lang.String location)`
    `` | `protected void` | `configureEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, java.lang.String[] args)`
    `` | `protected org.springframework.context.ConfigurableApplicationContext` | `createApplicationContext()`
    `` | `protected static FileChangeListener` | `createPluginManagerListener(org.springframework.context.ConfigurableApplicationContext applicationContext)` Creates and returns a file change listener for notifying the plugin manager of changes.
    `` | `protected void` | `enableDevelopmentModeWatch(Environment environment, org.springframework.context.ConfigurableApplicationContext applicationContext, java.lang.String[] args)`
    `` | `static boolean` | `isDevelopmentModeActive()`
    `` | `private void` | `loadPluginConfigurationsToMicronautContext(org.springframework.context.ConfigurableApplicationContext applicationContext)`
    `` | `protected io.micronaut.context.ApplicationContextBuilder` | `newMicronautContextBuilder()`
    `` | `protected java.lang.Object` | `printRunStatus(org.springframework.context.ConfigurableApplicationContext applicationContext)`
    `` | `protected void` | `recompile(java.io.File changedFile, org.codehaus.groovy.control.CompilerConfiguration compilerConfig, java.lang.String location)`
    `` | `org.springframework.context.ConfigurableApplicationContext` | `run(java.lang.String[] args)`
    `` | `static org.springframework.context.ConfigurableApplicationContext` | `run(java.lang.Class<?> source, java.lang.String[] args)` Static helper that can be used to run a GrailsApp from the specified source using default settings.
    `` | `static org.springframework.context.ConfigurableApplicationContext` | `run(java.lang.Class<?>[] sources, java.lang.String[] args)` Static helper that can be used to run a GrailsApp from the specified sources using default settings and user supplied arguments.
    `` | `static void` | `setDevelopmentModeActive(boolean active)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.springframework.boot.SpringApplication` | `org.springframework.boot.SpringApplication#addListeners([Lorg.springframework.context.ApplicationListener;), org.springframework.boot.SpringApplication#getListeners(), org.springframework.boot.SpringApplication#getAllSources(), org.springframework.boot.SpringApplication#setBannerMode(org.springframework.boot.Banner$Mode), org.springframework.boot.SpringApplication#setLogStartupInfo(boolean), org.springframework.boot.SpringApplication#setAllowBeanDefinitionOverriding(boolean), org.springframework.boot.SpringApplication#setAllowCircularReferences(boolean), org.springframework.boot.SpringApplication#setInitializers(java.util.Collection), org.springframework.boot.SpringApplication#addPrimarySources(java.util.Collection), org.springframework.boot.SpringApplication#getInitializers(), org.springframework.boot.SpringApplication#setHeadless(boolean), org.springframework.boot.SpringApplication#setApplicationStartup(org.springframework.core.metrics.ApplicationStartup), org.springframework.boot.SpringApplication#getApplicationStartup(), org.springframework.boot.SpringApplication#setBanner(org.springframework.boot.Banner), org.springframework.boot.SpringApplication#addInitializers([Lorg.springframework.context.ApplicationContextInitializer;), org.springframework.boot.SpringApplication#getMainApplicationClass(), org.springframework.boot.SpringApplication#setMainApplicationClass(java.lang.Class), org.springframework.boot.SpringApplication#getWebApplicationType(), org.springframework.boot.SpringApplication#setWebApplicationType(org.springframework.boot.WebApplicationType), org.springframework.boot.SpringApplication#setLazyInitialization(boolean), org.springframework.boot.SpringApplication#setRegisterShutdownHook(boolean), org.springframework.boot.SpringApplication#setAddCommandLineProperties(boolean), org.springframework.boot.SpringApplication#setAddConversionService(boolean), org.springframework.boot.SpringApplication#addBootstrapRegistryInitializer(org.springframework.boot.BootstrapRegistryInitializer), org.springframework.boot.SpringApplication#setDefaultProperties(java.util.Map), org.springframework.boot.SpringApplication#setDefaultProperties(java.util.Properties), org.springframework.boot.SpringApplication#setAdditionalProfiles([Ljava.lang.String;), org.springframework.boot.SpringApplication#getAdditionalProfiles(), org.springframework.boot.SpringApplication#setBeanNameGenerator(org.springframework.beans.factory.support.BeanNameGenerator), org.springframework.boot.SpringApplication#setApplicationContextFactory(org.springframework.boot.ApplicationContextFactory), org.springframework.boot.SpringApplication#getShutdownHandlers(), org.springframework.boot.SpringApplication#setResourceLoader(org.springframework.core.io.ResourceLoader), org.springframework.boot.SpringApplication#setEnvironment(org.springframework.core.env.ConfigurableEnvironment), org.springframework.boot.SpringApplication#getResourceLoader(), org.springframework.boot.SpringApplication#getEnvironmentPrefix(), org.springframework.boot.SpringApplication#setSources(java.util.Set), org.springframework.boot.SpringApplication#setEnvironmentPrefix(java.lang.String), org.springframework.boot.SpringApplication#setListeners(java.util.Collection), org.springframework.boot.SpringApplication#getSources(), org.springframework.boot.SpringApplication#main([Ljava.lang.String;), org.springframework.boot.SpringApplication#run([Ljava.lang.String;), org.springframework.boot.SpringApplication#run(java.lang.Class, [Ljava.lang.String;), org.springframework.boot.SpringApplication#run([Ljava.lang.Class;, [Ljava.lang.String;), org.springframework.boot.SpringApplication#exit(org.springframework.context.ApplicationContext, [Lorg.springframework.boot.ExitCodeGenerator;), org.springframework.boot.SpringApplication#getClassLoader(), org.springframework.boot.SpringApplication#wait(long), org.springframework.boot.SpringApplication#wait(long, int), org.springframework.boot.SpringApplication#wait(), org.springframework.boot.SpringApplication#equals(java.lang.Object), org.springframework.boot.SpringApplication#toString(), org.springframework.boot.SpringApplication#hashCode(), org.springframework.boot.SpringApplication#getClass(), org.springframework.boot.SpringApplication#notify(), org.springframework.boot.SpringApplication#notifyAll()`

- - ### Field Detail

    - #### private static final java.lang.String GRAILS_BANNER

    - #### private static final java.lang.String SPRING_PROFILES

    - #### private org.springframework.core.env.ConfigurableEnvironment configuredEnvironment

    - #### private static boolean developmentModeActive

    - #### private static DirectoryWatcher directoryWatcher

    - #### private boolean enableBeanCreationProfiler

  - ### Property Detail

    - #### org.springframework.core.env.ConfigurableEnvironment configuredEnvironment

    - #### boolean developmentModeActive

    - #### boolean enableBeanCreationProfiler

  - ### Constructor Detail

    - #### GrailsApp(java.lang.Class<?>[] sources)

      Create a new GrailsApp instance. The application context will load beans from the specified sources (see org.springframework.boot.SpringApplication documentation for details. The instance can be customized before calling run(String...).

      Parameters:
        `sources` - the bean sources
      See Also:
        run(Object, String[])
        GrailsApp<?>

    - #### GrailsApp(org.springframework.core.io.ResourceLoader resourceLoader, java.lang.Class<?>[] sources)

      Create a new GrailsApp instance. The application context will load beans from the specified sources (see org.springframework.boot.SpringApplication documentation for details. The instance can be customized before calling run(String...).

      Parameters:
        `resourceLoader` - the resource loader to use
        `sources` - the bean sources
      See Also:
        run(Object, String[])
        GrailsApp<?>

  - ### Method Detail

    - #### protected void compileGroovyFile(org.codehaus.groovy.control.CompilerConfiguration compilerConfig, java.io.File changedFile)

    - #### protected void configureDirectoryWatcher(DirectoryWatcher directoryWatcher, java.lang.String location)

    - #### @java.lang.Override protected void configureEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, java.lang.String[] args)

    - #### @java.lang.Override protected org.springframework.context.ConfigurableApplicationContext createApplicationContext()

    - #### protected static FileChangeListener createPluginManagerListener(org.springframework.context.ConfigurableApplicationContext applicationContext)

      Creates and returns a file change listener for notifying the plugin manager of changes.

      Parameters:
        `applicationContext` - - The running org.springframework.context.ApplicationContext
      Returns:
        DirectoryWatcher.FileChangeListener

    - #### @groovy.transform.CompileDynamic protected void enableDevelopmentModeWatch(Environment environment, org.springframework.context.ConfigurableApplicationContext applicationContext, java.lang.String[] args)

    - #### static boolean isDevelopmentModeActive()

    - #### @java.lang.SuppressWarnings(value: GrMethodMayBeStatic) private void loadPluginConfigurationsToMicronautContext(org.springframework.context.ConfigurableApplicationContext applicationContext)

    - #### protected io.micronaut.context.ApplicationContextBuilder newMicronautContextBuilder()

    - #### protected java.lang.Object printRunStatus(org.springframework.context.ConfigurableApplicationContext applicationContext)

    - #### protected void recompile(java.io.File changedFile, org.codehaus.groovy.control.CompilerConfiguration compilerConfig, java.lang.String location)

    - #### @java.lang.Override org.springframework.context.ConfigurableApplicationContext run(java.lang.String[] args)

    - #### static org.springframework.context.ConfigurableApplicationContext run(java.lang.Class<?> source, java.lang.String[] args)

      Static helper that can be used to run a GrailsApp from the specified source using default settings.

      Parameters:
        `source` - the source to load
        `args` - the application arguments (usually passed from a Java main method)
      Returns:
        the running org.springframework.context.ApplicationContext

    - #### static org.springframework.context.ConfigurableApplicationContext run(java.lang.Class<?>[] sources, java.lang.String[] args)

      Static helper that can be used to run a GrailsApp from the specified sources using default settings and user supplied arguments.

      Parameters:
        `sources` - the sources to load
        `args` - the application arguments (usually passed from a Java main method)
      Returns:
        the running org.springframework.context.ApplicationContext

    - #### static void setDevelopmentModeActive(boolean active)