@RequiresPermissions 要求subject中必须 含有log:view 权限才能执行方法pageInit()。否则抛出异常AuthorizationException
import org.apache.shiro.authz.annotation.RequiresPermissions; @RequiresPermissions("log:view") public String pageInit() { // }