update
This commit is contained in:
parent
4b6c92c493
commit
d15f01bf5f
|
|
@ -29,8 +29,9 @@ import org.apache.shiro.subject.Subject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import com.smallchill.common.base.BaseController;
|
import com.smallchill.common.base.BaseController;
|
||||||
|
|
@ -59,7 +60,7 @@ public class LoginController extends BaseController implements Const{
|
||||||
/**
|
/**
|
||||||
* GET 登录
|
* GET 登录
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/login", method = RequestMethod.GET)
|
@GetMapping("/login")
|
||||||
public String login() {
|
public String login() {
|
||||||
if (ShiroKit.isAuthenticated()) {
|
if (ShiroKit.isAuthenticated()) {
|
||||||
return redirect + "/";
|
return redirect + "/";
|
||||||
|
|
@ -71,8 +72,8 @@ public class LoginController extends BaseController implements Const{
|
||||||
* POST 登录
|
* POST 登录
|
||||||
*/
|
*/
|
||||||
@Before(LoginValidator.class)
|
@Before(LoginValidator.class)
|
||||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@PostMapping("/login")
|
||||||
public AjaxResult login(HttpServletRequest request, HttpServletResponse response) {
|
public AjaxResult login(HttpServletRequest request, HttpServletResponse response) {
|
||||||
String account = getParameter("account");
|
String account = getParameter("account");
|
||||||
String password = getParameter("password");
|
String password = getParameter("password");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user