Skip to content

Commit 3a33a23

Browse files
authored
[Refactor]: 운영 환경에 추가되도록 설정 (#212)
1 parent 37e671c commit 3a33a23

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/com/backend/global/initdata/BaseInitData.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
import java.util.List;
4545
import java.util.concurrent.ThreadLocalRandom;
4646

47-
@Profile("dev")
47+
//@Profile("dev")
48+
@Profile("!test")
4849
@Component
4950
@RequiredArgsConstructor
5051
public class BaseInitData {
@@ -77,9 +78,9 @@ ApplicationRunner baseInitDataApplicationRunner() {
7778
@Transactional
7879
public void work1() {
7980
// 이미 데이터가 있으면 건너뛰기
80-
if (memberRepository.count() > 0) {
81-
return;
82-
}
81+
// if (memberRepository.count() > 0) {
82+
// return;
83+
// }
8384

8485
// ========== 1. 회원 생성 (10명) ==========
8586
List<Member> members = createMembers();

0 commit comments

Comments
 (0)