Corresponds to Modules 1–4 (What is Spring Boot, Setup, First Application, Core Concepts).
Run
./mvnw spring-boot:run
Endpoints
- GET http://localhost:8080/hello — plain text
- GET http://localhost:8080/info — JSON (AppInfo)
- GET http://localhost:8080/greet?name=Student — uses GreetingService
Structure
DemoApplication.java— main class with@SpringBootApplicationcontroller/HelloController.java— REST controller with@RestController,@GetMappingdto/AppInfo.java— DTO for JSON responseservice/GreetingService.java— service with constructor injection (DI)