fix: resolve MCI_STRING routing issue and add fast fail timeout for router

This commit is contained in:
jade
2026-07-14 09:56:21 +09:00
parent 06e6bc6f6c
commit 97a054da82
3 changed files with 21 additions and 7 deletions

View File

@@ -50,7 +50,13 @@ public class McpRouterController {
this.securityProperties = securityProperties;
this.objectMapper = objectMapper;
this.gatewayFallbackProperties = gatewayFallbackProperties;
this.restClient = RestClient.create();
// [수정됨] 1초 타임아웃을 강제하여 죽은 서버 대기로 인한 지연 방지
org.springframework.http.client.SimpleClientHttpRequestFactory factory = new org.springframework.http.client.SimpleClientHttpRequestFactory();
factory.setConnectTimeout(1000); // 연결 시도 타임아웃 1초
factory.setReadTimeout(1000); // 응답 대기 타임아웃 1초
this.restClient = RestClient.builder().requestFactory(factory).build();
}
@Operation(summary = "MCP 파이프라인 호출", description = "MCP 표준 파이프라인(ExecuteService)을 통해 레거시 툴을 호출합니다.")