|
@ -27,14 +27,13 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|
|
.formLogin().defaultSuccessUrl("/swagger-ui.html").failureUrl("/login") //登录成功之后的跳转
|
|
|
.permitAll()
|
|
|
.and()
|
|
|
.logout()
|
|
|
.logout().logoutSuccessUrl("/login")
|
|
|
.permitAll();
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
|
|
auth
|
|
|
.inMemoryAuthentication()
|
|
|
auth.inMemoryAuthentication()
|
|
|
.withUser(username).password(password).roles("USER");
|
|
|
}
|
|
|
|