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
wwwanlingxiao
mall
Commits
93488364
Commit
93488364
authored
Aug 04, 2020
by
macro
Browse files
Update SecurityConfig.java
parent
5242bbf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
mall-demo/src/main/java/com/macro/mall/demo/config/SecurityConfig.java
View file @
93488364
...
...
@@ -31,7 +31,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
()
//配置权限
// .antMatchers("/").access("hasRole('TEST')")//该路径需要TEST角色
.
antMatchers
(
"/"
).
authenticated
()
//该路径需要登录认证
// .antMatchers("/brand/list").hasAuthority("TEST")//该路径需要TEST权限
.
antMatchers
(
"/**"
).
permitAll
()
.
and
()
//启用基于http的认证
...
...
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