| | |
| | | public static String getAccessToken() { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("APPID", "wx7c54942dfc87f4d8"); // |
| | | params.put("APPSECRET", "5873a729c365b65ab42bb5fc82d2ed49"); // |
| | | params.put("APPID", "wxf95fb77e0b1f8c09"); // |
| | | params.put("APPSECRET", "acf3be9facf7f26bb8286c9b4eff93d0"); // |
| | | ResponseEntity<String> responseEntity = restTemplate.getForEntity( |
| | | "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={APPID}&secret={APPSECRET}", String.class, params); |
| | | String body = responseEntity.getBody(); |