From 3184496c2b534e8b7e7142ed8419aaef16de0404 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 14 Jul 2023 16:03:23 +0800 Subject: [PATCH] 服务号初始化 --- src/main/java/cc/mrbird/febs/common/properties/XcxProperties.java | 2 -- src/main/java/cc/mrbird/febs/pay/controller/AutoReplyController.java | 14 ++------------ src/main/resources/application-dev.yml | 1 - 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/common/properties/XcxProperties.java b/src/main/java/cc/mrbird/febs/common/properties/XcxProperties.java index 250e42b..6393808 100644 --- a/src/main/java/cc/mrbird/febs/common/properties/XcxProperties.java +++ b/src/main/java/cc/mrbird/febs/common/properties/XcxProperties.java @@ -14,8 +14,6 @@ private String xcxAppid; private String xcxSecret; - //微信 - private String wechatToken; private String wecharPaynotifyUrl; diff --git a/src/main/java/cc/mrbird/febs/pay/controller/AutoReplyController.java b/src/main/java/cc/mrbird/febs/pay/controller/AutoReplyController.java index 8168d71..69bfd27 100644 --- a/src/main/java/cc/mrbird/febs/pay/controller/AutoReplyController.java +++ b/src/main/java/cc/mrbird/febs/pay/controller/AutoReplyController.java @@ -22,17 +22,7 @@ @RequestMapping(value = "/api/wechat/reply") public class AutoReplyController { - - private final XcxProperties xcxProperties = SpringContextHolder.getBean(XcxProperties.class); -// @Value("${wechat.appId}") -// private String wechatAppId; -// -// @Value("${wechat.appSecret}") -// private String wechatAppSecret; -// -// // 这个Token就是微信后台 服务器配置 中的Token -// @Value("${wechat.token}") -// private String wechatToken; + private final String wechatToken = "ywgpzfwh"; /** * 服务器校验 @@ -41,7 +31,7 @@ */ @GetMapping("/event") public String verification(HttpServletRequest req) { - return WechatEventUtil.verification(req, xcxProperties.getWechatToken()); + return WechatEventUtil.verification(req, wechatToken); } /** diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index fe2a524..31f4d3f 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -79,7 +79,6 @@ wecharpaySecret: QIANAYIZONGZI1234567899876543212 gaodeKey: 95ede7157929f5f6b6c758971be924b1 serviceName: yiyuanshucai - wechatToken:ywgpzfwh system: job: true \ No newline at end of file -- Gitblit v1.9.1