Added the logic for using two servers for NABARD and UCB

This commit is contained in:
2025-05-11 14:51:01 +05:30
parent f016c41649
commit 7d256e38ff

View File

@@ -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) {