这是我的控制器方法
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
这是我的相关pom
@RequestMapping(value = "/employee", method = RequestMethod.GET)
public ModelAndView listEmployees(HttpServletRequest request) {
List<Employee> employees = employeeService.getList();
return new ModelAndView("hello").addObject("employees", employees);
}
我看到员工对象自动转换为json
然后我试了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
但结果仍然转换为json?