fix : 파일이 없는 경우 file name "FileNotFound" return

dev
minuk926 3 years ago
parent 5df7f26bb1
commit 4733ce061b

@ -107,7 +107,9 @@ public class CmmFileController {
contentType = Files.probeContentType(path); contentType = Files.probeContentType(path);
fileSize = Files.size(path); fileSize = Files.size(path);
} catch (IOException e) { } catch (IOException e) {
throw new CustomBaseException(ErrorCode.FILE_NOT_FOUND); //throw new CustomBaseException(ErrorCode.FILE_NOT_FOUND);
contentType = "application/octet-stream";
fileName = "FileNotFound";
} }
File file = new File(absFile); File file = new File(absFile);
@ -115,7 +117,8 @@ public class CmmFileController {
try { try {
fileByte = FileUtils.readFileToByteArray(file); fileByte = FileUtils.readFileToByteArray(file);
} catch (IOException e) { } catch (IOException e) {
throw new CustomBaseException(ErrorCode.FILE_NOT_FOUND); fileByte = new byte[0];
//throw new CustomBaseException(ErrorCode.FILE_NOT_FOUND);
} }
response.setContentType(contentType); response.setContentType(contentType);

@ -179,15 +179,10 @@ public class ResidentAndDisabledController {
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
// 심사자 // 심사자
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
//@Secured(policy = SecurityPolicy.TOKEN) @Secured(policy = SecurityPolicy.TOKEN)
@Operation(summary = "심사자별 거주자/장애인 의견진술 심의목록 조회" , description = "심사자별 거주자/장애인 의견진술 심의목록 조회") @Operation(summary = "심사자별 거주자/장애인 의견진술 심의목록 조회" , description = "심사자별 거주자/장애인 의견진술 심의목록 조회")
@Parameters({ @Parameters({
@Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1"), @Parameter(in = ParameterIn.QUERY, name = "msDatagb", description = "데이타구분(1-거주자, 2-장애인)", required = true, example = "1")
//@Parameter(in = ParameterIn.QUERY, name = "scYear", description = "심사년도", required = true, example = "2021"),
//@Parameter(in = ParameterIn.QUERY, name = "scChasu", description = "차수", required = false, example = " "),
//@Parameter(in = ParameterIn.QUERY, name = "page", description = "페이지", required = true, example = "0"),
//@Parameter(in = ParameterIn.QUERY, name = "size", description = "페이지당갯수", required = true, example = "10")
}) })
@GetMapping(value = "/judge", produces = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "/judge", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<? extends IRestResponse> findByUserJudges( public ResponseEntity<? extends IRestResponse> findByUserJudges(

@ -43,7 +43,7 @@ public class JudgeListDto {
private String msuTeam; private String msuTeam;
@Schema(title = "민원코드", example = " ", description = "민원코드") @Schema(title = "민원코드", example = " ", description = "민원코드")
private Long msMainCode; private Long msMaincode;
@Schema(title = "접수번호", example = " ", description = "접수번호") @Schema(title = "접수번호", example = " ", description = "접수번호")
private String msSeq; private String msSeq;
@Schema(title = "차량번호", example = " ", description = "차량번호") @Schema(title = "차량번호", example = " ", description = "차량번호")

Loading…
Cancel
Save