@RestController @RequestMapping("/oauth") public class OauthController { @Autowired @Lazy private TokenStore tokenStore; @Autowired private TokenEndpoint tokenEndpoint; /** * 重写login接口 * * @param principal * @param parameters * @return * @throws HttpRequestMethodNotSupportedException */ @PostMapping("/token") public Result<Map<String, Object>> postAccessToken(Principal principal, @RequestParam Map<String, String> parameters) throws HttpRequestMethodNotSupportedException { OAuth2AccessToken accessToken; accessToken = tokenEndpoint.pos