Separate endpoint concerns

Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
This commit is contained in:
Phillip Webb
2017-10-13 09:14:27 -07:00
parent d24709c696
commit fd5c43cdc9
169 changed files with 3424 additions and 3067 deletions

View File

@@ -1,3 +1,3 @@
spring.thymeleaf.cache: false
logging.level.org.springframework.security: INFO
endpoints.default.web.enabled=true
management.endpoints.web.expose=*