To bind the method return value as the response body in Spring Boot, you can use the _____ annotation.

  • @GetMapping
  • @RequestMapping
  • @ResponseBody
  • @ResponseEntity
In Spring Boot, to bind the method return value as the response body, you can use the @ResponseBody annotation. This annotation indicates that the return value of the method should be converted to JSON or another format and included in the HTTP response body. It's commonly used when you want to return data from a controller method in a RESTful web service.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *