S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation allows you to define controller methods that return data instead of views?

  • (A) @RestController
  • (B) @Controller
  • (C) @DataMapping
  • (D) @ResponseData
  • Correct Answer - Option(A)
  • Views: 12
  • Filed under category Springboot
  • Hashtags:

Explanation by: Shyam Dubey
@RestController is used to return data directly, typically in JSON format.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.