-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
2 changed files
with
44 additions
and
44 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
86 changes: 43 additions & 43 deletions
86
src/main/java/com/moing/backend/global/utils/StartupRunner.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,43 +1,43 @@ | ||
package com.moing.backend.global.utils; | ||
|
||
import com.moing.backend.domain.member.domain.constant.Gender; | ||
import com.moing.backend.domain.member.domain.constant.RegistrationStatus; | ||
import com.moing.backend.domain.member.domain.constant.Role; | ||
import com.moing.backend.domain.member.domain.constant.SocialProvider; | ||
import com.moing.backend.domain.member.domain.entity.Member; | ||
import com.moing.backend.domain.member.domain.service.MemberSaveService; | ||
import com.moing.backend.global.annotation.Util; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.boot.CommandLineRunner; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Util | ||
@RequiredArgsConstructor | ||
public class StartupRunner implements CommandLineRunner { | ||
|
||
/** | ||
* 테스트용 insert | ||
*/ | ||
|
||
private final MemberSaveService memberSaveService; | ||
@Override | ||
public void run(String... args) throws Exception { | ||
Member test01 = new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester1", "undef", SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester01"); | ||
memberSaveService.saveMember(test01); | ||
|
||
Member test02=new Member(LocalDate.now(), "[email protected]", "undef", Gender.MAN, null, "modagbul_tester2", null, SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester02"); | ||
memberSaveService.saveMember(test02); | ||
|
||
Member test03=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester3", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester03"); | ||
memberSaveService.saveMember(test03); | ||
|
||
Member test04=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester4", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester04"); | ||
memberSaveService.saveMember(test04); | ||
|
||
Member test05=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester5", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester05"); | ||
memberSaveService.saveMember(test05); | ||
} | ||
} | ||
//package com.moing.backend.global.utils; | ||
// | ||
//import com.moing.backend.domain.member.domain.constant.Gender; | ||
//import com.moing.backend.domain.member.domain.constant.RegistrationStatus; | ||
//import com.moing.backend.domain.member.domain.constant.Role; | ||
//import com.moing.backend.domain.member.domain.constant.SocialProvider; | ||
//import com.moing.backend.domain.member.domain.entity.Member; | ||
//import com.moing.backend.domain.member.domain.service.MemberSaveService; | ||
//import com.moing.backend.global.annotation.Util; | ||
//import lombok.RequiredArgsConstructor; | ||
//import org.springframework.boot.CommandLineRunner; | ||
//import org.springframework.stereotype.Component; | ||
// | ||
//import java.time.LocalDate; | ||
// | ||
//@Util | ||
//@RequiredArgsConstructor | ||
//public class StartupRunner implements CommandLineRunner { | ||
// | ||
// /** | ||
// * 테스트용 insert | ||
// */ | ||
// | ||
// private final MemberSaveService memberSaveService; | ||
// @Override | ||
// public void run(String... args) throws Exception { | ||
// Member test01 = new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester1", "undef", SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester01"); | ||
// memberSaveService.saveMember(test01); | ||
// | ||
// Member test02=new Member(LocalDate.now(), "[email protected]", "undef", Gender.MAN, null, "modagbul_tester2", null, SocialProvider.KAKAO, RegistrationStatus.COMPLETED, Role.USER, "KAKAO@tester02"); | ||
// memberSaveService.saveMember(test02); | ||
// | ||
// Member test03=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester3", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester03"); | ||
// memberSaveService.saveMember(test03); | ||
// | ||
// Member test04=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester4", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester04"); | ||
// memberSaveService.saveMember(test04); | ||
// | ||
// Member test05=new Member(LocalDate.now(), "[email protected]", "undef", Gender.WOMAN, "undef", "modagbul_tester5", "undef", SocialProvider.APPLE, RegistrationStatus.COMPLETED, Role.USER, "APPLE@tester05"); | ||
// memberSaveService.saveMember(test05); | ||
// | ||
// } | ||
//} |