xiaoyong931011
2023-08-14 aed9a0f76ba9c181b375c96f5091fc0ee07413c3
src/test/java/cc/mrbird/febs/ProfitTest.java
@@ -136,11 +136,15 @@
    @Test
    public void getWeChatAccessToken() {
        String appId = "wx5cc58f796224af61";
        String appSecret = "71403646f666f9b9dca308d4f357765c";
        // 第三方用户唯一凭证
        String appId = "wx052716b1a388b13c";
        // 第三方用户唯一凭证密钥
        String appSecret = "a217fd6bd36b4939e29a052fd5ba6984";
        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appId + "&secret=" + appSecret;
        String jsonStr = restTemplate.getForObject(url, String.class);
        /**
         * 返回结果
         * {"access_token":"ACCESS_TOKEN","expires_in":7200}