wangbing 6 years ago
parent 2099141379
commit a64e2f07ad

@ -22,8 +22,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
private String[] excluded; private String[] excluded;
@Value("${r"${web.url.auth.included}"}") @Value("${r"${web.url.auth.included}"}")
private String[] included; private String[] included;
@Value("${r"${web.url.login}"}")
private String login;
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
@ -32,7 +30,6 @@ 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();

@ -18,8 +18,6 @@ web.welcome.page = /login.htm
web.url.auth.included = /** web.url.auth.included = /**
# 不需要验证授权, 或该请求有自己的验证机制 # 不需要验证授权, 或该请求有自己的验证机制
web.url.auth.excluded = /favicon.ico,/static/**,/api,/login.htm web.url.auth.excluded = /favicon.ico,/static/**,/api,/login.htm
# 默认的登录URL
web.url.login = /login.htm
# 日志配置 # 日志配置
logging.path=D:// logging.path=D://
logging.levels=DEBUG logging.levels=DEBUG

@ -19,8 +19,6 @@ web.welcome.page = /index.htm
web.url.auth.included = /** web.url.auth.included = /**
# 不需要验证授权, 或该请求有自己的验证机制 # 不需要验证授权, 或该请求有自己的验证机制
web.url.auth.excluded = /favicon.ico,/static/**,/api,/login.htm web.url.auth.excluded = /favicon.ico,/static/**,/api,/login.htm
# 默认的登录URL
web.url.login = /login.htm
# 日志配置 # 日志配置
logging.path = /root/ logging.path = /root/
logging.levels=INFO logging.levels=INFO

Loading…
Cancel
Save

Powered by TurnKey Linux.