From 3d6c34f45d76b78151d6586f93acca2943698b08 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期一, 09 十二月 2024 10:56:42 +0800
Subject: [PATCH] 1.
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java
new file mode 100644
index 0000000..2509b1d
--- /dev/null
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/config/HttpConfig.java
@@ -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();
+ }
+}
--
Gitblit v1.7.1