Spring Boot @RestController Explained

What is @RestController in Spring Boot? 🚀 It is a combination of: @Controller + @ResponseBody 👉 It directly returns JSON response Example: @RestController public class Test {   @GetMapping("/hello")   public String hello() {     return "Hello";   } } Simple, clean, and perfect for APIs. Are you using Spring Boot in your project? #SpringBoot #Java #BackendDeveloper

To view or add a comment, sign in

Explore content categories