huliguo
5 天以前 b36ba9d3da79245376f5a8a1c31cddb1f9a6d1b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.linghu.config;
 
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;
 
@Configuration
public class WebClientConfig {
    @Value("${linghu.url}")
    private String baseUrl;
 
    @Bean
    public WebClient webClient() {
        return WebClient.create(baseUrl);
    }
}