--- pom.xml
+++ pom.xml
... | ... | @@ -54,12 +54,6 @@ |
54 | 54 |
<dependency> |
55 | 55 |
<groupId>org.springframework.boot</groupId> |
56 | 56 |
<artifactId>spring-boot-starter-web</artifactId> |
57 |
- <exclusions> |
|
58 |
- <exclusion> |
|
59 |
- <groupId>org.springframework.boot</groupId> |
|
60 |
- <artifactId>spring-boot-starter-logging</artifactId> |
|
61 |
- </exclusion> |
|
62 |
- </exclusions> |
|
63 | 57 |
</dependency> |
64 | 58 |
<dependency> |
65 | 59 |
<groupId>org.springframework.boot</groupId> |
--- src/main/java/com/takensoft/cms/bbs/service/Impl/BbsCnServiceImpl.java
+++ src/main/java/com/takensoft/cms/bbs/service/Impl/BbsCnServiceImpl.java
... | ... | @@ -214,6 +214,8 @@ |
214 | 214 |
if (path.startsWith("file:///")) { |
215 | 215 |
// "file:///" 부분을 제거하고 경로를 반환 |
216 | 216 |
previewPath = path.replace("file:///", "") + fileUploadPath; |
217 |
+ } else { |
|
218 |
+ previewPath = locationPath + fileUploadPath; |
|
217 | 219 |
} |
218 | 220 |
} |
219 | 221 |
if (filePath == null) return null; |
--- src/main/java/com/takensoft/cms/bbs/web/BbsTypeMngController.java
+++ src/main/java/com/takensoft/cms/bbs/web/BbsTypeMngController.java
... | ... | @@ -70,7 +70,6 @@ |
70 | 70 |
*/ |
71 | 71 |
@PostMapping("/findAll.json") |
72 | 72 |
public ResponseEntity<?> findAll(@RequestBody BbsTypeMngVO bbsTypeMngVO) throws Exception{ |
73 |
- System.out.println("bbsTypeMng findAll = " + bbsTypeMngVO); |
|
74 | 73 |
// 게시판 유형 관리 목록 조회 |
75 | 74 |
Map<String, Object> result = bbsTypeMngService.findAllBbsTypeMng(bbsTypeMngVO); |
76 | 75 |
|
--- src/main/java/com/takensoft/cms/mber/web/RefreshTokenController.java
+++ src/main/java/com/takensoft/cms/mber/web/RefreshTokenController.java
... | ... | @@ -51,7 +51,6 @@ |
51 | 51 |
cookie.setPath("/"); // 쿠키 적용 범위 |
52 | 52 |
cookie.setHttpOnly(true); |
53 | 53 |
res.addCookie(cookie); |
54 |
- |
|
55 | 54 |
responseData.setStatus(HttpStatus.OK); |
56 | 55 |
responseData.setMessage("정상적으로 로그아웃 처리되었습니다."); |
57 | 56 |
return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
--- src/main/java/com/takensoft/common/file/service/Impl/FileServiceImpl.java
+++ src/main/java/com/takensoft/common/file/service/Impl/FileServiceImpl.java
... | ... | @@ -4,24 +4,16 @@ |
4 | 4 |
import com.takensoft.common.file.service.FileService; |
5 | 5 |
import com.takensoft.common.file.vo.FileVO; |
6 | 6 |
import com.takensoft.common.util.JWTUtil; |
7 |
-import com.takensoft.common.util.ResponseData; |
|
8 | 7 |
import lombok.RequiredArgsConstructor; |
9 | 8 |
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
10 | 9 |
import org.springframework.beans.factory.annotation.Value; |
11 |
-import org.springframework.http.HttpHeaders; |
|
12 |
-import org.springframework.http.HttpStatus; |
|
13 |
-import org.springframework.http.MediaType; |
|
14 |
-import org.springframework.http.ResponseEntity; |
|
15 | 10 |
import org.springframework.stereotype.Service; |
16 | 11 |
import org.springframework.transaction.annotation.Transactional; |
17 | 12 |
import org.springframework.util.StringUtils; |
18 | 13 |
import org.springframework.web.multipart.MultipartFile; |
19 |
-import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
20 | 14 |
|
21 | 15 |
import java.io.File; |
22 | 16 |
import java.io.IOException; |
23 |
-import java.nio.charset.Charset; |
|
24 |
-import java.nio.file.Paths; |
|
25 | 17 |
import java.util.*; |
26 | 18 |
import java.util.UUID; |
27 | 19 |
|
... | ... | @@ -54,7 +46,7 @@ |
54 | 46 |
* 파일 등록 |
55 | 47 |
*/ |
56 | 48 |
@Override |
57 |
- @Transactional |
|
49 |
+ @Transactional(rollbackFor = Exception.class) |
|
58 | 50 |
public int fileInsert(String fileMngId, List<MultipartFile> multipartFileList) throws Exception { |
59 | 51 |
int result = 0; |
60 | 52 |
|
... | ... | @@ -71,13 +63,14 @@ |
71 | 63 |
// 절대 경로 생성 |
72 | 64 |
// "file:///" 제거하여 실제 파일 시스템 경로만을 저장 |
73 | 65 |
String uploadPath = null; |
74 |
- String[] pathArray = locationPath.split("/, "); |
|
75 |
- for (String path : pathArray) { |
|
76 |
- if (path.startsWith("file:///")) { |
|
77 |
- // "file:///" 부분을 제거하고 경로를 반환 |
|
78 |
- uploadPath = path.replace("file:///", "") + fileUploadPath; |
|
79 |
- } |
|
80 |
- } |
|
66 |
+// String[] pathArray = locationPath.split("/, "); |
|
67 |
+// for (String path : pathArray) { |
|
68 |
+// if (path.startsWith("file:///")) { |
|
69 |
+// // "file:///" 부분을 제거하고 경로를 반환 |
|
70 |
+// uploadPath = path.replace("file:///", "") + fileUploadPath; |
|
71 |
+// } |
|
72 |
+// } |
|
73 |
+ uploadPath = locationPath + fileUploadPath; |
|
81 | 74 |
|
82 | 75 |
// 파일 정보 가공 |
83 | 76 |
String fileName = file.getOriginalFilename(); // 파일명 (원본) |
... | ... | @@ -163,15 +156,15 @@ |
163 | 156 |
|
164 | 157 |
// http 부분 |
165 | 158 |
String url = frontUrl + ":" + serverPort; |
166 |
- |
|
167 | 159 |
String uploadPath = null; |
168 |
- String[] pathArray = locationPath.split("/, "); |
|
169 |
- for (String path : pathArray) { |
|
170 |
- if (path.startsWith("file:///")) { |
|
171 |
- // "file:///" 부분을 제거하고 경로를 반환 |
|
172 |
- uploadPath = path.replace("file:///", "") + fileUploadPath; |
|
173 |
- } |
|
174 |
- } |
|
160 |
+// String[] pathArray = locationPath.split("/, "); |
|
161 |
+// for (String path : pathArray) { |
|
162 |
+// if (path.startsWith("file:///")) { |
|
163 |
+// // "file:///" 부분을 제거하고 경로를 반환 |
|
164 |
+// uploadPath = path.replace("file:///", "") + fileUploadPath; |
|
165 |
+// } |
|
166 |
+// } |
|
167 |
+ uploadPath = locationPath + fileUploadPath; |
|
175 | 168 |
|
176 | 169 |
String path = file.get("absltPath").toString(); |
177 | 170 |
path = path.replace(url, uploadPath); |
... | ... | @@ -206,44 +199,37 @@ |
206 | 199 |
@Override |
207 | 200 |
public String editorUploadImg(MultipartFile file) throws Exception { |
208 | 201 |
MultipartFile uploadFile = file; |
209 |
- |
|
210 | 202 |
// 파일 명 생성 |
211 | 203 |
String originalFileName = uploadFile.getOriginalFilename(); |
212 | 204 |
String ext = originalFileName.substring(originalFileName.lastIndexOf(".")); |
213 | 205 |
String maskNm = UUID.randomUUID() + ext; // 랜덤으로 파일명 생성 |
214 |
- |
|
215 | 206 |
// 파일 저장 경로 |
216 | 207 |
String uploadPath = null; |
217 |
- String[] pathArray = locationPath.split(", "); |
|
218 |
- for (String path : pathArray) { |
|
219 |
- if (path.startsWith("file:///")) { |
|
220 |
- // "file:///" 부분을 제거하고 경로를 반환 |
|
221 |
- uploadPath = path.replace("file:///", "") + editPath; |
|
222 |
- break; // 루프를 종료하여 첫 번째 일치하는 경로만 사용 |
|
223 |
- } |
|
224 |
- } |
|
225 |
- if (uploadPath == null) { |
|
226 |
- throw new Exception("Upload path is not properly configured."); |
|
227 |
- } |
|
208 |
+// String[] pathArray = locationPath.split(", "); |
|
209 |
+// for (String path : pathArray) { |
|
210 |
+// if (path.startsWith("file:///")) { |
|
211 |
+// // "file:///" 부분을 제거하고 경로를 반환 |
|
212 |
+// uploadPath = path.replace("file:///", "") + editPath; |
|
213 |
+// break; // 루프를 종료하여 첫 번째 일치하는 경로만 사용 |
|
214 |
+// } |
|
215 |
+// } |
|
216 |
+// if (uploadPath == null) { |
|
217 |
+// throw new Exception("Upload path is not properly configured."); |
|
218 |
+// } |
|
219 |
+ uploadPath = "/home/cloud-user/front-end/invest/uploadFiles" + editPath; |
|
228 | 220 |
String savePath = uploadPath + maskNm; |
229 |
- |
|
230 | 221 |
// 파일 저장 |
231 | 222 |
try { |
232 | 223 |
File saveFile = new File(savePath); |
233 |
- |
|
234 | 224 |
if (!saveFile.exists()) { |
235 | 225 |
saveFile.mkdirs(); |
236 | 226 |
} |
237 | 227 |
uploadFile.transferTo(saveFile); |
238 |
- |
|
239 | 228 |
} catch (Exception e) { |
240 | 229 |
e.printStackTrace(); |
241 | 230 |
throw new Exception("File upload failed."); |
242 | 231 |
} |
243 |
- |
|
244 |
- String imgPath = frontUrl + ":" + serverPort + editPath + maskNm; |
|
245 |
- |
|
232 |
+ String imgPath = frontUrl + "/invest/uploadFiles" + editPath + maskNm; |
|
246 | 233 |
return imgPath; |
247 | 234 |
} |
248 |
- |
|
249 | 235 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/file/web/FileController.java
+++ src/main/java/com/takensoft/common/file/web/FileController.java
... | ... | @@ -35,20 +35,8 @@ |
35 | 35 |
@Slf4j |
36 | 36 |
@RequestMapping(value="/sys/file") |
37 | 37 |
public class FileController { |
38 |
- |
|
39 | 38 |
private final FileService fileService; |
40 | 39 |
|
41 |
- @Value("${front.url}") |
|
42 |
- private String frontUrl; |
|
43 |
- |
|
44 |
- @Value("${server.port}") |
|
45 |
- private String serverPort; |
|
46 |
- |
|
47 |
- @Value("${spring.web.resources.static-locations}") |
|
48 |
- private String locationPath; |
|
49 |
- |
|
50 |
- @Value("${file.edit-file-upload-path}") |
|
51 |
- private String editPath; |
|
52 | 40 |
/** |
53 | 41 |
* @author 방선주 |
54 | 42 |
* @since 2024.05.21 |
... | ... | @@ -83,96 +71,6 @@ |
83 | 71 |
} |
84 | 72 |
} |
85 | 73 |
|
86 |
- /** |
|
87 |
- * @author 방선주 |
|
88 |
- * @since 2024.05.23 |
|
89 |
- * @param |
|
90 |
- * @return |
|
91 |
- * @throws Exception |
|
92 |
- * |
|
93 |
- * 에디터 파일 업로드 |
|
94 |
- */ |
|
95 |
-// @PostMapping("/postImageUpload.file") |
|
96 |
-// public void postImageUpload(HttpServletRequest request, HttpServletResponse response){ |
|
97 |
-// try { |
|
98 |
-// String sFileInfo = ""; |
|
99 |
-// String sFilename = request.getHeader("file-name"); |
|
100 |
-// String sFilenameExt = sFilename.substring(sFilename.lastIndexOf(".") + 1).toLowerCase(); |
|
101 |
-// |
|
102 |
-// // 허용되는 파일 확장자 목록 |
|
103 |
-// String[] allowFileArr = {"jpg", "png", "bmp", "gif"}; |
|
104 |
-// boolean isAllowed = Arrays.asList(allowFileArr).contains(sFilenameExt); |
|
105 |
-// |
|
106 |
-// if (!isAllowed) { |
|
107 |
-// // 이미지가 아닐 경우 |
|
108 |
-// PrintWriter print = response.getWriter(); |
|
109 |
-// print.print("NOTALLOW_" + sFilename); |
|
110 |
-// print.flush(); |
|
111 |
-// print.close(); |
|
112 |
-// } else { |
|
113 |
-// // 파일 경로 설정 |
|
114 |
-// System.out.println("locationPath : " + locationPath); |
|
115 |
-// System.out.println("editPath : " + editPath); |
|
116 |
-// |
|
117 |
-// // "file:///" 제거하여 실제 파일 시스템 경로만을 저장 |
|
118 |
-// String uploadFilePath = null; |
|
119 |
-// String[] pathArray = locationPath.split("/, "); |
|
120 |
-// for (String path : pathArray) { |
|
121 |
-// if (path.startsWith("file:///")) { |
|
122 |
-// // "file:///" 부분을 제거하고 경로를 반환 |
|
123 |
-// uploadFilePath = path.replace("file:///", "") + editPath; |
|
124 |
-// } |
|
125 |
-// } |
|
126 |
-// |
|
127 |
-// System.out.println("uploadFilePath : " + uploadFilePath); |
|
128 |
-// |
|
129 |
-// String filePath = uploadFilePath; // 서버 이동시 경로 변경 |
|
130 |
-//// String filePath = "C:\\uploadFiles\\editFileUpload\\"; |
|
131 |
-// File file = new File(filePath); |
|
132 |
-// |
|
133 |
-// if (!file.exists()) { |
|
134 |
-// file.mkdirs(); |
|
135 |
-// } |
|
136 |
-// |
|
137 |
-// // 고유 파일명 생성 |
|
138 |
-// LocalDateTime localDateTime = LocalDateTime.now(); |
|
139 |
-// String now = localDateTime.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); |
|
140 |
-// String sRealFileNm = now + UUID.randomUUID().toString() + sFilename.substring(sFilename.lastIndexOf(".")); |
|
141 |
-// String rlFileNm = filePath + sRealFileNm; |
|
142 |
-// |
|
143 |
-// // 서버에 파일 쓰기 |
|
144 |
-// InputStream inputStream = request.getInputStream(); |
|
145 |
-// OutputStream outputStream = new FileOutputStream(rlFileNm); |
|
146 |
-// int numRead; |
|
147 |
-// byte[] bytes = new byte[1024]; // 버퍼 크기를 더 작은 값으로 설정 |
|
148 |
-// while ((numRead = inputStream.read(bytes, 0, bytes.length)) != -1) { |
|
149 |
-// outputStream.write(bytes, 0, numRead); |
|
150 |
-// } |
|
151 |
-// inputStream.close(); |
|
152 |
-// outputStream.flush(); |
|
153 |
-// outputStream.close(); |
|
154 |
-// |
|
155 |
-// // 이미지 표시 |
|
156 |
-// sFileInfo += "&bNewLine=true"; |
|
157 |
-// sFileInfo += "&sFileName="+ sFilename; |
|
158 |
-// //TODO: 파일 경로를 절대경로로 설정함 |
|
159 |
-// if(System.getProperty("os.name").indexOf("Windows") > -1){ |
|
160 |
-// sFileInfo += "&sFileURL=" + frontUrl + ":" + serverPort + editPath + sRealFileNm; // 서버 이동시 경로 변경 |
|
161 |
-// } else { |
|
162 |
-// sFileInfo += "&sFileURL=" + frontUrl + ":" + serverPort + editPath + sRealFileNm; |
|
163 |
-// } |
|
164 |
-// |
|
165 |
-// // 출력 |
|
166 |
-// PrintWriter printWriter = response.getWriter(); |
|
167 |
-// printWriter.print(sFileInfo); |
|
168 |
-// printWriter.flush(); |
|
169 |
-// printWriter.close(); |
|
170 |
-// } |
|
171 |
-// } catch (Exception e) { |
|
172 |
-// e.printStackTrace(); |
|
173 |
-// response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); // 예외 발생 시 서버 에러 상태 반환 |
|
174 |
-// } |
|
175 |
-// } |
|
176 | 74 |
@PostMapping("/postImageUpload.file") |
177 | 75 |
public Map<String, Object> handleFileUpload(@RequestPart("upload") MultipartFile file) throws Exception { |
178 | 76 |
Map<String, Object> response = new HashMap<>(); |
--- src/main/java/com/takensoft/common/util/CustomAccessDenieHandler.java
+++ src/main/java/com/takensoft/common/util/CustomAccessDenieHandler.java
... | ... | @@ -1,8 +1,5 @@ |
1 | 1 |
package com.takensoft.common.util; |
2 | 2 |
|
3 |
-import com.fasterxml.jackson.databind.ObjectMapper; |
|
4 |
-import com.fasterxml.jackson.databind.SerializationFeature; |
|
5 |
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
|
6 | 3 |
import com.takensoft.common.config.CommonConfig; |
7 | 4 |
import lombok.RequiredArgsConstructor; |
8 | 5 |
import lombok.extern.slf4j.Slf4j; |
--- src/main/java/com/takensoft/common/util/CustomAuthenticationEntryPoint.java
+++ src/main/java/com/takensoft/common/util/CustomAuthenticationEntryPoint.java
... | ... | @@ -1,8 +1,5 @@ |
1 | 1 |
package com.takensoft.common.util; |
2 | 2 |
|
3 |
-import com.fasterxml.jackson.databind.ObjectMapper; |
|
4 |
-import com.fasterxml.jackson.databind.SerializationFeature; |
|
5 |
-import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
|
6 | 3 |
import com.takensoft.common.config.CommonConfig; |
7 | 4 |
import lombok.RequiredArgsConstructor; |
8 | 5 |
import lombok.extern.slf4j.Slf4j; |
--- src/main/java/com/takensoft/portal/entDscsnAply/web/EntDscsnAplyController.java
+++ src/main/java/com/takensoft/portal/entDscsnAply/web/EntDscsnAplyController.java
... | ... | @@ -1,6 +1,5 @@ |
1 | 1 |
package com.takensoft.portal.entDscsnAply.web; |
2 | 2 |
|
3 |
-import com.takensoft.common.Pagination; |
|
4 | 3 |
import com.takensoft.common.file.service.FileService; |
5 | 4 |
import com.takensoft.common.util.ResponseData; |
6 | 5 |
import com.takensoft.portal.entDscsnAply.service.EntDscsnAplyService; |
... | ... | @@ -11,7 +10,6 @@ |
11 | 10 |
import org.springframework.http.MediaType; |
12 | 11 |
import org.springframework.http.ResponseEntity; |
13 | 12 |
import org.springframework.web.bind.annotation.*; |
14 |
-import org.springframework.web.multipart.MultipartFile; |
|
15 | 13 |
|
16 | 14 |
import javax.servlet.http.HttpServletRequest; |
17 | 15 |
import java.nio.charset.Charset; |
--- src/main/resources/application.yml
+++ src/main/resources/application.yml
... | ... | @@ -54,8 +54,8 @@ |
54 | 54 |
|
55 | 55 |
servlet: |
56 | 56 |
multipart: |
57 |
- max-file-size: 200MB |
|
58 |
- max-request-size: 200MB |
|
57 |
+ max-file-size: 500MB |
|
58 |
+ max-request-size: 500MB |
|
59 | 59 |
|
60 | 60 |
# 캐시 설정 |
61 | 61 |
cache: |
... | ... | @@ -64,7 +64,8 @@ |
64 | 64 |
spec: maximumSize=100, expireAfterAccess=1h |
65 | 65 |
web: |
66 | 66 |
resources: |
67 |
- static-locations: file:///C:/uploadFiles/, classpath:/static/ |
|
67 |
+ # static-locations: file:///C:/uploadFiles/, classpath:/static/ |
|
68 |
+ static-locations: /home/cloud-user/uploadFiles |
|
68 | 69 |
|
69 | 70 |
# Mybatis settings |
70 | 71 |
#mybatis: |
... | ... | @@ -106,3 +107,7 @@ |
106 | 107 |
file: |
107 | 108 |
file-upload-path: /fileUpload/ |
108 | 109 |
edit-file-upload-path: /editFileUpload/ |
110 |
+ |
|
111 |
+logging: |
|
112 |
+ level: |
|
113 |
+ root: error(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/logback-srping.xml
... | ... | @@ -1,67 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!-- 15초마다 설정 파일의 변경을 확인 하여 변경시 갱신 --> | |
3 | -<configuration scan="true" scanPeriod="15 seconds"> | |
4 | - <!-- Server Log Config --> | |
5 | - <springProfile name="dev"> | |
6 | - <property resource="application.properties"/> | |
7 | - <!-- log file path --> | |
8 | - <property name="LOG_PATH" value="/home/cloud-user/back-end/logs/logs"/> | |
9 | - <!-- log file name --> | |
10 | - <property name="LOG_FILE_NAME" value="log_file"/> | |
11 | - <!-- err log file name --> | |
12 | - <property name="ERR_LOG_FILE_NAME" value="err_file"/> | |
13 | - <!-- log pattern --> | |
14 | - <property name="LOG_PATTERN" value="%-5level %d{yy-MM-dd HH:mm:ss} [%thread] [%logger{0}-%M:%line] - %msg%n "/> | |
15 | - <appender name="DEV_CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
16 | - <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | |
17 | - <pattern>${LOG_PATTERN}</pattern> | |
18 | - </encoder> | |
19 | - </appender> | |
20 | - <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
21 | - <!-- 파일경로 설정 --> | |
22 | - <file>${LOG_PATH}/${LOG_FILE_NAME}.log</file> | |
23 | - <!-- 출력패턴 설정--> | |
24 | - <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | |
25 | - <pattern>${LOG_PATTERN}</pattern> | |
26 | - </encoder> | |
27 | - <!-- Rolling 정책 (파일 관리설정) --> | |
28 | - <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
29 | - <!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 --> | |
30 | - <fileNamePattern>${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log</fileNamePattern> | |
31 | - <!-- 파일 크기 지정할떄 사용 --> | |
32 | - <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |
33 | - <!-- 파일당 최고 용량 kb, mb, gb --> | |
34 | - <maxFileSize>10MB</maxFileSize> | |
35 | - </timeBasedFileNamingAndTriggeringPolicy> | |
36 | - <!-- 일자별 로그파일 최대 보관주기(~일), 해당 설정일 이상된 파일은 자동으로 제거--> | |
37 | - <maxHistory>30</maxHistory> | |
38 | - <!--<MinIndex>1</MinIndex> <MaxIndex>10</MaxIndex>--> | |
39 | - </rollingPolicy> | |
40 | - </appender> | |
41 | - <appender name="Error" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
42 | - <filter class="ch.qos.logback.classic.filter.LevelFilter"> | |
43 | - <!-- 에러로그를 설정하고 로그의 레벨이 맞으면 onMatch, 아니라면 onMismatch --> | |
44 | - <level>error</level> | |
45 | - <onMatch>ACCEPT</onMatch> | |
46 | - <onMismatch>DENY</onMismatch> | |
47 | - </filter> | |
48 | - <file>${LOG_PATH}/${ERR_LOG_FILE_NAME}.log</file> | |
49 | - <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | |
50 | - <pattern>${LOG_PATTERN}</pattern> | |
51 | - </encoder> | |
52 | - <!-- Rolling 정책 --> | |
53 | - <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
54 | - <fileNamePattern>${LOG_PATH}/${ERR_LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log</fileNamePattern> | |
55 | - <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | |
56 | - <maxFileSize>10MB</maxFileSize> | |
57 | - </timeBasedFileNamingAndTriggeringPolicy> | |
58 | - <maxHistory>30</maxHistory> | |
59 | - </rollingPolicy> | |
60 | - </appender> | |
61 | - <root> | |
62 | - <appender-ref ref="DEV_CONSOLE"/> | |
63 | - <appender-ref ref="FILE"/> | |
64 | - <appender-ref ref="Error"/> | |
65 | - </root> | |
66 | - </springProfile> | |
67 | -</configuration>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/mybatis/mapper/cntnStats/cntnStats-SQL.xml
+++ src/main/resources/mybatis/mapper/cntnStats/cntnStats-SQL.xml
... | ... | @@ -235,8 +235,8 @@ |
235 | 235 |
--> |
236 | 236 |
<select id="selectUserCntnStats" parameterType="HashMap" resultType="HashMap"> |
237 | 237 |
SELECT ai.dates |
238 |
- , array_agg(authrt_nm) AS authrt_nm |
|
239 |
- , array_agg(COALESCE(ucs.cntn_nope, 0)) AS cntn_nope |
|
238 |
+ , array_agg(authrt_nm) AS authrt_nm |
|
239 |
+ , array_agg(COALESCE(ucs.cntn_nope, 0)) AS cntn_nope |
|
240 | 240 |
FROM (SELECT generate_series(to_date(#{startDt}, 'YYYY-MM-DD'), to_date(#{endDt}, 'YYYY-MM-DD'), '1 day'::interval)::date AS dates , authrt_cd , authrt_nm FROM authrt_info WHERE use_yn = 'Y') AS ai |
241 | 241 |
LEFT JOIN (SELECT authrt_cd, to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') AS cntn_date, cntn_nope FROM user_cntn_stats) AS ucs |
242 | 242 |
ON dates = ucs.cntn_date |
... | ... | @@ -251,7 +251,7 @@ |
251 | 251 |
내 용 : 사용자 접속 통계 목록 개수 조회 |
252 | 252 |
--> |
253 | 253 |
<select id="selectUserCntnStatsCnt" parameterType="HashMap"> |
254 |
- SELECT SUM(COALESCE(cntn_nope, 0)) |
|
254 |
+ SELECT COALESCE(SUM(cntn_nope), 0) |
|
255 | 255 |
FROM user_cntn_stats |
256 | 256 |
WHERE to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= to_date(#{startDt}, 'YYYY-MM-DD') |
257 | 257 |
AND to_date(#{endDt}, 'YYYY-MM-DD') >= to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') |
--- src/main/resources/mybatis/mapper/main/governmentMain-SQL.xml
+++ src/main/resources/mybatis/mapper/main/governmentMain-SQL.xml
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
</sql> |
25 | 25 |
<sql id="groupItem"> |
26 | 26 |
<if test="searchKeyword != null and searchText != ''"> |
27 |
- GROUP BY true |
|
27 |
+ GROUP BY true::boolean |
|
28 | 28 |
<if test="searchKeyword == 'day'"> |
29 | 29 |
, stats_date::DATE |
30 | 30 |
</if> |
--- src/main/resources/mybatis/mapper/mber/refresh-SQL.xml
+++ src/main/resources/mybatis/mapper/mber/refresh-SQL.xml
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 |
DELETE |
36 | 36 |
FROM mbr_refresh |
37 | 37 |
WHERE mbr_id = #{mbrId} |
38 |
- AND use_ip = #{useIp} |
|
38 |
+ AND use_ip like #{useIp} || '%' |
|
39 | 39 |
</delete> |
40 | 40 |
|
41 | 41 |
<!-- |
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?