Spring 전환 최소 실행 골격 구현 (role-developer-001)

This commit is contained in:
forge-bot 2026-07-14 05:03:25 +00:00
parent 79498b9bfa
commit 3ddbca90e0

View file

@ -0,0 +1,18 @@
package com.example.demo.controller;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/hello")
public ResponseEntity<String> hello(@RequestParam(required = false) String name) {
String message = (name != null && !name.isBlank())
? "Hello, " + name + "!"
: "Hello, World!";
return ResponseEntity.ok(message);
}
}