Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Returns info for a user based on path variable.
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.*;
@SpringBootApplication
public class UserApplication {
public static void main(String[] args) {
SpringApplication.run(UserApplication.class, args);
}
}
@RestController
@RequestMapping("/users")
class UserController {
@GetMapping("/{id}")
public String getUser(@PathVariable int id) {
return "User " + id;
}
}Spring Boot is a Java-based framework that simplifies building production-ready Spring applications. It provides convention-over-configuration, embedded servers, and production-grade features for microservices and web applications.
Origin & Creator
Spring Boot was created by Pivotal Software (now part of VMware) in 2014 to simplify Spring framework development and deployment.
Industrial Note
Spring Boot is preferred in enterprise, cloud-native, and microservices applications where scalability, maintainability, and rapid development are critical.