张延森 3 年 前
コミット
5328114c73

+ 1
- 1
pom.xml ファイルの表示

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.yunzhi</groupId>
12 12
 	<artifactId>gnyy</artifactId>
13
-	<version>0.0.1</version>
13
+	<version>0.0.3</version>
14 14
 	<name>qrcode</name>
15 15
 	<description>Demo project for Spring Boot</description>
16 16
 

+ 2
- 2
src/main/java/com/yunzhi/gnyy/common/HttpUtils.java ファイルの表示

@@ -13,7 +13,7 @@ import java.util.*;
13 13
 @Component
14 14
 public class HttpUtils {
15 15
     public String get(String url) throws Exception {
16
-        log.info("请求地址: ", url);
16
+        log.info("请求地址: {}", url);
17 17
         RestTemplate restTemplate = new RestTemplate();
18 18
         HttpHeaders headers = new HttpHeaders();
19 19
         headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
@@ -25,7 +25,7 @@ public class HttpUtils {
25 25
 
26 26
         ResponseEntity<String> resp = restTemplate.exchange(formatURL, HttpMethod.GET, entity, String.class, params);
27 27
         String res = resp.getBody();
28
-        log.info("请求结果: ", res);
28
+        log.info("请求结果: {}", res);
29 29
         return res;
30 30
     }
31 31
 

+ 5
- 0
src/main/java/com/yunzhi/gnyy/common/WxUtils.java ファイルの表示

@@ -50,6 +50,11 @@ public class WxUtils {
50 50
         conf.setAesKey(miniapp.getAesKey());
51 51
         conf.setMsgDataFormat("JSON");
52 52
 
53
+        if (null != miniapp.getHttpProxyHost() && !"".equals(miniapp.getHttpProxyHost())) {
54
+            conf.setHttpProxyHost(miniapp.getHttpProxyHost());
55
+            conf.setHttpProxyPort(miniapp.getHttpProxyPort());
56
+        }
57
+
53 58
         WxMaService service = new WxMaServiceImpl();
54 59
         service.setWxMaConfig(conf);
55 60
         return service;

+ 2
- 0
src/main/java/com/yunzhi/gnyy/config/WeixinConfig.java ファイルの表示

@@ -23,6 +23,8 @@ public class WeixinConfig {
23 23
         private String token;
24 24
         private String aesKey;
25 25
         private String msgDataFormat;
26
+        private String httpProxyHost;
27
+        private Integer httpProxyPort;
26 28
     }
27 29
 
28 30
 //    @Data

+ 4
- 2
src/main/resources/application.yml ファイルの表示

@@ -33,11 +33,13 @@ mybatis-plus:
33 33
 ###
34 34
 weixin:
35 35
   miniapp:
36
-    appid: wx835627a9b9b3932a
37
-    secret: 51cc2b26c1628ae098f05a3ba8e6f6f4
36
+    appid: wx9a218cc3471fe233
37
+    secret: 79a93850c4168c848e663ba7cbd1dfb9
38 38
     token:
39 39
     aesKey:
40 40
     msgDataFormat: JSON
41
+    httpProxyHost:
42
+    httpProxyPort:
41 43
 
42 44
 ###
43 45
 spring: