diff --git a/.gitignore b/.gitignore index 9d7daf0..ed62eae 100644 --- a/.gitignore +++ b/.gitignore @@ -56,8 +56,10 @@ HELP.md **/out/ # production -**/build +!**/build/ +**/build/* **/dist +!backend/module-common/build/libs/ # misc **.DS_Store diff --git a/backend/board-service/build.gradle b/backend/board-service/build.gradle index 9684ff0..3b9319d 100644 --- a/backend/board-service/build.gradle +++ b/backend/board-service/build.gradle @@ -28,8 +28,8 @@ ext { } dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/backend/module-common/build/libs/module-common-4.1.0-plain.jar b/backend/module-common/build/libs/module-common-4.1.0-plain.jar new file mode 100644 index 0000000..eaf52d7 Binary files /dev/null and b/backend/module-common/build/libs/module-common-4.1.0-plain.jar differ diff --git a/backend/module-common/gradle/wrapper/gradle-wrapper.jar b/backend/module-common/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/backend/module-common/gradle/wrapper/gradle-wrapper.jar differ diff --git a/backend/module-common/gradle/wrapper/gradle-wrapper.properties b/backend/module-common/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b1159fc --- /dev/null +++ b/backend/module-common/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/backend/module-common/src/main/java/org/egovframe/cloud/common/config/MessageSourceConfig.java b/backend/module-common/src/main/java/org/egovframe/cloud/common/config/MessageSourceConfig.java index fef988f..fafee11 100644 --- a/backend/module-common/src/main/java/org/egovframe/cloud/common/config/MessageSourceConfig.java +++ b/backend/module-common/src/main/java/org/egovframe/cloud/common/config/MessageSourceConfig.java @@ -8,6 +8,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.util.StringUtils; +import java.io.File; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; @@ -41,6 +42,7 @@ public class MessageSourceConfig { @Value("${spring.profiles.active:default}") private String profile; + private static final String FILE_SEPARATOR = File.separator; @Bean public MessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); @@ -48,6 +50,9 @@ public class MessageSourceConfig { if ("default".equals(profile)) { Path fileStorageLocation = Paths.get(messagesDirectory).toAbsolutePath().normalize(); String dbMessages = StringUtils.cleanPath("file://" + fileStorageLocation + MESSAGES); + if(FILE_SEPARATOR.equals("\\")) {//윈도우기반 자바시스템일 때 Could not parse properties file 에러방지 + dbMessages = StringUtils.cleanPath("file:///" + fileStorageLocation + MESSAGES); + } messageSource.setBasenames(dbMessages); } else { messageSource.setBasenames(messagesDirectory + MESSAGES); diff --git a/backend/portal-service/build.gradle b/backend/portal-service/build.gradle index 102c5b2..6c9e2da 100644 --- a/backend/portal-service/build.gradle +++ b/backend/portal-service/build.gradle @@ -28,8 +28,8 @@ ext { } dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java index ad2c50e..2ab110d 100644 --- a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java +++ b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java @@ -51,10 +51,16 @@ public class FileStorageUtils implements StorageUtils { private final Path fileStorageLocation; private final Environment environment; private final MessageUtil messageUtil; - + private static final String FILE_SEPARATOR = File.separator; + public FileStorageUtils(Environment environment, MessageUtil messageUtil) { this.environment = environment; - this.fileStorageLocation = Paths.get(environment.getProperty("file.directory")).toAbsolutePath().normalize(); + String envFileDir = ""; + envFileDir = environment.getProperty("file.directory"); + if(FILE_SEPARATOR.equals("\\")) {//윈도우기반 자바시스템일 때 경로 에러방지 + envFileDir = envFileDir.replaceAll("/", "\\\\"); + } + this.fileStorageLocation = Paths.get(envFileDir).toAbsolutePath().normalize(); this.messageUtil = messageUtil; } @@ -185,8 +191,9 @@ public class FileStorageUtils implements StorageUtils { Path path = getStorePath(basePath); Path target = path.resolve(filename); - Files.copy(file.getInputStream(), target, StandardCopyOption.REPLACE_EXISTING); - + InputStream inputStream = file.getInputStream(); + Files.copy(inputStream, target, StandardCopyOption.REPLACE_EXISTING); + inputStream.close(); //윈도우 시스템에서도 업로드 시 Temp폴더의 delete file 에러방지코드 추가 return filename; } catch (IOException ex) { log.error("Could not stored file", ex); diff --git a/backend/reserve-check-service/build.gradle b/backend/reserve-check-service/build.gradle index fbd9e90..6290f13 100644 --- a/backend/reserve-check-service/build.gradle +++ b/backend/reserve-check-service/build.gradle @@ -25,8 +25,8 @@ ext { } dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/backend/reserve-item-service/build.gradle b/backend/reserve-item-service/build.gradle index e622d66..85ec0f3 100644 --- a/backend/reserve-item-service/build.gradle +++ b/backend/reserve-item-service/build.gradle @@ -25,8 +25,8 @@ ext { } dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/backend/reserve-request-service/build.gradle b/backend/reserve-request-service/build.gradle index 96fa12c..6f9e313 100644 --- a/backend/reserve-request-service/build.gradle +++ b/backend/reserve-request-service/build.gradle @@ -26,8 +26,8 @@ ext { dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/backend/user-service/build.gradle b/backend/user-service/build.gradle index c91c8fb..25cfceb 100644 --- a/backend/user-service/build.gradle +++ b/backend/user-service/build.gradle @@ -28,8 +28,8 @@ ext { } dependencies { -// implementation files('../../module-common/build/libs/module-common-0.1.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 - implementation 'org.egovframe.cloud:module-common:0.1' + implementation files('../module-common/build/libs/module-common-4.1.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다 +// implementation 'org.egovframe.cloud:module-common:0.1' implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') { exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' } diff --git a/frontend/portal/package.json b/frontend/portal/package.json index adfa64e..d3a86a7 100644 --- a/frontend/portal/package.json +++ b/frontend/portal/package.json @@ -7,7 +7,7 @@ "npm": "6.14.7" }, "scripts": { - "dev": "next dev", + "dev": "ts-node --transpile-only --project tsconfig.server.json server/index.ts", "dev:sm": "SITE_ID=3 npm run dev", "dev:lg": "SITE_ID=2 npm run dev", "dev:smWin": "set SITE_ID=3&&npm run dev", diff --git a/frontend/portal/public/styles/lg/layout.css b/frontend/portal/public/styles/lg/layout.css index 5c1246e..337a81d 100644 --- a/frontend/portal/public/styles/lg/layout.css +++ b/frontend/portal/public/styles/lg/layout.css @@ -1137,6 +1137,7 @@ footer div > span a { font-size: 32px; line-height: 32px; text-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5); + background: rgba(0, 0, 0, 0.3); /* overflow: hidden; white-space: break-spaces; word-break: keep-all; */ @@ -1147,6 +1148,7 @@ footer div > span a { left: 6vw; color: rgba(255, 255, 255, 0.7); font-size: 1.7vw; + background: rgba(0, 0, 0, 0.3); } #main .slideBox a:before { content: '╋'; @@ -1185,7 +1187,7 @@ footer div > span a { #main .slide .reservBox { position: absolute; - top: 600px; + top: 650px; left: 0; z-index: 10; width: 100%; diff --git a/frontend/portal/public/styles/sm/layout.css b/frontend/portal/public/styles/sm/layout.css index 0857c50..ee2bb58 100644 --- a/frontend/portal/public/styles/sm/layout.css +++ b/frontend/portal/public/styles/sm/layout.css @@ -1140,7 +1140,8 @@ footer div > span a { overflow: hidden; } #main .slide div.slide-title p { - height: 12vw; + /* height: 12vw; */ + background: rgba(0, 0, 0, 0.3); color: #fff; font-size: 2.7vw; font-weight: 600; @@ -1171,6 +1172,7 @@ footer div > span a { left: 6vw; color: rgba(255, 255, 255, 0.7); font-size: 1.7vw; + background: rgba(0, 0, 0, 0.3); } #main .slide a:before { content: '╋'; diff --git a/frontend/portal/server/index.ts b/frontend/portal/server/index.ts new file mode 100644 index 0000000..1bbeb9d --- /dev/null +++ b/frontend/portal/server/index.ts @@ -0,0 +1,30 @@ +import { loadEnvConfig } from '@next/env' +import express, { Request, Response } from 'express' +import next from 'next' +loadEnvConfig('./', process.env.NODE_ENV !== 'production') + +const port = process.env.PORT || 3000 +const dev = process.env.NODE_ENV !== 'production' +const app = next({ dev }) +const handle = app.getRequestHandler() + +const startServer = async () => { + try { + await app.prepare() + const server = express() + + server.all('*', (req: Request, res: Response) => { + return handle(req, res) + }) + + server.listen(port, (err?: any) => { + if (err) throw err + console.log(`> Ready on localhost:${port} - env ${process.env.NODE_ENV}`) + }) + } catch (error) { + console.error(error) + process.exit(1) + } +} + +startServer() diff --git a/frontend/portal/src/pages/board/[skin]/[board]/edit/[id].tsx b/frontend/portal/src/pages/board/[skin]/[board]/edit/[id].tsx index c4cbd26..5b75f45 100644 --- a/frontend/portal/src/pages/board/[skin]/[board]/edit/[id].tsx +++ b/frontend/portal/src/pages/board/[skin]/[board]/edit/[id].tsx @@ -146,14 +146,17 @@ const BoardEdit = (props: BoardEditProps) => { data = produce(data, draft => { draft.attachmentCode = result }) + save(data) } } }) + }else{ + save(data) } }) + }else{ + save(data) } - - save(data) } }, [postData, attachList]) diff --git a/frontend/portal/tsconfig.server.json b/frontend/portal/tsconfig.server.json new file mode 100644 index 0000000..4871dbb --- /dev/null +++ b/frontend/portal/tsconfig.server.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", // 기본설정을 포함한다 + "compilerOptions": { + "module": "commonjs", // commonJs 사용하도록 override + "outDir": "dist", // 빌드 파일 경로 (production mode) + "noEmit": false // 서버에 대한 결과 파일을 내보내지 않음 (production mode) + }, + "include": ["server"] // server/ 디렉토리 아래에 있는 파일만 컴파일 (production mode) +}