Allow component name to be specified in @ControllerAdvice
[SPR-16566]
#21108
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Peter Luttrell opened SPR-16566 and commented
Please consider adding a property to the
@ControllerAdvice
and@RestControllerAdvice
annotations that provides a hint to SpringBoot naming just like is currently provided for@Controller
and@RestController
. This would enable users to have two identically namedControllerAdvice
classes in different packages peacefully coexist.For example, these two classes works nicely togather:
com.v1.SomeRestController
:com.v2.SomeRestController
:So it'd be great if these would also work togather:
com.v1.SomeRestControllerAdvice
:com.v2.SomeRestControllerAdvice
:But the last class causes the following as of the version of Spring included with Spring Boot 2.0.0.RELEASE:
Affects: 5.0.4
The text was updated successfully, but these errors were encountered: