| | |
| | | // https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET |
| | | |
| | | //改从redis中获取 |
| | | return stringRedisTemplate.boundValueOps("access_token:access_token:" + appid).get(); |
| | | |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | | log.info("appid:"+appid); |
| | | return valueOperations.get("access_token:access_token:" + appid); |
| | | |
| | | /* String path = " https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential"; |
| | | URL url = new URL(path + "&appid=" + appid + "&secret=" + secret); |