Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
chongli
/
fun-member
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
822c7bf0
authored
Oct 29, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了静态资源的springsecurity配置
parent
4b6eb8d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
src/main/java/com/boot/security/server/config/SecurityConfig.java
src/main/java/com/boot/security/server/config/SecurityConfig.java
View file @
822c7bf0
...
...
@@ -55,10 +55,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
http
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
http
.
authorizeRequests
()
.
antMatchers
(
"/"
,
"/*.html"
,
"/
favicon.ico"
,
"/css/**"
,
"/js/**
"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
.
antMatchers
(
"/"
,
"/*.html"
,
"/
*.png"
,
"/*.css"
,
"/*.js
"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
"/v2/api-docs/**"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/pages/**"
,
"/druid/**"
,
"/static
s
/**"
)
"/static/**"
)
.
permitAll
().
anyRequest
().
authenticated
();
//http.authorizeRequests().anyRequest().permitAll();
http
.
formLogin
().
loginProcessingUrl
(
"/login"
)
.
successHandler
(
authenticationSuccessHandler
).
failureHandler
(
authenticationFailureHandler
).
and
()
.
exceptionHandling
().
authenticationEntryPoint
(
authenticationEntryPoint
);
...
...
Write
Preview
Markdown
is supported
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