ssm纯注解开发,controller返回字符串可以转换为json对象,返回实体类就报错No converter found for return value of type
@RestController
@RequestMapping("/users")
public class UserController {
@Autowired
private UserService userService;
@GetMapping("/{id}")
public Person users(@PathVariable Integer id){
Person p = new Person();
p.setName("abc");
p.setAge(10);
return p;
}
}