0
Spring Boot does not recognize my controller if I submit more parameters in the request. For example:
If I send a normal GET request spring boot recognizes my controller:
http://localhost/idp/oauth/123/authorize
If I send a GET request with more parameters in the query spring boot does not recognize my controller:
http://localhost/idp/oauth/123/authorize?scope=public_profile
I need to receive the request exactly according to the second example (with the Scope parameter). spring does not recognize the controller and redirects to /error.
code:
@Controller
@RequestMapping("/idp/oauth")
public class OAuthController {
@RequestMapping(value = "/{clientId}/authorize", method = RequestMethod.GET)
public String authorizeGet(
HttpServletRequest request,
HttpServletResponse response,
@PathVariable String clientId,
Model model) {
// ...
}
@RequestMapping(value = "/{clientId}/authorize", method = RequestMethod.POST)
public String authorizePost(
HttpServletRequest request,
HttpServletResponse response,
@PathVariable String clientId,
Model model) {
// ...
}
}
You are on Stackoverflow in English, translate your question accordingly
– nullptr
Corrected, thank you very much!
– Alexandre Barreiro Neto