Skip to content

Commit 84d17b4

Browse files
committed
Chore: DevInitData 프로파일 설정
1 parent fd94ff9 commit 84d17b4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/java/com/back/global/initData/DevInitData.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.List;
2323

2424
@Configuration
25+
@Profile("default")
2526
@RequiredArgsConstructor
2627
public class DevInitData {
2728
private final UserRepository userRepository;
@@ -34,13 +35,6 @@ public class DevInitData {
3435
@Bean
3536
ApplicationRunner DevInitDataApplicationRunner() {
3637
return args -> {
37-
String activeProfile = environment.getProperty("spring.profiles.active", "none");
38-
if (!"default".equals(activeProfile)) {
39-
return; // default 환경이 아니면 실행하지 않음
40-
}
41-
// if (!"none".equals(activeProfile) && !"default".equals(activeProfile)) {
42-
// return;
43-
// }
4438
initUsersAndPostsAndComments();
4539
};
4640
}

0 commit comments

Comments
 (0)