Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make POST request -- object attributes are null on arrival #10

Closed
javac9 opened this issue Dec 29, 2017 · 1 comment
Closed

Cannot make POST request -- object attributes are null on arrival #10

javac9 opened this issue Dec 29, 2017 · 1 comment
Assignees
Labels

Comments

@javac9
Copy link

javac9 commented Dec 29, 2017

Hi,

I've written a simple create method for the Employee entity, but attributes of the object received are null:

@RequestMapping(value = "/employees", method = RequestMethod.POST, consumes = MediaTypes.HAL_JSON_VALUE)
public Employee create(Employee employee){
return repository.save(employee);
}

Could you please update the repo with such a simple but working example or at least try to explain what could be the issue here? Thank you very much!

@gregturn
Copy link
Contributor

gregturn commented Feb 3, 2018

The input is missing @RequestBody annotation.

@gregturn gregturn closed this as completed Feb 7, 2019
@gregturn gregturn self-assigned this Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants