spring-projects / spring-projects/spring-boot
Rewrite Actuator MVC adapter layer for Servlet Functional Endpoints
@bclozel is already working on this.
Since Feb 21, 2020.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
The Actuator MVC adapter layer is based on the MVC annotation model (especially AbstractWebMvcEndpointHandlerMapping, which extends RequestMappingInfoHandlerMapping). In this mode, we've got to use the annotation model in ways that aren't really ideal: programmatically registering handlers with conditions extracted from the Actuator configuration model, having very general controller handlers that mainly work because of Spring MVC flexibility.
And general and especially for #12951, we'd like to make Actuator web support independent of the main application. Without this, configuration changes in the main application will be reflected on Actuator endpoints (like the response format), which makes things inconsistent between applications. The main goal of Actuator is to provide a common, consistent model across applications, no matter what web stack they're using.
As seen in #20211, we might have found the limits of the current Actuator web adapter layer for Spring MVC. Spring Framework now ships Servlet Functional Endpoints. Unlike the annotation model, they're designed for programmatic registrations and the message converters configuration is bound to the RouterFunctionHandlerMapping instance, whereas with the annotation model it's separate and tied to RequestMappingHandlerAdapter.
This issue should consider whether reimplementing the MVC web adapter layer for Actuator using Servlet Functional Endpoints would be possible and solve our current issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.