请问spring security怎么放行

我想写个小项目 用springboot 然后输入地址和端口号:localhost:8080 就会自动跳转到index.html页。
加了spring security该怎么方行这个呢?http.authorizeRequests()
.antMatchers(“/index.html”).permitAll()
.anyRequest().authenticated();
或者
http.authorizeRequests()
.antMatchers(“/indexl”).permitAll()
.anyRequest().authenticated();
都没什么用。

你没有对 "/" 路径放行

img


访问被拒绝