snp-batch-validation/src/main/java/com/snp/batch/global/controller/WebViewController.java

21 lines
600 B
Java
Raw Normal View 히스토리

2025-10-22 13:50:04 +09:00
package com.snp.batch.global.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* SPA(React) fallback 라우터
*
* React Router가 클라이언트 사이드 라우팅을 처리하므로,
* 모든 프론트 경로를 index.html로 포워딩한다.
*/
2025-10-22 13:50:04 +09:00
@Controller
public class WebViewController {
@GetMapping({"/", "/jobs", "/executions", "/executions/{id:\\d+}",
"/execution-detail", "/schedules", "/schedule-timeline"})
public String forward() {
return "forward:/index.html";
2025-10-22 13:50:04 +09:00
}
}