tom.xu@informa.com hace 2 años
padre
commit
d5a6da4a51
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      src/main/java/ieven/server/webapp/api/UserController.java

+ 3 - 2
src/main/java/ieven/server/webapp/api/UserController.java

@@ -6,11 +6,10 @@ import ieven.server.webapp.service.user.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpSession;
 
-@RestController
 @RequestMapping("")
 public class UserController {
   @Autowired UserService userService;
@@ -21,6 +20,7 @@ public class UserController {
    * @return
    */
   @RequestMapping("user/login")
+  @ResponseBody
   public Mapped loginAccount(@RequestBody User user, HttpSession session) {
     User user2 = userService.loginAccount(user);
     if (user2 != null) {
@@ -36,6 +36,7 @@ public class UserController {
   }
 
   @RequestMapping("login/out")
+  @ResponseBody
   public Mapped loginout(HttpSession session) {
     session.invalidate();
     return Mapped.OK();