Skip to content
注解式权限认证
Java
Branch: master
Clone or download
sunbufu
sunbufu add direction
Latest commit 02826ca May 20, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
authorize-core update project version to "1.0.0-RELEASE" May 19, 2018
authorize-demo add direction May 20, 2018
authorize-starter update project version to "1.0.0-RELEASE" May 19, 2018
.gitignore changed groupId May 18, 2018
README.md add direction May 20, 2018
pom.xml update project version to "1.0.0-RELEASE" May 19, 2018

README.md

sunbufu-authorize

=====================================

Maven Central License

注解式权限管理框架

详细说明

1 how to use

1.1 add dependency to pom.xml

<dependency>
    <groupId>com.github.sunbufu</groupId>
    <artifactId>authorize-starter</artifactId>
    <version>1.0.0-RELEASE</version>
</dependency>

1.2 implement com.sunbufu.authorize.authorizecore.service.IAuthorizeService

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
}

1.3 add @Access to requestMapping

@Access("manage")
@RequestMapping("index")
public String index() {
    return "this is index page";
}
You can’t perform that action at this time.