SpringBoot整合Filter

1
2
3
4
5
PrintWriter out  = resp.getWriter();
String username = req.getParameter("username");
UserService userService = new UserServiceImpl();
User user = userService.getUser(username);
String str = JSON.toJSONString(user);

​ out.write(str);