[
https://issues.apache.org/jira/browse/SHIRO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
George Cao updated SHIRO-890:
-----------------------------
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
{color:#000000}DefaultAdvisorAutoProxyCreator. In this situation, there will
be two proxy creators in the same context, which leads to methods be proxied
twice also . {color}
{color:#000000}The fix may remove the type value of the
@ConditionalOnMissingBean.{color}
{code:java}
@Bean
@DependsOn("lifecycleBeanPostProcessor")
@ConditionalOnMissingBean(name = AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME)
@Override
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
return super.defaultAdvisorAutoProxyCreator();
}
{code}
was:
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
{color:#000000}DefaultAdvisorAutoProxyCreator. In this situation, there will
be two proxy creator in the same context, which leads to methods be proxied
twice also . {color}
{color:#000000}The fix may remove the type value of the
@ConditionalOnMissingBean.{color}
{code:java}
@Bean
@DependsOn("lifecycleBeanPostProcessor")
@ConditionalOnMissingBean(name = AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME)
@Override
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
return super.defaultAdvisorAutoProxyCreator();
}
{code}
> Avoid another proxy creator when @EnableAspectJAutoProxy enabled
> ----------------------------------------------------------------
>
> Key: SHIRO-890
> URL: https://issues.apache.org/jira/browse/SHIRO-890
> Project: Shiro
> Issue Type: Improvement
> Components: Integration: Spring
> Affects Versions: 1.9.1
> Reporter: George Cao
> Assignee: Les Hazlewood
> Priority: Critical
>
> 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
> {color:#000000}DefaultAdvisorAutoProxyCreator. In this situation, there will
> be two proxy creators in the same context, which leads to methods be proxied
> twice also . {color}
> {color:#000000}The fix may remove the type value of the
> @ConditionalOnMissingBean.{color}
> {code:java}
> @Bean
> @DependsOn("lifecycleBeanPostProcessor")
> @ConditionalOnMissingBean(name = AopConfigUtils.AUTO_PROXY_CREATOR_BEAN_NAME)
> @Override
> public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
> return super.defaultAdvisorAutoProxyCreator();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]