fix: EventHubPublisher에 @Primary 추가하여 EventHub 우선 사용 보장

This commit is contained in:
djeon 2025-10-31 15:16:23 +09:00
parent 0d56824fe8
commit cdae3dee7e

View File

@ -16,6 +16,7 @@ import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
@ -23,6 +24,7 @@ import org.springframework.stereotype.Component;
* Azure EventHub를 통한 이벤트 발행 * Azure EventHub를 통한 이벤트 발행
*/ */
@Component @Component
@Primary
@Slf4j @Slf4j
@org.springframework.boot.autoconfigure.condition.ConditionalOnBean(name = "eventProducer") @org.springframework.boot.autoconfigure.condition.ConditionalOnBean(name = "eventProducer")
public class EventHubPublisher implements EventPublisher { public class EventHubPublisher implements EventPublisher {