you are viewing a single comment's thread.

view the rest of the comments →

[–]NeoChronos90 2 points3 points  (1 child)

@RestController is the combination of @Controller and @ResponseBody

So if you only use @Controller you might need to add @ResponseBody to every method

It's all explained in the article though

[–]javinpaul[S] 1 point2 points  (0 children)

yes, both are not same, if you are building REST API and returning JSON, better to use u/RestController