@RequestMapping(value="getUserById")
@ResponseBody
public User getUserById(int userId){
System.out.println("userId="+userId);
return businessService.getUserById(userId);
}
浏览器调用结果:
Tue Oct 30 13:46:21 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).
No converter found for return value of type: class com.sunlei.springboot.model.User
难道springboot不会做默认的json转换吗?我看maven里面已经导入了jackson的各种包了,还缺什么设置?