Package: grails.boot

## [Groovy] Class GrailsApp

- grails.boot.GrailsApp

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

  Authors:
    Graeme Rocher
  Since:
    3.0

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

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `boolean` | `enableBeanCreationProfiler`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsApp (java.lang.Object... sources)` Create a new GrailsApp instance.
    `GrailsApp (org.springframework.core.io.ResourceLoader resourceLoader, java.lang.Object... 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()`
    `` | `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.Object 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.Object[] 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#isWebEnvironment(), org.springframework.boot.SpringApplication#getMainApplicationClass(), org.springframework.boot.SpringApplication#setMainApplicationClass(java.lang.Class), org.springframework.boot.SpringApplication#setWebEnvironment(boolean), org.springframework.boot.SpringApplication#setHeadless(boolean), org.springframework.boot.SpringApplication#setRegisterShutdownHook(boolean), org.springframework.boot.SpringApplication#setBanner(org.springframework.boot.Banner), org.springframework.boot.SpringApplication#setBannerMode(org.springframework.boot.Banner$Mode), org.springframework.boot.SpringApplication#setLogStartupInfo(boolean), org.springframework.boot.SpringApplication#setAddCommandLineProperties(boolean), 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#getSources(), org.springframework.boot.SpringApplication#setSources(java.util.Set), org.springframework.boot.SpringApplication#setApplicationContextClass(java.lang.Class), org.springframework.boot.SpringApplication#setInitializers(java.util.Collection), org.springframework.boot.SpringApplication#addInitializers([Lorg.springframework.context.ApplicationContextInitializer;), org.springframework.boot.SpringApplication#getInitializers(), org.springframework.boot.SpringApplication#setListeners(java.util.Collection), org.springframework.boot.SpringApplication#setEnvironment(org.springframework.core.env.ConfigurableEnvironment), org.springframework.boot.SpringApplication#getResourceLoader(), org.springframework.boot.SpringApplication#setBeanNameGenerator(org.springframework.beans.factory.support.BeanNameGenerator), org.springframework.boot.SpringApplication#setResourceLoader(org.springframework.core.io.ResourceLoader), org.springframework.boot.SpringApplication#main([Ljava.lang.String;), org.springframework.boot.SpringApplication#run([Ljava.lang.Object;, [Ljava.lang.String;), org.springframework.boot.SpringApplication#run([Ljava.lang.String;), org.springframework.boot.SpringApplication#run(java.lang.Object, [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, int), org.springframework.boot.SpringApplication#wait(long), 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()`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Property Detail

    - #### boolean enableBeanCreationProfiler

  - ### Constructor Detail

    - #### GrailsApp(java.lang.Object... 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(org.springframework.core.io.ResourceLoader, Object...)

    - #### GrailsApp(org.springframework.core.io.ResourceLoader resourceLoader, java.lang.Object... 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(org.springframework.core.io.ResourceLoader, Object...)

  - ### 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 // TODO: Report Groovy VerifierError protected void enableDevelopmentModeWatch(Environment environment, org.springframework.context.ConfigurableApplicationContext applicationContext, java.lang.String... args)

    - #### static boolean isDevelopmentModeActive()

    - #### @groovy.transform.CompileDynamic 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.Object 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.Object[] 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)