✨ 添加新特性。完善後台綁定的代碼

This commit is contained in:
冷冷 committed 2018-08-16 20:27:24 +08:00
1 parent a56875aa90
commit 36b2ce817e
8 files changed
+102 -17

No files matched your search

@@ -38,9 +38,4 @@ public class PigxAuthApplication {
public static void main(String[] args) {
SpringApplication.run(PigxAuthApplication.class, args);
}
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
@@ -94,7 +94,7 @@ public class PigxUserDetailsServiceImpl implements PigxUserDetailsService {
String url = String.format(WX_AUTHORIZATION_CODE_URL
, wxSocialConfig.getAppid(), wxSocialConfig.getSecret(), code);
String result = restTemplate.getForObject(url, String.class);
log.warn("微信响应报文:{}", result);
log.debug("微信响应报文:{}", result);
Object obj = JSONUtil.parseObj(result).get("openid");
if (obj != null) {