Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hiwepy/shiro-biz-spring-boot-starter
shiro-biz-spring-boot-starter
https://github.com/hiwepy/shiro-biz-spring-boot-starter
shiro spring-boot spring-boot-starter
Last synced: 6 days ago
JSON representation
shiro-biz-spring-boot-starter
- Host: GitHub
- URL: https://github.com/hiwepy/shiro-biz-spring-boot-starter
- Owner: hiwepy
- License: apache-2.0
- Created: 2017-09-13T12:09:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-08T14:47:34.000Z (4 months ago)
- Last Synced: 2024-09-08T16:54:20.839Z (4 months ago)
- Topics: shiro, spring-boot, spring-boot-starter
- Language: Java
- Homepage:
- Size: 443 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shiro-biz-spring-boot-starter
shiro starter for spring boot### 说明
> 基于 Shiro 的 Spring Boot Starter 实现
1. Apache Shiro是一个强大且易用的Java安全框架,执行身份验证、授权、密码学和会话管理。使用Shiro的易于理解的API,您可以快速、轻松地获得任何应用程序,从最小的移动应用程序到最大的网络和企业应用程序。
2. shiro-biz-spring-boot-starter 是在引用 [shiro-spring-boot-starter](http://mvnrepository.com/artifact/org.apache.shiro/shiro-spring-boot-starter "shiro-spring-boot-starter")、[shiro-spring-boot-web-starter](http://mvnrepository.com/artifact/org.apache.shiro/shiro-spring-boot-web-starter "shiro-spring-boot-web-starter") 的基础上整合 [shiro-biz](https://github.com/vindell/shiro-biz "shiro-biz") 的 Spring Boot 整合;
3. 完成了基于Shiro的权限的控制### Maven
``` xml
com.github.hiwepy
shiro-biz-spring-boot-starter
${project.version}```
### 配置参考
> application.yml
``` yml
################################################################################################################
###Shiro 权限控制基本配置:
################################################################################################################
shiro:
annotations:
enabled: true
proxy-target-class: true
authentication-caching-enabled: false
authentication-cache-name: SHIRO-AUTHC
authorization-caching-enabled: false
authorization-cache-name: SHIRO-AUTHZ
caching-enabled: false
cache:
type: ehcache
enabled: true
kaptcha:
enabled: true
retry-times-when-access-denied: 3
failure-url: /error
http:
header:
access-control-allow-methods: PUT,POST,GET,DELETE,OPTIONS
jwt:
enabled: true
login-url: /authz/login/slogin
redirect-url: /authz/login/index
success-url: /index
session-creation-enabled: false
session-validation-scheduler-enabled: false
session-validation-interval: 20000
session-stateless: true
session-storage-enabled: false
session-timeout: 1800000
unauthorized-url: /error
user-native-session-manager: false
web:
enabled: true
filter-chain-definition-map:
'[/]' : anon
'[/**/favicon.ico]' : anon
'[/webjars/**]' : anon
'[/assets/**]' : anon
'[/error*]' : anon
'[/logo/**]' : anon
'[/swagger-ui.html**]' : anon
'[/swagger-resources/**]' : anon
'[/v2/**]' : anon
'[/kaptcha*]' : anon
'[/admin]' : anon
'[/admin/assets/**]' : anon
'[/admin/applications]' : anon
'[/admin/applications/**]' : anon
'[/admin/notifications]' : anon
'[/admin/notifications/**]' : anon
'[/admin/instances]' : anon
'[/admin/instances/**]' : anon
'[/sockets/**]' : anon
'[/expiry]' : cros,withinExpiry
'[/authz/login/slogin]' : cros,authc
'[/logout]' : logout
```### Sample
[https://github.com/vindell/spring-boot-starter-samples/tree/master/spring-boot-sample-shiro-biz](https://github.com/vindell/spring-boot-starter-samples/tree/master/spring-boot-sample-shiro-biz "spring-boot-sample-shiro-biz")
### 参考资料
http://shiro.apache.org/documentation.html
http://jinnianshilongnian.iteye.com/blog/2018398