diff --git a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/service/attachment/AttachmentService.java b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/service/attachment/AttachmentService.java index 8a765a9..7520c82 100644 --- a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/service/attachment/AttachmentService.java +++ b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/service/attachment/AttachmentService.java @@ -150,7 +150,12 @@ public class AttachmentService extends AbstractService { */ @Transactional(readOnly = true) public AttachmentImageResponseDto loadImage(String imagename) { - return storageUtils.loadImage(imagename.replaceAll(EDITOR_FILE_SEPARATOR, FILE_SEPARATOR)); + if(FILE_SEPARATOR.equals("\\")) {//윈도우기반 자바시스템일 때 하이픈 character to be escaped is missing 에러방지 + imagename = imagename.replaceAll(EDITOR_FILE_SEPARATOR, "\\\\"); //getFileSystem().getPath에서 디스크의 경로를 사용할 때 + } else { //리눅스 또는 맥 기반 자바시스템 경로일 때(아래) + imagename = imagename.replaceAll(EDITOR_FILE_SEPARATOR, FILE_SEPARATOR); + } + return storageUtils.loadImage(imagename); } /** diff --git a/config/board-service.yml b/config/board-service.yml index 982099c..26ce8bb 100644 --- a/config/board-service.yml +++ b/config/board-service.yml @@ -3,7 +3,7 @@ database: spring: datasource: - url: ${database.url}?serverTimezone=Asia/Seoul + url: ${database.url}?serverTimezone=Asia/Seoul&autoReconnect=true&validationQuery=select 1 username: msaportal password: msaportal driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/config/portal-service.yml b/config/portal-service.yml index eee05d8..f08cb44 100644 --- a/config/portal-service.yml +++ b/config/portal-service.yml @@ -3,7 +3,7 @@ database: spring: datasource: - url: ${database.url}?serverTimezone=Asia/Seoul + url: ${database.url}?serverTimezone=Asia/Seoul&autoReconnect=true&validationQuery=select 1 username: msaportal password: msaportal driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/config/user-service.yml b/config/user-service.yml index e3e4150..8c67d04 100644 --- a/config/user-service.yml +++ b/config/user-service.yml @@ -3,7 +3,7 @@ database: spring: datasource: - url: ${database.url}?serverTimezone=Asia/Seoul + url: ${database.url}?serverTimezone=Asia/Seoul&autoReconnect=true&validationQuery=select 1 username: msaportal password: msaportal driver-class-name: com.mysql.cj.jdbc.Driver