Spring Security
  1. Spring Security
  2. SEC-1911

<security:debug/> enables SecurityDebugBeanFactoryPostProcessor which ignores <context:annotation-config/>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      ubuntu 11.10, java 1.6 31

      Description

      <bean id="customBasedAuthenticationProvider" class="com.test.admin.auth.CustomBasedAuthenticationProvider">
      <property name="configBean" ref="annotationBean" />
      </bean>

      <context:annotation-config/>
      <security:debug/>

      <security:authentication-manager>
      <security:authentication-provider ref="customBasedAuthenticationProvider">
      </security:authentication-provider>
      </security:authentication-manager>


      configBean

      @Component("annotationBean")
      @Scope(BeanDefinition.SCOPE_SINGLETON)
      public class AnnotationConfigBean implements InitializingBean {
      @Autowired
      public AutowiredBean bean;

      /* (non-Javadoc)

      • @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
        */
        @Override
        public void afterPropertiesSet() throws Exception { if(bean==null) throw new RuntimeException("noconfigbean"); }

      }

      autowiredBean

      @Component
      public class AutowiredBean {

      }

      when injecting annotationBean into customBasedAuthenticationProvider the @Autowired AutowiredBean is not set on the annotationBean. This occurs only when <security:debug/> is enabled.

        Issue Links

          Activity

          Hide
          Rob Winch added a comment -

          I believe this is a duplicate of SEC-1885. Can you please try the latest snapshot and let me know if this is resolved for you.

          Show
          Rob Winch added a comment - I believe this is a duplicate of SEC-1885 . Can you please try the latest snapshot and let me know if this is resolved for you.
          Hide
          Rob Winch added a comment -

          Resolving as duplicate due to no feedback otherwise

          Show
          Rob Winch added a comment - Resolving as duplicate due to no feedback otherwise

            People

            • Assignee:
              Rob Winch
              Reporter:
              kevin s
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: