List of usage examples for org.springframework.web HttpRequestMethodNotSupportedException HttpRequestMethodNotSupportedException
public HttpRequestMethodNotSupportedException(String method)
From source file:com.haulmont.restapi.ldap.LdapAuthController.java
@RequestMapping(value = "/v2/ldap/token", method = RequestMethod.GET) public ResponseEntity<OAuth2AccessToken> getAccessToken(Principal principal, @RequestParam Map<String, String> parameters, HttpServletRequest request) throws HttpRequestMethodNotSupportedException { if (!allowedRequestMethods.contains(HttpMethod.GET)) { throw new HttpRequestMethodNotSupportedException("GET"); }/*from w ww.j av a2 s. c om*/ return postAccessToken(principal, parameters, request); }
From source file:com.haulmont.restapi.idp.IdpAuthController.java
@GetMapping(value = "/v2/idp/token") public ResponseEntity<OAuth2AccessToken> getAccessToken(Principal principal, @RequestParam Map<String, String> parameters, HttpServletRequest request) throws HttpRequestMethodNotSupportedException { if (!allowedRequestMethods.contains(HttpMethod.GET)) { throw new HttpRequestMethodNotSupportedException("GET"); }/*w w w. j a va 2 s. c o m*/ return postAccessToken(principal, parameters, request); }