=====================================
注解式权限管理框架
<dependency>
<groupId>com.github.sunbufu</groupId>
<artifactId>authorize-starter</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>
implement authorize method
@Override
public boolean authorize(String[] access, HttpSession session) {
//do your authorize logic
}
implement authorizeFail method
@Override
public void authorizeFail(HttpServletRequest request, HttpServletResponse response) {
//do something
}
@Access("manage")
@RequestMapping("index")
public String index() {
return "this is index page";
}