Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
5fde06bb
Commit
5fde06bb
authored
Nov 04, 2019
by
dqjdda
Browse files
2.3 优化
parent
474e5688
Changes
2
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java
View file @
5fde06bb
...
@@ -6,6 +6,7 @@ import org.springframework.web.servlet.config.annotation.CorsRegistry;
...
@@ -6,6 +6,7 @@ import org.springframework.web.servlet.config.annotation.CorsRegistry;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
java.nio.file.Paths
;
/**
/**
* WebMvcConfigurer
* WebMvcConfigurer
...
...
eladmin-system/src/main/java/me/zhengjie/modules/security/config/SecurityConfig.java
View file @
5fde06bb
...
@@ -88,7 +88,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -88,7 +88,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
HandlerMethod
handlerMethod
=
infoEntry
.
getValue
();
HandlerMethod
handlerMethod
=
infoEntry
.
getValue
();
AnonymousAccess
anonymousAccess
=
handlerMethod
.
getMethodAnnotation
(
AnonymousAccess
.
class
);
AnonymousAccess
anonymousAccess
=
handlerMethod
.
getMethodAnnotation
(
AnonymousAccess
.
class
);
PreAuthorize
preAuthorize
=
handlerMethod
.
getMethodAnnotation
(
PreAuthorize
.
class
);
PreAuthorize
preAuthorize
=
handlerMethod
.
getMethodAnnotation
(
PreAuthorize
.
class
);
if
(
null
!=
preAuthorize
&&
preAuthorize
.
value
().
contains
(
"anonymous"
))
{
if
(
null
!=
preAuthorize
&&
preAuthorize
.
value
().
toLowerCase
().
contains
(
"anonymous"
))
{
anonymousUrls
.
addAll
(
infoEntry
.
getKey
().
getPatternsCondition
().
getPatterns
());
anonymousUrls
.
addAll
(
infoEntry
.
getKey
().
getPatternsCondition
().
getPatterns
());
}
else
if
(
null
!=
anonymousAccess
&&
null
==
preAuthorize
)
{
}
else
if
(
null
!=
anonymousAccess
&&
null
==
preAuthorize
)
{
anonymousUrls
.
addAll
(
infoEntry
.
getKey
().
getPatternsCondition
().
getPatterns
());
anonymousUrls
.
addAll
(
infoEntry
.
getKey
().
getPatternsCondition
().
getPatterns
());
...
...
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