带有rememberMe的SpringSocialConfigurer导致java.lang.IllegalStateException:securityBuilder不能为null

时间:2016-06-15 15:49:04

标签: spring spring-security spring-social

我有我的春季社交配置

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)

0 个答案:

没有答案