File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/main/java/com/intuit/springwebclient Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 44import java .util .Objects ;
55import java .util .function .Consumer ;
66
7+ import org .springframework .beans .factory .annotation .Qualifier ;
78import org .springframework .http .HttpHeaders ;
89import org .springframework .http .HttpStatus ;
910import org .springframework .http .ResponseEntity ;
1819import com .intuit .springwebclient .entity .ClientHttpResponse ;
1920import com .intuit .springwebclient .retryHandler .RetryHandlerFactory ;
2021
21- import lombok .AllArgsConstructor ;
2222import lombok .extern .slf4j .Slf4j ;
2323import reactor .core .publisher .Mono ;
2424import reactor .util .retry .Retry ;
2828 */
2929@ Slf4j
3030@ Component
31- @ AllArgsConstructor
3231public class CommonSpringWebClient {
3332 private final WebClient webClient ;
3433
35- /**
34+ public CommonSpringWebClient (@ Qualifier ("RWebPulseClient" ) WebClient webClient ) {
35+ this .webClient = webClient ;
36+ }
37+
38+ /**
3639 * Execute Blocking http request.
3740 * @param httpRequest
3841 * @return
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public HttpClient webHttpClient(){
4141 .option (ChannelOption .SO_TIMEOUT , webClientConfiguration .getHttpClientConfig ().getSocketTimeoutMillis ());
4242 }
4343
44- @ Bean
44+ @ Bean ( "RWebPulseClient" )
4545 public WebClient createWebClient (){
4646 return WebClient .builder ()
4747 .clientConnector (new ReactorClientHttpConnector (webHttpClient ()))
You can’t perform that action at this time.
0 commit comments