

250325 김혜민 파일 관련 주석 리팩토링
@9547c15e129fc3286e32d16a56aa1b825c296828
--- src/main/java/com/takensoft/cms/token/service/impl/RefreshTokenServiceImpl.java
+++ src/main/java/com/takensoft/cms/token/service/impl/RefreshTokenServiceImpl.java
... | ... | @@ -170,7 +170,6 @@ |
170 | 170 |
@Override |
171 | 171 |
@Transactional(rollbackFor = Exception.class) |
172 | 172 |
public int tokenReissueProc(HttpServletRequest req, HttpServletResponse res){ |
173 |
- try { |
|
174 | 173 |
// refresh token 검증 |
175 | 174 |
int result = (int) refreshTokenCheck(req).get("result"); |
176 | 175 |
if(result == 0) return result; |
... | ... | @@ -225,11 +224,6 @@ |
225 | 224 |
res.setHeader("Authorization", newAccessToken); |
226 | 225 |
|
227 | 226 |
return result; |
228 |
- } catch (DataAccessException dae) { |
|
229 |
- throw dae; |
|
230 |
- } catch (Exception e) { |
|
231 |
- throw e; |
|
232 |
- } |
|
233 | 227 |
} |
234 | 228 |
/** |
235 | 229 |
* @param req - HTTP 요청 객체 |
... | ... | @@ -242,19 +236,12 @@ |
242 | 236 |
*/ |
243 | 237 |
@Override |
244 | 238 |
public int delete(HttpServletRequest req, RefreshTknVO refreshTknVO) { |
245 |
- try { |
|
246 | 239 |
refreshTknVO.setUseIp(httpRequestUtil.getIp(req)); |
247 | 240 |
//중복로그인 비허용시 삭제 |
248 | 241 |
if (!redisConfig.isAllowMultipleLogin()) { |
249 | 242 |
redisTemplate.delete("jwt:" + refreshTknVO.getMbrId()); // 기존 JWT 삭제 |
250 | 243 |
} |
251 | 244 |
return refreshTokenDAO.deleteByRefresh(refreshTknVO); |
252 |
- |
|
253 |
- } catch (DataAccessException dae) { |
|
254 |
- throw dae; |
|
255 |
- } catch (Exception e) { |
|
256 |
- throw e; |
|
257 |
- } |
|
258 | 245 |
} |
259 | 246 |
/** |
260 | 247 |
* @param req - HTTP 요청 객체 |
--- src/main/java/com/takensoft/common/file/dao/FileDAO.java
+++ src/main/java/com/takensoft/common/file/dao/FileDAO.java
... | ... | @@ -4,42 +4,44 @@ |
4 | 4 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
5 | 5 |
|
6 | 6 |
import java.util.*; |
7 |
- |
|
8 | 7 |
/** |
9 | 8 |
* @author : 박정하 |
10 | 9 |
* @since : 2024.03.26 |
10 |
+ * @modification |
|
11 |
+ * since | author | description |
|
12 |
+ * 2024.03.26 | 박정하 | 최초 등록 |
|
11 | 13 |
* |
12 | 14 |
* 파일 관련 Mapper |
13 | 15 |
*/ |
14 | 16 |
@Mapper("fileDAO") |
15 | 17 |
public interface FileDAO { |
16 | 18 |
/** |
17 |
- * @author 박정하 |
|
18 |
- * @since 2024.03.26 |
|
19 |
+ * @param fileVO - 파일 관련 객체 |
|
20 |
+ * @return int - 등록 성공 여부 |
|
19 | 21 |
* |
20 | 22 |
* 파일 등록 |
21 | 23 |
*/ |
22 | 24 |
public int fileInsert(FileVO fileVO); |
23 | 25 |
|
24 | 26 |
/** |
25 |
- * @author 박정하 |
|
26 |
- * @since 2024.03.26 |
|
27 |
+ * @param fileMngId - 파일 관리 아이디 |
|
28 |
+ * @return List<HashMap<String, Object>> - 파일 목록 |
|
27 | 29 |
* |
28 | 30 |
* 파일 목록 조회 |
29 | 31 |
*/ |
30 | 32 |
List<HashMap<String, Object>> fileSelectList(String fileMngId); |
31 | 33 |
|
32 | 34 |
/** |
33 |
- * @author 박정하 |
|
34 |
- * @since 2024.03.27 |
|
35 |
+ * @param params - 파일 관리 아이디 |
|
36 |
+ * @return int - 등록 삭제 여부 |
|
35 | 37 |
* |
36 | 38 |
* 파일 삭제 |
37 | 39 |
*/ |
38 | 40 |
public int fileDelete(HashMap<String, Object> params); |
39 | 41 |
|
40 | 42 |
/** |
41 |
- * @author 방선주 |
|
42 |
- * @since 2024.05.21 |
|
43 |
+ * @param fileId - 파일 아이디 |
|
44 |
+ * @return FileVO - 파일 데이터 |
|
43 | 45 |
* |
44 | 46 |
* 파일 단일 조회 |
45 | 47 |
*/ |
--- src/main/java/com/takensoft/common/file/dao/FileMngDAO.java
+++ src/main/java/com/takensoft/common/file/dao/FileMngDAO.java
... | ... | @@ -5,34 +5,36 @@ |
5 | 5 |
import org.springframework.web.multipart.MultipartFile; |
6 | 6 |
|
7 | 7 |
import java.util.*; |
8 |
- |
|
9 | 8 |
/** |
10 | 9 |
* @author : 박정하 |
11 | 10 |
* @since : 2024.03.26 |
11 |
+ * @modification |
|
12 |
+ * since | author | description |
|
13 |
+ * 2024.03.26 | 박정하 | 최초 등록 |
|
12 | 14 |
* |
13 | 15 |
* 파일매니저 관련 Mapper |
14 | 16 |
*/ |
15 | 17 |
@Mapper("fileMngDAO") |
16 | 18 |
public interface FileMngDAO { |
17 | 19 |
/** |
18 |
- * @author 박정하 |
|
19 |
- * @since 2024.03.26 |
|
20 |
+ * @param fileMngVO - 파일 관리 관련 객체 |
|
21 |
+ * @return int - 파일 매니저 등록 성공 여부 |
|
20 | 22 |
* |
21 | 23 |
* 파일매니저 등록 |
22 | 24 |
*/ |
23 | 25 |
public int fileMngInsert(FileMngVO fileMngVO); |
24 | 26 |
|
25 | 27 |
/** |
26 |
- * @author 박정하 |
|
27 |
- * @since 2024.03.27 |
|
28 |
+ * @param fileMngVO - 파일 관리 관련 객체 |
|
29 |
+ * @return int - 파일 매니저 수정 여부 |
|
28 | 30 |
* |
29 | 31 |
* 파일매니저 수정 |
30 | 32 |
*/ |
31 | 33 |
public int fileMngUpadate(FileMngVO fileMngVO); |
32 | 34 |
|
33 | 35 |
/** |
34 |
- * @author 박정하 |
|
35 |
- * @since 2024.03.27 |
|
36 |
+ * @param params - 파일 매니저 아이디 |
|
37 |
+ * @return int - 파일 매니저 삭제 여부 |
|
36 | 38 |
* |
37 | 39 |
* 파일매니저 삭제 |
38 | 40 |
*/ |
--- src/main/java/com/takensoft/common/file/service/FileMngService.java
+++ src/main/java/com/takensoft/common/file/service/FileMngService.java
... | ... | @@ -1,36 +1,49 @@ |
1 | 1 |
package com.takensoft.common.file.service; |
2 | 2 |
|
3 |
+import com.takensoft.common.exception.CustomDeleteFailException; |
|
4 |
+import com.takensoft.common.exception.CustomInsertFailException; |
|
5 |
+import com.takensoft.common.exception.CustomNotFoundException; |
|
6 |
+import com.takensoft.common.exception.CustomUpdateFailException; |
|
3 | 7 |
import com.takensoft.common.file.vo.FileMngVO; |
8 |
+import org.springframework.dao.DataAccessException; |
|
4 | 9 |
import org.springframework.web.multipart.MultipartFile; |
5 | 10 |
|
6 | 11 |
import java.util.*; |
7 |
- |
|
8 | 12 |
/** |
9 |
- * @author : 박정하 |
|
10 |
- * @since : 2024.03.26 |
|
13 |
+ * @author 박정하 |
|
14 |
+ * @since 2024.03.26 |
|
15 |
+ * @modification |
|
16 |
+ * since | author | description |
|
17 |
+ * 2024.03.26 | 박정하 | 최초 등록 |
|
11 | 18 |
* |
12 | 19 |
* 파일매니저 관련 인터페이스 |
13 | 20 |
*/ |
14 | 21 |
public interface FileMngService { |
15 | 22 |
/** |
16 |
- * @author 박정하 |
|
17 |
- * @since 2024.03.26 |
|
23 |
+ * @param fileMngVO - 파일매니저 정보 |
|
24 |
+ * @param multipartFileList - 파일 목록 |
|
25 |
+ * @return HashMap<String, Object> |
|
26 |
+ * - fileInsertResult : 파일 등록 결과 |
|
27 |
+ * - fileMngId : 파일매니저 아이디 |
|
28 |
+ * - fileMngResult : 파일매니저 등록 결과 |
|
18 | 29 |
* |
19 | 30 |
* 파일매니저 등록 |
20 | 31 |
*/ |
21 | 32 |
public HashMap<String, Object> fileMngInsert(FileMngVO fileMngVO, List<MultipartFile> multipartFileList) ; |
22 | 33 |
|
23 | 34 |
/** |
24 |
- * @author 박정하 |
|
25 |
- * @since 2024.03.27 |
|
35 |
+ * @param fileMngVO - 파일매니저 정보 |
|
36 |
+ * @param deleteFileList - 삭제 파일 목록 |
|
37 |
+ * @param multipartFileList - 파일 목록 |
|
38 |
+ * @return int - 파일매니저 수정 결과 |
|
26 | 39 |
* |
27 | 40 |
* 파일매니저 수정 |
28 | 41 |
*/ |
29 | 42 |
public int fileMngUpadate(FileMngVO fileMngVO, List<HashMap<String, Object>> deleteFileList, List<MultipartFile> multipartFileList); |
30 |
- |
|
43 |
+ |
|
31 | 44 |
/** |
32 |
- * @author 박정하 |
|
33 |
- * @since 2024.03.27 |
|
45 |
+ * @param params - 파일매니저 아이디 |
|
46 |
+ * @return int - 파일매니저 삭제 결과 |
|
34 | 47 |
* |
35 | 48 |
* 파일매니저 삭제 |
36 | 49 |
*/ |
--- src/main/java/com/takensoft/common/file/service/FileService.java
+++ src/main/java/com/takensoft/common/file/service/FileService.java
... | ... | @@ -1,48 +1,63 @@ |
1 | 1 |
package com.takensoft.common.file.service; |
2 | 2 |
|
3 |
+import com.takensoft.common.exception.CustomDeleteFailException; |
|
4 |
+import com.takensoft.common.exception.CustomFileUploadFailException; |
|
5 |
+import com.takensoft.common.exception.CustomInsertFailException; |
|
6 |
+import com.takensoft.common.exception.CustomNotFoundException; |
|
3 | 7 |
import com.takensoft.common.file.vo.FileVO; |
8 |
+import org.springframework.dao.DataAccessException; |
|
4 | 9 |
import org.springframework.web.multipart.MultipartFile; |
5 | 10 |
import org.springframework.web.multipart.MultipartHttpServletRequest; |
6 | 11 |
|
7 | 12 |
import java.util.*; |
8 |
- |
|
9 | 13 |
/** |
10 |
- * @author : 박정하 |
|
11 |
- * @since : 2024.03.26 |
|
14 |
+ * @author 박정하 |
|
15 |
+ * @since 2024.03.26 |
|
16 |
+ * @modification |
|
17 |
+ * since | author | description |
|
18 |
+ * 2024.03.26 | 박정하 | 최초 등록 |
|
12 | 19 |
* |
13 | 20 |
* 파일 관련 인터페이스 |
14 | 21 |
*/ |
15 | 22 |
public interface FileService { |
16 | 23 |
/** |
17 |
- * @author 박정하 |
|
18 |
- * @since 2024.03.26 |
|
24 |
+ * @param fileMngId - 파일관리아이디 |
|
25 |
+ * @param multipartFileList - 파일 목록 |
|
26 |
+ * @return int - 파일 등록 결과 |
|
19 | 27 |
* |
20 | 28 |
* 파일 등록 |
21 | 29 |
*/ |
22 | 30 |
public int fileInsert(String fileMngId, List<MultipartFile> multipartFileList) ; |
23 | 31 |
|
24 | 32 |
/** |
25 |
- * @author 박정하 |
|
26 |
- * @since 2024.03.26 |
|
33 |
+ * @param fileMngId - 파일관리아이디 |
|
34 |
+ * @return List<HashMap<String, Object>> - 파일 내용 정보를 담고 있는 객체 목록 |
|
27 | 35 |
* |
28 | 36 |
* 파일 목록 조회 |
29 | 37 |
*/ |
30 | 38 |
List<HashMap<String, Object>> fileSelectList(String fileMngId); |
31 | 39 |
|
32 | 40 |
/** |
33 |
- * @author 박정하 |
|
34 |
- * @since 2024.03.27 |
|
41 |
+ * @param fileList - 파일 목록 |
|
42 |
+ * @return int - 파일 삭제 결과 |
|
35 | 43 |
* |
36 | 44 |
* 파일 삭제 |
37 | 45 |
*/ |
38 | 46 |
public int fileDelete(List<HashMap<String, Object>> fileList); |
47 |
+ |
|
39 | 48 |
/** |
40 |
- * @author 방선주 |
|
41 |
- * @since 2024.05.21 |
|
49 |
+ * @param fileId - 파일 아이디 |
|
50 |
+ * @return FileVO - 파일 내용 정보를 담고 있는 객체 |
|
42 | 51 |
* |
43 | 52 |
* 파일 단일 조회 |
44 | 53 |
*/ |
45 | 54 |
public FileVO fileSelectOne(int fileId); |
46 | 55 |
|
56 |
+ /** |
|
57 |
+ * @param file - 파일 정보 |
|
58 |
+ * @return String - 이미지 경로 |
|
59 |
+ * |
|
60 |
+ * 에디터 이미지 업로드 |
|
61 |
+ */ |
|
47 | 62 |
public String editorUploadImg(MultipartFile file); |
48 | 63 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/file/vo/FileMngVO.java
+++ src/main/java/com/takensoft/common/file/vo/FileMngVO.java
... | ... | @@ -1,12 +1,20 @@ |
1 | 1 |
package com.takensoft.common.file.vo; |
2 | 2 |
|
3 | 3 |
import lombok.Data; |
4 |
- |
|
4 |
+/** |
|
5 |
+ * @author : takensoft |
|
6 |
+ * @since : 2024.04.01 |
|
7 |
+ * @modification |
|
8 |
+ * since | author | description |
|
9 |
+ * 2024.04.01 | takensoft | 최초 등록 |
|
10 |
+ * |
|
11 |
+ * 파일 관리 관련 VO |
|
12 |
+ */ |
|
5 | 13 |
@Data |
6 | 14 |
public class FileMngVO { |
7 |
- private String fileMngId; // 파일관리아이디 |
|
8 |
- private String rgtr; // 등록자 |
|
9 |
- private String regDt; // 등록일 |
|
10 |
- private String mdfr; // 수정자 |
|
11 |
- private String mdfcnDt; // 수정일 |
|
15 |
+ private String fileMngId; // 파일관리아이디 |
|
16 |
+ private String rgtr; // 등록자 |
|
17 |
+ private String regDt; // 등록일 |
|
18 |
+ private String mdfr; // 수정자 |
|
19 |
+ private String mdfcnDt; // 수정일 |
|
12 | 20 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/file/vo/FileVO.java
+++ src/main/java/com/takensoft/common/file/vo/FileVO.java
... | ... | @@ -1,18 +1,26 @@ |
1 | 1 |
package com.takensoft.common.file.vo; |
2 | 2 |
|
3 | 3 |
import lombok.Data; |
4 |
- |
|
4 |
+/** |
|
5 |
+ * @author : takensoft |
|
6 |
+ * @since : 2024.04.01 |
|
7 |
+ * @modification |
|
8 |
+ * since | author | description |
|
9 |
+ * 2024.04.01 | takensoft | 최초 등록 |
|
10 |
+ * |
|
11 |
+ * 파일 관련 VO |
|
12 |
+ */ |
|
5 | 13 |
@Data |
6 | 14 |
public class FileVO { |
7 |
- private int fileId; // 파일아이디 |
|
8 |
- private String fileMngId; // 파일관리아이디 |
|
9 |
- private String fileNm; // 파일명 |
|
10 |
- private String maskNm; // 마스크명 |
|
11 |
- private String fileType; // 파일타입 |
|
12 |
- private String absltPath; // 절대경로 |
|
13 |
- private String partPath; // 일부경로 |
|
14 |
- private String extnNm; // 확장자 |
|
15 |
- private String fileSz; // 크기 |
|
16 |
- private String rgtr; // 등록자 |
|
17 |
- private String regDt; // 등록일 |
|
15 |
+ private int fileId; // 파일아이디 |
|
16 |
+ private String fileMngId; // 파일관리아이디 |
|
17 |
+ private String fileNm; // 파일명 |
|
18 |
+ private String maskNm; // 마스크명 |
|
19 |
+ private String fileType; // 파일타입 |
|
20 |
+ private String absltPath; // 절대경로 |
|
21 |
+ private String partPath; // 일부경로 |
|
22 |
+ private String extnNm; // 확장자 |
|
23 |
+ private String fileSz; // 크기 |
|
24 |
+ private String rgtr; // 등록자 |
|
25 |
+ private String regDt; // 등록일 |
|
18 | 26 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/file/web/FileController.java
+++ src/main/java/com/takensoft/common/file/web/FileController.java
... | ... | @@ -22,27 +22,26 @@ |
22 | 22 |
import java.util.HashMap; |
23 | 23 |
import java.util.Map; |
24 | 24 |
import java.util.UUID; |
25 |
- |
|
26 | 25 |
/** |
27 |
- * @author : 방선주 |
|
28 |
- * @since : 2024.05.23 |
|
26 |
+ * @author 방선주 |
|
27 |
+ * @since 2024.05.23 |
|
28 |
+ * @modification |
|
29 |
+ * since | author | description |
|
30 |
+ * 2024.05.23 | 방선주 | 최초 등록 |
|
29 | 31 |
* |
30 |
- * File 관련 컨트롤러 |
|
32 |
+ * File 관련 Controller |
|
31 | 33 |
*/ |
32 |
- |
|
33 | 34 |
@RestController |
34 | 35 |
@RequiredArgsConstructor |
35 | 36 |
@Slf4j |
36 | 37 |
@RequestMapping(value="/sys/file") |
37 | 38 |
public class FileController { |
39 |
+ |
|
38 | 40 |
private final FileService fileService; |
39 | 41 |
|
40 | 42 |
/** |
41 |
- * @author 방선주 |
|
42 |
- * @since 2024.05.21 |
|
43 |
- * @param fileId |
|
44 |
- * @return |
|
45 |
- * @throws Exception |
|
43 |
+ * @param fileId - 첨부파일 아이디 |
|
44 |
+ * @param response - HTTP 응답 객체 |
|
46 | 45 |
* |
47 | 46 |
* 게시판 첨부 파일 다운로드 |
48 | 47 |
*/ |
... | ... | @@ -71,6 +70,14 @@ |
71 | 70 |
} |
72 | 71 |
} |
73 | 72 |
|
73 |
+ /** |
|
74 |
+ * @param file - 첨부파일 |
|
75 |
+ * @return Map<String, Object> |
|
76 |
+ * - upload : 파일 업로드 여부 |
|
77 |
+ * - url : 파일 경로 |
|
78 |
+ * |
|
79 |
+ * 게시판 첨부 파일 다운로드 |
|
80 |
+ */ |
|
74 | 81 |
@PostMapping("/postImageUpload.file") |
75 | 82 |
public Map<String, Object> handleFileUpload(@RequestPart("upload") MultipartFile file){ |
76 | 83 |
Map<String, Object> response = new HashMap<>(); |
--- src/main/java/com/takensoft/common/idgen/service/IdgenService.java
+++ src/main/java/com/takensoft/common/idgen/service/IdgenService.java
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 |
@Autowired |
31 | 31 |
private IdgenMapper idgenMapper; |
32 | 32 |
/** |
33 |
- * @return 생성된 고유 아이디 값 |
|
33 |
+ * @return String - 생성된 고유 아이디 값 |
|
34 | 34 |
* |
35 | 35 |
* 지정된 테이블에 대한 다음 고유 ID를 생성하여 반환 |
36 | 36 |
* 새로 생성되는 경우 아이디 값은 1부터 시작하며, 기존 값은 1씩 증가하여 업데이트 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?