Consider deprecating @ControllerEndpoint and @RestControllerEndpoint
See original GitHub issueWe should decide if we want to deprecate and later remove @ControllerEndpoint and @RestControllerEndpoint from the actuator. Using them ties the user to WebMVC or WebFlux and they were meant to ease the upgrade path to the weblayer-abstracting @Endpoint with @ReadOperation, etc.
Getting rid of those would pave the way for https://github.com/spring-projects/spring-boot/issues/20290.
If you’re seeing this ticket and object to this idea, please comment, your feedback is very valuable. Please also explain your use case and why this use case can’t be solved with @Endpoint or @WebEndpoint.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:11 (8 by maintainers)
Top Results From Across the Web
RestControllerEndpoint (Spring Boot 3.0.0 API)
Identifies a type as being a REST endpoint that is only exposed over Spring MVC or Spring WebFlux. Mapped methods must be annotated...
Read more >spring-projects/spring-boot - Gitter
@wilkinsona My application is written in Kotlin and I have @WriteOperation in a custom actuators that takes in a DTO but spring boot...
Read more >Brian Clozel @bclozel@mamot.fr - Twitter
We should decide if we want to deprecate and later remove @ControllerEndpoint and @RestControllerEndpoint from the actuator. Using them ties the user to...
Read more >Spring Boot Rest Controller endpoint exception - java
The issue is because of producer media-type. The response only accept image/png , yet when there is an error media-type is application/json ...
Read more >Deprecating API Endpoints - Stoplight Blog
Deprecation communicates a function, method, or entire package is going ... We're considering building a notification system so teams can ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We have quite a few
@RestControllerEndpointannotations used here.Main use cases that I think would be useful and helpful to support going forward would be:
@GetMapping,@PostMapping,@ResponseBody, etc.I think most of these could likely be converted and written to conform to the new way of doing this.
HttpServletRequest#getInputStream()It might be doable to do this today, but I wasn’t able to find an alternative.
One other thing that might be useful here:
@RestControllerEndpointallows for overloading methods that address different requirements. For example, one could have multiple@GetMappingmethods that handle different concerns, with different parameters or path variables. This seems more natural vs one@ReadOperationwith 2-3 parameters some marked as selectors and some marked as not. Perhaps the replacement could provide the same programming model.