Angular:
function(team, team) { return this.http.put('/api/tradeTeam/', team,
team2).map(res => res.json()); }
Spring/Hibernate
@RestController
@Controller
public class MainController {
@RequestMapping(value = "/api/tradeTeam/", method = RequestMethod.PUT)
public List<Team> TradeTeam(@RequestBody Team team, Team team2) {
return teamService.TradeTeam(team, team2);
}
}
What am I doing wrong? My Service is set up correctly.
My error is:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
putrequest , the third parameter is ofoptions. you are passing your parameter there which is wrong .