From 7d256e38ff5deee1887c3ebd8b77f6469840b743 Mon Sep 17 00:00:00 2001 From: asif Date: Sun, 11 May 2025 14:51:01 +0530 Subject: [PATCH] Added the logic for using two servers for NABARD and UCB --- src/main/java/com/methods/RequestResponse.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/methods/RequestResponse.java b/src/main/java/com/methods/RequestResponse.java index c4a7e38..a46b82f 100644 --- a/src/main/java/com/methods/RequestResponse.java +++ b/src/main/java/com/methods/RequestResponse.java @@ -40,13 +40,21 @@ public class RequestResponse { InputStream input1 = null; String apiURL = null; try { + String bc = new JSONObject(jsonInputString).getString("bankcode"); input1 = Scheduler.class.getClass().getResourceAsStream("/Properties.properties"); prop.load(input1); - apiURL = prop.getProperty("APIURL"); + if(bc.equals("0005") || bc.equals("0021")) { + apiURL = prop.getProperty("APIURL_NABARD"); + } else { + apiURL = prop.getProperty("APIURL_UCB"); + } } catch (IOException ex) { log.error(String.valueOf(ex.getMessage()) + " error in request response class line no 67"); + } catch(Exception e) { + log.error(e.getMessage()); + e.printStackTrace(); } finally { if (input1 != null) {