세외수입 연계 요청여부 설정

master
mjkhan21 11 months ago
parent 8b586eac19
commit 4a9a0a86f6

@ -38,7 +38,9 @@ public class InterfaceConfig extends AbstractComponent {
}
}
private boolean useDatabase = true;
private boolean
useDatabase = true,
sendRequest = true;
/** .
* @param useDatabase
@ -47,6 +49,20 @@ public class InterfaceConfig extends AbstractComponent {
this.useDatabase = !"false".equals(useDatabase);
}
/** .
* @return
*/
public static boolean sendRequest() {
return conf.sendRequest;
}
/** .
* @param sendRequest
*/
public void setSendRequest(String sendRequest) {
this.sendRequest = !"false".equals(sendRequest);
}
/** 지자체 시스템 설정 */
private List<EndPoint> locals;
/** 지방세외수입 시스템 설정 */

@ -59,6 +59,7 @@ public class Requestor {
* @param intfInfo
*/
public void request(InterfaceInfo<?, ?> intfInfo) {
if (!InterfaceConfig.sendRequest()) return;
try {
init();
@ -80,10 +81,7 @@ public class Requestor {
);
String body = hresp.body();
Log.get(Requestor.class).debug("targetMessage:\n{}", body);
/*
if (WebClient.Request.SUCCESS != hresp.statusCode())
throw new RuntimeException(intfInfo.interfaceID() + ": " + hresp.statusCode());
*/
intfInfo
.json(json)
.parseTargetMessage(body);

@ -1,5 +1,6 @@
{
"useDatabase": false,
"useDatabase": true,
"sendRequest": false,
"locals": [
{"organization": "4060000",/* 지역 자치단체 코드(7자리) */

Loading…
Cancel
Save