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;
|
|
|
|
|
|
2026-02-17 12:53:54 +09:00
|
|
|
/**
|
|
|
|
|
* SPA(React) fallback 라우터
|
|
|
|
|
*
|
|
|
|
|
* React Router가 클라이언트 사이드 라우팅을 처리하므로,
|
|
|
|
|
* 모든 프론트 경로를 index.html로 포워딩한다.
|
|
|
|
|
*/
|
2025-10-22 13:50:04 +09:00
|
|
|
@Controller
|
|
|
|
|
public class WebViewController {
|
|
|
|
|
|
2026-02-17 12:53:54 +09:00
|
|
|
@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
|
|
|
}
|
|
|
|
|
}
|