-
Notifications
You must be signed in to change notification settings - Fork 1
Controller method return type is properly set only for wrapper types #8
Description
If a KafkaListener method looks like this:
java.util.concurrent.CompletableFuture<ExampleOut>handleExampleIn(@Payload ExampleIn examplein, @Headers Map<String, String> headers);
the resulting controller method looks like this (returning type is ExampleOut which is correct):
public ExampleOut executeExampleIn(@RequestBody ExampleIn examplein,
@RequestParam @Parameter(hidden = true) Map<String, String> params,
HttpServletResponse servletResponse, @RequestHeader Map<String, String> headers) {
kafkaSenderService.send(topicName, examplein, params, servletResponse);
return new ExampleOut();
}
But if a KafkaListener method doesn't use wrappers for the returning type:
ExampleOuthandleExampleIn(@Payload ExampleIn examplein, @Headers Map<String, String> headers);
the resulting controller method return type will be void.
location: pro/axenix_innovation/axenapi/utils/ElementHelper.java -> method getReturnedTypeMirror (the method considers only types with typed arguments, for other types null is returned).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status