提交 32ae3ba5 编写于 作者: 7 7wc98#14

Modify

上级 2695e2d1
......@@ -31,6 +31,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.sessionManagement()
.maximumSessions(1).maxSessionsPreventsLogin(true);
http.authorizeRequests()
.antMatchers("/campus").permitAll()
.antMatchers("/aboutLearn").permitAll()
......@@ -52,7 +54,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.permitAll()
.and()
.logout()
.logoutSuccessUrl("/campus")
.logoutSuccessUrl("/campus").invalidateHttpSession(true)
.permitAll();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册