-
Notifications
You must be signed in to change notification settings - Fork 56
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
[Spring Core]주병주 미션 제출합니다. #70
Open
GoToBILL
wants to merge
73
commits into
next-step:gotobill
Choose a base branch
from
GoToBILL:gotobill-core
base: gotobill
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
18b8ea6
1-2-3단계 커밋
ac9d564
수정
0194a4a
삼단계 누락 추가
58bb75f
리뷰 반영
84fb7a1
리뷰 반영
f53da3a
리뷰 반영2
e6ea575
jpa 4,5,6
6f3270b
jpa modified
f450b0f
7,8 단계
f5d81d5
7단계 수정
0ced918
7 retry
9552f5f
add: ci.yml add
bd79489
ci : test
5469490
ci : core branch add
a43cc9e
ci : core branch add after -> test
4206a81
ci : test 0.0.1
9915ae8
ci : test 0.0.2
dab6831
ci > ci/cd
2bf3d7b
ci > ci/cd.001
ea30f53
ci > ci/cd.002 -x test
0c12843
ci > ci/cd.003 key update
41d7316
ci > ci/cd.004 ci/cd check
bf448cc
ci > ci/cd.005 ci/cd check:main->gotobill-core
aefd93c
ci > ci/cd.006 ci/cd check:main->gotobill-core
5db14e0
ci > ci/cd.007 배포 test
9d5f106
ci > ci/cd.008 kill now process and run
aa081a4
ci > ci/cd.009 add: after nohup sleep 10
be84bd3
ci > ci/cd.010 -: after nohup sleep 10
59b528c
ci > ci/cd.011 add: kill process
3dec885
ci > ci/cd.012 add: kill process before pull
05b16f2
ci > ci/cd.013 add: kill process before pull
ffb620e
ci > ci/cd.014 add: kill process before pull
972306f
ci > ci/cd.015 add: kill process before pull
b5ca92a
ci > ci/cd.016 add: kill process before pull
c9771d3
ci > ci/cd.017 last
4be8a68
ci > ci/cd.018
f4ede7d
ci > ci/cd.019
8aa3c81
ci > ci/cd.20
4599618
ci > ci/cd.21
2309e53
ci > ci/cd.22
38e646a
ci > ci/cd.23
dc4aee2
ci > ci/cd.24
320e50b
ci > ci/cd.25
abc990a
ci > ci/cd.26
fccb995
ci > ci/cd.27
dabedb8
ci > ci/cd.28
5821086
add: nginx 30
fe59f04
add: nginx 30
565bc8d
add: nginx 31
e4959af
add: nginx 32
b1cb56f
add: nginx 33
db17df5
add: nginx 34
cdbf9b2
add: nginx 35
9755601
add docker
GoToBILL 25fdc65
add docker :01
GoToBILL b2efc64
add docker :02
GoToBILL 3efd6bd
add docker :03
GoToBILL 80642c0
add docker :04
GoToBILL 08a4470
add docker :05
GoToBILL 4203c1a
add docker :06
GoToBILL d568742
add docker :07
GoToBILL 5a3f2e8
add docker :08
GoToBILL 39078a3
add docker :09
GoToBILL 8373483
add docker :10
GoToBILL 8d9dabe
add docker :11
GoToBILL 31f5f98
add docker :12
GoToBILL 2a2950f
add docker :13
GoToBILL 496db22
add docker :14
GoToBILL 0d264df
add docker :15
GoToBILL 0f76376
add docker :16
GoToBILL fbae782
add docker :17
GoToBILL 157de6d
add docker :18
GoToBILL df0350e
add docker :19
GoToBILL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package auth; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class AuthConfig { | ||
|
||
@Bean | ||
public JwtUtils jwtUtils(@Value("${roomescape.auth.jwt.secret}") String secretKey) { | ||
return new JwtUtils(secretKey); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/java/roomescape/jwt/JwtTokenMember.java → src/main/java/auth/JwtTokenMember.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package roomescape.jwt; | ||
package auth; | ||
|
||
public record JwtTokenMember( | ||
String name, | ||
|
14 changes: 7 additions & 7 deletions
14
...in/java/roomescape/jwt/JwtController.java → src/main/java/auth/JwtUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package roomescape.data; | ||
|
||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Component; | ||
import roomescape.member.Member; | ||
import roomescape.member.MemberRepository; | ||
|
||
@Profile("default") | ||
@Component | ||
public class DataLoader implements CommandLineRunner { | ||
|
||
private final MemberRepository memberRepository; | ||
|
||
public DataLoader(final MemberRepository memberRepository) { | ||
this.memberRepository = memberRepository; | ||
} | ||
|
||
@Override | ||
public void run(final String... args) throws Exception { | ||
final Member member1 = memberRepository.save(new Member("어드민", "[email protected]", "password", "ADMIN")); | ||
final Member member2 = memberRepository.save(new Member("브라운", "[email protected]", "password", "USER")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package roomescape.data; | ||
|
||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Component; | ||
import roomescape.member.Member; | ||
import roomescape.member.MemberRepository; | ||
import roomescape.reservation.Reservation; | ||
import roomescape.reservation.ReservationRepository; | ||
import roomescape.theme.Theme; | ||
import roomescape.theme.ThemeRepository; | ||
import roomescape.time.Time; | ||
import roomescape.time.TimeRepository; | ||
|
||
@Profile("test") | ||
@Component | ||
public class TestDataLoader implements CommandLineRunner { | ||
|
||
private final MemberRepository memberRepository; | ||
|
||
private final ThemeRepository themeRepository; | ||
|
||
private final TimeRepository timeRepository; | ||
|
||
private final ReservationRepository reservationRepository; | ||
Comment on lines
+17
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이런부분은 하나씩 공백이 있을 필요 없을 것 같아보입니다! |
||
|
||
public TestDataLoader(final MemberRepository memberRepository, | ||
final ThemeRepository themeRepository, | ||
final TimeRepository timeRepository, | ||
final ReservationRepository reservationRepository) { | ||
this.memberRepository = memberRepository; | ||
this.themeRepository = themeRepository; | ||
this.timeRepository = timeRepository; | ||
this.reservationRepository = reservationRepository; | ||
} | ||
|
||
@Override | ||
public void run(final String... args) throws Exception { | ||
final Member member1 = memberRepository.save(new Member("어드민", "[email protected]", "password", "ADMIN")); | ||
final Member member2 = memberRepository.save(new Member("브라운", "[email protected]", "password", "USER")); | ||
|
||
final Theme theme1 = themeRepository.save(new Theme("테마1", "테마1입니다.")); | ||
final Theme theme2 = themeRepository.save(new Theme("테마2", "테마2입니다.")); | ||
final Theme theme3 = themeRepository.save(new Theme("테마3", "테마3입니다.")); | ||
|
||
final Time time1 = timeRepository.save(new Time("10:00")); | ||
final Time time2 = timeRepository.save(new Time("12:00")); | ||
final Time time3 = timeRepository.save(new Time("14:00")); | ||
final Time time4 = timeRepository.save(new Time("16:00")); | ||
final Time time5 = timeRepository.save(new Time("18:00")); | ||
final Time time6 = timeRepository.save(new Time("20:00")); | ||
|
||
reservationRepository.save(new Reservation("어드민", "2024-03-01", member1, time1, theme1)); | ||
reservationRepository.save(new Reservation("어드민", "2024-03-01", member1, time2, theme2)); | ||
reservationRepository.save(new Reservation("어드민", "2024-03-01", member1, time3, theme3)); | ||
|
||
reservationRepository.save(new Reservation("브라운", "2024-03-01", member2, time4, theme1)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Production용과 DataLoader와 Test용 TestDataLoader를 만드세요
라는 요구 사항이 있었는데, 저는 주어진 그대로@Profile("Production")
라고 단순하게 접근했습니다.그런데 병주님을 포함한 대부분의 분들이
@Profile("default")
라고 많이 작성해 주셨더라고요.둘 다 큰 상관이 없는걸 까요? 이 부분 궁금해요!