xuhy
2025-08-26 7112e097c7dd61d49d50b8b05dd6ceadcbcd1b37
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.ruoyi.order.config;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
 
/**
 * http请求工具配置
 *
 * @author: KingKong
 * @create: 2018-11-14 10:47
 **/
@Configuration
public class HttpConfig {
 
    @Autowired
    private RestTemplateBuilder builder;
 
    @Bean
    public RestTemplate restTemplate() {
        return builder.build();
    }
}