Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-890

Avoid another proxy creator when @EnableAspectJAutoProxy enabled

    XMLWordPrintableJSON

Details

    Description

      There is already an issue created https://issues.apache.org/jira/projects/SHIRO/issues/SHIRO-804.

      But when @EnableAspectJAutoProxy enabled, spring actually creates an instance of  AnnotationAwareAspectJAutoProxyCreator but not DefaultAdvisorAutoProxyCreator.  In this situation, there will be two proxy creators in the same context, which leads to methods be proxied twice also .

      The fix may remove the type value of the @ConditionalOnMissingBean.

      @Bean
      @DependsOn("lifecycleBeanPostProcessor")
      @ConditionalOnMissingBean(name = AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME)
      @Override
      public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
          return super.defaultAdvisorAutoProxyCreator();
      }
       

      Attachments

        Activity

          People

            lhazlewood Les Hazlewood
            georgecao George Cao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 20m
                3h 20m