Skip to content

Commit

Permalink
WarmupConfig의 조건부 빈 생성 처리를 위한 @ConditionalOnProperty 어노테이션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
cire0304 committed Nov 6, 2023
1 parent 8e1a5fc commit 66d7180
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.ayucoupon.warmup.WarmupRunner;
import com.ayucoupon.warmup.WarmupStarter;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -12,6 +13,7 @@

@Configuration
@EnableConfigurationProperties({CouponWarmupProperties.class, UserCouponWarmupProperties.class})
@ConditionalOnProperty(prefix = "my.warmup", name = "enabled", havingValue = "true")
@RequiredArgsConstructor
public class WarmupConfig {

Expand Down

0 comments on commit 66d7180

Please sign in to comment.