Spring 전환 최소 실행 골격 재검증 (role-developer-reverify-001)
This commit is contained in:
parent
6d85fec6e0
commit
640c4312a6
1 changed files with 23 additions and 0 deletions
23
src/main/java/com/example/controller/HealthController.java
Normal file
23
src/main/java/com/example/controller/HealthController.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package com.example.controller;
|
||||
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api")
|
||||
public class HealthController {
|
||||
|
||||
@GetMapping("/health")
|
||||
public ResponseEntity<Map<String, String>> health() {
|
||||
return ResponseEntity.ok(Map.of("status", "UP"));
|
||||
}
|
||||
|
||||
@GetMapping("/ping")
|
||||
public ResponseEntity<String> ping() {
|
||||
return ResponseEntity.ok("pong");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue