I have a controller class with a few methods one of which is a method that is supposed to take POST requests and create a new Account with the JSON from the body of that POS
So I changed @Requestbodys to a single @RequestBody like andreim said, it fixed my bad request error but for some reason the account username would always be null when the post request went through.
I messed with a few thing, eventually leading me to swap the order of the Account constructor parameters from
Account(String username, String password)
to
Account(String password, String username)
This worked for some reason and let me make my post request with the proper values. Latter out of curiosity I decided to swap the parameters back to Account(String username, String password)
and the post request still works as intended.
I have no idea what I did to get rid of the null problem but it seams to have worked.