63 Commits

Author SHA1 Message Date
eGovFrameSupport
ab8b150739 Update StatisticsRepository.java 2024-12-17 17:08:10 +09:00
eGovFrameSupport
b4d3eb0da3 Update RoleRepository.java 2024-12-17 17:07:27 +09:00
overpassion
d09bcffdd8 Merge pull request #25 from s-yujin1004/contribution
Kubernetes v1.28 기준으로 수정
2024-10-08 16:17:06 +09:00
overpassion
c64a5917fe Merge pull request #24 from LeeBaekHaeng/2024/problems/user-service
[user-service] 이클립스 문제(Problems) 해결
2024-10-08 16:13:25 +09:00
overpassion
cc550b5476 Merge pull request #22 from LeeBaekHaeng/2024/problems/SecurityConfig
[SecurityConfig] 이클립스 문제(Problems) 해결
2024-10-08 09:50:33 +09:00
overpassion
20608cb79f Merge pull request #23 from LeeBaekHaeng/2024/problems/apigateway
[apigateway] 이클립스 문제(Problems) 해결
2024-10-08 09:42:50 +09:00
overpassion
7fa693cf7a Merge pull request #20 from yooniank/contribution
chore: update README.md for k8s
2024-10-07 17:46:57 +09:00
overpassion
53eef65e2f Merge branch 'contribution' into contribution 2024-10-07 17:46:48 +09:00
overpassion
4935214321 Merge pull request #17 from dasomel/contribution
띄어쓰기 수정
2024-10-07 17:25:18 +09:00
steve jobs
a6ee514cd4 Kubernetes v1.28 기준으로 수정 2024-09-27 11:03:18 +09:00
이백행
0823147573 [user-service] 이클립스 문제(Problems) 해결 2024-09-25 10:39:45 +09:00
이백행
729f3bfaf4 [apigateway] 이클립스 문제(Problems) 해결 2024-09-24 21:41:19 +09:00
이백행
fbe5cd8521 [SecurityConfig] 이클립스 문제(Problems) 해결 2024-09-23 21:10:56 +09:00
yooniank
26fbd581da chore: update README.md for k8s 2024-09-20 10:41:58 +00:00
dasomel
edb712aec5 띄어쓰기 수정
Deployenvironments -> Deploy environments
2024-07-17 23:02:33 +09:00
egovframesupport
b2f3854ad3 Doc: contribution 용 issue template 등록 2024-07-15 09:38:33 +09:00
jei007
43f0351bda Update ReserveCheckSeviceApplication.java 2024-02-29 10:36:10 +09:00
jei007
772870c618 Update build.gradle 2024-02-29 10:34:51 +09:00
jei007
60413ff330 Update build.gradle 2024-02-29 10:23:33 +09:00
jei007
90aad445eb Update logback-spring.xml 2024-02-29 10:21:37 +09:00
jei007
57eae5a411 Update build.gradle 2024-02-29 10:20:28 +09:00
jei007
a2bb69217c Update logback-spring.xml 2024-02-29 10:18:07 +09:00
jei007
a12cdaa798 Update build.gradle 2024-02-29 10:16:26 +09:00
jei007
25ab6a7140 Update build.gradle 2024-02-29 10:15:44 +09:00
jei007
cb776dc0ab Update logback-spring.xml 2024-02-29 10:13:15 +09:00
jei007
7b7dd253e9 Update build.gradle 2024-02-29 10:12:18 +09:00
jei007
7fa8db7334 Update logback-spring.xml 2024-02-29 10:08:02 +09:00
jei007
2ecdb074cd Update build.gradle 2024-02-29 10:06:32 +09:00
jei007
7b155b3c0b Update logback-spring.xml 2024-02-29 10:02:05 +09:00
jei007
0a48c563c6 Update build.gradle 2024-02-29 10:01:07 +09:00
jei007
b6c2872ac8 Update build.gradle 2024-02-29 09:27:45 +09:00
jei007
bf5494cffe Update build.gradle 2024-02-29 09:25:49 +09:00
jei007
ae418ce420 Update logback-spring.xml 2024-02-29 09:24:25 +09:00
jei007
7dad5c8742 Update build.gradle 2024-02-29 09:23:11 +09:00
jei007
ed5671189c Update logback-spring.xml 2024-02-29 09:16:26 +09:00
jei007
c0981885e0 Update logback-spring.xml 2024-02-29 09:15:25 +09:00
jei007
27200749eb Update build.gradle 2024-02-29 09:14:31 +09:00
eGovFrameSupport
0550fe4965 Update pull_request_template.md
캡쳐 -> 캡처
2023-09-07 17:37:41 +09:00
eGovFrameSupport
510089fdf7 Create LICENSE 2023-07-07 13:39:10 +09:00
overpassion
f72d8542dd Merge pull request #14 from miniplugin/contribution
윈도우 시스템에서도 다국어 메세지 경로를 사용 및  포털사이트의 묻고답하기 신규 등록시 첨부파일 업로드의 post 테이블에 attachmentCode 누락되는 부분 처리
2023-06-12 14:20:03 +09:00
kimilguk
9086c60482 커밋7. 넥스트js 포털사이트(대규모)의 배너 출력 시 타이클과 더보기 링크가 밝은 색상에서도 보이게 css처리 2023-06-06 15:30:42 +09:00
kimilguk
6ac1790f2f 커밋6. 넥스트js 포털사이트의 묻고답하기 신규 등록시 첨부파일 업로드의 post 테이블에 attachmentCode 누락되는 부분 추가 2023-06-06 13:57:54 +09:00
kimilguk
b2b23f7b5e 커밋5. 넥스트js 포털사이트의 배너 출력 시 타이클과 더보기 링크가 밝은 색상에서도 보이게 css처리 2023-06-06 13:52:48 +09:00
kimilguk
96098869a8 커밋4. 포털 실행 방법 ts-node로 시작하게 변화: 실행 속도 향상 2023-06-06 13:31:22 +09:00
kimilguk
3af8a46d83 커밋3. 윈도우 시스템에서도 업로드 시 Temp폴더의 delete file 에러방지코드 추가 2023-06-06 13:24:39 +09:00
kimilguk
b2adbc1079 커밋2. 윈도우 시스템에서도 파일스토리지의 경로를 사용가능하게 추가 2023-06-06 13:20:57 +09:00
kimilguk
81c6c93d2a 커밋1. 윈도우 시스템에서도 다국어 메세지 경로를 사용 가능하게 추가 2023-06-06 12:58:57 +09:00
overpassion
0fb4003417 Merge pull request #13 from lucki3377/contribution
SecurityConfig에서 WebSecurityConfigurerAdapter 대체 처리
2023-06-05 14:16:00 +09:00
overpassion
d2875cfacb Merge pull request #12 from miniplugin/contribution
윈도우시스템에서도 웹에디터로 올린 이미지를 볼수있게 코드추가 및 MySql Closed방지
2023-06-05 09:49:12 +09:00
lucki3377
50d19be98f Update SecurityConfig.java
spring boot 2.7 버전 업그레이드로 인한 deperated된 소스 처리
2023-05-31 16:25:35 +09:00
kimilguk
342b66cfca 윈도우시스템에서도 웹에디터로 올린 이미지를 볼수있게 코드추가 및 MySql Closed방지 2023-05-12 16:45:21 +09:00
overpassion
dcbe48d308 Update package-lock.json
원복처리
2023-05-12 09:12:00 +09:00
overpassion
f9ca7b8905 Create package-lock.json
삭제파일 복원
2023-05-11 17:16:50 +09:00
overpassion
4cbecb2686 Merge pull request #11 from miniplugin/contribution
프런트엔드 admin 실행 스크립트에 windows용 추가 및 npm 의존성 버전 매뉴얼대로 실행
2023-05-11 17:04:30 +09:00
overpassion
9f7a53a860 Delete package-lock.json
삭제처리
2023-05-11 16:53:31 +09:00
overpassion
fb2434a25b Update package-lock.json
package-lock.json 원복 처리
2023-05-11 16:52:50 +09:00
overpassion
0febd840b2 Update package.json
코드 수정
2023-05-11 16:25:54 +09:00
boramcom
3f04f5f07d 프런트엔드 admin 실행 스크립트에 windows용 추가 및 npm 의존성 버전 매뉴얼대로 실행 2023-05-02 17:26:46 +09:00
overpassion
d4e159b1dd Merge pull request #10 from miniplugin/contribution
MSA 백엔드 프로젝트 중 5개의 application.yml 파일이 EUC-KR 로 인코딩 된 부분 UTF-8로 변경
2023-05-02 14:55:31 +09:00
boramcom
5e16e6cdc8 MSA 백엔드 프로젝트 중 5개의 application.yml 파일이 EUC-KR 로 인코딩 된 부분 UTF-8로 변경 2023-04-29 18:19:11 +09:00
chris-yoon
97a717796d Merge pull request #9 from yoonian/split-languages
Split English into README-en.md
2023-04-24 13:32:20 +09:00
Yoon PyungHo
181057d1fe Split English into README-en.md 2023-04-20 16:49:00 +00:00
chris-yoon
18ad94ec8a Merge pull request #8 from eGovFramework/main
Main
2023-04-17 13:41:27 +09:00
76 changed files with 1405 additions and 12217 deletions

View File

@@ -1,35 +0,0 @@
name: 개발가이드 수정 요청 Requesting changes to the development guide
description: 개발가이드 수정 요청하는 템플릿입니다. Template for requesting changes to the dev guide.
title: "[Guide]: "
labels: ["guide"]
assignees:
- overpassion
body:
- type: markdown
attributes:
value: |
시간을 내어 개발가이드 수정 요청을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a DevGuide correction request. (공유하고 싶은 기술문서나 노하우는 github wiki에 남겨 주세요. If you have any documentation or know-how you'd like to share, please leave it on our github wiki.)
- type: input
id: url
attributes:
label: 개발가이드 URL Dev Guide URL
description: 수정해야할 개발가이드 URL을 적어 주세요. Please write down the dev guide URL that needs to be modified.
placeholder: Example) https://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte4.1:fdl:aop:aspectj
validations:
required: true
- type: textarea
id: where-to-amend
attributes:
label: 수정 대상 내용 What to fix
description: 수정해야할 대상 내용을 기입해 주세요. Fill in what you need to fix.
placeholder: 수정해야할 대상은 다음과 같습니다. Here's what you'll need to modify
validations:
required: true
- type: textarea
id: amendment
attributes:
label: 수정 문구 Corrective Wording
description: 어떻게 수정되어야 하는지 적어주세요. Please write down how it should be fixed.
placeholder: 다음과 같이 수정되어야 합니다. It should be modified as follows
validations:
required: true

View File

@@ -3,7 +3,7 @@ description: 오류 내용을 이슈로 등록하는 템플릿입니다. Templat
title: "[Bug]: "
labels: ["bug", "triage"]
assignees:
- overpassion
- rukegithub
body:
- type: markdown
attributes:

View File

@@ -1,9 +1,9 @@
name: 기능 요구 및 의견 Feature Request
description: 기능 요구나 기타 의견을 이슈로 등록하는 템플릿입니다. Suggest an idea for improving eGovFrame.
name: 기능 요구 Feature Request
description: 기능 요구 이슈로 등록하는 템플릿입니다. Suggest a new feature for improving eGovFrame.
title: "[기능요구(Feature)]: "
labels: ["feature"]
assignees:
- overpassion
- rukegithub
body:
- type: markdown
attributes:

View File

@@ -0,0 +1,55 @@
name: 발전 방안 제안 Improvement Plan
description: 발전 방안을 이슈로 등록하는 템플릿입니다. Suggest a new plan for improving eGovFrame.
title: "[발전 방안 제안(Improvement Plan)]: "
labels: ["Improvement"]
assignees:
- yongfire38
body:
- type: markdown
attributes:
value: |
시간을 내어 의견을 작성해 주셔서 감사합니다. Thank you for taking the time to fill out a request.
- type: input
id: idea-name
attributes:
label: 아이디어명 Idea Name
validations:
required: true
- type: textarea
id: idea-summary
attributes:
label: 아이디어 요약 Idea Summary
description: 과제 내용을 300자 이내로 간결하게 요약 및 정의해 주세요 Please summarize and define your content in 300 characters or less
placeholder: 예) 게시판 첨부기능 추가 Example) Adding a bulletin board attachment
validations:
required: true
- type: textarea
id: suggestion-background
attributes:
label: 제안배경 Suggestion Background
description: 아이디어를 제안하게 된 배경 및 필요성을 기술해 주세요. Please describe the background and need for the idea.
placeholder: 아이디어를 제안하게 된 배경은 다음과 같습니다. The background to suggesting the idea is as follows.
validations:
required: true
- type: textarea
id: expectations
attributes:
label: 기대효과 Expectations
description: 아이디어의 실현 가능성과 예상되는 기대효과를 제시하여 주세요. Please describe the expected impact and outcome of the idea.
placeholder: 해당 아이디어의 기대효과는 다음과 같습니다. Here are the expected effects of this idea.
validations:
required: false
- type: textarea
id: free-writing
attributes:
label: 자유기술 Free Writing
description: 추가 기재하고 싶은 항목 및 내용을 자유롭게 기재하여 주세요. Please feel free to add anything else you'd like to include.
validations:
required: false
- type: textarea
id: reference
attributes:
label: 참고문헌 Reference
description: 참고문헌이 있는 경우 작성하여 주세요. If you have references, please include them.
validations:
required: false

View File

@@ -30,6 +30,6 @@
- [ ] Internet Explorer
- [ ] 기타 Others
## 테스트 스크린샷 또는 캡 영상 Test screenshots or captured video
## 테스트 스크린샷 또는 캡 영상 Test screenshots or captured video
테스트 전과 후의 스크린샷 또는 캡 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here.
테스트 전과 후의 스크린샷 또는 캡 영상을 이곳에 첨부해 주세요. Please attach screenshots or video captures of your before and after tests here.

4
.gitignore vendored
View File

@@ -56,8 +56,10 @@ HELP.md
**/out/
# production
**/build
!**/build/
**/build/*
**/dist
!backend/module-common/build/libs/
# misc
**.DS_Store

201
LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

222
README-en.md Normal file
View File

@@ -0,0 +1,222 @@
# MSA templates (for training)
![Spring](https://img.shields.io/badge/Spring_Boot-F2F4F9?style=for-the-badge&logo=spring-boot)
![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white)
![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB)
![NextJS](https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=for-the-badge&logo=kubernetes&logoColor=white)
This is the training source code for the Microservices Architecture (MSA) template created as part of the "Supporting the Spread of Cloud-Native Administrative and Public Services (2021)" project.
## Directory structure
```
├─backend
│ ├─apigateway
│ ├─board-service
│ ├─config
│ ├─discovery
│ ├─module-common
│ ├─portal-service
│ ├─reserve-check-service
│ ├─reserve-item-service
│ ├─reserve-request-service
│ └─user-service
├─config
├─docker-compose
│ ├─app
│ │ ├─mesh
│ │ └─service
│ ├─elk
│ │ ├─kibana
│ │ │ └─config
│ │ └─logstash
│ │ ├─config
│ │ └─pipeline
│ ├─mysql
│ │ └─init
│ └─opensearch
│ └─logstash
│ ├─config
│ └─pipeline
├─frontend
│ ├─admin
│ │ ├─public
│ │ │ ├─images
│ │ │ └─locales
│ │ ├─server
│ │ ├─src
│ │ │ ├─@types
│ │ │ ├─components
│ │ │ ├─constants
│ │ │ ├─hooks
│ │ │ ├─libs
│ │ │ ├─pages
│ │ │ ├─service
│ │ │ ├─stores
│ │ │ ├─styles
│ │ │ └─utils
│ │ └─test
│ ├─portal
│ │ ├─public
│ │ │ ├─locales
│ │ │ └─styles
│ │ ├─src
│ │ │ ├─@types
│ │ │ ├─components
│ │ │ ├─constants
│ │ │ ├─hooks
│ │ │ ├─libs
│ │ │ │ └─Storage
│ │ │ ├─pages
│ │ │ ├─service
│ │ │ ├─stores
│ │ │ ├─styles
│ │ │ └─utils
│ │ └─test
│ └─practice-image
└─k8s
├─applications
│ ├─backend
│ │ ├─apigateway
│ │ │ └─ingress
│ │ ├─board-service
│ │ ├─config
│ │ ├─discovery
│ │ │ └─ingress
│ │ ├─portal-service
│ │ ├─reserve-check-service
│ │ ├─reserve-item-service
│ │ ├─reserve-request-service
│ │ └─user-service
│ └─frontend
│ ├─admin
│ │ └─ingress
│ └─portal
│ └─ingress
└─environments
├─configmaps
├─databases
│ └─mysql
│ └─init
├─jenkins
├─logging
│ └─elk
│ ├─elasticsearch
│ ├─kibana
│ │ └─ingress
│ └─logstash
├─nfs
├─rabbitmq
│ └─ingress
├─storage
├─vagrant
└─zipkin
└─ingress
```
### Contents
- `/backend`: Services on the backend based on Spring Boot
- `/backend/apigateway`: API management and monitoring service for microservices (service mesh)
- `/backend/board-service`: Bulletin Board Service (Manage boards, posts, and attachments)
- `/backend/config`: Provide environment-independent services by offering separate, unified configuration management services (service mesh)
- `/backend/discovery`: Register and manage microservices and find and invoke them on demand (service mesh)
- `/backend/user-service`: User services (login, sign up, forgot password, admin)
- `/backend/portal-service`: Portal common services (menu, code, content, permissions, authorizations, banners, attachment management)
- `/backend/reserve-check-service`: Reservation Confirmation Service (non-blocking)
- `/backend/reserve-item-service`: Reserved Item Service (non-blocking)
- `/backend/reserve-request-service`: Reservation Request Service (non-blocking)
- `/config`: A folder containing a collection of configuration YAML files used by the CONFIG server in the backend.
- `/docker-compose`: YAML configuration files to manage the running of multiple containers in Docker
- `/frontend/admin`: Admin Dashboard built with Next.js + Typescript + Material UI.
- `/frontend/portal`: React based frontend built with Next.js + Typescript.
- `/frontend/practice-image`: Banner images
- `/k8s`: Resource template yaml file for deploying to a Kubernetes environment
- `/k8s/applications`: K8s Resource template yaml files for the backend and frontend applications
- `/k8s/environments/configmaps`: objects stored as key-value pairs as environment variables used by Pods.
- `/k8s/environments/databases`: MySQL-related objects
- `/k8s/environments/jenkins`: Jenkins-related objects
- `/k8s/environments/logging`: ELK-specific objects for Centralized Logging
- `/k8s/environments/nfs`: NFS Node Volumes Configuration
- `/k8s/environments/rabbitmq`: Message Broker-related objects
- `/k8s/environments/storage`: PersistentVolumeClaim objects
- `/k8s/environments/vagrant`: Vagrant-specific definitions that make it easy to configure the creation of a virtualized software development environment
- `/k8s/environments/zipkin`: Zipkin-specific definitions for distributed transaction tracing
## How to run backend
- Run the Eclipse IDE in your development environment.
- From the Eclipse IDE menu, click File>Import....
- In the Import window that opens, select Gradle>Existing Gradle Project
- Click Next when the Import Gradle Project window opens.
- Select ${home}/workspace.edu/egovframe-msa-edu/backend/config from the project root directory and click the Finish button.
- Repeat the above to import the following projects (1-6 for small, 1-9 for large).
1. config
2. discovery
3. apigateway
4. user-service
5. portal-service
6. board-service
7. reserve-check-service
8. reserve-item-service
9. reserve-request-service
- After importing all the projects and checking the Project Explorer, the board-service, portal-service, and user-service projects show errors. You need to add the classes that are generated by querydsl to the build path.
- Click Window>Show View>Other, select Gradle>Gradle Tasks in the opened window, and click the Open button to open the Gradle Tasks tab.
- Click the View Menu button in the top right corner of Gradle Tasks and check Show All Tasks.
- In Gradle Tasks, double-click portal-service>other>compileQuerydsl or right-click and click Run Gradle Tasks to start the build.
- In the Project Explorer, select board-service, portal-service, user-service, and press F5 or right-click and click Refresh to refresh the project.
- In Project Explorer, right-click the board-service, portal-service, or user-service, and then click Properties.
- In the Properties window that opens, select Java Build Path from the left menu and click the Add Folder... button on the right Source tab.
- In the Source Folder Selection window that opens, check build>generated>querydsl and click the OK button.
- When you click the Apply and Close button in the Properties window, the window closes and the project rebuilds and the error message disappears.
(For more information about ELK configuration, Config, OAuth 2.0 setup, API call and JUnit Test, please refer to [02.MSA template backend configuration and practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084631/02.MSA._.pdf).)
## How to run frontend
```
node : 14.8.0
npm : 6.14.7
Visual Studio Code : latest
```
- Download and install from https://nodejs.org/en/download and check the version.
```
node -v
npm -v
```
- In Visual Studio Code, open the frontend/admin folder.
- In a terminal, run the following
```
npm install
npm run dev
```
- On the login screen, enter '1@gmail.com' in the email field and 'test1234!' in the password field to log in.
(For more information, please refer to [03.MSA template frontend configuration and practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084632/03.MSA._.pdf).)
## Screenshots reference
![Microservices Architecture](./images/msa.png)
![Authentication/Authorization-JWT](./images/jwt.png)
![Frontend](./images/frontend.png)
![Login](./images/login.png)
![Admin](./images/admin.png)
## Training materials
Only available in Korean.
- [01.MSA template overview and development environment practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084628/01.MSA._._.pdf)
- [01.MSA Template Overview and Development Environment Theory(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084629/01.MSA._._.pdf)
- [02.MSA template backend configuration and practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084631/02.MSA._.pdf)
- [03.MSA template frontend configuration and practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084632/03.MSA._.pdf)
- [04.MSA template event stream configuration and practice(KOR).pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084633/04.MSA._.pdf)

113
README.md
View File

@@ -1,17 +1,16 @@
# MSA 템플릿 (교육용) MSA templates (for training)
# MSA 템플릿 (교육용)
![Spring](https://img.shields.io/badge/Spring_Boot-F2F4F9?style=for-the-badge&logo=spring-boot)
![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white)
![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB)
![Next JS](https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white)
![NextJS](https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=for-the-badge&logo=kubernetes&logoColor=white)
'클라우드 네이티브 기반 행정·공공 서비스 확산 지원(2021)' 사업의 일환으로 제작된 MSA(Microservices Architecture) 템플릿의 교육 소스코드이다.
This is the training source code for the Microservices Architecture (MSA) template created as part of the "Supporting the Spread of Cloud-Native Administrative and Public Services (2021)" project.
## 디렉토리 구조 Directory Structure
## 디렉토리 구조
```
├─backend
@@ -118,43 +117,43 @@ This is the training source code for the Microservices Architecture (MSA) templa
└─ingress
```
### 디렉토리 설명 Contents
### 디렉토리 설명
- `/backend`: Spring Boot를 기반으로 백앤드에 올려지는 서비스들 Services on the backend based on Spring Boot
- `/backend/apigateway`: Microservice에 대한 API 관리 및 모니터링 서비스 API management and monitoring service for microservices (service mesh)
- `/backend/board-service`: 게시판 서비스 (게시판, 게시물, 첨부파일 관리) Bulletin Board Service (Manage boards, posts, and attachments)
- `/backend/config`: 별도의 통합된 설정 관리 서비스 제공을 통해 환경 독립적 서비스 제공 Provide environment-independent services by offering separate, unified configuration management services (service mesh)
- `/backend/discovery`: 마이크로서비스들을 등록하여 관리하고 요청 시 해당 서비스를 찾아 호출 Register and manage microservices and find and invoke them on demand (service mesh)
- `/backend/user-service`: 사용자 서비스 (로그인, 회원가입, 비밀번호 찾기, 관리자) User services (login, sign up, forgot password, admin)
- `/backend/portal-service`: 포털 공통 서비스 (메뉴, 코드, 컨텐츠, 권한, 인가, 배너, 첨부파일 관리) Portal common services (menu, code, content, permissions, authorizations, banners, attachment management)
- `/backend/reserve-check-service`: 예약 확인 서비스 Reservation Confirmation Service (non-blocking)
- `/backend/reserve-item-service`: 예약 물품 서비스 Reserved Item Service (non-blocking)
- `/backend/reserve-request-service`: 예약 신청 서비스 Reservation Request Service (non-blocking)
- `/config`: backend 의 config 서버에서 사용하는 설정 yaml 파일 모음 폴더 A folder containing a collection of configuration YAML files used by the CONFIG server in the backend.
- `/docker-compose`: Docker에 여러 컨테이너의 실행을 관리하는 yaml 구성 파일들 YAML configuration files to manage the running of multiple containers in Docker
- `/backend`: Spring Boot를 기반으로 백앤드에 올려지는 서비스들
- `/backend/apigateway`: Microservice에 대한 API 관리 및 모니터링 서비스
- `/backend/board-service`: 게시판 서비스 (게시판, 게시물, 첨부파일 관리)
- `/backend/config`: 별도의 통합된 설정 관리 서비스 제공을 통해 환경 독립적 서비스 제공
- `/backend/discovery`: 마이크로서비스들을 등록하여 관리하고 요청 시 해당 서비스를 찾아 호출
- `/backend/user-service`: 사용자 서비스 (로그인, 회원가입, 비밀번호 찾기, 관리자)
- `/backend/portal-service`: 포털 공통 서비스 (메뉴, 코드, 컨텐츠, 권한, 인가, 배너, 첨부파일 관리)
- `/backend/reserve-check-service`: 예약 확인 서비스
- `/backend/reserve-item-service`: 예약 물품 서비스
- `/backend/reserve-request-service`: 예약 신청 서비스
- `/config`: backend 의 config 서버에서 사용하는 설정 yaml 파일 모음 폴더
- `/docker-compose`: Docker에 여러 컨테이너의 실행을 관리하는 yaml 구성 파일들
- `/frontend/admin`: Next.js + Typescript + Material UI 활용한 Admin Dashboard.
- `/frontend/portal`: Next.js + Typescript 활용한 React 기반 프론트엔드.
- `/frontend/practice-image`: 배너 이미지 Banner images
- `/k8s`: Kubernetes 환경 배포를 위한 Resource 템플릿 yaml 파일 Resource template yaml file for deploying to a Kubernetes environment
- `/k8s/applications`: Backend와 Frontend 애플리케이션의 k8s Resource 템플릿 yaml 파일 k8s Resource template yaml files for the backend and frontend applications
- `/k8s/environments/configmaps`: Pods에서 사용하는 환경변수로서 Key-Value 쌍의 형태로 저장된 객체 정의 Define objects stored as key-value pairs as environment variables used by Pods.
- `/k8s/environments/databases`: MySQL 관련 객체 정의 Define MySQL-related objects
- `/k8s/environments/jenkins`: Jenkins 관련 객체 정의 Defining Jenkins-related objects
- `/k8s/environments/logging`: Centralized Logging을 위한 ELK 관련 객체 정의 Define ELK-specific objects for Centralized Logging
- `/k8s/environments/nfs`: NFS 노드 볼륨 구성 Configure NFS Node Volumes
- `/k8s/environments/rabbitmq`: Message Broker 관련 객체 정의 Defining Message Broker-related objects
- `/frontend/practice-image`: 배너 이미지
- `/k8s`: Kubernetes 환경 배포를 위한 Resource 템플릿 yaml 파일
- `/k8s/applications`: Backend와 Frontend 애플리케이션의 k8s Resource 템플릿 yaml 파일
- `/k8s/environments/configmaps`: Pods에서 사용하는 환경변수로서 Key-Value 쌍의 형태로 저장된 객체 정의
- `/k8s/environments/databases`: MySQL 관련 객체 정의
- `/k8s/environments/jenkins`: Jenkins 관련 객체 정의
- `/k8s/environments/logging`: Centralized Logging을 위한 ELK 관련 객체 정의
- `/k8s/environments/nfs`: NFS 노드 볼륨 구성
- `/k8s/environments/rabbitmq`: Message Broker 관련 객체 정의
- `/k8s/environments/storage`: PersistentVolumeClaim 정의
- `/k8s/environments/vagrant`: 가상화 소프트웨어 개발환경의 생성을 쉽게 구성하도록 하는 Vagrant 관련 정의 Vagrant-specific definitions that make it easy to configure the creation of a virtualized software development environment
- `/k8s/environments/zipkin`: 분산 트랜잭션 추적을 위한 Zipkin 관련 정의 Zipkin-specific definitions for distributed transaction tracing
- `/k8s/environments/vagrant`: 가상화 소프트웨어 개발환경의 생성을 쉽게 구성하도록 하는 Vagrant 관련 정의
- `/k8s/environments/zipkin`: 분산 트랜잭션 추적을 위한 Zipkin 관련 정의
## 백앤드 구동 방법 How to run backend
## 백앤드 구동 방법
- 개발환경 Eclipse IDE 를 실행한다. Run the Eclipse IDE for your development environment.
- Eclipse IDE 메뉴에서 File>Import… 를 클릭한다. From the Eclipse IDE menu, click File>Import....
- Import 창이 열리면 Gradle>Existing Gradle Project 를 선택하고 Next 버튼을 클릭한다. In the Import window that opens, select Gradle>Existing Gradle Project and click the Next button.
- 개발환경 Eclipse IDE 를 실행한다.
- Eclipse IDE 메뉴에서 File>Import… 를 클릭한다.
- Import 창이 열리면 Gradle>Existing Gradle Project 를 선택하고 Next 버튼을 클릭한다.
- Import Gradle Project 창이 열리면 Next 버튼을 클릭한다.
- Project root directory 에서 ${home}/workspace.edu/egovframe-msa-edu/backend/config를 선택하고 Finish 버튼을 클릭한다. Select ${home}/workspace.edu/egovframe-msa-edu/backend/config from the project root directory and click the Finish button.
- 위의 과정을 반복하여 아래의 프로젝트를 import 한다. (소규모는 1-6, 대규모는 1-9) Repeat the above to import the following projects (1-6 for small, 1-9 for large)
- Project root directory 에서 ${home}/workspace.edu/egovframe-msa-edu/backend/config를 선택하고 Finish 버튼을 클릭한다.
- 위의 과정을 반복하여 아래의 프로젝트를 import 한다. (소규모는 1-6, 대규모는 1-9)
1. config
2. discovery
@@ -166,19 +165,19 @@ This is the training source code for the Microservices Architecture (MSA) templa
8. reserve-item-service
9. reserve-request-service
- 모든 프로젝트를 import 하고 Project Explorer 를 확인하면 board-service, portal-service, user-service 프로젝트에 오류 표시가 출력된다. querydsl 로 generate 되는 클래스들을 build path 에 추가해야 한다. After importing all the projects and checking the Project Explorer, the board-service, portal-service, and user-service projects show errors. You need to add the classes that are generated by querydsl to the build path.
- Window>Show View>Other 을 클릭해서 열린 창에서 Gradle>Gradle Tasks 를 선택하고 Open 버튼을 클릭하면 Gradle Tasks 탭이 열린다. Click Window>Show View>Other, select Gradle>Gradle Tasks in the opened window, and click the Open button to open the Gradle Tasks tab.
- Gradle Tasks 오른쪽 윗부분의 View Menu 버튼을 클릭해서 Show All Tasks 를 체크한다. Click the View Menu button in the top right corner of Gradle Tasks and check Show All Tasks.
- Gradle Tasks 에서 portal-service>other>compileQuerydsl 을 더블클릭 또는 우클릭 후 Run Gradle Tasks 를 클릭하면 build 가 시작된다. In Gradle Tasks, double-click portal-service>other>compileQuerydsl or right-click and click Run Gradle Tasks to start the build.
- Project Explorer 에서 board-service, portal-service, user-service 를 선택하고 F5 또는 우클릭 후 Refresh 를 클릭해서 프로젝트를 새로고침한다. In the Project Explorer, select board-service, portal-service, user-service, and press F5 or right-click and click Refresh to refresh the project.
- Project Explorer 에서 board-service, portal-service, user-service 를 우클릭하고 Properties 를 클릭한다. In Project Explorer, right-click the board-service, portal-service, or user-service, and then click Properties.
- Properties 창이 열리면 왼쪽 메뉴에서 Java Build Path를 선택하고 오른쪽 Source 탭에서 Add Folder… 버튼을 클릭한다. In the Properties window that opens, select Java Build Path from the left menu and click the Add Folder... button on the right Source tab.
- Source Folder Selection 창이 열리면 build>generated>querydsl 을 체크하고 OK 버튼을 클릭한다. In the Source Folder Selection window that opens, check build>generated>querydsl and click the OK button.
- Properties 창에서 Apply and Close 버튼을 클릭하면 창이 닫히면서 프로젝트를 다시 빌드하고 오류 표시는 사라진다. When you click the Apply and Close button in the Properties window, the window closes and the project rebuilds and the error message disappears.
- 모든 프로젝트를 import 하고 Project Explorer 를 확인하면 board-service, portal-service, user-service 프로젝트에 오류 표시가 출력된다. querydsl 로 generate 되는 클래스들을 build path 에 추가해야 한다.
- Window>Show View>Other 을 클릭해서 열린 창에서 Gradle>Gradle Tasks 를 선택하고 Open 버튼을 클릭하면 Gradle Tasks 탭이 열린다.
- Gradle Tasks 오른쪽 윗부분의 View Menu 버튼을 클릭해서 Show All Tasks 를 체크한다.
- Gradle Tasks 에서 portal-service>other>compileQuerydsl 을 더블클릭 또는 우클릭 후 Run Gradle Tasks 를 클릭하면 build 가 시작된다.
- Project Explorer 에서 board-service, portal-service, user-service 를 선택하고 F5 또는 우클릭 후 Refresh 를 클릭해서 프로젝트를 새로고침한다.
- Project Explorer 에서 board-service, portal-service, user-service 를 우클릭하고 Properties 를 클릭한다.
- Properties 창이 열리면 왼쪽 메뉴에서 Java Build Path를 선택하고 오른쪽 Source 탭에서 Add Folder… 버튼을 클릭한다.
- Source Folder Selection 창이 열리면 build>generated>querydsl 을 체크하고 OK 버튼을 클릭한다.
- Properties 창에서 Apply and Close 버튼을 클릭하면 창이 닫히면서 프로젝트를 다시 빌드하고 오류 표시는 사라진다.
(ELK 설정, Config 설정, OAuth 2.0 설정, API 호출 및 JUnit 테스트 관련해서는 02.MSA템플릿\_백엔드구성실습.pdf 파일을 참조한다.)
(ELK 설정, Config 설정, OAuth 2.0 설정, API 호출 및 JUnit 테스트 관련해서는 [02.MSA템플릿 백엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084631/02.MSA._.pdf) 파일을 참조한다.)
## 프론트앤드 구동 방법 How to run frontend
## 프론트앤드 구동 방법
```
node : 14.8.0
@@ -186,26 +185,26 @@ npm : 6.14.7
Visual Studio Code : latest
```
- https://nodejs.org/en/download 에서 다운로드 후 설치하고 버전을 확인한다. Download and install from https://nodejs.org/en/download and check the version.
- https://nodejs.org/en/download 에서 다운로드 후 설치하고 버전을 확인한다.
```
node -v
npm -v
```
- Visual Studio Code 에서 frontend/admin 폴더를 연다. In Visual Studio Code, open the frontend/admin folder.
- Terminal 에서 다음을 실행한다. In a terminal, run the following
- Visual Studio Code 에서 frontend/admin 폴더를 연다.
- Terminal 에서 다음을 실행한다.
```
npm install
npm run dev
```
- 로그인 화면에서 email 란에 '1@gmail.com', password 란에 'test1234!' 입력 후 로그인한다. On the login screen, enter '1@gmail.com' in the email field and 'test1234!' in the password field to log in.
- 로그인 화면에서 email 란에 '1@gmail.com', password 란에 'test1234!' 입력 후 로그인한다.
(기타 상세한 내용은 03.MSA템플릿\_프론트엔드구성실습.pdf 파일을 참조한다.) (For more details, see 03.MSA템플릿\_프론트엔드구성및실습.pdf).
(기타 상세한 내용은 [03.MSA템플릿 프론트엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084632/03.MSA._.pdf) 파일을 참조한다.)
## 참조 화면 Screenshots Reference
## 참조 화면
![Microservices Architecture](./images/msa.png)
![Authentication/Authorization-JWT](./images/jwt.png)
@@ -213,10 +212,10 @@ npm run dev
![Login](./images/login.png)
![Admin](./images/admin.png)
## 교육 교재 Training materials
## 교육 교재
- [01.MSA템플릿*개요개발환경*실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084628/01.MSA._._.pdf)
- [01.MSA템플릿*개요개발환경*이론.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084629/01.MSA._._.pdf)
- [02.MSA템플릿\_백엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084631/02.MSA._.pdf)
- [03.MSA템플릿\_프론트엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084632/03.MSA._.pdf)
- [04.MSA템플릿\_이벤트스트림구성및 실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084633/04.MSA._.pdf)
- [01.MSA템플릿 개요개발환경 실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084628/01.MSA._._.pdf)
- [01.MSA템플릿 개요개발환경 이론.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084629/01.MSA._._.pdf)
- [02.MSA템플릿 백엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084631/02.MSA._.pdf)
- [03.MSA템플릿 프론트엔드구성실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084632/03.MSA._.pdf)
- [04.MSA템플릿 이벤트스트림구성 및 실습.pdf](https://github.com/eGovFramework/egovframe-msa-edu/files/11084633/04.MSA._.pdf)

View File

@@ -1,12 +1,12 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id "org.sonarqube" version "3.3"
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'org.sonarqube' version '3.5.0.2730'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
repositories {
@@ -14,8 +14,8 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
dependencies {
@@ -28,11 +28,11 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // config
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp' // bus
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

View File

@@ -3,7 +3,6 @@ package org.egovframe.cloud.apigateway.api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@@ -25,6 +24,7 @@ import java.util.Locale;
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2021/08/10 jaeyeolkim 최초 생성
* 2024/09/24 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
* </pre>
*/
@Slf4j

View File

@@ -6,8 +6,6 @@ import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.reactive.error.DefaultErrorAttributes;
import org.springframework.boot.web.reactive.error.ErrorAttributes;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.reactive.function.server.ServerRequest;
@@ -31,6 +29,7 @@ import java.util.Map;
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2021/07/16 jaeyeolkim 최초 생성
* 2024/09/24 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
* </pre>
*/
@Slf4j

View File

@@ -69,7 +69,7 @@ management:
info:
app:
name: Spring Cloud Gateway
description: API <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD>/<2F><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
description: API 라우팅 및 보안, 모니터링/메트릭 등의 기능을 간단하고 효과적인 방법으로 제공
swagger-ui: http://localhost:8000/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
messages:

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,14 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id "org.sonarqube" version "3.3"
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'org.sonarqube' version '3.5.0.2730'
id 'io.spring.dependency-management' version '1.1.0'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -23,14 +23,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -48,8 +48,8 @@ dependencies {
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.73'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'mysql:mysql-connector-java'
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
// querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0'
@@ -62,8 +62,8 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-stream-binder-rabbit'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.6.9'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.7.0'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// lombok
implementation 'org.projectlombok:lombok'
@@ -72,10 +72,11 @@ dependencies {
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'com.h2database:h2'
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' // 테스트시에만 출력
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.1' // 테스트시에만 출력
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.javassist:javassist:3.29.0-GA'
implementation 'org.javassist:javassist:3.29.2-GA'
implementation 'org.webjars:webjars-locator-core:0.53'
}
dependencyManagement {

View File

@@ -30,4 +30,4 @@ management:
info:
app:
name: Board Service
description: <EFBFBD>Խ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>, <20>Խù<D4BD><C3B9><EFBFBD><EFBFBD><EFBFBD>, ÷<><C3B7><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
description: 게시판관리, 게시물관리, 첨부파일관리 기능을 제공

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,11 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
repositories {
@@ -13,8 +13,8 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
dependencies {
@@ -27,7 +27,7 @@ dependencies {
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.73'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,11 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
repositories {
@@ -13,8 +13,8 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
dependencies {

View File

@@ -1,8 +1,9 @@
package org.egovframe.cloud.discovery;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.SecurityFilterChain;
/**
* org.egovframe.cloud.discovery.SecurityConfig
@@ -20,10 +21,11 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2021/06/30 jaeyeolkim 최초 생성
* 2024/09/23 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
* </pre>
*/
@EnableWebSecurity // Spring Security 설정들을 활성화시켜 준다
public class SecurityConfig extends WebSecurityConfigurerAdapter {
public class SecurityConfig {
/**
* 스프링 시큐리티 설정
@@ -31,8 +33,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
* @param http
* @throws Exception
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.csrf().disable()
.headers().frameOptions().disable()
@@ -42,6 +44,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.anyRequest().authenticated()
.and()
.httpBasic();
return http.build();
}
}

View File

@@ -1,14 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id 'java'
id "org.sonarqube" version "2.7"
id 'org.sonarqube' version '3.5.0.2730'
}
group 'org.egovframe.cloud'
version '4.1.0'
version '4.2.0'
sourceCompatibility = '1.8'
repositories {
@@ -30,13 +30,13 @@ configurations {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
dependencies {
// EgovAbstractServiceImpl
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -44,7 +44,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation' // LocalValidatorFactoryBean
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'javassist:javassist:3.12.1.GA'
implementation 'org.javassist:javassist:3.29.2-GA'
// querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0'
@@ -55,8 +55,8 @@ dependencies {
//openapi docs
implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.7.0'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'
//reactive
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'

Binary file not shown.

View File

@@ -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

View File

@@ -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);

View File

@@ -1,14 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id "org.sonarqube" version "3.3"
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'org.sonarqube' version '3.5.0.2730'
id 'io.spring.dependency-management' version '1.1.0'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -23,14 +23,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -50,10 +50,11 @@ dependencies {
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.73'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'commons-net:commons-net:3.8.0' // FTPClient
implementation 'mysql:mysql-connector-java'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
implementation 'commons-io:commons-io:2.13.0'
implementation 'commons-net:commons-net:3.9.0' // FTPClient
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
//messaging
implementation 'org.springframework.cloud:spring-cloud-stream'
@@ -64,7 +65,7 @@ dependencies {
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.7.0'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// lombok
@@ -74,10 +75,11 @@ dependencies {
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'com.h2database:h2'
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' // 테스트시에만 출력
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.1' // 테스트시에만 출력
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.javassist:javassist:3.29.0-GA'
implementation 'org.javassist:javassist:3.29.2-GA'
implementation 'org.webjars:webjars-locator-core:0.53'
}
dependencyManagement {

View File

@@ -22,6 +22,6 @@ import java.util.List;
* 2021/09/07 shinmj 최초 생성
* </pre>
*/
public interface StatisticsRepository extends JpaRepository<Statistics, String>, StatisticsRepositoryCustom {
public interface StatisticsRepository extends JpaRepository<Statistics, Long>, StatisticsRepositoryCustom {
}

View File

@@ -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);
}
/**

View File

@@ -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);

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,11 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -20,14 +20,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
@@ -41,11 +41,11 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp' // bus
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.1'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.11'
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
//messaging
implementation 'org.springframework.cloud:spring-cloud-stream'
@@ -54,10 +54,10 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'dev.miku:r2dbc-mysql:0.8.2.RELEASE'
implementation 'mysql:mysql-connector-java'
implementation 'mysql:mysql-connector-java:8.0.33'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'
//lombok
implementation 'org.projectlombok:lombok'
@@ -71,6 +71,8 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.webjars:webjars-locator-core:0.53'
}
test {

View File

@@ -6,8 +6,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import reactivefeign.spring.config.EnableReactiveFeignClients;
//import reactor.blockhound.BlockHound;
import java.security.Security;
@ComponentScan({"org.egovframe.cloud.common", "org.egovframe.cloud.reactive", "org.egovframe.cloud.reservechecksevice"}) // org.egovframe.cloud.common package 포함하기 위해

View File

@@ -15,4 +15,4 @@ management:
info:
app:
name: Reserve Check Service
description: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
description: 예약시스템 기능 중 예약확인, 예약승인/취소 기능을 제공

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,11 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -20,14 +20,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
@@ -41,19 +41,19 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp' // bus
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.1'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.11'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
implementation 'dev.miku:r2dbc-mysql:0.8.2.RELEASE'
implementation 'mysql:mysql-connector-java'
implementation 'mysql:mysql-connector-java:8.0.33'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'
//messaging
implementation 'org.springframework.cloud:spring-cloud-stream'
@@ -71,6 +71,8 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.webjars:webjars-locator-core:0.53'
}
test {

View File

@@ -15,4 +15,4 @@ management:
info:
app:
name: Reserve Item Service
description: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>๰ǰ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
description: 예약시스템 기능 중 예약지역, 예약물품 관리 기능을 제공

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,11 +1,11 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -20,15 +20,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
@@ -42,11 +41,11 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-bus-amqp' // bus
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.1'
implementation 'com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.11'
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
//messaging
implementation 'org.springframework.cloud:spring-cloud-stream'
@@ -57,10 +56,10 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'dev.miku:r2dbc-mysql:0.8.2.RELEASE'
implementation 'mysql:mysql-connector-java'
implementation 'mysql:mysql-connector-java:8.0.33'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.7.0'
//lombok
implementation 'org.projectlombok:lombok'
@@ -75,6 +74,8 @@ dependencies {
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.springframework.amqp:spring-rabbit-test'
implementation 'org.webjars:webjars-locator-core:0.53'
}
test {

View File

@@ -15,4 +15,4 @@ management:
info:
app:
name: Reserve Request Service
description: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
description: 예약시스템 기능 중 예약신청 기능을 제공

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,14 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.7.0'
id "org.sonarqube" version "2.7"
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.springframework.boot' version '2.7.12'
id 'org.sonarqube' version '3.5.0.2730'
id 'io.spring.dependency-management' version '1.1.0'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id 'java'
}
group = 'org.egovframe.cloud'
version = '0.1'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
@@ -23,14 +23,14 @@ repositories {
}
ext {
set('springCloudVersion', "2021.0.3")
set('log4j2.version', "2.17.2") // log4j 보안 패치
set('springCloudVersion', '2021.0.7')
set('log4j2.version', '2.20.0') // log4j 보안 패치
}
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('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.1.0') {
// implementation files('../module-common/build/libs/module-common-4.2.0-plain.jar') // 공통 모듈, @ComponentScan(basePackages={"org.egovframe.cloud"}) 추가해야 적용된다
implementation 'org.egovframe.cloud:module-common:4.2.0'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.2.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
}
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -50,9 +50,9 @@ dependencies {
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.73'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.73'
implementation 'net.logstash.logback:logstash-logback-encoder:7.2' // logstash logback
implementation 'mysql:mysql-connector-java'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
implementation 'net.logstash.logback:logstash-logback-encoder:7.4' // logstash logback
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
// querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0'
@@ -61,10 +61,10 @@ dependencies {
implementation 'org.ehcache:ehcache'
implementation 'javax.cache:cache-api' // expiry를 위해 필요
implementation 'com.google.api-client:google-api-client:1.35.1'
implementation 'com.google.api-client:google-api-client:2.2.0'
// openapi docs
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.6.9'
implementation 'org.springdoc:springdoc-openapi-webmvc-core:1.7.0'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// lombok
@@ -73,11 +73,12 @@ dependencies {
testImplementation 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'com.h2database:h2'
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
testImplementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.javassist:javassist:3.29.0-GA'
implementation 'org.webjars:webjars-locator-core:0.53'
}
dependencyManagement {

View File

@@ -30,6 +30,7 @@ import java.util.Collections;
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2021/06/30 jaeyeolkim 최초 생성
* 2024/09/25 이백행 컨트리뷰션 이클립스 문제(Problems) 해결
* </pre>
*/
@RequiredArgsConstructor
@@ -47,7 +48,8 @@ public class CustomOAuth2UserService implements OAuth2UserService<OAuth2UserRequ
*/
@Override
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
OAuth2UserService delegate = new DefaultOAuth2UserService();
// OAuth2UserService delegate = new DefaultOAuth2UserService();
OAuth2UserService<OAuth2UserRequest, OAuth2User> delegate = new DefaultOAuth2UserService();
OAuth2User oAuth2User = delegate.loadUser(userRequest);
// 현재 로그인 진행 중인 서비스를 구분하는 코드(구글 or 네이버..)

View File

@@ -2,12 +2,13 @@ package org.egovframe.cloud.userservice.config;
import lombok.RequiredArgsConstructor;
import org.egovframe.cloud.userservice.service.user.UserService;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
import static org.egovframe.cloud.common.config.GlobalConstant.SECURITY_PERMITALL_ANTPATTERNS;
@@ -31,11 +32,15 @@ import static org.egovframe.cloud.common.config.GlobalConstant.SECURITY_PERMITAL
*/
@RequiredArgsConstructor
@EnableWebSecurity // Spring Security 설정들을 활성화시켜 준다
public class SecurityConfig extends WebSecurityConfigurerAdapter {
public class SecurityConfig {
private final TokenProvider tokenProvider;
private final UserService userService;
private final BCryptPasswordEncoder bCryptPasswordEncoder;
@Bean
AuthenticationManager authenticationManager(AuthenticationConfiguration authConfiguration) throws Exception {
return authConfiguration.getAuthenticationManager();
}
/**
* 스프링 시큐리티 설정
@@ -43,45 +48,34 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
* @param http
* @throws Exception
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.headers().frameOptions().disable()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS) // 토큰 사용하기 때문에 세션은 비활성화
.and()
.authorizeRequests()
.antMatchers(SECURITY_PERMITALL_ANTPATTERNS).permitAll()
.anyRequest().access("@authorizationService.isAuthorization(request, authentication)") // 호출 시 권한 인가 데이터 확인
.and()
.addFilter(getAuthenticationFilter())
.logout()
.logoutSuccessUrl("/");
}
@Bean
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
/**
* 로그인 인증정보를 받아 토큰을 발급할 수 있도록 필터를 등록해준다.
*
* @return
* @throws Exception
*/
private AuthenticationFilter getAuthenticationFilter() throws Exception {
return new AuthenticationFilter(authenticationManager(), tokenProvider, userService);
}
AuthenticationManager authenticationManager = authenticationManager(http.getSharedObject(AuthenticationConfiguration.class));
/**
* 인증 관련 - 로그인 처리
* DB 에서 조회하여 일치하는지 체크한다.
*
* @param auth
* @throws Exception
*/
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
// userService.loadUserByUsername 메소드
auth.userDetailsService(userService).passwordEncoder(bCryptPasswordEncoder);
}
/**
* 로그인 인증정보를 받아 토큰을 발급할 수 있도록 필터를 등록해준다.
*
* @return
* @throws Exception
*/
AuthenticationFilter authenticationFilter = new AuthenticationFilter(authenticationManager, tokenProvider, userService);
http
.csrf().disable().headers().frameOptions().disable()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS) // 토큰 사용하기 때문에 세션은 비활성화
.and()
.authorizeRequests()
.antMatchers(SECURITY_PERMITALL_ANTPATTERNS).permitAll()
.anyRequest().access("@authorizationService.isAuthorization(request, authentication)") // 호출 시 권한 인가 데이터 확인
.and()
.addFilter(authenticationFilter)
.logout()
.logoutSuccessUrl("/");
return http.build();
}
}

View File

@@ -26,6 +26,10 @@ import java.io.Serializable;
*/
@Getter
public class SessionUser implements Serializable {
/**
*
*/
private static final long serialVersionUID = -6319235143325686744L;
private String userName;
private String email;

View File

@@ -19,5 +19,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
* 2021/07/07 jooho 최초 생성
* </pre>
*/
public interface RoleRepository extends JpaRepository<Role, Long>, RoleRepositoryCustom {
public interface RoleRepository extends JpaRepository<Role, String>, RoleRepositoryCustom {
}

View File

@@ -70,6 +70,9 @@ public class AuthorizationService extends AbstractService {
* @return Page<AuthorizationListResponseDto> 페이지 인가 목록 응답 DTO
*/
public Page<AuthorizationListResponseDto> findPage(RequestDto requestDto, Pageable pageable) {
if (log.isDebugEnabled()) {
log.debug("requestDto={}", requestDto);
}
return authorizationRepository.findPage(requestDto, pageable);
}

View File

@@ -807,51 +807,51 @@ public class UserService extends AbstractService implements UserDetailsService {
return user.orElse(null);
}
/**
* 소셜 사용자 엔티티 조회
* 등록되어 있지 않은 경우 사용자 등록
*
* @param providerCode 공급자 코드
* @param providerId 공급자 id
* @param email 이메일
* @param userName 사용자 명
* @return UserLoginRequestDto 사용자 로그인 요청 DTO
*/
private UserResponseDto getAndSaveSocialUser(String providerCode, String providerId, String email, String userName) {
User user = findSocialUser(providerCode, providerId);
// 이메일로 조회
// 공급자에서 동일한 이메일을 사용할 수 있고
// 현재 시스템 구조 상 이메일을 사용자 식별키로 사용하고 있어서 이메일로 사용자를 한번 더 검색한다.
if (user == null) {
user = userRepository.findByEmail(email).orElse(null);
// 공급자 id로 조회되지 않지만 이메일로 조회되는 경우 공급자 id 등록
if (user != null) {
user.setSocial(providerCode, providerId);
}
}
if (user == null) {
// 사용자 등록
final String userId = UUID.randomUUID().toString();
//final String password = makeRandomPassword(); // 임의 비밀번호 생성 시 복호화 불가능
user = User.builder()
.email(email) // 100byte
//.encryptedPassword(passwordEncoder.encode(password)) // 100 byte
.userName(userName)
.userId(userId)
.role(Role.USER)
.userStateCode(UserStateCode.NORMAL.getKey())
.build();
user.setSocial(providerCode, providerId);
user = userRepository.save(user);
}
return new UserResponseDto(user);
}
// /**
// * 소셜 사용자 엔티티 조회
// * 등록되어 있지 않은 경우 사용자 등록
// *
// * @param providerCode 공급자 코드
// * @param providerId 공급자 id
// * @param email 이메일
// * @param userName 사용자 명
// * @return UserLoginRequestDto 사용자 로그인 요청 DTO
// */
// private UserResponseDto getAndSaveSocialUser(String providerCode, String providerId, String email, String userName) {
// User user = findSocialUser(providerCode, providerId);
//
// // 이메일로 조회
// // 공급자에서 동일한 이메일을 사용할 수 있고
// // 현재 시스템 구조 상 이메일을 사용자 식별키로 사용하고 있어서 이메일로 사용자를 한번 더 검색한다.
// if (user == null) {
// user = userRepository.findByEmail(email).orElse(null);
//
// // 공급자 id로 조회되지 않지만 이메일로 조회되는 경우 공급자 id 등록
// if (user != null) {
// user.setSocial(providerCode, providerId);
// }
// }
//
// if (user == null) {
// // 사용자 등록
// final String userId = UUID.randomUUID().toString();
// //final String password = makeRandomPassword(); // 임의 비밀번호 생성 시 복호화 불가능
//
// user = User.builder()
// .email(email) // 100byte
// //.encryptedPassword(passwordEncoder.encode(password)) // 100 byte
// .userName(userName)
// .userId(userId)
// .role(Role.USER)
// .userStateCode(UserStateCode.NORMAL.getKey())
// .build();
// user.setSocial(providerCode, providerId);
//
// user = userRepository.save(user);
//
// }
//
// return new UserResponseDto(user);
// }
}

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!DOCTYPE xml>
<Configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
@@ -45,4 +46,4 @@
</root>
</springProfile>
</configuration>
</Configuration>

View File

@@ -1,6 +1,5 @@
package org.egovframe.cloud.userservice.api.role;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.egovframe.cloud.userservice.api.role.dto.AuthorizationUpdateRequestDto;
import org.egovframe.cloud.userservice.domain.role.Authorization;

View File

@@ -5,14 +5,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.context.MessageSource;
import java.util.Locale;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@EnableConfigurationProperties

View File

@@ -30,6 +30,11 @@ import java.util.List;
public class RestResponsePage<T> extends PageImpl<T> {
/**
*
*/
private static final long serialVersionUID = -5737360124251098346L;
/**
* Rest 응답 페이지 생성자
*
* @param content 목록

View File

@@ -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

View File

@@ -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

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,10 @@
"scripts": {
"start:dev": "next",
"dev": "ts-node --project tsconfig.server.json server/index.ts",
"dev:sm": "SITE_ID=4 ts-node --project tsconfig.server.json server/index.ts",
"dev:sm": "SITE_ID=4 npm run dev",
"dev:lg": "SITE_ID=1 npm run dev",
"dev:smWin": "set SITE_ID=4&&npm run dev",
"dev:lgWin": "set SITE_ID=1&&npm run dev",
"clean:dev": "rimraf .next",
"build:server": "tsc --project tsconfig.server.json",
"build:next": "next build",

View File

@@ -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",

View File

@@ -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%;

View File

@@ -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: '╋';

View File

@@ -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()

View File

@@ -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])

View File

@@ -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)
}

77
k8s/README-en.md Normal file
View File

@@ -0,0 +1,77 @@
# Deploy services on Kubernetes
In Kubernetes, the service consists of two components,
1. Environments
2. Applications
And you can choose the storage in the application either NFS or Cinder provided by Openstack(used by [Pasta](http://paas-ta.kr))
# Prerequisites
## Install kustomize
If you are using kubectl 1.14 or later, it embeded kustomize. So please ignore this section.
I recommend that you install the latest version of [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/) for your cluster instead of installing kustomize.
Even so, if you want to use kustomize, refer to [official kustomize doc](https://kustomize.io/).
# Deploy service
You must follow deployment order.
## Deploy environments
```sh
$ kustomize build k8s/environments | kubectl apply -f -
```
or if you are using the kubectl only,
```sh
$ kubectl apply -k k8s/environments
```
## Deploy applications
If you want to use NFS as a main storage,
```sh
$ kustomize build k8s/stoage/nfs | kubectl apply -f -
```
or
```sh
$ kubectl apply -k k8s/stoage/nfs
```
In case of using Openstack storage(CINDER) as a main storage,
```sh
$ kustomize build k8s/stoage/openstack | kubectl apply -f -
```
or
```sh
$ kubectl apply -k k8s/stoage/openstack
```
# Shutdown service
Simply apply deployment in reverse order.
If you are using nfs,
```sh
$ kustomize build k8s/environments | kubectl delete -f -
$ kustomize build k8s/stoage/nfs | kubectl delete -f - --wait
```
or
```sh
$ kubectl delete -k k8s/environments
$ kubectl delete -k k8s/stoage/nfs --wait
```
The case of openstack is similar, so it is omitted.

View File

@@ -1,77 +1,77 @@
# Deploy services on Kubernetes
# Kubernetes에서 서비스 배포
In Kubernetes, the service consists of two components,
Kubernetes에서 서비스는 두 가지 구성 요소로 이루어져 있습니다.
1. Environments
2. Applications
1. 환경 (Environments)
2. 애플리케이션 (Applications)
And you can choose the storage in the application either NFS or Cinder provided by Openstack(used by [Pasta](http://paas-ta.kr))
그리고 애플리케이션에서 사용할 스토리지를 선택할 수 있으며, NFS 또는 Openstack이 제공하는 Cinder를 사용할 수 있습니다(이 경우 [PaaS-TA](http://paas-ta.kr)를 사용).
# Prerequisites
# 사전 준비 {#prerequisites}
## Install kustomize
## kustomize 설치 {#install-kustomize}
If you are using kubectl 1.14 or later, it embeded kustomize. So please ignore this section.
I recommend that you install the latest version of [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/) for your cluster instead of installing kustomize.
Even so, if you want to use kustomize, refer to [official kustomize doc](https://kustomize.io/).
kubectl 1.14 이상을 사용하고 있다면, kustomize가 내장되어 있으므로 이 섹션을 무시해도 됩니다.
대신 클러스터에서 최신 버전의 [kubectl](https://kubectl.docs.kubernetes.io/installation/kubectl/)을 설치하는 것을 권장합니다.
그럼에도 불구하고 kustomize를 사용하고 싶다면, [공식 kustomize 문서](https://kustomize.io/)를 참고하세요.
# Deploy service
# 서비스 배포 {#deploy-service}
You must follow deployment order.
배포 순서를 따라야 합니다.
## Deployenvironments
## 환경 배포 {#deploy-environments}
```sh
$ kustomize build k8s/environments | kubectl apply -f -
```
or if you are using the kubectl only,
혹은 kubectl만 사용하는 경우,
```sh
$ kubectl apply -k k8s/environments
```
## Deploy applications
## 애플리케이션 배포 {#deploy-applications}
If you want to use NFS as a main storage,
NFS를 메인 스토리지로 사용하려면,
```sh
$ kustomize build k8s/stoage/nfs | kubectl apply -f -
```
or
혹은
```sh
$ kubectl apply -k k8s/stoage/nfs
```
In case of using Openstack storage(CINDER) as a main storage,
Openstack의 스토리지(CINDER)를 메인 스토리지로 사용하는 경우,
```sh
$ kustomize build k8s/stoage/openstack | kubectl apply -f -
```
or
혹은
```sh
$ kubectl apply -k k8s/stoage/openstack
```
# Shutdown service
## 서비스 종료 {#shutdown-service}
Simply apply deployment in reverse order.
단순히 배포 순서를 반대로 적용하면 됩니다.
If you are using nfs,
NFS를 사용하는 경우,
```sh
$ kustomize build k8s/environments | kubectl delete -f -
$ kustomize build k8s/stoage/nfs | kubectl delete -f - --wait
```
or
혹은
```sh
$ kubectl delete -k k8s/environments
$ kubectl delete -k k8s/stoage/nfs --wait
```
The case of openstack is similar, so it is omitted.
Openstack의 경우도 비슷하므로 생략합니다.

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: mysql-pv
labels:
env: production
tier: database
app: mysql
name: mysql-pv
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
storageClassName: nfs
persistentVolumeReclaimPolicy: Retain
nfs:
path: /srv/nfs
server: 192.168.56.21

View File

@@ -32,7 +32,7 @@ spec:
- "-c"
- |
set -ex
[[ `hostname` =~ -([0-9]+)$ ]] || exit 1
[[ $HOSTNAME =~ -([0-9]+)$ ]] || exit 1
ordinal=${BASH_REMATCH[1]}
echo [mysqld] > /mnt/conf.d/server-id.cnf
echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf

View File

@@ -1,18 +0,0 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jenkins-ingress
labels:
env: production
tier: cicd
app: jenkins
name: jenkins-ingress
spec:
rules:
- host: <젠킨스 도메인> # TODO
http:
paths:
- path: /
backend:
serviceName: jenkins
servicePort: 8080

View File

@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jenkins-ingress
labels:
env: production
tier: cicd
app: jenkins
spec:
rules:
- host: <Jenkins 도메인> # TODO
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jenkins
port:
number: 8080

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: jenkins

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-pv
labels:
env: production
tier: cicd
app: jenkins
name: jenkins-pv
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
storageClassName: nfs
persistentVolumeReclaimPolicy: Retain
nfs:
path: /srv/nfs
server: 192.168.56.21

View File

@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: jenkins
name: jenkins-role
rules:
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "create", "update", "delete"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "create", "update", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "create", "update", "delete", "patch"]

View File

@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: jenkins
name: jenkins-rolebinding
subjects:
- kind: ServiceAccount
name: jenkins
namespace: default
roleRef:
kind: Role
name: jenkins-role
apiGroup: rbac.authorization.k8s.io

View File

@@ -1,4 +1,4 @@
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kibana-ingress
@@ -6,13 +6,15 @@ metadata:
env: production
tier: logging
app: kibana
name: kibana-ingress
spec:
rules:
- host: <ELK Kibana 도메인> # TODO
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: kibana
servicePort: 5601
service:
name: kibana
port:
number: 5601

View File

@@ -1,4 +1,4 @@
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rabbitmq-ingress
@@ -6,13 +6,15 @@ metadata:
env: production
tier: backend
app: rabbitmq
name: rabbitmq-ingress
spec:
rules:
- host: <RabbitMQ 도메인> # TODO
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: rabbitmq
servicePort: 15672
service:
name: rabbitmq
port:
number: 15672

View File

@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: zipkin-ingress
@@ -6,13 +6,16 @@ metadata:
env: production
tier: backend
app: zipkin
name: zipkin-ingress
spec:
rules:
- host: <Zipkin 도메인> # TODO
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: zipkin
servicePort: 9411
service:
name: zipkin
port:
number: 9411