So guys I don't what is going on, I need to add an entry to db table. I created an endpoint that needs as parameter an EnumType called ActionStatisticType but Spring can not map it.
This is the way I'm doing the request in angular:
this.httpService.put(this.serviceUrl, actionType)
This is the request it creates to backend:
This is how I mapped it on spring:
@RequestMapping(method = RequestMethod.PUT)
public void create(@RequestParam ActionStatisticType actionType) {
log.info("#ActionStatisticController.register {}", actionType);
this.service.create(actionType);
}
And this is the error I get:
org.springframework.web.bind.MissingServletRequestParameterException: Required ActionStatisticType parameter 'actionType' is not present
I also tried encapsulating it in an object and setting an attrib name but it didn't work either.
Can you please tell me what I'm doing wrong? Thank you.