ActionConfig

master
wangbing 6 years ago
parent c6ca01bfc5
commit 725635b003

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

Loading…
Cancel
Save

Powered by TurnKey Linux.