| | |
| | | @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"; |
| | | |
| | | /** |
| | | * 服务器校验 |
| | |
| | | */ |
| | | @GetMapping("/event") |
| | | public String verification(HttpServletRequest req) { |
| | | return WechatEventUtil.verification(req, xcxProperties.getWechatToken()); |
| | | return WechatEventUtil.verification(req, wechatToken); |
| | | } |
| | | |
| | | /** |