-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
nebhale opened SPR-10949 and commented
Currently if a method is annotated with @SubscribeEvent
and then uses an @PathVariable
the value is not mapped into the method invocation. So an example such as the following does not work.
@SubscribeEvent("/projects/{projectId}/builds")
List<Build> onSubscribe(@PathVariable String projectId) {
...
}
What should happen is the value that is extracted from the placeholder should be injected in the same way it would be if this were an @RequestMapping
annotated method. Note that this means that the argument should be coerced beyond a mere String
and should get the full benefit of the Spring's type coercion support (e.g, Spring Data's domain class binding). Also note that this may be more generally applicable to methods annotated with other types (e.g. @MessageMapping
).
Affects: 4.0 M3
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement