Polishing
This commit is contained in:
@@ -93,12 +93,13 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyProcessorSu
|
||||
|
||||
if (bean instanceof Advised advised) {
|
||||
if (!advised.isFrozen() && isEligible(AopUtils.getTargetClass(bean))) {
|
||||
// Add our local Advisor to the existing proxy's Advisor chain...
|
||||
// Add our local Advisor to the existing proxy's Advisor chain.
|
||||
if (this.beforeExistingAdvisors) {
|
||||
advised.addAdvisor(0, this.advisor);
|
||||
}
|
||||
else if (advised.getTargetSource() == AdvisedSupport.EMPTY_TARGET_SOURCE && advised.getAdvisorCount() > 0) {
|
||||
// No target, leave last advisor in place
|
||||
else if (advised.getTargetSource() == AdvisedSupport.EMPTY_TARGET_SOURCE &&
|
||||
advised.getAdvisorCount() > 0) {
|
||||
// No target, leave last Advisor in place and add new Advisor right before.
|
||||
advised.addAdvisor(advised.getAdvisorCount() - 1, this.advisor);
|
||||
return bean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user