实现对特定角色和特定路径拦截

This commit is contained in:
fjy8018@qq.com
2018-07-06 15:44:45 +08:00
parent 14bdaf5989
commit 0be0ccf113
11 changed files with 226 additions and 173 deletions

View File

@@ -2,9 +2,11 @@ package top.fjy8018.shiro.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 页面导航
*
* @author F嘉阳
* @date 2018/7/6 10:57
*/
@@ -12,7 +14,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
public class NavController {
@RequestMapping("/index")
public String index(){
public String index() {
return "index";
}
@RequestMapping("/admin")
@ResponseBody
public String admin() {
return "admin success";
}
}