-
|
When returning a plain String within a Micronaut controller such as @Get ("/")
public HttpResponse<?> hello() {
return HttpResponse.notFound("Hello");
}the controller returns or with this one @Get("/hello")
public String hello2() {
return "Hello";
}the controller returns Syntactically If I use an @Get("hello3")
public String hello3() throws IOException {
return objectMapper.writeValueAsString("Hello");
}results in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The string is meant to be a raw type representing already encoded JSON |
Beta Was this translation helpful? Give feedback.
The string is meant to be a raw type representing already encoded JSON