package com.xinelu.mobile.controller; import com.xinelu.mobile.utils.WeChatAppletUtils; import com.xinelu.mobile.utils.WeChatOfficialAccountUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * @Description 测试controller * @Author 纪寒 * @Date 2024-02-18 16:39:49 * @Version 1.0 */ @RestController @RequestMapping("/testMobile") public class MobileTestController { @Resource private WeChatAppletUtils weChatAppletUtils; @Resource private WeChatOfficialAccountUtils weChatOfficialAccountUtils; /** * 测试获取微信小程序accessToken */ @RequestMapping("/getAppletAcccessToken") public void getAppletAccessToken() { weChatAppletUtils.getWeChatAppletAccessToken(); } /** * 测试获取微信公众号accessToken */ @RequestMapping("/getOfficialAccountAccessToken") public void getOfficialAccountAccessToken() { weChatOfficialAccountUtils.getWeChatOfficialAccountAccessToken(); } }