Die Anfrage ist mit dem Statuscode 500 fehlgeschlagen, während die Autorisierung vorgenommen wurdeJava

Java-Forum
Anonymous
 Die Anfrage ist mit dem Statuscode 500 fehlgeschlagen, während die Autorisierung vorgenommen wurde

Post by Anonymous »

Guten Abend allerseits, ich hoffe, diese Nachricht findet Sie gut! Wenn Sie sich fragen, ob Änderungen an den folgenden Codezeilen vorgenommen werden müssen, wenn die folgenden Ausnahmen zurückgegeben werden (angegeben im Ausgangsabschnitt). Ihre Unterstützung wird sehr geschätzt.

Code: Select all

public interface AuthService {
@PostMapping(
value = "/oauth/token",
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
// consumes = {"application/x-www-form-urlencoded"},
produces = MediaType.APPLICATION_JSON_VALUE
// produces = {"application/json"}
)
LoginResponse authenticate(
@RequestParam(name = "grant_type") String grantType,
@RequestParam String username,
@RequestParam String password,
@RequestBody String reqBody
);
}
< /code>
Ausgabe: < /p>
[AuthService#authenticate(String, String, String, String)]:
[
{
"error": "invalid_request",
"error_description": "Missing form parameter: grant_type"
}
]
with root cause feign.FeignException$BadRequest: [400 Bad Request] during [POST]
< /code>
Versucht die folgenden mehrere Optionen, um das [url=viewtopic.php?t=20324]Problem[/url] zu beheben. Aber kein Glück bevorzugt. Ihre Anleitung wird sehr geschätzt.14:53:16.258 [http-nio-8090-exec-2] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] -
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
[Request processing failed; nested exception is feign.FeignException$BadRequest:
[400 Bad Request] during [POST] to https call [AuthService#authenticate(String,String,String,String)]:
[
{
"error": "invalid_request",
"error_description": "Missing form parameter: grant_type"
}
]
]
with root cause
feign.FeignException$BadRequest: [400 Bad Request] during [POST] to https call [AuthService#authenticate(String,String,String,String)]:
[
{
"error": "invalid_request",
"error_description": "Missing form parameter: grant_type"
}
]
Option2:
Beobachtungen: Versuchen Sie Folgendes, um das Problem von Grant_type zu beheben. Aber kein Glück bevorzugt: < /p>

Code: Select all

@PostMapping(
value = "/oauth/token",
// consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
consumes = {"application/x-www-form-urlencoded"},
// produces = MediaType.APPLICATION_JSON_VALUE,
produces = {"application/json"}
)
< /code>
Ausgabe: < /p>
02:29:32.547 [http-nio-8090-exec-4] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] -
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
[Request processing failed; nested exception is feign.FeignException$BadRequest:
[400 Bad Request] during [POST] to [https]:
[
{
"error": "invalid_request",
"error_description": "Missing form parameter: grant_type"
}
]
] with root cause
feign.FeignException$BadRequest: [400 Bad Request] during [POST] to [https:] [AuthService#authenticate(String,String,String,String)]:
[
{
"error": "invalid_request",
"error_description": "Missing form parameter: grant_type"
}
]
at feign.FeignException.clientErrorStatus(FeignException.java:213) ~[feign-core-11.8.jar!/:?]

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post