Refactor the Actuator MVC configuration to allow more customization

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
This commit is contained in:
Dave Syer
2015-06-30 09:01:35 +01:00
parent 4187b5d8fb
commit 1e464da248
20 changed files with 929 additions and 281 deletions

View File

@@ -1,5 +1,5 @@
# logging.file: /tmp/logs/app.log
# logging.level.org.springframework.security: INFO
# logging.level.org.springframework.security: DEBUG
management.address: 127.0.0.1
#management.port: 8181
endpoints.shutdown.enabled: true