SpringSecurity登陆受权出现This object has not been built问题解决

素颜马尾好姑娘i 2022-10-18 12:59 256阅读 0赞

问题

在使用SpringSecurity作登陆受权时,出现了这样的异常:java.lang.IllegalStateException: This object has not been builtjava

  1. @Override
  2. protected void configure(HttpSecurity httpSecurity) throws Exception {
  3. httpSecurity
  4. // 原因
  5. .csrf(Customizer.withDefaults());
  6. ... ...

改成

  1. @Override
  2. protected void configure(HttpSecurity httpSecurity) throws Exception {
  3. httpSecurity
  4. .csrf()
  5. ... ...

发表评论

表情:
评论列表 (有 0 条评论,256人围观)

还没有评论,来说两句吧...

相关阅读