微信公众号模板消息功能配置信息参数修改

This commit is contained in:
纪寒 2024-03-21 17:36:40 +08:00
parent 4cd5348e7d
commit e0f8e8072a
2 changed files with 9 additions and 7 deletions

View File

@ -101,7 +101,7 @@ token:
# 令牌有效期默认30分钟
expireTime: 30
# 请求拦截白名单
ant-matchers: /postDischarge/**
ant-matchers: /postDischarge/**,/testMobile/**
## MyBatis-Plus配置
mybatis-plus:

View File

@ -2,6 +2,7 @@ package com.xinelu.mobile.controller;
import com.xinelu.mobile.utils.WeChatAppletUtils;
import com.xinelu.mobile.utils.WeChatOfficialAccountUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -20,19 +21,20 @@ public class MobileTestController {
private WeChatAppletUtils weChatAppletUtils;
@Resource
private WeChatOfficialAccountUtils weChatOfficialAccountUtils;
/**
* 测试获取微信小程序accessToken
*/
@RequestMapping("/getAppletAcccessToken")
public void getAppletAccessToken() {
weChatAppletUtils.getWeChatAppletAccessToken();
@GetMapping("/getAppletAcccessToken")
public String getAppletAccessToken() {
return weChatAppletUtils.getWeChatAppletAccessToken();
}
/**
* 测试获取微信公众号accessToken
*/
@RequestMapping("/getOfficialAccountAccessToken")
public void getOfficialAccountAccessToken() {
weChatOfficialAccountUtils.getWeChatOfficialAccountAccessToken();
@GetMapping("/getOfficialAccountAccessToken")
public String getOfficialAccountAccessToken() {
return weChatOfficialAccountUtils.getWeChatOfficialAccountAccessToken();
}
}