feat: 신한라이프 대내MCI/EAI JSON 연계 표준(ShinhanMciSender) 신규 구현
This commit is contained in:
@@ -86,6 +86,7 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor
|
||||
}
|
||||
|
||||
public org.springframework.http.ResponseEntity<String> handleMessage(String sessionId, String body) {
|
||||
log.info("Received POST message for sessionId: " + sessionId + ", body: " + body);
|
||||
if (sessionId == null || !sessions.containsKey(sessionId)) {
|
||||
return org.springframework.http.ResponseEntity.badRequest().body("Missing or invalid sessionId");
|
||||
}
|
||||
@@ -104,10 +105,13 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor
|
||||
} else {
|
||||
message = objectMapper.convertValue(map, io.modelcontextprotocol.spec.McpSchema.JSONRPCNotification.class);
|
||||
}
|
||||
log.info("Converted message type: " + message.getClass().getName());
|
||||
|
||||
session.handle(message).subscribe();
|
||||
log.info("Message sent to session handler");
|
||||
return org.springframework.http.ResponseEntity.ok().build();
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to handle message", e);
|
||||
return org.springframework.http.ResponseEntity.status(500).body(e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -124,11 +128,15 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor
|
||||
@Override
|
||||
public Mono<Void> sendMessage(McpSchema.JSONRPCMessage message) {
|
||||
return Mono.fromRunnable(() -> {
|
||||
log.info("Sending message to SSE stream: " + message.getClass().getName());
|
||||
try {
|
||||
String json = objectMapper.writeValueAsString(message);
|
||||
log.info("Serialized message: " + json);
|
||||
emitter.send(org.springframework.web.servlet.mvc.method.annotation.SseEmitter.event().name("message").data(json));
|
||||
log.info("Message successfully sent to SSE emitter");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
log.error("Error sending message to SSE emitter", e);
|
||||
emitter.completeWithError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,10 @@ mcp.gateway.fallback.routes.email=https://axhub-tool-email.onrender.com
|
||||
mcp.gateway.fallback.default-url=https://axhub-tool-other.onrender.com
|
||||
mcp.gateway.fallback.routes.payment=https://axhub-tool-payment.onrender.com
|
||||
mcp.gateway.fallback.routes.hr=https://axhub-tool-hr.onrender.com
|
||||
|
||||
# --- 褐フ塭檜ヅ EAI/MCI 翱啗 IP 薑爾 (偃嫦 <20>唳) ---
|
||||
shinhan.integration.envrTypeCd=D
|
||||
shinhan.integration.eai.url=http://10.176.32.181
|
||||
shinhan.integration.internalMci.url=http://10.176.32.173
|
||||
shinhan.integration.bancaMci.url=http://10.176.32.117
|
||||
shinhan.integration.externalMci.url=http://10.176.32.176
|
||||
|
||||
@@ -3,3 +3,10 @@
|
||||
# spring.datasource.driverClassName=oracle.jdbc.OracleDriver
|
||||
# spring.datasource.username=prod_user
|
||||
# spring.datasource.password=prod_password
|
||||
|
||||
# --- 褐フ塭檜ヅ EAI/MCI 翱啗 IP 薑爾 (遴艙 <20>唳) ---
|
||||
shinhan.integration.envrTypeCd=R
|
||||
shinhan.integration.eai.url=http://10.172.32.181
|
||||
shinhan.integration.internalMci.url=http://10.172.32.173
|
||||
shinhan.integration.bancaMci.url=http://10.172.32.117
|
||||
shinhan.integration.externalMci.url=http://10.172.32.177
|
||||
|
||||
Reference in New Issue
Block a user