我有我的春季社交配置
http
.authorizeRequests()
.antMatchers("/secured/**").authenticated()
.and()
.formLogin()
.and()
.logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login")
.and()
.httpBasic()
.and()
.apply(new SpringSocialConfigurer())
此时所有工作都很棒,但是当我尝试添加rememberMe()时,最终会以
结束Caused by: java.lang.IllegalStateException: securityBuilder cannot be null
at org.springframework.security.config.annotation.SecurityConfigurerAdapter.getBuilder(SecurityConfigurerAdapter.java:65)
at org.springframework.security.config.annotation.SecurityConfigurerAdapter.and(SecurityConfigurerAdapter.java:54)
at org.springframework.security.config.annotation.SecurityConfigurerAdapter$and.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at my.super.package.SecurityConfigurer.configure(SecurityConfigurer.groovy:89)