I'm using Angularjs and spring mvc 3. I have in my controller class:
@Controller
@RequestMapping(value = "/elprocesses")
public class ELProcessController {
...
@RequestMapping(value = "/elprocess", method = RequestMethod.POST)
public @ResponseBody void save(@RequestBody final Entity01 entity01,
@RequestBody final Entity02 entity02
) {
...
}
ELProcessController.js :
$scope.saveForm = function(selectedname01) {
$http.post('elprocesses/elprocess', {entity01:selectedname01, entity02:selectedname02});
...
}
it doesn't enter in my spring controller method, but when I send only one data with $http.post('elprocesses/elprocess', selectedname01);
and changing my controller class with:
@RequestMapping(value = "/elprocess", method = RequestMethod.POST)
public @ResponseBody void save(@RequestBody final Entity01 entity01)
this works fine,
What am I doing wrong to send entity01 and entity02?