Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

사용자 개인 템플릿 페이지 탐색 기능 구현 #776

Closed
wants to merge 534 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
534 commits
Select commit Hold shift + click to select a range
cd1b6ed
refactor(service): 기존 태그 전체 삭제로 태그 업데이트 가능한지 테스트
jminkkk Sep 20, 2024
b08fb67
docs: 컨벤션 적용
zangsu Sep 20, 2024
8c248a6
test: 카테고리가 존재하지 않으면 빈 리스트를 반환한다.
zangsu Sep 20, 2024
81e2e23
refactor: 실패하는 테스트 disabled
zangsu Sep 20, 2024
42280db
Merge pull request #653 from woowacourse-teams/test/645-template-tag-…
zangsu Sep 20, 2024
ae0509b
Merge pull request #646 from woowacourse-teams/test/645-member-service
zangsu Sep 20, 2024
95f90d0
Merge pull request #663 from woowacourse-teams/test/645-template-tag-…
zangsu Sep 20, 2024
3da929a
Merge pull request #654 from woowacourse-teams/test/645-member-catego…
zangsu Sep 20, 2024
b9b6e8e
Merge pull request #660 from woowacourse-teams/test/645-category-temp…
zangsu Sep 20, 2024
2d0af11
Merge pull request #655 from woowacourse-teams/test/645-member-catego…
zangsu Sep 20, 2024
6f283b4
refactor: 필드 명을 isLiked 로 변경
zangsu Sep 20, 2024
e107f89
Merge pull request #661 from woowacourse-teams/test/645-template-service
kyum-q Sep 20, 2024
b2ca409
Merge pull request #658 from woowacourse-teams/test/645-category-temp…
zeus6768 Sep 21, 2024
b27c5af
chore: 좋아요 패키지를 별도로 분리
zangsu Sep 21, 2024
c988f80
refactor: 메서드 명, api 메서드 변경
zangsu Sep 21, 2024
217f8fd
docs: 용어 통일
zangsu Sep 21, 2024
a3b8a34
docs: 메서드 오타 수정
zangsu Sep 21, 2024
ce42534
Merge pull request #662 from woowacourse-teams/test/645-thumbnail-ser…
jminkkk Sep 22, 2024
68bc013
Merge pull request #665 from woowacourse-teams/test/645-template-appl…
jminkkk Sep 22, 2024
da3c4ce
docs: 파라미터로 templateId 를 받도록 변경
zangsu Sep 22, 2024
0ccd41b
Merge pull request #656 from woowacourse-teams/test/645-category-service
zeus6768 Sep 22, 2024
8252785
Merge pull request #666 from woowacourse-teams/test/645-member-templa…
HoeSeong123 Sep 22, 2024
618e136
refactor(service): 클래스명 변경
zeus6768 Sep 22, 2024
b3a857d
refactor(service): 개행 추가
zeus6768 Sep 22, 2024
75a7bf2
Merge pull request #675 from woowacourse-teams/feat/668-be-like
jminkkk Sep 22, 2024
fb230a5
refactor(configuration): 사용하지 않는 인터셉터 삭제
zeus6768 Sep 22, 2024
d3c1550
refactor(configuration): 인증 argument resolver 반환값 MemberDto -> Member 변경
zeus6768 Sep 22, 2024
d4a9645
test(controller): 경고 제거
zeus6768 Sep 22, 2024
aa34035
refactor(service): MemberCategoryTemplateApplicationService 삭제
zeus6768 Sep 22, 2024
17ade78
refactor(configuration): 경고 제거
zeus6768 Sep 22, 2024
d236e2e
refactor(service): 사용하지 않는 메서드 삭제
zeus6768 Sep 22, 2024
216bcef
refactor(service): CategoryTemplateService 삭제
zeus6768 Sep 22, 2024
f3cb161
Merge pull request #669 from woowacourse-teams/667/fix-validated-setting
zangsu Sep 22, 2024
3b1cdad
feat: 좋아요 도메인 생성
zangsu Sep 22, 2024
eaa4424
feat: Template 에서 좋아요 기능 추가
zangsu Sep 22, 2024
addc9a0
feat: Repository 구현
zangsu Sep 22, 2024
58ee947
refactor(service): 인증 argument resolver 반환값 MemberDto -> Member 변경
zeus6768 Sep 22, 2024
e74edf3
refactor: ServiceTest 에 LikeRepository 추가
zangsu Sep 22, 2024
03088ab
feat: LikesService 추가 및 좋아요 기능 구현
zangsu Sep 22, 2024
1310717
feat: Like -> Likes 로 네이밍 변경 및 Service 의존성 추가
zangsu Sep 22, 2024
994ede7
refactor(service): optimize import
zeus6768 Sep 22, 2024
1a487aa
refactor(service): 개행
zeus6768 Sep 22, 2024
7737232
feat: 템플릿과 멤버로 좋아요 삭제 기능 추가
zangsu Sep 22, 2024
12c1dd5
feat: 좋아요 취소 API 제공
zangsu Sep 22, 2024
133d473
refactor(service): MemberCategoryApplicationService 삭제 및 메서드 변경 findA…
zeus6768 Sep 22, 2024
112cf53
feat: 좋아요 개수 조회 메서드 생성
zangsu Sep 22, 2024
235c332
refactor(service): 메서드 변경 findAllByMember -> findAllByMemberId
zeus6768 Sep 22, 2024
40e3eb6
test(service): 메서드 로직 변경에 따른 삭제
zeus6768 Sep 22, 2024
2122d3d
refactor: 좋아요 개수 조회 메서드를 사용해 테스트 코드 수정
zangsu Sep 22, 2024
9fd266d
refactor(service): optimize import
zeus6768 Sep 22, 2024
1dcff88
docs: displayName 형태 일치하게 변경
zangsu Sep 22, 2024
a380578
test(category): 생성자 파라미터 변경
zeus6768 Sep 22, 2024
7aa869f
refactor(category): CategoryTemplateApplicationServiceTest 삭제
zeus6768 Sep 22, 2024
0658c9f
test(controller): 경고 삭제
zeus6768 Sep 22, 2024
7d967dc
docs: 좋아요 개수 조회 기능 추가
zangsu Sep 22, 2024
34525ac
test: 기존의 FakeDB 테스트가 터지지 않도록 임시 객체 추가
zangsu Sep 22, 2024
ce71cc4
refactor(service): 사용하지 않는 메서드 삭제
zeus6768 Sep 22, 2024
18a82c2
refactor(service): MemberTemplateApplicationService 삭제
zeus6768 Sep 22, 2024
1ac52e9
refactor(service): delete unused line
zeus6768 Sep 22, 2024
5a10f8d
refactor(template): 메서드명 일치
zeus6768 Sep 22, 2024
edfa4ba
refactor(template): optimize imports
zeus6768 Sep 22, 2024
cf10a22
refactor(template): 경고 제거
zeus6768 Sep 22, 2024
953c9fe
Merge branch 'dev/be' into refactor/650-service
zeus6768 Sep 22, 2024
b367bd3
refactor(controller): trim space
zeus6768 Sep 22, 2024
33a1854
refactor(response): FindTemplateResponse 생성 로직 개선
zeus6768 Sep 22, 2024
5cf6cc1
test(response): 불필요한 라인 삭제
zeus6768 Sep 22, 2024
4276b06
test(response): 단언문 개선
zeus6768 Sep 22, 2024
ee647e9
test(repository): 테스트 로직 수정
zeus6768 Sep 22, 2024
41eb8d8
feat: 멤버의 템플릿 좋아요 여부 확인 메서드 구현
zangsu Sep 23, 2024
402a29a
feat: 멤버의 템플릿 좋아요 여부 확인 기능 추가
zangsu Sep 23, 2024
af9f890
feat: 목록 조회에서 좋아요 여부 확인 기능 추가
zangsu Sep 23, 2024
c2b34ae
feat: 좋아요순 정렬 기능 구현
zangsu Sep 23, 2024
79be67d
feat: 좋아요 개수 조회 메서드 제거 후 Template 의 필드로 사용
zangsu Sep 23, 2024
24d9fef
refactor: 컨벤션 적용
zangsu Sep 23, 2024
cef1f20
refactor: 코드 정리
zangsu Sep 23, 2024
e5a4412
docs: 분리된 api 에 대해 문서화 제공
zangsu Sep 23, 2024
317cffd
docs: displayName 수정
zangsu Sep 23, 2024
e1183a5
refactor: 불필요한 개행 제거
zangsu Sep 23, 2024
894ee25
refactor: Service 계층 테스트 셋업을 Repository 계층으로 수행
zangsu Sep 23, 2024
0ea7106
chore: 패키지 명을 likes 로 변경
zangsu Sep 23, 2024
e2b6a30
refactor: 조건문 가독성을 위해 메서드 사용
zangsu Sep 23, 2024
24bd164
feat: flyway 파일 추가
zangsu Sep 23, 2024
9f4dd55
refactor: 필요없는 어노테이션 제거
zangsu Sep 23, 2024
bf25edd
refactor: 불필요한 개행 삭제
zangsu Sep 23, 2024
259538a
refactor: 필드, 파라미터 명 like -> likes 로 수정
zangsu Sep 23, 2024
dbe7dcb
refactor: 로그인 정보를 가져오기 위한 어노테이션 추가
zangsu Sep 24, 2024
375fd2f
docs: 좋아요 많은 순 -> 좋아요순 으로 수정
zangsu Sep 24, 2024
142fa6e
refactor: 불필요한 개행 제거
zangsu Sep 24, 2024
b6ab54a
refactor: backend cd 변경
HoeSeong123 Sep 24, 2024
eac9402
refactor: 브랜치명 변경
HoeSeong123 Sep 24, 2024
9c0b3ba
refactor: 불필요한 코드 제거
HoeSeong123 Sep 24, 2024
26efd31
refactor: 좋아요 생성 책임을 Like 에서 제거
zangsu Sep 24, 2024
2557519
refactor: 개행 변경
zangsu Sep 24, 2024
cbdb2dc
refactor: 도커 폴더로 이동하는 코드 추가
HoeSeong123 Sep 24, 2024
f9c724f
refactor: 불필요한 코드 제거
HoeSeong123 Sep 24, 2024
a3d7379
refactor: main으로 푸쉬될 때만 deploy_instance_b가 동작하도록 변경
HoeSeong123 Sep 24, 2024
ebe4a78
refactor: 중복 코드 제거
HoeSeong123 Sep 24, 2024
0be7e4d
refactor: 메서드 이름을 문법에 맞게 변경
zangsu Sep 24, 2024
93f0a59
refactor: SQL 문법 수정
zangsu Sep 24, 2024
66bcd67
refactor: 개행 추가
zangsu Sep 24, 2024
474b517
refactor: 주석 제거
zangsu Sep 24, 2024
aa74a41
docs: XXX 기능 테스트 -> XXX 로 DisplayName 변경
zangsu Sep 24, 2024
e77013d
style: 불필요한 개행 삭제
zangsu Sep 24, 2024
5ddabda
refactor: LikePredicate 파일 분리
zangsu Sep 24, 2024
6f8c48b
refactor: 파라미터 순서 변경
zangsu Sep 24, 2024
7b05a98
style: 개행 추가
zangsu Sep 24, 2024
329e7aa
refactor: 좋아요를 눌렀는지 판단하는 인터페이스의 이름을 더 명확하게 변경
zangsu Sep 24, 2024
760fc84
refactor: Like -> Liked 로 변경
zangsu Sep 24, 2024
9bae4de
refactor: dev 와 prod 배포 분리
HoeSeong123 Sep 24, 2024
9a3878e
Merge pull request #685 from woowacourse-teams/refactor/683-backend-cd
kyum-q Sep 24, 2024
99e4783
Merge pull request #680 from woowacourse-teams/feat/668-be-like
zangsu Sep 24, 2024
eceebaa
fix(TemplateController): pagenation 기본 페이지 0으로
jminkkk Sep 25, 2024
4a9a63f
refactor: 좋아요 기능의 응답 코드를 통일
zangsu Sep 25, 2024
e955aa9
Merge pull request #692 from woowacourse-teams/feat/668-be-like
HoeSeong123 Sep 26, 2024
551b152
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
9dad722
refactor(repository): 사용하지 않는 private 메서드 삭제
zeus6768 Sep 26, 2024
27fd2e3
refactor(category): 메서드명 가독성 개선
zeus6768 Sep 26, 2024
58baebd
refactor(category): 예외메시지 통일
zeus6768 Sep 26, 2024
d648fa7
refactor(service): 회원가입 로직에 `@Transactional` 적용
zeus6768 Sep 26, 2024
a164603
refactor(service): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
777a2fe
refactor(service): 메서드 순서 변경
zeus6768 Sep 26, 2024
46cbae1
refactor(service): 태그 삭제 로직에 `@Transactional` 추가
zeus6768 Sep 26, 2024
b7851a2
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
93f0be3
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
822d71b
test(category): 예외메시지 수정
zeus6768 Sep 26, 2024
716ce57
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
3cef2e1
refactor(sourcecode): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
9916a2e
refactor(template): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
4d6f3cd
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
e51e002
refactor(repository): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
7bc22bd
docs(template): 예외 케이스 추가
zeus6768 Sep 26, 2024
a3fa1ea
refactor(tag): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
2046939
test(repository): 예외 메시지 통일
zeus6768 Sep 26, 2024
e306602
test(service): 메서드 순서 변경
zeus6768 Sep 26, 2024
dfdc7ff
refactor(service): 검색 DTO 생성 로직 개선
zeus6768 Sep 26, 2024
1d482fe
fix conflicts
zeus6768 Sep 26, 2024
a565c69
refactor(template): 사용하지 않는 메서드 삭제
zeus6768 Sep 26, 2024
00ca5eb
style(service): 불필요한 공백 삭제
zeus6768 Sep 26, 2024
33d1e4d
refactor(service): 비교 연산자 가독성 개선
zeus6768 Sep 26, 2024
ca7d37f
refactor(service): 테스트 단언문 개선
zeus6768 Sep 26, 2024
31cbf69
docs(template): api 명세 오류 수정
zeus6768 Sep 26, 2024
323e90b
docs(template): 예외 메시지 통일
zeus6768 Sep 26, 2024
a3913ca
docs(template): 예외 메시지 통일
zeus6768 Sep 26, 2024
1181fa7
refactor(domain): equals & hashcode 재정의
zeus6768 Sep 26, 2024
a6fb248
test(service): transactional 위치 변경
zeus6768 Sep 26, 2024
1322f37
Merge pull request #679 from woowacourse-teams/refactor/650-service
HoeSeong123 Sep 26, 2024
46c0e92
refactor(template): 템플릿 조회 시 성능 개선을 위해 로직 변경
kyum-q Sep 25, 2024
973703d
refactor: rds reader writer 적용
HoeSeong123 Sep 26, 2024
24af44b
refactor(Category): 카테고리에 멤버 id 인덱스 설정 추가
kyum-q Sep 25, 2024
e8810e7
refactor(template): 소스 코드 삭제 로직 @Modifying 로 하나의 sql로 전체 삭제
kyum-q Sep 26, 2024
254555b
Merge pull request #691 from woowacourse-teams/fix/690-pagenation-def…
HoeSeong123 Sep 26, 2024
b052311
refactor(template): 템플릿 태그 삭제 로직 @Modifying 로 하나의 sql로 전체 삭제
kyum-q Sep 26, 2024
dc25796
refactor(service): 생성 및 수정 메서드에 transactional 추가
zeus6768 Sep 26, 2024
0d487f5
fix: 누락된 MemberDto -> Member 변경사항 추가
zangsu Sep 26, 2024
601f087
refactor: read, write 문자 상수화
HoeSeong123 Sep 26, 2024
4141d05
refactor(template): 썸네일 삭제 로직 @Modifying 로 하나의 sql로 전체 삭제
kyum-q Sep 26, 2024
40d8ec7
refactor: Template create Transactional 추가
HoeSeong123 Sep 26, 2024
c4a3f13
refactor(service): 태그 템플릿 조회 join으로 N+1쿼리 해결
kyum-q Sep 26, 2024
ae3c196
refactor(repository): template tag 조회 시 발생하는 N + 1 개선을 위한 JPQL 메서드 생성
jminkkk Sep 26, 2024
c158416
refactor(service): N + 1 개선된 tag 조회 쿼리메서드 사용하여 변
jminkkk Sep 26, 2024
97c7c55
refactor(repository): 썸네일 조회 시 소스코드 N + 1 문제를 fetch join으로 해결
jminkkk Sep 26, 2024
86d4336
refactor(tag): tag 조회 시 필요한 템플릿 id 만 받도록 수정
kyum-q Sep 26, 2024
02083ee
refactor(tag): IN 절 대신 서브 쿼리 활용
kyum-q Sep 26, 2024
760fa24
refactor(tag): Tag N+1 문제를 내부 쿼리로 해결
kyum-q Sep 26, 2024
52d5a54
refactor(tag): Tag N+1 문제를 내부 쿼리로 해결
kyum-q Sep 26, 2024
afb4cc1
Merge pull request #702 from woowacourse-teams/fix/650-remove-member-…
zangsu Sep 26, 2024
9bdcf8b
refactor(service): template 목록 조회 시 각 template에 해당하는 template tag를 한번…
jminkkk Sep 26, 2024
952a590
refactor(service): 주석 제거
jminkkk Sep 26, 2024
d0982d1
refactor(service): getAllTemplateTagsByTemplates 테스트 적
jminkkk Sep 26, 2024
55684ff
Merge branch 'dev/be' into refactor/699-reader-writer-rds
HoeSeong123 Sep 26, 2024
2bfbd27
refactor(repository): 템플릿 목록으로 썸네일 목록 조회
jminkkk Sep 26, 2024
deb779a
refactor(service): 템플릿 목록으로부터 썸네일 목록 조회
jminkkk Sep 26, 2024
45458c1
refactor(domain): Thumbnail 이 Template 을 가지고 있는지 물어보도록 역할 부
jminkkk Sep 26, 2024
cda1f3f
refactor(service): template 목록 조회 시 각 template에 해당하는 thumbnail 한번에 조회…
jminkkk Sep 26, 2024
50f37cc
Merge branch 'refactor/673-performance-template-find-delete' of https…
kyum-q Sep 26, 2024
50606e4
test: 비즈니스 로직 변경에 따른 테스트 코드 수정
kyum-q Sep 26, 2024
af374ce
feat(migration): 카테고리 memberId 인덱스 추가 마이그레이션 파일 생성
kyum-q Sep 26, 2024
9c3c12b
Merge pull request #701 from woowacourse-teams/refactor/699-reader-wr…
kyum-q Sep 26, 2024
3c2ed35
Merge pull request #657 from woowacourse-teams/test/645-auth-service
zeus6768 Sep 26, 2024
9c44936
refactor(domain): FetchType.LAZY 설정 추가
kyum-q Sep 26, 2024
a36aa7a
refactor(repository): 메서드명 변경
kyum-q Sep 26, 2024
7256a88
refactor(service): 사용하지 않는 필드 제거
kyum-q Sep 26, 2024
8cc15a2
refactor(repository): 사용하지 않는 메서드 제거
kyum-q Sep 26, 2024
9dd2098
test: displayName 수정
kyum-q Sep 26, 2024
fb3d12b
refactor: 태그 저장 로직 개선
zangsu Sep 26, 2024
f009c44
refactor: TemplateTag 의 필드 lazy loading
zangsu Sep 26, 2024
434502e
refactor: Tag 이름에 인덱스 설정
zangsu Sep 26, 2024
5918abb
refactory(repository): 템플릿 조회 시 카테고리 join fetch N + 1 해결
jminkkk Sep 27, 2024
1a6ffeb
refactor(service): 불필요한 스트림 생성 제거
kyum-q Sep 27, 2024
0e37b8b
Merge pull request #710 from woowacourse-teams/dev/be
jminkkk Sep 27, 2024
7d34058
Merge pull request #711 from woowacourse-teams/dev/fe
vi-wolhwa Sep 27, 2024
0f525fa
refactor: 도메인에 인덱스 정보 추가
zangsu Sep 27, 2024
576b094
refactor: 테스트에서만 사용되는 메서드 제거
zangsu Sep 27, 2024
5d40e4c
Merge pull request #703 from woowacourse-teams/refactor/673-performan…
kyum-q Sep 27, 2024
379e913
refactor(domain): @Table 수정
kyum-q Sep 27, 2024
76083a5
Merge branch 'dev/be' into refactor/673-performance-template-find-delete
kyum-q Sep 27, 2024
283bdb4
fix: Fake DB 문제 해결
kyum-q Sep 27, 2024
5517efe
fix(repository): 코드 충돌 해결
kyum-q Sep 27, 2024
9ae042e
Merge pull request #704 from woowacourse-teams/refactor/673-performan…
jminkkk Sep 27, 2024
8280a69
refactor: Override 제거
zangsu Sep 27, 2024
523f563
Merge pull request #715 from woowacourse-teams/refactor/673-performan…
jminkkk Sep 27, 2024
3d78e75
refactory(repository): 전문 검색 인덱스 적
jminkkk Sep 27, 2024
1cac725
fix(global): 데이터베이스 비울 때 인덱스 검토
jminkkk Sep 27, 2024
0e65a72
refactory(resources): 전문 검색 인덱스 DDL 추가
jminkkk Oct 1, 2024
caecf76
refactory(repository): @BeforeEach 및 불필요한 메서드 제거
jminkkk Oct 1, 2024
a636ff7
refactory(global): 전문 검색 인덱스 없는 경우 재생성 로직 drop 하지 않도록 변경
jminkkk Oct 1, 2024
a36c47c
fix(resources): 인덱스 생성 로직 변경
jminkkk Oct 1, 2024
5d8c8f7
refactory(resources): 주석 상세하게
jminkkk Oct 2, 2024
5266ddc
Merge pull request #719 from woowacourse-teams/refactor/673-performan…
kyum-q Oct 2, 2024
bbf1bc2
refactory(category): 카테고리 생성 시 길이 15자로 제한 검
jminkkk Oct 2, 2024
cb40c2c
refactory(validation): 문자열 목록에 대해 유효성을 검증하는 객체 구현
jminkkk Oct 3, 2024
4d63946
refactory(template): 템플릿 생성 시 태그 길이 30자 이하인 지 검증
jminkkk Oct 3, 2024
2ec1ec1
refactor: 사용되지 않는 MemberDto 제거
jminkkk Oct 3, 2024
b5e508f
refactor(swagger): 개발 서버 추가
jminkkk Oct 3, 2024
4087ccc
Merge pull request #730 from woowacourse-teams/refactor/548-swagger-d…
kyum-q Oct 4, 2024
ced1170
refactor(domain): 부생성자 구현
kyum-q Oct 4, 2024
3fcd486
feat(repository): 템플릿 id에 해당하는 like 삭제
kyum-q Oct 4, 2024
44b09bb
test: 템플릿에 해당하는 좋아요 삭제 repository 테스트 구현
kyum-q Oct 4, 2024
a33a998
feat(service): 템플릿 id에 해당하는 like 삭제하는 로직 구현
kyum-q Oct 4, 2024
ed60503
refactor(facade): 템플릿과 관련된 정보 삭제 로직이 like 도 포함되도록 수정
kyum-q Oct 4, 2024
1845aae
refactor(main): 코드컨벤션 정리
kyum-q Oct 4, 2024
c56f260
refactor(main): 클래스 상단에 개행 추가
kyum-q Oct 4, 2024
856bfd6
refactor(cors): lombok.Getter로 코드 개선
kyum-q Oct 4, 2024
5c06238
refactor(repository): 사용하지 않는 메서드 삭제
kyum-q Oct 4, 2024
046929a
refactor(test): Nested 테스트 클래스명 첫문자 대문자로 변경
kyum-q Oct 4, 2024
f599555
refactor(test): 클래스 상단에 개행 추가
kyum-q Oct 4, 2024
50f2e21
refactor(validation): 내부에서만 사용하는 메서드의 접근 제한자 private으로 변경
jminkkk Oct 5, 2024
d346da6
test: var 사용 제거
kyum-q Oct 6, 2024
4e1bc58
refactor(repository): 개행 처리 수정
kyum-q Oct 6, 2024
aea3c51
Merge pull request #641 from woowacourse-teams/chore/640-compose
jminkkk Oct 7, 2024
850cef4
Merge pull request #729 from woowacourse-teams/refactor/650-remove-me…
HoeSeong123 Oct 7, 2024
1ab2289
refactor: 헬스 체크 관련 로직은 안보이도록 수정
HoeSeong123 Oct 1, 2024
9777474
refactor: /actuator/health에 대한 로그만 안보이도록 수정
HoeSeong123 Oct 1, 2024
ff5414f
refactor: 오타 수정
HoeSeong123 Oct 1, 2024
5d93220
refactor: info 로그는 전부 안보이게 변경
HoeSeong123 Oct 1, 2024
128a0fa
refactor: 커밋을 위한 공백 추가
HoeSeong123 Oct 7, 2024
b50a95f
refactor: 공백 제거
HoeSeong123 Oct 7, 2024
75f7df2
refactor(repository): 공백 제거
kyum-q Oct 7, 2024
37e2665
Merge pull request #728 from woowacourse-teams/feat/512-category-tag-…
kyum-q Oct 7, 2024
3e039d4
Merge pull request #724 from woowacourse-teams/refactor/723-health-ch…
zangsu Oct 7, 2024
e2115dd
Merge pull request #737 from woowacourse-teams/fix/734-delete-like
zangsu Oct 8, 2024
a168509
Merge pull request #718 from woowacourse-teams/dev/be
jminkkk Oct 8, 2024
0590555
fix(tag): tag name 조회 시 대소문자 구분하도록 수정
zeus6768 Oct 8, 2024
6eb92fe
refactor(repository): 불필요한 개행 제거
zeus6768 Oct 8, 2024
7468bda
Merge pull request #759 from woowacourse-teams/fix/757-template-tag
kyum-q Oct 9, 2024
bbafbd3
Merge pull request #738 from woowacourse-teams/refactor/650-code-conv…
zeus6768 Oct 10, 2024
2ad7598
Merge pull request #769 from woowacourse-teams/dev/be
vi-wolhwa Oct 10, 2024
cca1b72
Merge pull request #766 from woowacourse-teams/dev/fe
vi-wolhwa Oct 11, 2024
f831aab
feat(src): 엔드포인트 MY_TEMPLATES를 MEMBER_TEMPLATES로 변경
vi-wolhwa Oct 11, 2024
def2a89
feat(src): 템플릿페이지, 템플릿카드에서 작성자 클릭 시 리다이렉트 기능 구현
vi-wolhwa Oct 11, 2024
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
82 changes: 51 additions & 31 deletions .github/workflows/backend_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,73 @@ name: Backend CD
on:
push:
branches:
- main
- dev/be

jobs:
build:
runs-on: [self-hosted, develop, spring]
runs-on:
- ubuntu-latest
steps:
- name: 브랜치명을 통해 개발 환경 알아내기
run: |
cd ${{ secrets.SCRIPT_DIRECTORY }}
bash find-env-by-branch.sh

- name: 체크아웃
uses: actions/checkout@v4

- name: JDK 설치
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: gradle 캐싱
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: bootJar로 jar 파일 생성
run: |
./gradlew bootJar
mv build/libs/*.jar ${{ secrets.WORK_DIRECTORY }}/${{ env.ENVIRONMENT }}
working-directory: ./backend
run: ./gradlew bootJar
working-directory: backend

- name: 클린업
if: always()
run: rm -rf ../2024-code-zap/*
- name: Artifact 업로드
uses: actions/upload-artifact@v4
with:
name: code-zap-jar
path: backend/build/libs/*.jar

deploy:
deploy_develop:
needs: build
runs-on: [self-hosted, develop, spring]
if: ${{ github.ref == 'refs/heads/dev/be' }}
runs-on:
- self-hosted
- spring
- develop
steps:
- name: 브랜치명을 통해 개발 환경 알아내기
run: |
cd ${{ secrets.SCRIPT_DIRECTORY }}
bash find-env-by-branch.sh

- name: 실행 프로세스 확인
run: |
cd ${{ secrets.SCRIPT_DIRECTORY }}
bash check-old-pids.sh

- name: Artifact 다운로드
uses: actions/download-artifact@v4
with:
name: code-zap-jar
path: ${{ secrets.SPRING_DIRECTORY }}
- name: 배포 스크립트 실행
run: |
cd ${{ secrets.SCRIPT_DIRECTORY }}
RUNNER_TRACKING_ID="" && bash start.sh ${{ env.ENVIRONMENT }}
cd ${{ secrets.SPRING_DIRECTORY }}
mv code-zap*.jar ${{ secrets.JAR_NAME }}
docker compose restart

- name: 실행 프로세스 확인으로 배포 검증
deploy_production:
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
environment: [prod_a, prod_b]
runs-on:
- self-hosted
- spring
- ${{ matrix.environment }}
steps:
- name: Artifact 다운로드
uses: actions/download-artifact@v4
with:
name: code-zap-jar
path: ${{ secrets.SPRING_DIRECTORY }}
- name: 배포 스크립트 실행
run: |
cd ${{ secrets.SCRIPT_DIRECTORY }}
bash verify-deploy.sh
cd ${{ secrets.SPRING_DIRECTORY }}
mv code-zap*.jar ${{ secrets.JAR_NAME }}
docker compose restart
35 changes: 0 additions & 35 deletions .github/workflows/backend_cd_prod.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/backend_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
working-directory: ./backend/src/main/resources
run: echo "${{ secrets.APPLICATION_DB_YAML }}" > application-db.yml

- name: gradle 캐싱
uses: gradle/actions/setup-gradle@v4

- name: JDK 17 설정
uses: actions/setup-java@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ out/

### YAML ###
application-db.yml

### compose ###
docker/app/*.jar
docker/.env
24 changes: 24 additions & 0 deletions backend/docker/app/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
spring:
config:
activate:
on-profile: local
datasource:
url: jdbc:mysql://mysql:3306/${MYSQL_DATABASE}?serverTimezone=Asia/Seoul
username: root
password: ${MYSQL_ROOT_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
flyway:
enabled: false
jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
format_sql: true
show_sql: true
output:
ansi:
enabled: always

#cors:
# allowed-origins: http://localhost:3000
35 changes: 35 additions & 0 deletions backend/docker/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: code-zap

services:
mysql:
image: mysql:8.4.2
expose:
- ${MYSQL_PORT}
ports:
- ${HOST_PORT}:${MYSQL_PORT}
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
volumes:
- code-zap:/var/lib/mysql

spring:
image: amazoncorretto:17
ports:
- "8080:8080"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
volumes:
- ./app:/app
entrypoint: [
"java", "-jar",
"-Dspring.config.location=/app/application.yml",
"-Dspring.profiles.active=local",
"/app/zap.jar"
]

volumes:
code-zap:
20 changes: 20 additions & 0 deletions backend/docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

abs_path=$(readlink -f "$0");
abs_dir=$(dirname "$abs_path");

backend_path=$(realpath "$abs_path/../..")

cd "$backend_path" || exit

./gradlew clean
./gradlew bootJar

jar_path="$backend_path/build/libs"
jar_filename=$(ls -tr "$jar_path"/*.jar | grep ".*\.jar")

mkdir "$abs_dir/app"
mv "$jar_filename" "$abs_dir/app/zap.jar"

cd "$abs_dir" || exit
docker compose up -d
2 changes: 0 additions & 2 deletions backend/src/main/java/codezap/CodeZapApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

@SpringBootApplication
public class CodeZapApplication {

public static void main(String[] args) {
SpringApplication.run(CodeZapApplication.class, args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import jakarta.servlet.http.HttpServletRequest;

import org.springframework.core.MethodParameter;
import org.springframework.lang.NonNull;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

import codezap.auth.manager.CredentialManager;
import codezap.auth.provider.CredentialProvider;
import codezap.member.dto.MemberDto;
import codezap.member.domain.Member;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
Expand All @@ -25,14 +26,14 @@ public boolean supportsParameter(MethodParameter parameter) {
}

@Override
public MemberDto resolveArgument(
MethodParameter parameter,
public Member resolveArgument(
@NonNull MethodParameter parameter,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest,
WebDataBinderFactory binderFactory
) {
HttpServletRequest request = (HttpServletRequest) webRequest.getNativeRequest();
String credential = credentialManager.getCredential(request);
return MemberDto.from(credentialProvider.extractMember(credential));
return credentialProvider.extractMember(credential);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import codezap.member.domain.Member;

public record LoginResponse(
long memberId,
Long memberId,
String name
) {
public static LoginResponse from(Member member) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package codezap.auth.encryption;

public interface PasswordEncryptor {
String encrypt(String plainPassword, String salt);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package codezap.auth.encryption;

import java.security.SecureRandom;
import java.util.Base64;

import org.springframework.stereotype.Component;

@Component
public class RandomSaltGenerator implements SaltGenerator {

@Override
public String generate() {
SecureRandom byteGenerator = new SecureRandom();
byte[] saltByte = new byte[32];
byteGenerator.nextBytes(saltByte);
return Base64.getEncoder().encodeToString(saltByte);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package codezap.auth.encryption;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;

import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

import codezap.global.exception.CodeZapException;

@Component
public class SHA2PasswordEncryptor implements PasswordEncryptor {
private final MessageDigest digest;

public SHA2PasswordEncryptor() {
try {
digest = MessageDigest.getInstance("SHA-256");
} catch (NoSuchAlgorithmException e) {
throw new CodeZapException(HttpStatus.INTERNAL_SERVER_ERROR, "암호화 알고리즘이 잘못 명시되었습니다.");
}
}

@Override
public String encrypt(String plainPassword, String salt) {
String passwordWithSalt = plainPassword + salt;
byte[] encryptByte = digest.digest(passwordWithSalt.getBytes());
return Base64.getEncoder().encodeToString(encryptByte);
}
}
Loading