[Solved] Oauth2(spring security)method_not_allowed(Request method ‘GET’ not supported)


Error information

<error_description>Request method &#39;GET&#39; not supported</error_description>

39 is a single quotation mark


Only post is supported by default


download and install postman tool (or other post tools) and use post to call

method of adding get to code

public class OAuthSecurityConfig extends AuthorizationServerConfigurerAdapter {
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
        endpoints.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST);// add get method



Similar Posts: