puzhibing
2024-12-26 e93aad02d2dd2a6e624e81ea0adb3611a8fc43e5
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java
New file
@@ -0,0 +1,25 @@
package com.ruoyi.other.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();
    }
}