Set `CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME` by
default to improve startup performance. The `spring.beaninfo.ignore`
property can be set in `application.properties` if BeanInfo classes
should be searched.
Fixes gh-4390
Create a set of core groups to gather properties logically: core, web,
security, data, integration, actuator and devtools.
In each of them, groups are ordered against their lexical order.
Closes gh-4344
In 1.3, our Gradle plugin no longer automatically applies the
application plugin. This affects the default options that are
available for explicitly configuring a project's main class. This
commit updates the documentation accordingly.
Closes gh-3768
The syntax was a bit tortured. This should clarify things and also
de-emphasise the "production" use case for the file system
properties file (we want to be cloud native don't we?).
Previously, the "Common application properties" appendix had no
consistent use of a configuration key value. It could just as well be
the default value or an example.
We now always document the default value after the "=" sign and
eventually add an example with the phrasing "For instance".
The keys have also been reordered so that they follow a natural (i.e.
lexical) order.
Closes gh-3230
Closes gh-3160
Closes gh-3155
Closes gh-3153
Previously, the nested private static class would cause an error at
startup stating that it was not accessible when trying to bind the
property from the environment. The nested class should be public.
Closes gh-4323
Previously, LoggingApplicationListener used %rEx as the default
exception conversion word. This would result in the nested causes
being logging in reverse order, i.e. the most deeply nested cause
would be logged first.
This commit updates the default to be %wEx and adds a test to verify
the default behaviour.
Closes gh-4247
If a filter is registered in `web.xml` with no `dispatcher` element, the
spec states that it should have the `REQUEST` dispatcher type only.
As we are adding more dispatcher types by default, it can be surprising
for users migrating from a `web.xml` based web app. The documentation
has now an explicit note about this.
Closes gh-2689
Improve the initial PR to include a filtering of the profiles that were
already enabled via the `spring.profiles.active` property.
Also add more tests to prove that each profile is loaded only once
now.
Closes gh-4273
Update the "INIT INFO section" of `launch.script` to include
`initInfoProvides`, `initInfoShortDescription` and `initInfoDescription`
property substitutions.
The Maven plugin has been updated to populate substitutions with
`${project.artifactId}`, `${project.name}` and `${project.description}`.
Fixes gh-4245
Flip the default value of `addResources` for both the Maven and Gradle
plugins. This effectively turns off static resources reloading and, more
importantly, the pruning of duplicate resources from the target
directory.
As devetools is our mainstram solution for such feature, the documantion
has been updated to reflect that.
Closes gh-4227
Logback documentation explains how to initialize the logging system and
namely how the `logback.configurationFile` system property can be used to
specify the configuration file to use.
Spring Boot has an abstraction on top of that. A user can define the
`logging.path` property regardless of the logging infrastructure it is
using.
Users following the logback documentation can be confused at first so
we're not logging a warning when we found out that the logback specific
property has been specified.
Closes gh-2382
Previously, the launch script would always use a file named
<appname>.log to capture the application's console output. This commit
adds a variable, LOG_FILENAME, for specifying the file name defaulting
to <appname>.log.
Fixes gh-4194
Commit adf2c44b was an attempt to prevent HSQLDB from throwing an
exception when the JVM exits. This was achieved by disabling the
application context’s shutdown hook in the tests. This had the unwanted
side effect of causing tests’ application contexts not to be closed. The
reported symptom was that @Destroy methods were no longer being invoked.
We need a different solution to the problem.
The exception was:
Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: attempt to connect while db opening /closing
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
at org.hsqldb.DatabaseManager.newSession(Unknown Source)
... 23 common frames omitted
I originally thought this was due to a race between the application
context’s shutdown hook and HSQLDB’s shutdown hook, however HSQLDB
doesn’t use a shutdown hook. I believe that the problem is due to
an HSQLDB database being created with shutdown=true in its URL, similar
to the problem described here [1]. This will shut down the database when
the last connection to it is closed, however the shutdown will happen
asynchronously. If the JVM then runs the application context’s shutdown
hook, EmbeddedDatabaseFactory will attempt to connect to the database to
execute the SHUTDOWN command. This executes synchronously but will race
with the asynchronous shutdown that’s executing as a result of
shutdown=true in the JDBC url and the last connection to the database
being closed.
This commit reinstates the use of application context shutdown hooks in
the tests, and updates the documentation to recommend that, if a user
manually configures the URL for their embedded database, they do so
in such a way that the database doesn’t shutdown automatically, thereby
allowing the shutdown to be driven by application context close.
Closes gh-4208
[1] http://sourceforge.net/p/hsqldb/bugs/1400/
Update TraceWebFilter to optionally trace more details from the
HttpServletRequest/HttpServletResponse. The `management.trace.include`
property can be used to change what aspects are logged.
Closes gh-3948
Add an `excludeDevtools` property to both the Maven and Gradle plugin
that removes `org.springframework.boot:spring-boot-devtools` (if
necessary) when repackaging the application.
Closes gh-3171
Spring Boot will eagerly initialize a `ConversionService` named
`conversionService` for configuration keys processing. This commit adds
a note in the documentation regarding that special behaviour.
Closes gh-4162
Spring Security 4’s default configuration will, irrespective of any
other header writers that are added, enable writers for the following
headers:
- X-Content-Type
- X-XSS-Protection
- Cache-Control
- X-Frame-Options
Previously, SecurityProperties.headers used false as the default for the
properties that enable or disable these headers but the configuration is
only applied when the properties are true. This left us with the right
default behaviour (the headers are enabled) but meant that the
properties could not be used to switch off the headers.
This commit changes the defaults for the four properties to true and
updates SpringBootWebSecurityConfiguration to only apply the
configuration when the properties are false. This leaves us with the
desired defaults while allowing users to disable one or more of the
properties by setting the relevant property to false.
Closes gh-3517
So far we have wrongly advertized that the `spring-boot-starter-parent`
filters application configuration in such a way that standard Spring
placeholders are not processed.
In order to achieve such feature, the `useDefaultDelimiters` property
must be set to `false` as otherwise default delimiters are appended to
the list of custom delimiters.
This property is not enabled so that only keys surrounded by `@` are
filtered by the build.
Closes gh-3092
Prior to 8.0.28 Tomcat required the key store and trust store (if any)
to be available directly on the filesystem, i.e. classpath: resources
would not work. Tomcat 8.0.28 removed this limitation.
This commit updates to Tomcat 8.0.28, updates the tests to verify
the new Tomcat capability and removes the obsolete documentation of
the restriction.
Closes gh-4048
Previously, if Solr 5 was on the classpath, SolrAutoConfiguration
would fail with a rather cryptic error message due to a change in the
inheritance hierarchy of CloudSolrServer between Solr 4 and Solr 5.
This commit updates SolrAutoConfiguration to be conditional on a
class that exists in Solr 4 but was removed in Solr 5. This has the
effect of switching off the auto-configuration when Solr 5 is on
the classpath, allowing the auto-configuration report to be used to
identify why the configuration was disabled. The documentation has
also been updated to state that Spring Boot does not currently support
Solr 5.0.
Closes gh-2795
This commit adds a new property, logging.register-shutdown-hook, that
when set to true, will cause LoggingApplicationListener to register
a shutdown hook the first time it initializes a logging system. When
the JVM exits, the shutdown hook shuts down each of the supported
logging systems, ensuring that all of their appenders have been
flushed and closed.
Closes gh-4026
This commit changes the new mode-based configuration to use two new
methods – setBannerMode on SpringApplication and bannerMode on
SpringApplicationBuilder. The old methods, setShowBanner and
showBanner on SpringApplication and SpringApplicationBuilder
respectively, have been reinstated and deprecated.
Closes gh-4001
This commit adds the option to output the banner using the logger
instead of standard out. Rather than taking a boolean
spring.main.show-banner is now configured using an enum. Three values
are supported:
- LOG: the banner is logged
- CONSOLE: the banner is printed to standard out (previously true)
- OFF: the banner is switched off (previously false)
The default behavior remains unchanged; the banner will be printed to
standard out.
Closes gh-4022
See gh-4001
Previously `spring.velocity.charset` only controlled the output encoding
with the templates being loaded with the default encoding. We now
consistently set the same value for both the input and output encodings.
It is still possible to override it to a different value using
`spring.velocity.properties.input.encoding`
Closes gh-3994
Previously `spring.velocity.charset` only controlled the output encoding
with the templates being loaded with the default encoding. We now
consistently set the same value for both the input and output encodings.
It is still possible to override it to a different value using
`spring.velocity.properties.input.encoding`
Closes gh-3994
This change applies only to "standard" MVC endpoints (not the extended
ones like /env and /jolokia which already have this feature). Allows
users to supply an endpoints.{name}.path.
Fixes gh-2790
This commit adds two new properties, spring.devtools.remote.proxy.host
and spring.devtools.remote.proxy.port that can be used to configure
RemoteSpringApplication to connect to the remote application through
an HTTP proxy.
Closes gh-3968
In order to have more control on the structure of the configuration, we
do not bind to `RepositoryRestConfiguration` directly anymore. This
commit introduces `RepositoryProperties` instead.
See gh-3854
Closes gh-4073
Add `error.include-stacktrace` configuration option to determine when
stack trace attributes should be added. Options are `never`, `always`
or `on-trace-param`.
Prior to this commit stacktrace attributes were never includes in HTML
responses, and only included in JSON responses when a `trace` request
parameter was set to `true`. This has now been changed so that,
by default, stacktrace attributes are never included.
The BasicErrorController includes a protected method that can be
overridden if includes should be different depending on the `produces`
mapping.
Closes gh-2371
Update MetricExportAutoConfiguration to auto-configure statsd metrics
export when a `spring.metrics.export.statsd.host` property is set.
Closes gh-3719
Add aliases for `@ComponentScan`attributes on `@SpringBootApplication`
so that it is possible to customize how the component scan should be
applied on the project.
Previously, one would have to revert to `@EnableAutoConfiguration` to
achieve the same result.
Closes gh-3368
Provide a general purpose Hazelcast integration (i.e. not tied to caching).
Auto-configure a `HazelcastInstance` either based on the presence of a
`Config` bean or a configuration file. Said configuration file can be
specified explicitly or automatically found from default locations.
The cache integration already supports Hazelcast so it has been reworked
to automatically reuse an existing `HazelcastInstance` if available.
Closes gh-2942
Use "return" instead of "exit" where possible, especially in
function definitions.
Also fixed the exit codes to match the LSB spec for some specific
conditions (fixes gh-3521).
Fixes gh-3199, fixes gh-3535
Users sometimes create beans of type Converter and don't expect that to
automatically trigger a cascade of early initialization. This change adds
a qualifier to the Converters that are used by @ConfigurationProperties,
so they can be isolated (and simple).
Fixes gh-2669
Spring MVC requires all handlers for the same path to be on the same handler
so if anyone wants to add new handlers for different content types they
have to copy a lot of code from BasicErrorController. This change increases
the visibility of the basic utility methods in BasicErrorController so that
custom handlers can be added easily.
Fixes gh-3828
This commit adds a new annotation, @ServletComponentScan, that can be
used to enable scanning for @WebFilter, @WebListener, and @WebServlet
annotated classes. Registration beans will be automatically created for
any classes that are found, with the configuration derived from the
annotation.
Previously, native cache libraries were favored over a standard JSR-107
implementation. If a user has a working setup using JCache with one
provider and switch to another provider, his setup may be broken if we
happen to provide a native support for the new provider.
We now consistently favor JSR-107 if it is present. Native support can
still be enabled via the `spring.cache.type` property.
Closes gh-3822
Previously, manual meta-data were added to the existing set of entries
which could lead to duplicates if a manual entry is meant to complement
a property that is detected via the processor.
We now match the name and type of the item against the auto-detected
entries. If no match is found, we add the extra entry as we did before.
If a match is found we override the description, default value and
deprecation information.
Closes gh-3562
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:
@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}
Closes gh-3635
Changing the velocity view resolver to a VelocityLayoutViewResolver seems
a common use case so it has now a dedicated section in the relevant how
to.
Closes gh-3732
The default value of `spring.devtools.restart.exclude` is quite long and
any override requires to copy/paste it to add additional exclusions. To
avoid that, a new `spring.devtools.restart.additional-exclude` property
has been added.
Both properties are now used to compute the full list of exclusions that
is used by PatternClassPathRestartStrategy.
Closes gh-3774
The `spring.datasource.name` property was hidden behind the 'name'
attribute of the Tomcat connection pool (since we are mapping all
datasource implementations on the `spring.datasource` namespace.
This commit replace the injected value by hand with the use of the
regular `DataSourceProperties`. That way, we generate proper meta-data
for it as well.
Closes gh-3755
A new `spring.datasource.type` property can now be used to configure the
connection pool implementation to use (rather than only relying on Boot's
preferences).
Closes gh-3705
Improve the documentation to explain the necessary steps to create a
custom Spring Boot starter. In particular, provide more details regarding
naming conventions.
Closes gh-2537
See gh-2927
Previously, to use a custom ConfigurableWebBindingInitializer, it was
necessary to extend WebMvcConfigurationSupport and override
getConfigurableWebBindingInitializer. This had the unwanted
side-effect of switching off the auto-configuration of Spring MVC.
This commit updates the auto-configuration to look for a
ConfigurableWebBindingInitializer bean and register it with Spring
MVC.
Closes gh-2526
This commit provides a single endpoint, /actuator, that serves HTML
(the HAL browser) or JSON depending on the request’s accept header
that enables discovery of all of the actuator’s other endpoints.
When the management context path is configured, the /actuator endpoint
moves to the configured path, e.g. if the management context path is
set to /management, the actuator endpoint will be available from
/management.
Closes gh-3696
This commit adds a new property, logging.exception-conversion-word,
that can be used to configure the conversion word that is used when
logging exceptions. The default value, %rEx, will log exceptions
with the root cause first and include class packaging information in
the stack trace. The new property is supported when using either
Logback or Log4J2.
Closes gh-3684
Harmonize the configuration properties for Undertow to match the changes
made for gh-2491.
Move `spring.undertow.accessLog*` to `spring.undertow.accesslog.*`
Add `directory`, `prefix` and `suffix` properties to further customize
how access logs are configured on Tomcat. Relocate all properties to the
`server.tomcat.accesslog` namespace.
`server.tomcat.accessLogPattern` and `server.tomcat.accessLogEnabled` are
deprecated and replaced by `server.tomcat.accesslog.pattern` and
`server.tomcat.accesslog.enabled` respectively.
Closes gh-2491
Previously, only folders on the classpath would be watched and used
to trigger a restart/reload of the application. This commit adds a
new property spring.devtools.restart.additional-paths that can be
used to configure additional paths that should be watched for
changes. When a change occurs in one of those paths a restart or
reload will be triggered, depending on the full restart exclude
patterns configured via the existing spring.devtools.restart.exclude
property.
Closes gh-3469
Three conditions must be met for the console to be enabled:
- H2 is on the classpath
- The application is a web application
- spring.h2.console.enabled is set to true
If spring-boot-devtools is on the classpath, spring.h2.console.enabled
will be set to true automatically. Without the dev tools, the enabled
property will have to be set to true in application.properties.
By default, the console is available at /h2-console. This can be
configured via the spring.h2.console.path property. The value of this
property must begin with a '/'.
When Spring Security is on the classpath the console will be secured
based on the user's security.* configuration. When the console is
secured, CSRF protection is disabled and frame options is set to
SAMEORIGIN for its path. Both settings are required in order for the
console to function.
Closes gh-766
The `bootRun` gradle task or `spring-boot:run` maven goal can be used to
start a Spring Boot app with DevTools as long as forking is enabled. Add
an explicit note in the documentation to mention that.
Closes gh-3315
Add an auto-configuration that avoid a Spring Boot user to add
`@EnableConfigurationProperties` to its configuration to benefit from
that feature.
As our own auto-configurations are tested independently, such annotation
is still present to avoid a useless reference to this new
auto-configuration.
Closes gh-2457
Add `spring.autoconfigure.exclude` to control the list of
auto-configuration classes to exclude via configuration. Merge the
exclusions defined on the `@EnableAutoConfiguration` or
`@SpringBooApplication` if any.
Closes gh-2435
Add a "management.health.defaults.enabled" property that controls whether
the default health indicators are enabled. This allow to disable them all
by default and still enable individual ones using their respective
specific property.
Closes gh-2298
Currently, the default TemplateResolver had no specific order. Thymeleaf
handles that with a "always first" strategy (that can be confusing if
several TemplateResolver have a "null" order.
While it is a fine default (and changing it could lead to weird side
effects), it has to be changed as soon as another TemplateResolver bean
is defined in the project.
The `spring.thymeleaf.template-resolver-order` property has been added to
control the order of the default TemplateResolver.
Closes gh-3575
Allow to disable the auto-startup flag of the default JMS and RabbitMQ
containers. This effectively permit to disable automatic listening via
configuration.
Closes gh-3587
A RepositoryRestMvcConfiguration subclass provided by a user is
problematic in a Spring Boot application as it causes
RepositoryRestMvcConfiguration's bean declarations to be processed
before any auto-configuration runs.
One problem that this causes is that it switches off Boot's Jackson
auto-configuration due to RepositoryRestMvcConfiguration having
already declared multiple ObjectMapper beans. Unlike Boot's
auto-configured ObjectMapper, none of these ObjectMappers are marked
as @Primary. This then leads to wiring failures due to multiple
candidates being available.
To address this problem a new RepositoryRestConfigurer abstract has been
introduced in Spring Data Gosling. Its use is now strongly preferred
over subclassing RepositoryRestMvcConfiguration. Note that our own
RepositoryRestMvcConfiguration subclass remains. It is imported as part
of auto-configuration (avoiding the ordering problems described above),
and provides configuration properties binding for
RepositoryRestConfiguration. However, the Jackson ObjectMapper
configuration has been moved out into a new RepositoryRestConfigurer
implementation.
While SpringBootRepositoryRestMvcConfiguration remains, this commit
makes it package private to discourage users from subclassing it. While
this may break existing applications, it, coupled with the documentation
updates, will hopefully guide them toward using
RepositoryRestConfigurer.
Closes gh-3439
Previously, the Spring Boot Gradle plugin would always apply the
application plugin to a project. It then piggy-backed on the application
plugin’s mainClassName and applicationDefaultJvmArgs properties for the
configuration of the bootRun task.
This commit updates the Spring Boot Gradle plugin so that it no longer
applies the application plugin. If the user applies the application
plugin then its configuration will be used, but it’s a no longer
requirement.
Users who do not need the application plugin, but who were using the
mainClassName or applicationDefaultJvmArgs properties will need to
change their builds as a result of this change as those properties will
no longer exist. As before, the mainClassName can be configured on the
springBoot extension:
springBoot {
mainClassName 'com.example.YourApplication'
}
The applicationDefaultJvmArgs property can be used, but it must now be
declared with the project's ext block. For example:
ext {
applicationDefaultJvmArgs = [ '-Dcom.example.property=true' ]
}
Closes gh-2679
Update Tomcat, Jetty and Undertow to serialize session data when the
application is stopped and load it again when the application restarts.
Persistent session are opt-in; either by setting `persistentSession`
on the ConfigurableEmbeddedServletContainer or by using the property
`server.session.persistent=true`.
Fixes gh-2490
Previously, the prefix was spring.embedded-mongodb. This was
inconsistent with the prefixes for Artermis and HornetQ which are
spring.artemis.embedded and spring.hornetq.embedded respectively.
See gh-2002
Embedded MongoDB is now auto-configured when it is on the classpath.
The Mongo instance will listen on the port specified by the
spring.data.mongodb.port property. If this property has a value of
zero and randomly allocated port will be used. In such an event, the
MongoClient created by MongoAutoConfiguration will be automatically
configured to use the port that was allocated.
By default, MongoDB 2.6.10 will be used. This can be configured using
the spring.embedded-mongodb.version property. Mongo's sync delay
feature is enabled by default. This can be configured using the
spring.embedded-mongobd.features property.
Closes gh-2002
Add an explicit note about the need of Spring MVC for actuator HTTP
endpoints. Also explicitly mention Jersey since it can be a source of
confusion.
See gh-2025
Previously, an item could only have a 'deprecated' boolean flag to
indicate that the property is deprecated. It is desirable to provide an
additional description for the deprecation as well as the name of the
property to use instead.
The `deprecated` boolean flag is now supported. Instead, a `deprecated`
object can be specified with two optional attributes: `reason` to provide
an explanation for the deprecation and `replacement` to refer to the
property that should be used instead. If none of them is present, an
empty deprecation object should be set.
For backward compatibility, the `deprecated` field is still set.
Deprecation information can only set via manual meta-data.
Closes gh-3449
This commit adds a new property, spring.jackson.time-zone, that can be
used to configure the time zone that Jackson uses when configuring
dates. It affects the serialisation of both JDK and Joda date types.
Closes gh-3505
This commit enhances the CLI to use the repositories configured in the
profiles declared in a user's Maven settings.xml file during
dependency resolution. A profile must be active for its repositories
to be used.
Closes gh-2703
Closes gh-3483
I think this is safe, judging by the integration tests, but I'm not
putting it in 1.2.x until we've had some feedback on it. The
integration tests actually had a bug that was masking this problem
because they were merging Properties from the whole classpath instead
of picking the first available resource (which is generally what
we do in Spring Boot applications for application.properties for
instance).
Fixes gh-3048
Liquibase has a `changeLog` property that is definitely used as a
`Resource` but cannot be defined as such as the original String value
should be kept against an API we don't control.
Update the tests also to make it more clear that if hints are added
against a property that is detected automatically, said property still
keeps all its auto-discovered capabilities.
Closes gh-3457
Update AbstractLoggingSystem to pass LoggingInitializationContext to
loadDefaults() method to enable access to the environment.
DefaultLogbackConfiguration now uses this to find log pattern overrides.
Fixes gh-3367
Closes gh-3405
Replace the enum provider by a more general purpose provider that can
substitute the type of the property for the purpose of auto-completing
the values.
"handle-as" can be used for enums but for any type that the IDE
understands such as locale, charset, mime-type and Spring's resource
abstraction.
Closes gh-3457
Add ApplicationArguments interface which allows SpringApplication.run
arguments to be injected into any bean. The interface provides access
to both the raw String[] arguments and also provides some convenience
methods to access the parsed 'option' and 'non-option' arguments.
A new ApplicationRunner interface has also been added which is
similar to the existing CommandLineRunner.
Fixes gh-1990
Add support for the following server properties which can be used to
configure the session:
server.session.tracking-modes
server.session.cookie.name
server.session.cookie.domain
server.session.cookie.path
server.session.cookie.comment
server.session.cookie.http-only
server.session.cookie.secure
server.session.cookie.max-age
In addition `server.session-timeout` is now deprecated and has been
replaced with `server.session.timeout`.
Fixes gh-3240
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.
Closes gh-3327
Use AbstractTemplateViewResolverProperties as the base class for
GroovyTemplateProperties since the Spring GroovyMarkupViewResolver is
an AbstractTemplateViewResolver.
The auto-configuration for Groovy is now more aligned with the existing
Freemarker and Velocity auto-configuration, with a `resourceLoaderPath`
property being used instead of `prefix`.
Fixes gh-3365
Closes gh-3374
Previously, all attempts to log a configuration file were logged at DEBUG
level which lead to a lot of noise as Spring Boot looks in many places by
default.
We now only log the files that are effectively found at DEBUG level and
all failed attempts at TRACE level.
Closes gh-3129
If a `JavaMailSenderImpl` is available, check that the underlying mail
server is available on startup. Add a `spring.mail.test-connection`
property to control this behaviour.
Closes gh-3408
If spring-hateoas is on the classpath and an MvcEndpoint returns a
@ResponseBody it will be extended and wrapped into a Resource with links.
All the existing endpoints that return sensible JSON data can be extended
this way (i.e. not /logfile). The HAL browser will also be added as an
endpoint if available on the classpath. Finally, asciidocs for the
Actuator endpoints are available as a separate jar file, which if
included in an app will also generate a new (HTTP) endpoint.
Fixes gh-1390
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.
Fixes gh-3345