File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/main/java/com/github/binarywang/demo/wechat/controller Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 18
18
<description >Spring Boot Demo with wechat MP</description >
19
19
20
20
<properties >
21
+ <weixin-java-mp .version>2.4.3</weixin-java-mp .version>
22
+
21
23
<maven .compiler.source>1.7</maven .compiler.source>
22
24
<maven .compiler.target>1.7</maven .compiler.target>
23
25
<maven .compiler.encoding>UTF-8</maven .compiler.encoding>
24
26
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
25
27
<project .build.locales>zh_CN</project .build.locales>
26
- <weixin-java-mp .version>2.4.0</weixin-java-mp .version>
27
28
</properties >
28
29
29
30
<dependencies >
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ public class WechatController {
31
31
@ Autowired
32
32
private WxMpMessageRouter router ;
33
33
34
+ @ ResponseBody
34
35
@ GetMapping (produces = "text/plain;charset=utf-8" )
35
- public @ ResponseBody String authGet (
36
+ public String authGet (
36
37
@ RequestParam (name = "signature" ,
37
38
required = false ) String signature ,
38
39
@ RequestParam (name = "timestamp" ,
@@ -54,8 +55,9 @@ public class WechatController {
54
55
return "非法请求" ;
55
56
}
56
57
58
+ @ ResponseBody
57
59
@ PostMapping (produces = "application/xml; charset=UTF-8" )
58
- public @ ResponseBody String post (@ RequestBody String requestBody ,
60
+ public String post (@ RequestBody String requestBody ,
59
61
@ RequestParam ("signature" ) String signature ,
60
62
@ RequestParam ("timestamp" ) String timestamp ,
61
63
@ RequestParam ("nonce" ) String nonce ,
You can’t perform that action at this time.
0 commit comments