close

[Solved] Spring-Boot : 400 Bad request error even when parameter is present

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Spring-Boot : 400 Bad request error even when parameter is present in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Spring-Boot : 400 Bad request error even when parameter is present Error Occurs?

Today I am facing the following error Spring-Boot : 400 Bad request error even when parameter is present in Java.

How To Solve Spring-Boot : 400 Bad request error even when parameter is present Error ?

  1. How To Solve Spring-Boot : 400 Bad request error even when parameter is present Error ?

    To Solve Spring-Boot : 400 Bad request error even when parameter is present Error So I found a solution to this problem..The issue was with postman when I remove content-type header it works fine,Postman insert header by itself

  2. Spring-Boot : 400 Bad request error even when parameter is present

    To Solve Spring-Boot : 400 Bad request error even when parameter is present Error So I found a solution to this problem..The issue was with postman when I remove content-type header it works fine,Postman insert header by itself

Solution 1

So I found a solution to this problem..The issue was with postman when I remove content-type header it works fine,Postman insert header by itself

Solution 2

You are using form data with a simple request param, that’s not how it works. If you are trying to send the json and file together, make sure “childFile”‘s content type is “application/json” and receive it by request body with annotation @RequestPart, and mapping produces should be “multipart/form-data”, then it will do the job.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read