Browse Source

update configuration

shjung 3 days ago
parent
commit
ade4a4bab9

+ 13 - 13
src/main/java/com/tsi/api/server/controller/TscSsipApiController.java

@@ -76,8 +76,8 @@ public class TscSsipApiController {
     @PostMapping(value = {SSIP_API_NODE_INFO}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<TscSsipApiResultNodeInfo> getNodeInfo(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
 
-        String apiId = SSIP_API_NODE_INFO;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_NODE_INFO;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, apiToken);
 
         List<NodeDto> resultData = new ArrayList<>();
@@ -129,8 +129,8 @@ public class TscSsipApiController {
     @PostMapping(value = {SSIP_API_BROKER_INFO}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<TscSsipApiResultBrokerInfo> getBrokerInfo(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
 
-        String apiId = SSIP_API_BROKER_INFO;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_BROKER_INFO;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, apiToken);
 
         ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
@@ -208,8 +208,8 @@ public class TscSsipApiController {
     @PostMapping(value = {SSIP_API_SYSTEM_STATUS}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> registerSystemStatus(@RequestBody SystemStatusDto status, HttpServletRequest request){
 
-        String apiId = SSIP_API_SYSTEM_STATUS;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_SYSTEM_STATUS;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.debug("{}, {}, {}", apiId, remoteIP, status.toString());
 
         //명목메모리 사용률 = used / total = ( total - free ) / total
@@ -312,8 +312,8 @@ public class TscSsipApiController {
     @PostMapping(value = {SSIP_API_SYSTEM_STATUS2}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> registerSystemStatus2(@RequestBody SystemStatus2Dto status, HttpServletRequest request){
 
-        String apiId = SSIP_API_SYSTEM_STATUS2;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_SYSTEM_STATUS2;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.debug("{}, {}, {}", apiId, remoteIP, status.toString());
 
         //명목메모리 사용률 = used / total = ( total - free ) / total
@@ -359,8 +359,8 @@ public class TscSsipApiController {
     @GetMapping(value = {SSIP_API_KAFKA_TOKEN}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> getKafkaToken(@PathVariable("apiToken") String apiToken, HttpServletRequest request) {
 
-        String apiId = SSIP_API_KAFKA_TOKEN;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_KAFKA_TOKEN;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, apiToken);
 
         ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
@@ -404,8 +404,8 @@ public class TscSsipApiController {
     @PostMapping(value = {SSIP_API_KAFKA_AUTH}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> getKafkaAuth(@RequestBody KafkaTokenAuthDto token, HttpServletRequest request) {
 
-        String apiId = SSIP_API_KAFKA_AUTH;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = SSIP_API_KAFKA_AUTH;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, token);
 
         String resultCode = String.valueOf(TscSsipApiErrorCode.SUCCESS.getCode());
@@ -431,7 +431,7 @@ public class TscSsipApiController {
             }
         }
         catch (Exception e) {
-            log.error("Exception: {}", e);
+            log.error("Exception: {}", e.getMessage());
             apiInvokeVo.setError(TscSsipApiErrorCode.ERROR_INTERNAL_DATA.getCode());
             resultCode = String.valueOf(TscSsipApiErrorCode.ERROR_INTERNAL_DATA.getCode());
             result.setResult(resultCode);

+ 8 - 8
src/main/java/com/tsi/api/server/controller/TscSsipAppController.java

@@ -44,8 +44,8 @@ public class TscSsipAppController {
     @GetMapping(value = {NAVI_NODE_STATUS}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> getNodeStatus(@PathVariable("deviceId") String deviceId, HttpServletRequest request) {
 
-        String apiId = NAVI_NODE_STATUS;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = NAVI_NODE_STATUS;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, deviceId);
 
         ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
@@ -87,8 +87,8 @@ public class TscSsipAppController {
     @GetMapping(value = {NAVI_DEVICE_AUTH}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> getDeviceAuthInfo(@PathVariable("deviceId") String deviceId, HttpServletRequest request) {
 
-        String apiId = NAVI_DEVICE_AUTH;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = NAVI_DEVICE_AUTH;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, deviceId);
 
         ApiInvokeVo apiInvokeVo = ApiInvokeVo.builder()
@@ -133,8 +133,8 @@ public class TscSsipAppController {
 
     @PostMapping(value = {NAVI_DEVICE_REGISTER}, produces = {"application/json; charset=utf8"})
     public ResponseEntity<AbstractTscSsipApiResult> registerDevice(@RequestBody DeviceInfo deviceInfo,  HttpServletRequest request){
-        String apiId = NAVI_DEVICE_REGISTER;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = NAVI_DEVICE_REGISTER;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, deviceInfo.toString());
 
         try {
@@ -152,8 +152,8 @@ public class TscSsipAppController {
 
     @GetMapping(value = {NAVI_DOWNLOADS})
     public ResponseEntity<Resource> download(@PathVariable("fileName") String fileName, HttpServletRequest request) {
-        String apiId = NAVI_DOWNLOADS;
-        String remoteIP = ApiUtils.getRemoteIP(request);
+        final String apiId = NAVI_DOWNLOADS;
+        final String remoteIP = ApiUtils.getRemoteIP(request);
         log.info("{}, {}, {}", apiId, remoteIP, fileName);
 
         try {