ActionConfig

master
wangbing 6 years ago
parent c6ca01bfc5
commit 725635b003

@ -32,6 +32,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.authorizeRequests() .authorizeRequests()
.antMatchers(excluded).permitAll() .antMatchers(excluded).permitAll()
.antMatchers(included).access("@Authorization.hasPermission(request,authentication)") .antMatchers(included).access("@Authorization.hasPermission(request,authentication)")
.and().formLogin().loginPage(login)
.and().cors() .and().cors()
.and().headers().frameOptions().disable() .and().headers().frameOptions().disable()
.and().csrf().disable(); .and().csrf().disable();
@ -71,8 +72,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
token1.setUserName("admin"); token1.setUserName("admin");
//继承临时Token //继承临时Token
token1.addResourceSet(LocalData.getTempToken()); token1.addResourceSet(LocalData.getTempToken());
//管理员特有资源 //管理员特有资源(这边请用正则表达式)
token1.putResource("/admin/.*"); token1.putResource("/admin/.*\\.htm");
LocalData.setToken(token1); LocalData.setToken(token1);
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.