-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47b7c2e
commit da5903e
Showing
7 changed files
with
58 additions
and
48 deletions.
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
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
import java.time.LocalDate; | ||
import java.util.ArrayList; | ||
|
||
import kr.tgwing.tech.user.entity.TempUser; | ||
import kr.tgwing.tech.user.repository.TempUserRepository; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
@@ -43,9 +45,19 @@ public CommandLineRunner loadTestData(PostRepository postRepository, | |
ReplyRepository replyRepository, | ||
ProjectRepository projectRepository, | ||
ParticipantRepository participantRepository, | ||
LinkRepository linkRepository | ||
LinkRepository linkRepository, | ||
TempUserRepository tempUserRepository | ||
) { | ||
return args -> { | ||
TempUser assignment = TempUser.builder() | ||
.studentNumber("2020202020") | ||
.phoneNumber("01000000000") | ||
.email("[email protected]") | ||
.name("동아리원") | ||
.password("1234") | ||
.birth(LocalDate.parse("1999-01-01")) | ||
.build(); | ||
|
||
User writer1 = User.builder() | ||
.studentNumber("2018000000") | ||
.phoneNumber("01000000000") | ||
|
@@ -80,6 +92,7 @@ public CommandLineRunner loadTestData(PostRepository postRepository, | |
userRepository.save(writer1); | ||
userRepository.save(writer2); | ||
userRepository.save(admin); | ||
tempUserRepository.save(assignment); | ||
|
||
Post post1 = Post.builder() | ||
.title("sample blog 1") | ||
|
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
6 changes: 6 additions & 0 deletions
6
src/main/java/kr/tgwing/tech/user/exception/NotAssignmentException.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package kr.tgwing.tech.user.exception; | ||
|
||
import kr.tgwing.tech.common.exception.CommonException; | ||
|
||
public class NotAssignmentException extends CommonException { | ||
} |
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