在春季启动时停止响应的默认jsonification?

时间:2016-01-26 13:48:16

标签: java spring-boot

这是我的控制器方法

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?

0 个答案:

没有答案