Added the logic for using two servers for NABARD and UCB
This commit is contained in:
@@ -40,13 +40,21 @@ public class RequestResponse {
|
|||||||
InputStream input1 = null;
|
InputStream input1 = null;
|
||||||
String apiURL = null;
|
String apiURL = null;
|
||||||
try {
|
try {
|
||||||
|
String bc = new JSONObject(jsonInputString).getString("bankcode");
|
||||||
input1 = Scheduler.class.getClass().getResourceAsStream("/Properties.properties");
|
input1 = Scheduler.class.getClass().getResourceAsStream("/Properties.properties");
|
||||||
|
|
||||||
prop.load(input1);
|
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) {
|
} catch (IOException ex) {
|
||||||
|
|
||||||
log.error(String.valueOf(ex.getMessage()) + " error in request response class line no 67");
|
log.error(String.valueOf(ex.getMessage()) + " error in request response class line no 67");
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
if (input1 != null) {
|
if (input1 != null) {
|
||||||
|
Reference in New Issue
Block a user