弹簧控制器
@RequestMapping(value = "/saveNamedDrivers", method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_VALUE)
public ModelAndView saveNamedDrivers(QuotationDO user, HttpServletRequest request, HttpSession session,HttpServletResponse response) {
//public String signUp(@RequestBody QuotationDO user){
System.out.println("1234567890");
System.out.println((user));
return new ModelAndView("premium/premium");
}
index.js
$http({
method: 'POST',
url: CONTEXT_PATH + 'saveNamedDrivers',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
data:JSON.stringify($scope.user)
})
如何访问java中的DO对象我获取了print语句的空数据?