spotlessApply 적용
This commit is contained in:
@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.code;
|
||||
|
||||
import com.kamco.cd.kamcoback.code.config.CommonCodeCacheManager;
|
||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto.CodeDto;
|
||||
import com.kamco.cd.kamcoback.code.service.CommonCodeService;
|
||||
import com.kamco.cd.kamcoback.common.utils.CommonCodeUtil;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
@@ -13,6 +14,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -288,4 +290,21 @@ public class CommonCodeApiController {
|
||||
int count = commonCodeCacheManager.getCachedCommonCodeCount();
|
||||
return ApiResponseDto.ok(count);
|
||||
}
|
||||
|
||||
@Operation(summary = "코드 조회", description = "enum 코드 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "코드 조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CodeDto.class))),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/enums")
|
||||
public ApiResponseDto<Map<String, List<CodeDto>>> getCode() {
|
||||
return ApiResponseDto.ok(commonCodeService.getAllCodes());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user