Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
78ab976
add : PostRepositoryCustom 확장
oownahcohc Oct 26, 2022
224cc78
feat : PostRepositoryCustom 인터페이스 개발
oownahcohc Oct 26, 2022
0ac132c
feat : PostRepositoryCustomImpl 구현 개발
oownahcohc Oct 26, 2022
9684837
add : FollowRepositoryCustom 확장
oownahcohc Oct 26, 2022
f672284
feat : FollowRepositoryCustom 인터페이스 개발
oownahcohc Oct 26, 2022
03aa080
feat : FollowRepositoryCustomImpl 구현 개발
oownahcohc Oct 26, 2022
bfb89c9
feat : auditing time response 공통 response 개발
oownahcohc Oct 26, 2022
e4673e0
add : home 뷰 조회 관련 success response 추가
oownahcohc Oct 26, 2022
ee4c024
feat : post response dto 개발
oownahcohc Oct 26, 2022
11cae0c
feat: home 뷰 response 개발
oownahcohc Oct 26, 2022
c403959
feat : 유저 및 유저의 친구들이 오늘 인증 포스트를 작성했는지 여부를 판단하는 enum class
oownahcohc Oct 26, 2022
c2b8408
feat : 유저 및 친구들 관련 정보 response dto
oownahcohc Oct 26, 2022
e2c4494
feat : home 관련 요청 controller 개발
oownahcohc Oct 26, 2022
519558d
feat : home 조회 service
oownahcohc Oct 26, 2022
144fd42
Merge pull request #7 from team-welcome/feat/home
oownahcohc Oct 26, 2022
3c410d1
fix : swqgger 설정을 위한 implement 수정
oownahcohc Oct 26, 2022
690a847
feat : swagger configuartion 개발
oownahcohc Oct 26, 2022
bcc0c83
Merge pull request #8 from team-welcome/feat/swagger-config
oownahcohc Oct 26, 2022
2e58dda
style : README.md 내용 추가
oownahcohc Oct 26, 2022
228791d
add : 푸시 알림 전송 관련 success response 추가
oownahcohc Oct 27, 2022
b3b3350
add : 알림 내용 저장할 column 추가 및 정적 팩토리 메서드 추가
oownahcohc Oct 27, 2022
ad950de
feat : TokenRepository 개발
oownahcohc Oct 27, 2022
c7247d5
feat : notification 관련 요청 controller 개발
oownahcohc Oct 27, 2022
d59f3a6
feat : NotificationService 인터페이스 개발
oownahcohc Oct 27, 2022
58d687b
feat : 찌르기(POKE) 알림 service 구현 개발
oownahcohc Oct 27, 2022
617fd31
feat : 팔로우(FOLLOW) 알림 service 개발 준비
oownahcohc Oct 27, 2022
d58d956
feat : NotificationType 키, NotificationService 를 값으로 갖는 service 제공 Ma…
oownahcohc Oct 27, 2022
ab5c518
Merge pull request #9 from team-welcome/feat/notification-poke
oownahcohc Oct 27, 2022
fd75e1a
test : Test Bean 등록
oownahcohc Oct 28, 2022
9723c91
test : follow reposirtory 메서드 쿼리수와 연관관계 편의 메서드 쿼리 수 비교 테스트
oownahcohc Oct 28, 2022
b48f859
add : 유저 검색 및 언팔로우 success response 추가
oownahcohc Oct 28, 2022
d3a2c73
add : follow 관련 연관관계 매핑 및 연관관계 편의 메서드, 정적 팩토리 메서드 추가
oownahcohc Oct 28, 2022
27e289f
add : 닉네임으로 모든 유저 찾기 메서드 추가
oownahcohc Oct 28, 2022
dcd86c2
add : 닉네임으로 모든 유저 찾기 메서드 추가 개발
oownahcohc Oct 28, 2022
10f4fd0
fix : 정적 팩토리 메서드 명 변경
oownahcohc Oct 28, 2022
24aceef
feat : user 관련 요청 controller 개발
oownahcohc Oct 28, 2022
d0388ad
feat : user 닉네임으로 검색 service
oownahcohc Oct 28, 2022
a92b294
feat : 닉네임으로 검색 request dto
oownahcohc Oct 28, 2022
ef7fd23
feat : 닉네임으로 검색한 유저 결과 response dto
oownahcohc Oct 28, 2022
317224c
feat : follow 관련 요청 controller 개발
oownahcohc Oct 28, 2022
1a7c435
feat : follow 관련 service
oownahcohc Oct 28, 2022
63e6d57
feat : 유저 팔로우 및 언팔로우 request dto
oownahcohc Oct 28, 2022
73e15d4
move : 유저의 팔로우 상태 나타내는 enum class 패키지 위치 변경
oownahcohc Oct 28, 2022
fca069d
Merge pull request #10 from team-welcome/feat/user-follow
oownahcohc Oct 28, 2022
261baa4
refactor : followUser 메서드 팔로우 한 유저 반환하도록 변경
oownahcohc Oct 29, 2022
e5f15e0
refactor : 두번째 파라미터 User 타입으로 변경
oownahcohc Oct 29, 2022
c319037
feat : NotificationType 에 따라 FCM 이용해 푸시알림 보내는 기능 abstract class 로 추상화
oownahcohc Oct 29, 2022
9b5f358
refactor : SendMessageService 상속 및 FCM 푸시알림 호출
oownahcohc Oct 29, 2022
49b29af
refactor : 두번째 파라미터 User 타입으로 변경에 따른 코드 변경
oownahcohc Oct 29, 2022
dd305c2
Merge pull request #11 from team-welcome/feat/notification-follow
oownahcohc Oct 29, 2022
9f78a71
chore : spring cloud aws implementation 추가
oownahcohc Oct 29, 2022
6f5b312
feat : application aws yml 설정
oownahcohc Oct 29, 2022
7471905
add : 존재하지 않는 게시글 exception response 추가
oownahcohc Oct 29, 2022
814d121
add : 챌린지 글 관 success response 추가
oownahcohc Oct 29, 2022
7b686bd
add : 챌린지 글 관련 success response 추가
oownahcohc Oct 29, 2022
e44ce81
add : 챌린지 글 관련 success response 추가
oownahcohc Oct 29, 2022
733c8d7
feat : 파일 확장자 반환 utils
oownahcohc Oct 29, 2022
e1b5784
feat : application aws yml 설정
oownahcohc Oct 29, 2022
201ab64
feat : 유니크한 파일 이름 생성을 위한 uuid utils
oownahcohc Oct 29, 2022
f287b6a
feat : 유저가 등록한 file 의 type을 구분하기 위한 enum class
oownahcohc Oct 29, 2022
78cee74
feat : 유저가 등록한 file 의 content type(image, mp4 등)을 구분하기 위한 enum class
oownahcohc Oct 29, 2022
15366fb
feat : AmazonS3Client 사용을 위한 Bean 등록
oownahcohc Oct 29, 2022
a47505f
rename : entity 명 scrap 으로 변경
oownahcohc Oct 29, 2022
285af70
rename : entity 명 scrap 으로 변경에 따른 repository명 변경
oownahcohc Oct 29, 2022
bda4cf7
feat : ScrapRepositoryCustom 인터페이스 개발
oownahcohc Oct 29, 2022
a2fa7c3
feat : ScrapRepositoryCustomImpl 구현 개발
oownahcohc Oct 29, 2022
23ccdca
refactor : 연관관계 편의 메서드 addPosts 시, post 갯수에 따른 회원 등급 변경
oownahcohc Oct 29, 2022
072f578
add : 정적 팩토리 메서드 추가
oownahcohc Oct 29, 2022
81c3c48
add : postId 로 Post 찾기 메서드 추가
oownahcohc Oct 29, 2022
d49c836
feat : 챌린지 글 등록 요청 controller
oownahcohc Oct 29, 2022
0925849
feat : 챌린지 글 관련 조회 요청 controller
oownahcohc Oct 29, 2022
fa5ca57
feat : 챌린지 글 등록 service
oownahcohc Oct 29, 2022
f7c4fb8
feat : 챌린지 글 관련 조회 service
oownahcohc Oct 29, 2022
246a817
feat : 챌린지(post) service utils
oownahcohc Oct 29, 2022
3b6b488
feat : 인증글 등록 request dto
oownahcohc Oct 29, 2022
6c2ef50
feat : 인증글 등록 시 회원등급 반환 response dto
oownahcohc Oct 29, 2022
efd30ab
챌린지글 상세보기 response dto
oownahcohc Oct 29, 2022
0d6fd0f
feat : 챌린지글 상세보기 response dto
oownahcohc Oct 29, 2022
c693046
feat : 챌린지글 미리보기 response dto
oownahcohc Oct 29, 2022
4d9929e
feat : 유저의 챌린지글(post) 스크랩 여부 enum class
oownahcohc Oct 29, 2022
a013207
feat : AmazonS3 Bucket 관련 interface
oownahcohc Oct 29, 2022
3e8bb62
feat : AmazonS3 Bucket 관련 interface impl 구현
oownahcohc Oct 29, 2022
9f4329f
feat : upload 할 파일 요청 관련 interface
oownahcohc Oct 29, 2022
2265cd9
feat : upload 할 파일 요청 관련 interface impl 구현
oownahcohc Oct 29, 2022
98c7c98
feat : upload file provider 개발
oownahcohc Oct 29, 2022
010f46d
Merge pull request #12 from team-welcome/feat/post
oownahcohc Oct 29, 2022
0fb16ff
hotfix : service 패키지 이동 및 unfollow 로직 수정
oownahcohc Oct 29, 2022
acd1f76
add : 존재하지 않는 팔로우 관계 및 스크랩되지 않은 게시글 exception response 추가
oownahcohc Oct 29, 2022
106dce7
add : follow service 로직 hotfix에 따른 Scrap find 메서드 추가
oownahcohc Oct 29, 2022
8c8609e
add : 챌린지 글 관련 success response 추가
oownahcohc Oct 29, 2022
c98be28
add : 정적 팩토리 메서드 추가
oownahcohc Oct 29, 2022
3ea47e1
add : postId, userId 로 스크랩 찾기 메서드 추가
oownahcohc Oct 29, 2022
86b84cd
feat : follow service utils 추가
oownahcohc Oct 29, 2022
11d4274
feat : 스크랩 관련 요청 controller
oownahcohc Oct 29, 2022
bcb857b
feat : 스크랩 및 스크랩 취소 service
oownahcohc Oct 29, 2022
cb864c2
feat : scrap service utils 개발
oownahcohc Oct 29, 2022
2147a3e
feat : scrap 관련 요청 request dto
oownahcohc Oct 29, 2022
de9fc88
Merge pull request #13 from team-welcome/feat/scrap
oownahcohc Oct 29, 2022
ddae4c6
feat: 애플 로그인 controller, response, utils 개발
Dayne-w Oct 31, 2022
d98b0cd
feat : 애플 로그인 구현 완료
Dayne-w Nov 1, 2022
93240ec
test : followRepository 팔로잉 유저 가져오기 test 및 쿼리 비교
oownahcohc Nov 2, 2022
2cc2d25
test : follow service 테스트
oownahcohc Nov 2, 2022
6e1fb67
add : 이미 팔로우중인 유저 exception response 추가
oownahcohc Nov 2, 2022
80210de
fix : 나를 팔로우하는 유저, 내가 팔로우하는 유저 연관관계 메서드 수정 및 팔로우관계 삭제 메서드 추가
oownahcohc Nov 2, 2022
7cf9733
add : 내가 팔로우하는 유저 존재 여부 메서드 추가
oownahcohc Nov 2, 2022
1ed69f7
add : test용 정적 팩토리 메서드 추가
oownahcohc Nov 2, 2022
97539d6
fix : 팔로우 및 언팔로우 서비스 로직 수정
oownahcohc Nov 2, 2022
85be244
add : 이미 팔로우중인 유저 validate service utils 추가
oownahcohc Nov 2, 2022
b2d80cb
Merge pull request #14 from team-welcome/test/integrate
oownahcohc Nov 2, 2022
23df345
Merge pull request #15 from team-welcome/feat/auth
Dayne-w Nov 2, 2022
4cc6427
refactor : fcm token 정보 저장 추가
oownahcohc Nov 2, 2022
2340175
Merge pull request #16 from team-welcome/refactor/auth
oownahcohc Nov 2, 2022
e351d47
refactor : 유저 팔로우 관련 정보 로직 리팩토링
oownahcohc Nov 3, 2022
c41e2a5
Merge pull request #18 from team-welcome/refactor/#17
oownahcohc Nov 3, 2022
4a63d1a
feat : 클라이언트 통신 간 사용될 http header utils
oownahcohc Nov 3, 2022
4258cfb
feat : 서블릿 request 로 들어온 header의 토큰값을 해독해 userId 반환하는 handler
oownahcohc Nov 3, 2022
6d3bef9
feat : HandlerInterceptor 조합 서블릿 요청을 가로채 Auth 여부 판단
oownahcohc Nov 3, 2022
b3f02cf
feat : Auth 여부 판단 후 인증이 완료됐다면 해당 유저의 userId 반환하는 resolver 개발
oownahcohc Nov 3, 2022
62143d2
feat : webMvcConfigurer 조합해 AuthInterceptor 와 LoginUserIdResolver 등록
oownahcohc Nov 3, 2022
9ae4927
Merge pull request #19 from team-welcome/feat/webmvc-config
oownahcohc Nov 3, 2022
9a6489f
fix : target paramter 로 수정
oownahcohc Nov 3, 2022
bf51fd7
refactor : 인증이 필요한 컨트롤러 리팩토링 및 swagger 설정
oownahcohc Nov 3, 2022
2fe0483
Merge pull request #21 from team-welcome/refactor/#20
oownahcohc Nov 3, 2022
91285c5
refactor : 홈에서 포스트 정보 조회 response dto 분리
oownahcohc Nov 3, 2022
48c13c3
refactor : 홈에서 유저 정보 조회 response dto 분리
oownahcohc Nov 3, 2022
613dc24
feat : HomeService interface 개발
oownahcohc Nov 3, 2022
e269f05
refactor : 유저의 친구 목록 반환 로직 및 유저의 post 목록 반환 로직 분리
oownahcohc Nov 3, 2022
d4a50af
refactor : 비즈니스 로직 분리에 따른 controller 요청 분리
oownahcohc Nov 3, 2022
7b40e91
Merge pull request #23 from team-welcome/refactor/#22
oownahcohc Nov 3, 2022
16c0896
hotfix : field 변수 static final 변수로 수정
oownahcohc Nov 3, 2022
628bb11
hotfix : application.yml ddl-auto validate 로 수정
oownahcohc Nov 3, 2022
0730532
feat : uckgisagi-ci
oownahcohc Nov 8, 2022
1d66eb7
feat : uckgisagi CI 구축
oownahcohc Nov 8, 2022
a00c545
add : aws yml 설정
oownahcohc Nov 8, 2022
47fa4a7
feat : 서버 배포 시 새로운 was 띄우기
oownahcohc Nov 8, 2022
3131005
feat : health check 스크립트
oownahcohc Nov 8, 2022
4ccb6d1
feat : 서버 배포 시 nginx 스위칭
oownahcohc Nov 8, 2022
f427b27
feat : 배포 시 실행할 appsepc.yml 설정
oownahcohc Nov 8, 2022
f9c5b4c
fix : S3_BUCKET_NAME, PROJECT_NAME 수정
oownahcohc Nov 8, 2022
17716f5
fix : files/source/destination 경로 수정
oownahcohc Nov 8, 2022
a942bc4
fix : prod 환경 설정
oownahcohc Nov 8, 2022
cda34f4
feat : prod 환경 yml 설정
oownahcohc Nov 8, 2022
7c77e1c
fix : jar 파일 경로 수정
oownahcohc Nov 8, 2022
05f6069
chore : firebase admin json 파일 remove
oownahcohc Nov 8, 2022
1198b1c
add : friebase admin json 파일 추가
oownahcohc Nov 8, 2022
37f9db8
style : h2 database 추가
oownahcohc Nov 16, 2022
cc1edb3
refactor : @DisplayName 추가
oownahcohc Nov 16, 2022
368c0b8
test : token 발급 service test
oownahcohc Nov 16, 2022
74baae3
feat : test 용 yml 설정 추가
oownahcohc Nov 16, 2022
d56de16
hotfix : success response data 값 null 세팅 오류 수정
oownahcohc Nov 16, 2022
783bc5b
style : 사용하지 않는 import 제거
oownahcohc Nov 16, 2022
849ee63
refactor : @Component -> @Configuration 변경
oownahcohc Nov 16, 2022
3b255bf
add : @EnableWebSecurity 추가
oownahcohc Nov 16, 2022
51ff749
refactor : @NotNull 제거
oownahcohc Nov 16, 2022
05d3787
Merge pull request #24 from team-welcome/test/integrate
oownahcohc Nov 16, 2022
70639a7
fix : pull_request trigger 조건 제거
oownahcohc Nov 16, 2022
9ec9708
hotfix : jwt token 만료일 수정
oownahcohc Nov 16, 2022
7f7d2b8
test : Spring Context 에서 관리되는 Bean 및 HandlerMapping 조회
oownahcohc Nov 17, 2022
a20e285
add : spring.mvc.pathmatch.matching-strategy : ant_path_matcher 로 설정 …
oownahcohc Nov 17, 2022
b5d6684
hotfix : WebMvcConfigurationSupport 상속 -> WebMvcConfigurer impl 로 변경(…
oownahcohc Nov 17, 2022
5119be2
Merge pull request #26 from team-welcome/hotfix/#25
oownahcohc Nov 17, 2022
6902081
hotfix : delete 매핑 및 get 매핑 일부 request body -> path variable , reques…
oownahcohc Nov 17, 2022
c467ca7
hotfix : @Auth 누락 추가
oownahcohc Nov 17, 2022
94b7170
hotfix : user 객체에 getMyFollowings() 동작 안함 issue -> followRepository 에…
oownahcohc Nov 17, 2022
a381ec8
hotfix : user, follow 관련 연관관계 메서드 오류로 인한 unfollow로직 수정
oownahcohc Nov 18, 2022
3dd78d9
add : Accusation Entity 추가
Dayne-w Nov 20, 2022
b02c8d0
add : PostController에 accusePost 메서드 추가
Dayne-w Nov 20, 2022
fadb800
add : Accuse 관련 Dto 클래스 생성
Dayne-w Nov 20, 2022
b9e7539
client 토큰 재발급 테스를 위한 토큰 만료기간 재설정
oownahcohc Nov 20, 2022
68d6df4
feat : 게시물 중복 신고 제한 기능
Dayne-w Nov 21, 2022
6835e53
feat : 게시글 신고하기 기능 구현
Dayne-w Nov 21, 2022
e64bb07
feat : Post 삭제하기 구현 완료
Dayne-w Nov 26, 2022
1332001
modified
oownahcohc Nov 29, 2022
36b312e
add : test 용 setter
oownahcohc Nov 29, 2022
b53b43d
hotfix: follow 로직 버그로 인한 테스트 주석처리
oownahcohc Nov 29, 2022
634e328
fix : database 변경으로 인한 수정
oownahcohc Nov 29, 2022
f8024a8
add : 해당 날짜에 포스팅한 게시물 select
oownahcohc Nov 29, 2022
3e8cbc5
add : 해당 날짜에 포스팅한 게시물 조회 controller
oownahcohc Nov 29, 2022
f2791f0
add : 해당 날짜에 포스팅한 게시물 조회 service
oownahcohc Nov 29, 2022
6ab93c8
Merge pull request #29 from team-welcome/feat/#28
oownahcohc Nov 29, 2022
d888339
hotfix : createdAt, updatedAt response 추가
oownahcohc Nov 29, 2022
3f3c7a9
test : ApplicationContext 에 등록된 빈 테스트
oownahcohc Nov 30, 2022
6a02d1e
chore : test 용 app yml 파일 설정
oownahcohc Nov 30, 2022
c5d6be2
test : StoreRetrieveServiceTest
oownahcohc Nov 30, 2022
0616c91
test : ScrapServiceTest
oownahcohc Nov 30, 2022
e180296
refactor : addScrap 요청 path variable 로 변경
oownahcohc Nov 30, 2022
f6c9e2b
refactor : SpringBootTest 테스트 환경 변경
oownahcohc Nov 30, 2022
c958022
test : ReviewServiceTest
oownahcohc Nov 30, 2022
4e46fb7
test : NotificationServiceProvider 가 잘 등록되는지 테스트
oownahcohc Nov 30, 2022
6c0b64a
test : NotificationServiceProvider 가 잘 등록되는지 테스트
oownahcohc Nov 30, 2022
e373131
test : token info 생성 service 테스트
oownahcohc Nov 30, 2022
0353db8
test : AuthServiceProvider 가 잘 등록되는지 테스트
oownahcohc Nov 30, 2022
19d6071
test : Home 관련 조회 service 테스트
oownahcohc Nov 30, 2022
44670c8
test : followRepository 테스트 및 연관관계 메서드 테스트
oownahcohc Nov 30, 2022
d6112eb
test : follow service 테스트
oownahcohc Nov 30, 2022
028b35a
style : 코드 줄 정리
oownahcohc Nov 30, 2022
c3ff5bf
add : test 용 코드 추가
oownahcohc Nov 30, 2022
2dc6847
fix : database 변경으로 인한 수정
oownahcohc Nov 30, 2022
b9ee015
style : 코드 줄 정리
oownahcohc Nov 30, 2022
d7b6c17
merge : followServiceTest conflict 해결
oownahcohc Nov 30, 2022
54257a8
Merge pull request #30 from team-welcome/test/integrate
oownahcohc Nov 30, 2022
862ed07
add : 회원 탈퇴한 유저 삭제하기 추가
Dayne-w Nov 30, 2022
6c01ade
feat : 유저 차단하기 controller 추가
Dayne-w Nov 30, 2022
be20020
feat : 유저 차단하기 BlockUserDto 추가
Dayne-w Nov 30, 2022
747cf8c
feat : Block Entity와 BlockRepository 생성
Dayne-w Nov 30, 2022
6ec7c68
feat : 유저 차단 BlockService 생성
Dayne-w Nov 30, 2022
ae3791b
feat : 유저 차단할 경우 해당 유저 검색 불가 구현
Dayne-w Nov 30, 2022
961c11d
feat : 신고된 post 안 보이게 로직 수정
Dayne-w Nov 30, 2022
e496f8b
feat : 유저 차단시 차단한 유저의 게시물 안 보이게 설정
Dayne-w Nov 30, 2022
ad3719e
add : 유저 차단 해제 구현
Dayne-w Nov 30, 2022
ee8de3b
merge : 유저차단, 게시물 신고 conflict 해결
oownahcohc Dec 1, 2022
5c10179
merge : 유저차단, 게시물 신고 및 코드 수정
oownahcohc Dec 1, 2022
406cf76
Merge pull request #31 from team-welcome/feat/accuse
oownahcohc Dec 1, 2022
28fb9f9
refactor : DetailPostResponse Dto에 userId 추가
Dayne-w Dec 1, 2022
fae2d69
refactor : 인증 글 상세보기 return 값에 post 작성한 userId 추가
Dayne-w Dec 1, 2022
56d1f51
Merge pull request #33 from team-welcome/feat/block
Dayne-w Dec 1, 2022
e084cab
hotfix : 불필요한 쿼리문 및 코드 중복 수정
oownahcohc Dec 1, 2022
4b69691
fix : 테스트 시 유효하지 않은 userId 로 테스트
oownahcohc Dec 1, 2022
1045cf6
hotfix : 매달 1일 날짜 비교 로직 수정
oownahcohc Dec 1, 2022
563b72f
fix : 클라이언트 요청에 따른 토큰 만료시간 수정
oownahcohc Dec 1, 2022
d6a7fc0
add : 차단한 유저 목록 조회 api 생성
Dayne-w Dec 1, 2022
cd4f3aa
Merge pull request #34 from team-welcome/feat/block
Dayne-w Dec 1, 2022
c3272f3
fix : 유저 검색시 본인 안뜨도록 수정
oownahcohc Dec 2, 2022
022a220
Merge fix/#32
oownahcohc Dec 2, 2022
bd9ac29
refactor : domain package 위치 변경
oownahcohc Dec 2, 2022
fdd5182
Merge#37 from refactor/package
oownahcohc Dec 2, 2022
8b2eb82
hotfix : 인증글 상세 조회 시 인증글 작성 유저 이름 안나오는 오류 수정
oownahcohc Dec 4, 2022
9228145
refactor : 키 변경
Dayne-w Dec 4, 2022
c920c52
Update uckgisagi-deploy.yml
Dayne-w Dec 4, 2022
d65390e
Update uckgisagi-deploy.yml
Dayne-w Dec 4, 2022
426713e
Update uckgisagi-deploy.yml
Dayne-w Dec 4, 2022
e0fefc6
Update uckgisagi-deploy.yml
Dayne-w Dec 4, 2022
ff171fc
refactor : follow 시 반환값 UserDictionary 로 변경
oownahcohc Dec 5, 2022
22a2cc6
refactor : firebase initializer 이름 변경
oownahcohc Dec 5, 2022
c3be336
style : 세미콜론 중복 사용 삭제
oownahcohc Dec 5, 2022
9754909
feat : 유저의 id 값으로 해당 유저를 저장하는 dictionary
oownahcohc Dec 5, 2022
cde6de4
refactor : Notification entity 명 변경
oownahcohc Dec 5, 2022
173fd8c
refactor : sendNotification 메서드 파라미터 변경
oownahcohc Dec 5, 2022
56404f8
fix : FCM 알림이 가지 않는 오류 수정
oownahcohc Dec 5, 2022
44d8c7c
refactor : sendMessageByNotificationType 파라미터 수정
oownahcohc Dec 5, 2022
96ce9a2
feat : 알람 서비스 용 상수
oownahcohc Dec 5, 2022
644bce6
fix : rds password 수정
oownahcohc Dec 5, 2022
3cb6317
Merge pull request #39 from team-welcome/fix/#38
oownahcohc Dec 5, 2022
47bde32
hotfix : 클라이언트 요청에 따른 random nickname utils 변경
oownahcohc Dec 6, 2022
0860a0a
Update uckgisagi-deploy.yml
Dayne-w Dec 7, 2022
db63e24
refactor : application-aws.yml & application-jwt.yml 파일 secret 설정
Dayne-w Dec 7, 2022
060fbd0
refactor : application-prod.yml 파일 secret 설정
Dayne-w Dec 7, 2022
03814eb
refactor : secret 환경변수 설정
Dayne-w Dec 7, 2022
9ecdcfe
Update README.md
oownahcohc Dec 8, 2022
451ab95
Update README.md
oownahcohc Dec 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/uckgisagi-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI

on:
workflow_dispatch:
push:
branches: [ "develop" ]

env:
S3_BUCKET_NAME: uckgisagi-bucket
PROJECT_NAME: uckgisagi-server
RESOURCE_AWS_PATH: ./src/main/resources/application-aws.yml
RESOURCE_JWT_PATH: ./src/main/resources/application-jwt.yml
RESOURCE_PROD_PATH: ./src/main/resources/application-prod.yml

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Set PROD Yml
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.RESOURCE_PROD_PATH }}
env:
spring.datasource.url: ${{ secrets.RDS_URL }}
spring.datasource.username: ${{ secrets.RDS_USERNAME }}
spring.datasource.password: ${{ secrets.RDS_PASSWORD }}

- name: Set AWS Yml
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.RESOURCE_AWS_PATH }}
env:
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY_ID }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Set JWT Yml
uses: microsoft/variable-substitution@v1
with:
files: ${{ env.RESOURCE_JWT_PATH }}
env:
jwt.secret: ${{ secrets.JWT_SECRET }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew
shell: bash

- name: Build with Gradle
run: ./gradlew build -x test
shell: bash

- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2

- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip

- name: Code Deploy
run: aws deploy create-deployment --application-name uckgisagi-code-deploy --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name uckgisagi-code-deploy-group --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$GITHUB_SHA.zip
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ out/
### VS Code ###
.vscode/


### Firebase Admin ###
src/main/resources/firebase/*.json

### querydsl ###
src/querydsl
src/querydsl

### h2 database ###
database
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# uckgisagi-server

🌏억지로 지구를 사랑하는 지구인들🌱
# 🌏 억지로 지구를 사랑하는 지구인들 🌏
<img src="https://img.shields.io/badge/Spring Boot-6DB33F?style=for-the-badge&logo=Spring Boot&logoColor=white"> <img src="https://img.shields.io/badge/JAVA-007396?style=for-the-badge&logo=JAVA&logoColor=white">
<img src="https://img.shields.io/badge/MYSQL-4479A1?style=for-the-badge&logo=MYSQL&logoColor=white">

## 개요
2022학년도 2학기 오픈소스 기반 기초 설계 학기 프로젝트 과제
## 깃 커밋 컨벤션
* `feat`: 새로운 기능 개발
* `fix`: 버그 수정
* `add`: 새로운 기능 추가
* `chore`: 빌드 업무 수정 (build.gradle 수정)
* `refactor`: 코드 리팩토링
* `style`: 코드 포맷팅, 주석 삭제 등 코드 변경이 없는 경우
* `test`: 테스트 코드, 리팩토링 테스트 코드 개발 및 추가
## 코드 컨벤션


## 사용한 스택
### 백엔드
* 스프링 부트 2.7.4
* 언어: 자바
* JAVA 11, Gradle
* MySQL
* Spring JPA
* QueryDsl
* Spring Security
* Swagger
* http://54.180.212.221/api/swagger-ui/index.html
* Sl4j Logging
* Validation
* 그 외 스타터 라이브러리

### 감사합니다
24 changes: 24 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/uckgisagi-server/
overwrite: yes

permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user

hooks:
ApplicationStart:
- location: scripts/run_new_was.sh
timeout: 180
runas: ec2-user
# - location: scripts/health_check.sh
# timeout: 180
# runas: ec2-user
- location: scripts/switch.sh
timeout: 180
runas: ec2-user
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'

// aws
// implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

// jetbrains annotation
compileOnly 'org.jetbrains:annotations:23.0.0'
Expand Down Expand Up @@ -63,8 +63,7 @@ dependencies {
implementation 'org.json:json:20220924'

// swagger
implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
}

jar {
Expand Down
29 changes: 29 additions & 0 deletions scripts/health_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CURRENT_PORT=$(cat /home/ec2-user/service_url.inc | grep -Po '[0-9]+' | tail -1)
TARGET_PORT=0

# Toggle port Number
if [ ${CURRENT_PORT} -eq 8081 ]; then
TARGET_PORT=8082
elif [ ${CURRENT_PORT} -eq 8082 ]; then
TARGET_PORT=8081
else
echo "> No WAS is connected to nginx"
exit 1
fi

echo "> Start health check of WAS at 'http://127.0.0.1:${TARGET_PORT}' ..."

for RETRY_COUNT in 1 2 3 4 5 6 7 8 9 10
do
echo "> #${RETRY_COUNT} trying..."
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:${TARGET_PORT}/api/health)

if [ ${RESPONSE_CODE} -eq 200 ]; then
echo "> New WAS successfully running"
exit 0
elif [ ${RETRY_COUNT} -eq 10 ]; then
echo "> Health check failed."
exit 1
fi
sleep 10
done
23 changes: 23 additions & 0 deletions scripts/run_new_was.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CURRENT_PORT=$(cat /home/ec2-user/service_url.inc | grep -Po '[0-9]+' | tail -1)
TARGET_PORT=0

echo "> Current port of running WAS is ${CURRENT_PORT}."

if [ ${CURRENT_PORT} -eq 8081 ]; then
TARGET_PORT=8082
elif [ ${CURRENT_PORT} -eq 8082 ]; then
TARGET_PORT=8081
else
echo "> No WAS is connected to nginx"
fi

TARGET_PID=$(lsof -Fp -i TCP:${TARGET_PORT} | grep -Po 'p[0-9]+' | grep -Po '[0-9]+')

if [ ! -z ${TARGET_PID} ]; then
echo "> Kill WAS running at ${TARGET_PORT}."
sudo kill ${TARGET_PID}
fi

nohup java -jar -Dserver.port=${TARGET_PORT} -Dspring.profiles.active=prod /home/ec2-user/uckgisagi-server/build/libs/*.jar > /home/ec2-user/nohup.out 2>&1 &
echo "> Now new WAS runs at ${TARGET_PORT}."
exit 0
23 changes: 23 additions & 0 deletions scripts/switch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CURRENT_PORT=$(cat /home/ec2-user/service_url.inc | grep -Po '[0-9]+' | tail -1)
TARGET_PORT=0

echo "> Nginx currently proxies to ${CURRENT_PORT}."

# Toggle port number
if [ ${CURRENT_PORT} -eq 8081 ]; then
TARGET_PORT=8082
elif [ ${CURRENT_PORT} -eq 8082 ]; then
TARGET_PORT=8081
else
echo "> No WAS is connected to nginx"
exit 1
fi

# Change proxying port into target port
echo "set \$service_url http://127.0.0.1:${TARGET_PORT};" | tee /home/ec2-user/service_url.inc

echo "> Now Nginx proxies to ${TARGET_PORT}."
# Reload nginx
sudo service nginx reload

echo "> Nginx reloaded."
6 changes: 6 additions & 0 deletions src/main/java/server/uckgisagi/UckgisagiApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableJpaAuditing
@EnableFeignClients
@SpringBootApplication
public class UckgisagiApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package server.uckgisagi.app.accusation.controller;

import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import server.uckgisagi.app.accusation.dto.AccusationPostReqDto;
import server.uckgisagi.app.accusation.dto.AccusationPostResDto;
import server.uckgisagi.app.accusation.service.AccusationService;
import server.uckgisagi.common.dto.ApiSuccessResponse;
import server.uckgisagi.config.interceptor.Auth;
import server.uckgisagi.config.resolver.LoginUserId;
import springfox.documentation.annotations.ApiIgnore;

import static server.uckgisagi.common.success.SuccessResponseResult.CREATED_ACCUSE_POST;

@RestController
@RequiredArgsConstructor
public class AccusationController {

private final AccusationService accusationService;

@ApiOperation("[인증] 둘러보기 페이지 - 게시글 신고하기")
@Auth
@PostMapping("/v1/post/accuse")
public ApiSuccessResponse<AccusationPostResDto> accusePost(@RequestBody AccusationPostReqDto accusationPostReqDto, @ApiIgnore @LoginUserId Long userId) {
return ApiSuccessResponse.success(CREATED_ACCUSE_POST, accusationService.accusePost(accusationPostReqDto, userId));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package server.uckgisagi.app.accusation.domain.entity;

import lombok.*;
import server.uckgisagi.app.accusation.dto.AccusationPostResDto;
import server.uckgisagi.common.domain.AuditingTimeEntity;
import server.uckgisagi.app.post.domain.entity.Post;
import server.uckgisagi.app.user.domain.entity.User;

import javax.persistence.*;

@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Accusation extends AuditingTimeEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "accusation_id")
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "post_id")
private Post post;

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name="user_id")
private User user;


private Accusation(final Post post, final User user) {
this.post = post;
this.user = user;
}

public static Accusation newInstance(Post post, User user) {
return new Accusation(post, user);
}

public AccusationPostResDto toAccusePostResponseDto(Accusation accusation){
return AccusationPostResDto.builder()
.postId(accusation.getPost().getId())
.userId(accusation.getUser().getId())
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package server.uckgisagi.app.accusation.domain.repository;

import server.uckgisagi.app.accusation.domain.entity.Accusation;

import java.util.List;
import java.util.Optional;

public interface AccusationCustomRepository{

List<Accusation> findAllByPostId(Long postId);

Optional<Accusation> findByUserIdAndPostId(Long userId, Long postId);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package server.uckgisagi.app.accusation.domain.repository;

import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;
import server.uckgisagi.app.accusation.domain.entity.Accusation;

import java.util.List;
import java.util.Optional;

import static server.uckgisagi.app.accusation.domain.entity.QAccusation.accusation;


@RequiredArgsConstructor
public class AccusationCustomRepositoryImpl implements AccusationCustomRepository {

private final JPAQueryFactory query;


@Override
public List<Accusation> findAllByPostId(Long postId) {
return query.selectFrom(accusation)
.where(accusation.post.id.eq(postId))
.fetch();
}

@Override
public Optional<Accusation> findByUserIdAndPostId(Long userId, Long postId) {
return query.selectFrom(accusation)
.where(accusation.user.id.eq(userId))
.where(accusation.post.id.eq(postId))
.stream().findFirst();
}
}
Loading