This commit is contained in:
zhuangqian 2016-09-29 12:18:37 +08:00
parent 4b6c92c493
commit d15f01bf5f

View File

@ -29,8 +29,9 @@ import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.smallchill.common.base.BaseController;
@ -59,7 +60,7 @@ public class LoginController extends BaseController implements Const{
/**
* GET 登录
*/
@RequestMapping(value = "/login", method = RequestMethod.GET)
@GetMapping("/login")
public String login() {
if (ShiroKit.isAuthenticated()) {
return redirect + "/";
@ -71,8 +72,8 @@ public class LoginController extends BaseController implements Const{
* POST 登录
*/
@Before(LoginValidator.class)
@RequestMapping(value = "/login", method = RequestMethod.POST)
@ResponseBody
@PostMapping("/login")
public AjaxResult login(HttpServletRequest request, HttpServletResponse response) {
String account = getParameter("account");
String password = getParameter("password");