Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisyoungbin committed Sep 29, 2021
2 parents 1d9f72f + b91edbf commit 6742b28
Show file tree
Hide file tree
Showing 221 changed files with 2,785 additions and 6,768 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/front-dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: yarn

- name: Build
run: yarn build
run: yarn build:dev

- name: S3 Deploy
run: aws s3 sync ./dist s3://2021-cvi-dev/ --acl bucket-owner-full-control # s3 이름 2021-cvi-dev
Expand Down
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ out/
/src/main/resources/application-jwt.yml

# client-secret
/src/main/resources/application-client-secret.yml
/src/main/resources/application-client-secret.yml
5 changes: 5 additions & 0 deletions backend/app-cvi-admin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bootJar { enabled = false }
jar { enabled = true }

dependencies {
}
File renamed without changes.
Empty file.
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions backend/app-cvi-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# app-cvi-api
## 모듈 설명
- 사용자가 사용할 수 있는 기능을 제공하는 `애플리케이션 모듈`이에요.
- Controller, View의 책임을 가지고 있어요.
- 의존하는 모듈의 비즈니스 흐름 제어를 담당해요.

## 의존 모듈
- `common-cvi`: 예외 응답 객체를 사용해요.
- `domain-cvi`: Model에 CRUD 작업을 위임해요.
- `domain-cvi-oauth-service`: 소셜 로그인 요청에 대한 서비스를 위임해요.
- `domain-cvi-publicdata-service`: 공공 데이터 요청에 대한 서비스를 위임해요.
- `domain-cvi-scheduler`: 일정 기간마다 수행되어야 하는 작업을 위임해요.
56 changes: 56 additions & 0 deletions backend/app-cvi-api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version = '0.0.1-SNAPSHOT'

dependencies {
implementation project(path:':common-cvi', configuration: 'default')
implementation project(path:':domain-cvi', configuration: 'default')
implementation project(path:':domain-cvi-oauth-service', configuration: 'default')
implementation project(path:':domain-cvi-publicdata-service', configuration: 'default')
implementation project(path:':domain-cvi-scheduler', configuration: 'default')
implementation project(path:':domain-cvi-aws-s3-service', configuration: 'default')

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'

//cache
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'javax.cache:cache-api:1.1.1'
implementation 'org.ehcache:ehcache:3.9.4'

testImplementation 'io.rest-assured:rest-assured:4.3.3'
}

jacocoTestCoverageVerification { // 코드 커버리지 측정항목 시행
def Qdomains = []

for (qPattern in "*.QA".."*.QZ") {
Qdomains.add(qPattern + "*")
}

violationRules { // 위반 규칙
rule {
enabled = true
element = 'BUNDLE'

limit {
counter = 'INSTRUCTION'
value = 'COVEREDRATIO'
minimum = 0.00
}

excludes = [
// 커버리지 제외할 클래스
'*.DataLoader*',
'*.CviApplication*',
'*.DummyData*',
'*.KakaoProfile*',
'*.NaverProfile*'
] + Qdomains
}
}
}

sonarqube {
properties {
property "sonar.exclusions", "**/*Test*.*, **/Q*.java, **/*Doc*.java"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.backjoongwon.cvi;
package com.cvi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class CviApplication {
public class CentralVaccinationInformationApplication {

public static void main(String[] args) {
SpringApplication.run(CviApplication.class, args);
SpringApplication.run(CentralVaccinationInformationApplication.class, args);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
package com.backjoongwon.cvi;
package com.cvi;

import com.backjoongwon.cvi.auth.domain.authorization.SocialProvider;
import com.backjoongwon.cvi.comment.domain.Comment;
import com.backjoongwon.cvi.comment.domain.CommentRepository;
import com.backjoongwon.cvi.like.domain.Like;
import com.backjoongwon.cvi.like.domain.LikeRepository;
import com.backjoongwon.cvi.post.domain.Post;
import com.backjoongwon.cvi.post.domain.PostRepository;
import com.backjoongwon.cvi.post.domain.VaccinationType;
import com.backjoongwon.cvi.user.domain.AgeRange;
import com.backjoongwon.cvi.user.domain.User;
import com.backjoongwon.cvi.user.domain.UserRepository;
import com.cvi.comment.domain.model.Comment;
import com.cvi.comment.domain.repository.CommentRepository;
import com.cvi.like.domain.model.Like;
import com.cvi.like.domain.repository.LikeRepository;
import com.cvi.post.domain.model.Post;
import com.cvi.post.domain.model.VaccinationType;
import com.cvi.post.domain.repository.PostRepository;
import com.cvi.user.domain.model.AgeRange;
import com.cvi.user.domain.model.SocialProvider;
import com.cvi.user.domain.model.User;
import com.cvi.user.domain.repository.UserRepository;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.*;

@Component
@RequiredArgsConstructor
@Profile("dev")
Expand All @@ -41,9 +44,9 @@ public class DataLoader implements CommandLineRunner {
@Transactional
public void run(String... args) {
if (userRepository.findAll().isEmpty()
&& postRepository.findAll().isEmpty()
&& likeRepository.findAll().isEmpty()
&& commentRepository.findAll().isEmpty()) {
&& postRepository.findAll().isEmpty()
&& likeRepository.findAll().isEmpty()
&& commentRepository.findAll().isEmpty()) {
List<User> users = new ArrayList<>();
for (int i = 0; i < USER_COUNT; i++) {
User user = User.builder().nickname(String.valueOf(i)).socialId("socialId").socialProvider(SocialProvider.KAKAO).profileUrl("pictureUrl").ageRange(AgeRange.FIFTIES).build();
Expand Down
39 changes: 39 additions & 0 deletions backend/app-cvi-api/src/main/java/com/cvi/DummyData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.cvi;

public class DummyData {
public static final String DUMMY_DATA_10000 = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean odio orci, venenatis sed vulputate quis, ultricies non massa. Nulla commodo justo at metus consequat hendrerit. Sed nec mauris urna. Nunc turpis est, pulvinar vitae tellus non, sollicitudin commodo ligula. Nullam est ante, faucibus id leo malesuada, elementum hendrerit tortor. Sed id metus eu leo aliquet faucibus et ac felis. Aliquam nec laoreet est, interdum tempor mauris. Etiam feugiat, ante sed ullamcorper euismod, ligula lorem ultricies nisi, nec bibendum est dui eget metus. Nam ac congue libero.\n" +
"\n" +
"Pellentesque blandit risus quis consequat maximus. Donec ullamcorper facilisis ante, non luctus ex condimentum quis. Quisque pulvinar sagittis nulla at pulvinar. Nam mi urna, rutrum non erat id, dapibus ultricies tortor. Aliquam malesuada metus eu erat imperdiet pulvinar. In eget iaculis metus. Suspendisse nec orci auctor, egestas elit ut, ultrices sapien. Suspendisse tincidunt iaculis tellus id scelerisque. In non congue orci. Aliquam erat volutpat. Sed iaculis diam at justo porttitor, pulvinar tristique mauris finibus. Sed lobortis venenatis nunc sit amet cursus. Aenean mattis enim lectus, sit amet ullamcorper arcu sodales id.\n" +
"\n" +
"Quisque ornare tincidunt enim. Maecenas quis laoreet mi, in hendrerit lacus. Praesent id turpis in sapien euismod accumsan. Cras euismod sollicitudin sem nec aliquet. Aenean magna ex, luctus ut nulla id, consectetur sodales risus. Curabitur interdum elit et consectetur aliquet. Morbi non fringilla nisl.\n" +
"\n" +
"Donec neque elit, dapibus in malesuada at, convallis in dui. Donec consectetur dignissim magna, et ultrices felis finibus id. Etiam a urna lectus. Proin neque metus, iaculis eget mauris ac, congue vulputate nisl. Pellentesque sodales felis eu diam scelerisque molestie. Pellentesque commodo tempus vestibulum. Proin non quam egestas, pulvinar augue eu, hendrerit lorem. Aenean vel mollis nisi, sit amet scelerisque dolor. Vestibulum feugiat eleifend tellus, ac auctor ex ultricies ut. Aenean volutpat vulputate risus a euismod. Nulla tincidunt massa pulvinar dapibus pharetra. Curabitur a blandit lectus, vel posuere purus. Ut erat diam, bibendum vitae luctus quis, sollicitudin eget magna. Phasellus dignissim in odio feugiat blandit. Etiam porta sollicitudin massa sit amet auctor. Suspendisse rutrum pellentesque fermentum.\n" +
"\n" +
"Maecenas non faucibus lorem, eget tempor sapien. Pellentesque ac augue id justo malesuada blandit. In auctor varius scelerisque. Nunc cursus id elit et facilisis. Aenean in egestas erat. Nullam eleifend vitae diam at vehicula. Suspendisse ut diam at elit mollis accumsan. Nulla facilisi.\n" +
"\n" +
"Etiam vel elit a lorem efficitur ullamcorper id laoreet neque. Pellentesque nec imperdiet urna. Vestibulum sodales ante ac justo rutrum, id tempus nulla tincidunt. Aenean accumsan posuere enim eu vestibulum. Donec ex metus, molestie ac enim a, ultrices dapibus ipsum. Pellentesque neque quam, lobortis a lacus sed, molestie finibus urna. Curabitur a dolor quis ante malesuada blandit.\n" +
"\n" +
"Aliquam in massa ac odio mollis malesuada vel et diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam placerat feugiat elit eget iaculis. Cras arcu arcu, suscipit ac mi eu, pharetra pulvinar diam. Praesent tincidunt, lorem id auctor mollis, mi ipsum rhoncus mauris, vel placerat elit massa quis leo. Curabitur et mi fringilla quam blandit pulvinar. Nunc enim sem, maximus vitae sem at, posuere euismod risus. Duis euismod ullamcorper sem eget semper. Curabitur et neque vitae neque euismod pharetra. Curabitur vel mi accumsan, facilisis neque nec, consequat lectus. Mauris tristique velit vitae congue consequat. Donec sit amet tortor sed ante congue bibendum a cursus libero.\n" +
"\n" +
"Praesent tristique eget neque quis bibendum. Donec quis ante sed orci varius maximus. Praesent gravida in massa nec tincidunt. Nulla facilisi. Praesent magna enim, placerat eu libero id, hendrerit malesuada diam. Fusce vestibulum nulla ut erat elementum iaculis. Fusce eu posuere purus. Quisque efficitur rutrum metus quis vestibulum.\n" +
"\n" +
"Fusce vitae semper orci. Quisque eu urna lobortis, auctor magna quis, pellentesque sem. Etiam vitae vehicula dolor, sit amet pretium nulla. Ut efficitur pretium augue in luctus. Vestibulum in odio a diam tristique efficitur. Nulla egestas quis risus at imperdiet. Maecenas eget bibendum nisi, eu faucibus odio.\n" +
"\n" +
"Vestibulum porttitor a nulla a varius. Pellentesque nec lacinia nunc, nec elementum est. Vivamus commodo tortor et velit euismod blandit. Maecenas luctus pharetra velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque vulputate leo at nisi rutrum mattis. Pellentesque luctus malesuada turpis. Duis non erat quis eros hendrerit accumsan.\n" +
"\n" +
"Vivamus placerat, mi vitae fermentum pulvinar, massa lacus commodo tellus, in elementum neque purus elementum odio. Donec auctor volutpat finibus. Cras feugiat eu ipsum eu tincidunt. Sed non tortor ultrices, cursus sapien in, euismod nibh. Nunc interdum viverra dignissim. Nunc finibus finibus fermentum. Proin faucibus blandit lorem, nec pretium quam fermentum nec. In id euismod nisi, eu euismod tellus. Nulla interdum, arcu id vehicula viverra, lacus velit pellentesque sapien, sit amet sollicitudin erat metus in augue. Proin in congue dui. Aenean pharetra odio nec ornare suscipit. Nunc et libero magna. In ut quam ante.\n" +
"\n" +
"Fusce dignissim scelerisque neque ut tincidunt. Quisque ut lacinia metus, ut luctus lacus. Vivamus et dictum metus, et cursus libero. Phasellus turpis libero, hendrerit a mollis ac, semper feugiat urna. Nullam id sagittis quam, eu facilisis enim. Maecenas in tortor lacinia, aliquet felis non, congue leo. Proin enim massa, malesuada interdum tempus eget, venenatis id tellus. Etiam ultricies, lacus quis egestas pulvinar, ipsum nibh luctus nisl, sed interdum felis leo eu leo. Mauris faucibus semper nisi at rhoncus. Quisque vel venenatis nisi. Ut consectetur mauris nec magna lacinia fringilla. Nullam luctus fermentum odio. Donec ultricies augue sed dui elementum, sed euismod nibh laoreet. Maecenas condimentum sapien at faucibus mattis. Pellentesque porttitor sed tortor et faucibus. Aliquam sed quam eget lacus aliquam molestie sit amet at urna.\n" +
"\n" +
"Curabitur eget metus interdum diam volutpat efficitur. Maecenas viverra massa in est volutpat, eu convallis nisi eleifend. Sed molestie sagittis mauris. Quisque id arcu vitae lorem tristique pretium. Mauris cursus ex dolor, nec malesuada urna iaculis sit amet. Mauris pharetra magna eget sapien varius aliquet. Maecenas pulvinar orci non condimentum dictum. Maecenas faucibus rutrum arcu, nec aliquet elit dignissim ut. Integer ullamcorper massa eu lectus malesuada rutrum. Vestibulum maximus euismod ante, a euismod augue dapibus non. Praesent tellus orci, tempus quis dignissim id, ultricies porta felis. Maecenas ut ipsum dolor.\n" +
"\n" +
"Mauris pulvinar nisi et lorem elementum tristique. Vestibulum tempus, nunc id dictum condimentum, felis nisl dapibus sem, sit amet commodo metus tortor ut dui. Suspendisse viverra urna efficitur massa pellentesque mattis. Sed posuere, urna mollis bibendum ornare, felis dui congue nibh, sed placerat velit tellus vitae tellus. Cras maximus blandit diam nec feugiat. Nunc bibendum erat vitae libero lobortis pulvinar. In ut aliquam orci. Donec feugiat, ex congue pretium dictum, justo enim feugiat risus, malesuada ornare purus diam quis turpis. Phasellus vitae est id turpis consectetur semper. Quisque vel euismod justo, molestie vestibulum leo. Donec nibh nunc, rutrum ut diam ut, tincidunt bibendum est. Donec tristique dolor et interdum mollis. Aliquam a mi nulla.\n" +
"\n" +
"Morbi hendrerit sagittis nulla quis porta. Phasellus vitae vehicula sem, non mollis lorem. Donec mollis vestibulum nunc, vitae laoreet neque consectetur eget. Sed varius urna et urna porttitor, eu imperdiet velit sollicitudin. Nulla dolor dui, imperdiet at facilisis eget, scelerisque sed nisi. Integer maximus congue viverra. Ut mattis faucibus fermentum. Donec malesuada mattis sollicitudin. Maecenas vel est fringilla, elementum lectus et, rutrum mauris. Sed non viverra purus, ut finibus felis. Nunc ac fermentum tortor, non faucibus mauris.\n" +
"\n" +
"Aliquam erat volutpat. Etiam nulla erat, pretium id enim quis, hendrerit congue ligula. Sed vitae accumsan sem. Praesent ligula turpis, bibendum vitae nulla ut, efficitur commodo erat. Vestibulum odio nibh, convallis id ligula eget, pretium condimentum erat. Nam molestie tortor nec nibh ornare, at ultricies massa molestie. Aenean sodales dolor risus, sed fringilla purus interdum accumsan. In hac habitasse platea dictumst. In sit amet nisl nec leo sagittis tincidunt. Pellentesque at ligula at sapien suscipit facilisis. Sed nec feugiat neque. Sed eu neque lectus. Nullam sed magna ac mi pretium tristique. Integer at velit erat. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris efficitur nisl eget metus porta, ut tincidunt felis ultricies.\n" +
"\n" +
"Nullam sit amet maximus lacus. Suspendisse elit erat, vestibulum vel magna mollis, iaculis hendrerit eros. Praesent quis eros sed lorem faucibus feugiat vitae non sapien. Aliquam non mi sed dolor accumsan finibus id in odio. Nunc a placerat mauris. In hac habitasse platea dictumst. Curabitur quis diam facilisis, vulputate ligula nec, auctor mauris. Suspendisse potenti. Duis tempor neque diam, vel ornare metus fringilla quis. Proin a odio non nisi egestas blandit. Vestibulum sit amet leo odio. Nulla quis quam vel mauris eleifend dapibus et sed sapien. Suspendisse cursus porta augue, sed scelerisque libero faucibus quis. Vestibulum ipsum sem, pulvinar id tellus a, tincidunt cursus velit. Pellentesque tristique interdum est, nec sollicitudin justo efficitur quis.\n" +
"\n" +
"Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed tellus nulla, fringilla ut tortor ut, pellentesque faucibus dui. Donec posuere risus ut enim fermentum tristique. Nullam a erat nec massa rutrum bibendum. Duis rutrum porttitor massa nunc.";
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.backjoongwon.cvi.user.auth;
package com.cvi.auth;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.backjoongwon.cvi.user.auth;
package com.cvi.auth;

import com.backjoongwon.cvi.user.service.UserService;
import com.backjoongwon.cvi.user.domain.JwtTokenProvider;
import com.backjoongwon.cvi.user.domain.User;
import com.cvi.service.UserService;
import com.cvi.user.domain.model.User;
import java.util.Objects;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
Expand All @@ -11,10 +13,6 @@
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

import javax.servlet.http.HttpServletRequest;
import java.util.Objects;
import java.util.Optional;

@Component
@RequiredArgsConstructor
public class AuthenticationPrincipalArgumentResolver implements HandlerMethodArgumentResolver {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.backjoongwon.cvi.user.auth;
package com.cvi.auth;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.backjoongwon.cvi.user.domain;
package com.cvi.auth;

import io.jsonwebtoken.*;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.backjoongwon.cvi.user.auth;
package com.cvi.auth;

import com.backjoongwon.cvi.user.domain.JwtTokenProvider;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.backjoongwon.cvi.config;
package com.cvi.config;

import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.backjoongwon.cvi.config;
package com.cvi.config;

import com.backjoongwon.cvi.user.auth.AuthenticationPrincipalArgumentResolver;
import com.backjoongwon.cvi.user.auth.SigninInterceptor;
import com.cvi.auth.AuthenticationPrincipalArgumentResolver;
import com.cvi.auth.SigninInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
Expand Down
Loading

0 comments on commit 6742b28

Please sign in to comment.