diff --git a/mens-api/src/main/java/kr/xit/ens/support/nice/service/INiceCiService.java b/mens-api/src/main/java/kr/xit/ens/support/nice/service/INiceCiService.java index 236905a..1cccb4a 100644 --- a/mens-api/src/main/java/kr/xit/ens/support/nice/service/INiceCiService.java +++ b/mens-api/src/main/java/kr/xit/ens/support/nice/service/INiceCiService.java @@ -25,7 +25,7 @@ public interface INiceCiService { // 기관용 Token //-------------------------------------------------------------------------------- TokenResponse generateToken(final TokenRequest reqDTO); - TokenResponse revokeToken(final String token); + TokenResponse revokeToken(); //-------------------------------------------------------------------------------- // 기관용 Token //-------------------------------------------------------------------------------- diff --git a/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiDummyTestService.java b/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiDummyTestService.java index 9f036dc..4789472 100644 --- a/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiDummyTestService.java +++ b/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiDummyTestService.java @@ -18,6 +18,8 @@ import kr.xit.biz.ens.model.nice.NiceCiDTO.ResponseDataHeader; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRequest; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResponse; +import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRevokeResDataBody; +import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenRevokeResponse; import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.util.ApiWebClientUtil; @@ -110,18 +112,21 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl { * - current_timestamp * Date currentDate = new Date(); * long current_timestamp = currentDate.getTime() /1000 - * @param token * @return * */ @TraceLogging - public TokenResponse revokeToken(final String token){ - return webClient.exchange( - HOST + API_GENERATE_TOKEN, - HttpMethod.POST, - null, - TokenResponse.class, - getHeaderMap(MediaType.APPLICATION_FORM_URLENCODED_VALUE, AUTH_TYPE_BASIC)); + public TokenRevokeResponse revokeToken(){ + + return TokenRevokeResponse.builder() + .dataHeader(ResponseDataHeader.builder() + .gwRsltCd("1200") + .gwRsltMsg("오류없음") + .build()) + .dataBody(TokenRevokeResDataBody.builder() + .result(true) + .build()) + .build(); } //-------------------------------------------------------------------------------- // 기관용 Token diff --git a/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiService.java b/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiService.java index f1c984c..86d9b4b 100644 --- a/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiService.java +++ b/mens-api/src/main/java/kr/xit/ens/support/nice/service/NiceCiService.java @@ -109,13 +109,12 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer * - current_timestamp * Date currentDate = new Date(); * long current_timestamp = currentDate.getTime() /1000 - * @param token * @return * */ @Override @TraceLogging - public TokenResponse revokeToken(final String token){ + public TokenResponse revokeToken(){ //validate(reqDTO, null); return webClient.exchange( diff --git a/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiController.java b/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiController.java index db3ea9d..3deed5e 100644 --- a/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiController.java +++ b/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiController.java @@ -52,10 +52,8 @@ public class NiceCiController { @Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기") @PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE) - public ApiResponseDTO> revokeToken( - @RequestParam final String accessToken - ) { - return ApiResponseDTO.success(service.revokeToken(accessToken)); + public ApiResponseDTO> revokeToken() { + return ApiResponseDTO.success(service.revokeToken()); } //-------------------------------------------------------------------------------- // 기관용 Token diff --git a/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiDummyTestController.java b/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiDummyTestController.java index 92f2d68..a34ab1a 100644 --- a/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiDummyTestController.java +++ b/mens-api/src/main/java/kr/xit/ens/support/nice/web/NiceCiDummyTestController.java @@ -68,10 +68,8 @@ public class NiceCiDummyTestController { @Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기") @PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE) - public ApiResponseDTO> revokeToken( - @RequestParam final String accessToken - ) { - return ApiResponseDTO.success(service.revokeToken(accessToken)); + public ApiResponseDTO> revokeToken() { + return ApiResponseDTO.success(service.revokeToken()); } //-------------------------------------------------------------------------------- // 기관용 Token diff --git a/mens-batch/src/main/resources/config/application-app.yml b/mens-batch/src/main/resources/config/application-app.yml index 1bb7ebe..b7c1ec2 100644 --- a/mens-batch/src/main/resources/config/application-app.yml +++ b/mens-batch/src/main/resources/config/application-app.yml @@ -3,21 +3,28 @@ #----------------------------------------------------------------------- app: - # request log - param: - log: + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: # exclude pattern : CommonsRequestLoggingFilter && LoggingFilter 적용 exclude-patterns: '/swagger-ui/(.*), /api-docs/(.*)' + custom-enabled: false # CommonsRequestLoggingFilter 사용 parameter 로그 출력 - enabled: true - # parameter custom 로그 출력(LoggerAspect) - custom.enabled: false - # MDC logging trace 활성 - mdc: - log: - trace: - enabled: false - uris: '/api/kakao/(.*), /api/v1/ens/sendBulks(.*)' + common-enabled: false + # Filter를 사용한 로그 출력 + filter-enabled: false + response-enabled: false + mdc: + enabled: false + exclude-patterns: '/api/kakao/(.*), /api/v1/ens/sendBulks(.*)' # slack slack-webhook: diff --git a/mens-batch/src/main/resources/config/application-dev.yml b/mens-batch/src/main/resources/config/application-dev.yml index 4a85994..d472b07 100644 --- a/mens-batch/src/main/resources/config/application-dev.yml +++ b/mens-batch/src/main/resources/config/application-dev.yml @@ -51,14 +51,23 @@ app: data: root: path: /data - param: - log: - # CommonsRequestLoggingFilter 사용 parameter 로그 출력 + + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: + custom-enabled: true + response-enabled: true + # MDC logging trace 활성 + mdc: enabled: true - # parameter custom 로그 출력(LoggerAspect) - custom.enabled: true - # MDC logging trace 활성 - mdc.log.trace.enabled: true # slack slack-webhook: diff --git a/mens-batch/src/main/resources/config/application-ens.yml b/mens-batch/src/main/resources/config/application-ens.yml index e0d2fcd..117e641 100644 --- a/mens-batch/src/main/resources/config/application-ens.yml +++ b/mens-batch/src/main/resources/config/application-ens.yml @@ -2,19 +2,18 @@ # application 설정 : batch -> api #----------------------------------------------------------------------- contract: - provider: - # milisecond - connection: - timeout: 30000 - readTimeout: 30000 - thread: - # 동시 실행 스레드 개수 - corePoolSize: 5 - # 스레드 풀에서 사용할 수 있는 최대 개수 - maxPoolSize: 10 - kakao: - bulk-max-cnt: 10 - host: http://localhost:8081 - api: - bulksend: /api/kakaopay/v1/documents/bulk - bulkstatus: /api/kakaopay/v1/documents/bulk/status + # milisecond + connection: + timeout: 30000 + readTimeout: 30000 + thread: + # 동시 실행 스레드 개수 + corePoolSize: 5 + # 스레드 풀에서 사용할 수 있는 최대 개수 + maxPoolSize: 10 + kakao: + bulk-max-cnt: 10 + host: http://localhost:8081 + api: + bulksend: /api/kakaopay/v1/documents/bulk + bulkstatus: /api/kakaopay/v1/documents/bulk/status diff --git a/mens-batch/src/main/resources/config/application-local.yml b/mens-batch/src/main/resources/config/application-local.yml index ef1fec6..9f47658 100644 --- a/mens-batch/src/main/resources/config/application-local.yml +++ b/mens-batch/src/main/resources/config/application-local.yml @@ -73,14 +73,23 @@ app: data: root: path: D:/data - param: - log: - # CommonsRequestLoggingFilter 사용 parameter 로그 출력 - enabled: true - # parameter custom 로그 출력(LoggerAspect) - custom.enabled: true - # MDC logging trace 활성 - mdc.log.trace.enabled: true + + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: + custom-enabled: true + response-enabled: true + # MDC logging trace 활성 + mdc: + enabled: false # slack slack-webhook: diff --git a/mens-batch/src/main/resources/config/application-prod.yml b/mens-batch/src/main/resources/config/application-prod.yml index 747877a..e95c1ee 100644 --- a/mens-batch/src/main/resources/config/application-prod.yml +++ b/mens-batch/src/main/resources/config/application-prod.yml @@ -77,14 +77,22 @@ app: data: root: path: d:/data - param: - log: - # CommonsRequestLoggingFilter 사용 parameter 로그 출력 + + #--------------------------------------------------------------- + # log 설정 + # request: + # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화 + # --> 운영: common-enabled, 개발: custom-enabled 사용 권장 + # response-enabled : 호출 결과 출력 - 운영시 false + # mdc : api 호출(서비스) 로그 기록 + # uris : api 호출 로그 제외 패턴 + #--------------------------------------------------------------- + log: + request: + common-enabled: true + # MDC logging trace 활성 + mdc: enabled: true - # parameter custom 로그 출력(LoggerAspect) - custom.enabled: true - # MDC logging trace 활성 - mdc.log.trace.enabled: true # slack slack-webhook: diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/nice/NiceCiDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/nice/NiceCiDTO.java index d46109f..389f1e5 100644 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/nice/NiceCiDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/nice/NiceCiDTO.java @@ -112,6 +112,10 @@ public class NiceCiDTO { @Schema(requiredMode = RequiredMode.REQUIRED) @Valid private ResponseDataHeader dataHeader; + + @Schema(requiredMode = RequiredMode.REQUIRED) + @Valid + private TokenRevokeResDataBody dataBody; } /** @@ -161,15 +165,26 @@ public class NiceCiDTO { */ @Schema(requiredMode = RequiredMode.AUTO, title = "요청한 scope 값", example = "default") private String scope; + } - //----------------------------------------------------------------------- - // 토큰 폐기 요청시 필수값 - //----------------------------------------------------------------------- + /** + *
+ * 기관용 토큰 폐기 응답 dataBody + *+ */ + @Schema(name = "TokenRevokeResDataBody", description = "기관용 토큰 폐기 요청 응답 dataBody DTO") + @Data + @NoArgsConstructor + @AllArgsConstructor + @SuperBuilder + public static class TokenRevokeResDataBody { /** - * token 폐기시 필수 + *
+ * 토큰폐기결과 * true or false + **/ - @Schema(requiredMode = RequiredMode.AUTO) + @Schema(requiredMode = RequiredMode.REQUIRED, title = "토큰폐기결과", example = "true") private boolean result; } //--------------------------------------------------------------------------------