By default, the configuration will be taken from "/WEB-INF/applicationContext.groovy"
for the root context, and "/WEB-INF/test-servlet.groovy" for a context with the namespace
"test-servlet" (like for a DispatcherServlet instance with the servlet-name "test").
The config location defaults can be overridden via the "contextConfigLocation"
context-param of ContextLoader and servlet
init-param of FrameworkServlet. Config locations
can either denote concrete files like "/WEB-INF/context.groovy" or Ant-style patterns
like "/WEB-INF/*-context.groovy" (see PathMatcher
javadoc for pattern details). Note that ".xml" files will be parsed as XML content;
all other kinds of resources will be parsed as Groovy scripts.
Note: In case of multiple config locations, later bean definitions will
override ones defined in earlier loaded files. This can be leveraged to
deliberately override certain bean definitions via an extra Groovy script.
For a WebApplicationContext that reads in a different bean definition format,
create an analogous subclass of AbstractRefreshableWebApplicationContext.
Such a context implementation can be specified as "contextClass" context-param
for ContextLoader or "contextClass" init-param for FrameworkServlet.
The default location for the root context is "/WEB-INF/applicationContext.groovy",
and "/WEB-INF/test-servlet.groovy" for a context with the namespace "test-servlet"
(like for a DispatcherServlet instance with the servlet-name "test").
Load the bean definitions with the given GroovyBeanDefinitionReader.
The lifecycle of the bean factory is handled by the refreshBeanFactory method;
therefore this method is just supposed to load and/or register bean definitions.
Delegates to a ResourcePatternResolver for resolving location patterns
into Resource instances.
Throws:
java.io.IOException - if the required Groovy script or XML file isn't found
The default location for the root context is "/WEB-INF/applicationContext.groovy",
and "/WEB-INF/test-servlet.groovy" for a context with the namespace "test-servlet"
(like for a DispatcherServlet instance with the servlet-name "test").