feat: JsonInclude.Include.NON_EMPTY 적용

dev
gitea-관리자 1 year ago
parent 90c77d40a4
commit 6d05fcaf45

@ -25,7 +25,7 @@ public interface INiceCiService {
// 기관용 Token // 기관용 Token
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
TokenResponse generateToken(final TokenRequest reqDTO); TokenResponse generateToken(final TokenRequest reqDTO);
TokenResponse revokeToken(final String token); TokenResponse revokeToken();
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

@ -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.TokenRequest;
import kr.xit.biz.ens.model.nice.NiceCiDTO.TokenResDataBody; 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.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.exception.BizRuntimeException;
import kr.xit.core.spring.annotation.TraceLogging; import kr.xit.core.spring.annotation.TraceLogging;
import kr.xit.core.spring.util.ApiWebClientUtil; import kr.xit.core.spring.util.ApiWebClientUtil;
@ -110,18 +112,21 @@ public class NiceCiDummyTestService extends EgovAbstractServiceImpl {
* - current_timestamp * - current_timestamp
* Date currentDate = new Date(); * Date currentDate = new Date();
* long current_timestamp = currentDate.getTime() /1000 * long current_timestamp = currentDate.getTime() /1000
* @param token
* @return * @return
* </pre> * </pre>
*/ */
@TraceLogging @TraceLogging
public TokenResponse revokeToken(final String token){ public TokenRevokeResponse revokeToken(){
return webClient.exchange(
HOST + API_GENERATE_TOKEN, return TokenRevokeResponse.builder()
HttpMethod.POST, .dataHeader(ResponseDataHeader.builder()
null, .gwRsltCd("1200")
TokenResponse.class, .gwRsltMsg("오류없음")
getHeaderMap(MediaType.APPLICATION_FORM_URLENCODED_VALUE, AUTH_TYPE_BASIC)); .build())
.dataBody(TokenRevokeResDataBody.builder()
.result(true)
.build())
.build();
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token

@ -109,13 +109,12 @@ public class NiceCiService extends EgovAbstractServiceImpl implements INiceCiSer
* - current_timestamp * - current_timestamp
* Date currentDate = new Date(); * Date currentDate = new Date();
* long current_timestamp = currentDate.getTime() /1000 * long current_timestamp = currentDate.getTime() /1000
* @param token
* @return * @return
* </pre> * </pre>
*/ */
@Override @Override
@TraceLogging @TraceLogging
public TokenResponse revokeToken(final String token){ public TokenResponse revokeToken(){
//validate(reqDTO, null); //validate(reqDTO, null);
return webClient.exchange( return webClient.exchange(

@ -52,10 +52,8 @@ public class NiceCiController {
@Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기") @Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기")
@PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> revokeToken( public ApiResponseDTO<?> revokeToken() {
@RequestParam final String accessToken return ApiResponseDTO.success(service.revokeToken());
) {
return ApiResponseDTO.success(service.revokeToken(accessToken));
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token

@ -68,10 +68,8 @@ public class NiceCiDummyTestController {
@Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기") @Operation(summary = "기관용 토큰 폐기", description = "기관용 토큰 폐기")
@PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE) @PostMapping(value = "/revokeToken", produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResponseDTO<?> revokeToken( public ApiResponseDTO<?> revokeToken() {
@RequestParam final String accessToken return ApiResponseDTO.success(service.revokeToken());
) {
return ApiResponseDTO.success(service.revokeToken(accessToken));
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// 기관용 Token // 기관용 Token

@ -3,21 +3,28 @@
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
app: 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 pattern : CommonsRequestLoggingFilter && LoggingFilter 적용
exclude-patterns: '/swagger-ui/(.*), /api-docs/(.*)' exclude-patterns: '/swagger-ui/(.*), /api-docs/(.*)'
custom-enabled: false
# CommonsRequestLoggingFilter 사용 parameter 로그 출력 # CommonsRequestLoggingFilter 사용 parameter 로그 출력
enabled: true common-enabled: false
# parameter custom 로그 출력(LoggerAspect) # Filter를 사용한 로그 출력
custom.enabled: false filter-enabled: false
# MDC logging trace 활성 response-enabled: false
mdc: mdc:
log: enabled: false
trace: exclude-patterns: '/api/kakao/(.*), /api/v1/ens/sendBulks(.*)'
enabled: false
uris: '/api/kakao/(.*), /api/v1/ens/sendBulks(.*)'
# slack # slack
slack-webhook: slack-webhook:

@ -51,14 +51,23 @@ app:
data: data:
root: root:
path: /data 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 enabled: true
# parameter custom 로그 출력(LoggerAspect)
custom.enabled: true
# MDC logging trace 활성
mdc.log.trace.enabled: true
# slack # slack
slack-webhook: slack-webhook:

@ -2,19 +2,18 @@
# application 설정 : batch -> api # application 설정 : batch -> api
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
contract: contract:
provider: # milisecond
# milisecond connection:
connection: timeout: 30000
timeout: 30000 readTimeout: 30000
readTimeout: 30000 thread:
thread: # 동시 실행 스레드 개수
# 동시 실행 스레드 개수 corePoolSize: 5
corePoolSize: 5 # 스레드 풀에서 사용할 수 있는 최대 개수
# 스레드 풀에서 사용할 수 있는 최대 개수 maxPoolSize: 10
maxPoolSize: 10 kakao:
kakao: bulk-max-cnt: 10
bulk-max-cnt: 10 host: http://localhost:8081
host: http://localhost:8081 api:
api: bulksend: /api/kakaopay/v1/documents/bulk
bulksend: /api/kakaopay/v1/documents/bulk bulkstatus: /api/kakaopay/v1/documents/bulk/status
bulkstatus: /api/kakaopay/v1/documents/bulk/status

@ -73,14 +73,23 @@ app:
data: data:
root: root:
path: D:/data path: D:/data
param:
log: #---------------------------------------------------------------
# CommonsRequestLoggingFilter 사용 parameter 로그 출력 # log 설정
enabled: true # request:
# parameter custom 로그 출력(LoggerAspect) # custom-enabled | common-enabled | filter-enabled 중 1개만 활성화
custom.enabled: true # --> 운영: common-enabled, 개발: custom-enabled 사용 권장
# MDC logging trace 활성 # response-enabled : 호출 결과 출력 - 운영시 false
mdc.log.trace.enabled: true # mdc : api 호출(서비스) 로그 기록
# uris : api 호출 로그 제외 패턴
#---------------------------------------------------------------
log:
request:
custom-enabled: true
response-enabled: true
# MDC logging trace 활성
mdc:
enabled: false
# slack # slack
slack-webhook: slack-webhook:

@ -77,14 +77,22 @@ app:
data: data:
root: root:
path: d:/data 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 enabled: true
# parameter custom 로그 출력(LoggerAspect)
custom.enabled: true
# MDC logging trace 활성
mdc.log.trace.enabled: true
# slack # slack
slack-webhook: slack-webhook:

@ -112,6 +112,10 @@ public class NiceCiDTO {
@Schema(requiredMode = RequiredMode.REQUIRED) @Schema(requiredMode = RequiredMode.REQUIRED)
@Valid @Valid
private ResponseDataHeader dataHeader; 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") @Schema(requiredMode = RequiredMode.AUTO, title = "요청한 scope 값", example = "default")
private String scope; private String scope;
}
//----------------------------------------------------------------------- /**
// 토큰 폐기 요청시 필수값 * <pre>
//----------------------------------------------------------------------- * dataBody
* </pre>
*/
@Schema(name = "TokenRevokeResDataBody", description = "기관용 토큰 폐기 요청 응답 dataBody DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public static class TokenRevokeResDataBody {
/** /**
* token * <pre>
*
* true or false * true or false
* </pre>
*/ */
@Schema(requiredMode = RequiredMode.AUTO) @Schema(requiredMode = RequiredMode.REQUIRED, title = "토큰폐기결과", example = "true")
private boolean result; private boolean result;
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------

Loading…
Cancel
Save