I have the following code in my angularjs
$http({
method : "POST",
url : '/jobseeker',
data : {
"email" : $scope.userdata.uemail,
"firstname" : $scope.userdata.fname,
"lastname" : $scope.userdata.lname,
"password" : $scope.userdata.upassword
}
}).success(function(data) {
console.log(data);
//state.go(to verification page for job seeker
})
I have the following request mapping
@RequestMapping(value = "/jobseeker", method = RequestMethod.POST)
public ResponseEntity signUp(@RequestBody Map<String, Object> parameterMap ) {...}
to accept this data.
Is there any better way to do this? Are there any request message converters which I can include in my pom.xml and simply use @RequestParam annotation to access the keys in the json data?
Note: I am new to spring boot and spring mvc and trying to learn