|
@@ -7,6 +7,7 @@ import com.sxtvs.open.core.conf.OauthConfig;
|
|
|
import com.sxtvs.open.core.sls.AliyunLogger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -110,11 +111,13 @@ public class OauthController {
|
|
|
return view;
|
|
|
}
|
|
|
|
|
|
- @RequestMapping("weixin/wx7040933fd0e4b0e8/callback")
|
|
|
+ @RequestMapping("weixin/{appid}/callback")
|
|
|
public String callback(
|
|
|
@RequestParam("auth_code") String authCode,
|
|
|
- @RequestParam("expires_in") Integer expiresIn) {
|
|
|
- logger.info("key", "oauth/wx7040933fd0e4b0e8/code", "data", Map.of("authCode", authCode, "expiresIn", expiresIn));
|
|
|
+ @RequestParam("expires_in") Integer expiresIn,
|
|
|
+ @PathVariable("appid") String appid) {
|
|
|
+ logger.info("key", "oauth/{appid}/callback", "data",
|
|
|
+ Map.of("authCode", authCode, "expiresIn", expiresIn, "appid", appid));
|
|
|
return "redirect:https://www.baidu.com";
|
|
|
}
|
|
|
}
|