@groovy.transform.CompileStatic class GrailsAutoConfiguration extends java.lang.Object implements ApplicationContextAware, GrailsApplicationClass
A base class for configurations that bootstrap a Grails application
| Type | Name and description |
|---|---|
ApplicationContext |
applicationContext |
| Constructor and description |
|---|
GrailsAutoConfiguration() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected java.util.Collection<java.lang.Class> |
artefactsWrittenDownAheadOfTime()The artefacts written down while the application's code was generated, or null where
nothing was written down and they are to be found the usual ways. |
|
java.util.Collection<java.lang.Class> |
classes()The classes that constitute the Grails application. |
|
void |
doWithApplicationContext() |
|
void |
doWithDynamicMethods() |
|
groovy.lang.Closure |
doWithSpring() |
|
Config |
getConfig() |
|
GrailsApplication |
getGrailsApplication() |
|
GrailsApplicationPostProcessor |
grailsApplicationPostProcessor(PluginDiscovery pluginDiscovery)
|
|
protected boolean |
limitScanningToApplication()Whether classpath scanning should be limited to the application and not dependent JAR files. |
|
void |
onConfigChange(java.util.Map<java.lang.String, java.lang.Object> event) |
|
void |
onShutdown(java.util.Map<java.lang.String, java.lang.Object> event) |
|
void |
onStartup(java.util.Map<java.lang.String, java.lang.Object> event) |
|
java.util.Collection<java.lang.String> |
packageNames()
|
|
java.util.Collection<java.lang.Package> |
packages()
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The artefacts written down while the application's code was generated, or null where
nothing was written down and they are to be found the usual ways.
Both usual ways need something an image does not have: one walks the classpath, the other reads a list the compile-time transform builds as it goes, which is empty in anything the transform did not itself compile. So an image found no artefacts at all, and an application could only start by naming its own -- a list to keep in step with itself forever after.
They were found while the code was generated, on an ordinary JVM where both ways work, and left here.
The classes that constitute the Grails application.
The context is set before this is asked, on both paths that ask it: the early registration
phase sets it on the instance it creates, and the @Bean method below is invoked on
this configuration class after Spring has applied ApplicationContextAware. It has to
be -- the scan below resolves its resources through the context, and did so before any of
this was written -- so reading a singleton from it here adds no ordering that was not
already relied upon.
Whether classpath scanning should be limited to the application and not dependent JAR files. Users can override this method to enable more broad scanning at the cost of startup time.