Skip to content

Commit 337b058

Browse files
committed
ConditionalOnPropertyy추가
1 parent 0bfbdc7 commit 337b058

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

back/src/main/java/com/back/global/ai/config/ImageWebClientConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.back.global.ai.config;
22

3+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
34
import org.springframework.context.annotation.Bean;
45
import org.springframework.context.annotation.Configuration;
56
import org.springframework.http.HttpHeaders;
@@ -9,6 +10,7 @@
910
public class ImageWebClientConfig {
1011

1112
@Bean("stabilityWebClient")
13+
@ConditionalOnProperty(prefix = "ai.image", name = "enabled", havingValue = "true")
1214
public WebClient stabilityWebClient(ImageAiConfig imageAiConfig) {
1315
return WebClient.builder()
1416
.baseUrl(imageAiConfig.getBaseUrl())

0 commit comments

Comments
 (0)