我们有一个 Spring boot 应用程序,在服务器上部署了 Spring security。我们使用 https,但是当重定向到 Spring 默认登录表单时,会使用 http 调用重定向,这会导致 503 服务不可用。我不明白为什么Spring要切换通信协议,有没有办法阻止它?
我们的配置
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/", "/home", "/status", "/actuator").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.permitAll()
.and()
.logout()
.permitAll()
.and()
.csrf()
.disable();
}
要重定向的页面:


登录 :

富国沪深
繁华开满天机
呼啦一阵风
随时随地看视频慕课网APP
相关分类