Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
git test
Jeesite4
Commits
c310fbdc
Commit
c310fbdc
authored
3 years ago
by
jeesite
Browse files
Options
Download
Email Patches
Plain Diff
升级 shiro 1.8.0 其它版本也可参照此提交进行升级
parent
51e1f4cb
v4.0_dev
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/src/main/java/com/jeesite/modules/config/ShiroConfig.java
+11
-0
...src/main/java/com/jeesite/modules/config/ShiroConfig.java
parent/pom.xml
+1
-1
parent/pom.xml
with
12 additions
and
1 deletion
+12
-1
modules/core/src/main/java/com/jeesite/modules/config/ShiroConfig.java
+
11
-
0
View file @
c310fbdc
...
...
@@ -13,6 +13,7 @@ import org.apache.shiro.cas.CasSubjectFactory;
import
org.apache.shiro.realm.Realm
;
import
org.apache.shiro.spring.LifecycleBeanPostProcessor
;
import
org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor
;
import
org.apache.shiro.web.filter.InvalidRequestFilter
;
import
org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
...
...
@@ -108,6 +109,15 @@ public class ShiroConfig {
private
UserFilter
shiroUserFilter
()
{
return
new
UserFilter
();
}
/**
* 非法请求过滤器
*/
private
InvalidRequestFilter
invalidRequestFilter
()
{
InvalidRequestFilter
bean
=
new
InvalidRequestFilter
();
bean
.
setBlockNonAscii
(
false
);
return
bean
;
}
/**
* Shiro认证过滤器
...
...
@@ -126,6 +136,7 @@ public class ShiroConfig {
filters
.
put
(
"perms"
,
shiroPermsFilter
());
filters
.
put
(
"roles"
,
shiroRolesFilter
());
filters
.
put
(
"user"
,
shiroUserFilter
());
filters
.
put
(
"invalidRequest"
,
invalidRequestFilter
());
FilterChainDefinitionMap
chains
=
new
FilterChainDefinitionMap
();
chains
.
setFilterChainDefinitions
(
Global
.
getProperty
(
"shiro.filterChainDefinitions"
));
chains
.
setDefaultFilterChainDefinitions
(
Global
.
getProperty
(
"shiro.defaultFilterChainDefinitions"
));
...
...
This diff is collapsed.
Click to expand it.
parent/pom.xml
+
1
-
1
View file @
c310fbdc
...
...
@@ -34,7 +34,7 @@
<mybatis-spring.version>
1.3.1
</mybatis-spring.version>
<jsqlparser.version>
1.1
</jsqlparser.version>
<druid.version>
1.1.10
</druid.version>
<shiro.version>
1.
4.2
</shiro.version>
<shiro.version>
1.
8.0
</shiro.version>
<beetl.version>
2.7-SNAPSHOT
</beetl.version>
<ehcache-web.version>
2.0.4
</ehcache-web.version>
<quartz.version>
2.2.3
</quartz.version>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help