Polishing
This commit is contained in:
parent
666037ec5c
commit
cc379f1cc7
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -70,7 +70,9 @@ public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
protected Object[] getAdvicesAndAdvisorsForBean(Class<?> beanClass, String beanName, @Nullable TargetSource targetSource) {
|
protected Object[] getAdvicesAndAdvisorsForBean(
|
||||||
|
Class<?> beanClass, String beanName, @Nullable TargetSource targetSource) {
|
||||||
|
|
||||||
List<Advisor> advisors = findEligibleAdvisors(beanClass, beanName);
|
List<Advisor> advisors = findEligibleAdvisors(beanClass, beanName);
|
||||||
if (advisors.isEmpty()) {
|
if (advisors.isEmpty()) {
|
||||||
return DO_NOT_PROXY;
|
return DO_NOT_PROXY;
|
||||||
|
|
|
@ -563,14 +563,11 @@ class ConfigurationClassEnhancer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
((Factory) fbProxy).setCallback(0, new MethodInterceptor() {
|
((Factory) fbProxy).setCallback(0, (MethodInterceptor) (obj, method, args, proxy) -> {
|
||||||
@Override
|
|
||||||
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
|
|
||||||
if (method.getName().equals("getObject") && args.length == 0) {
|
if (method.getName().equals("getObject") && args.length == 0) {
|
||||||
return beanFactory.getBean(beanName);
|
return beanFactory.getBean(beanName);
|
||||||
}
|
}
|
||||||
return proxy.invoke(factoryBean, args);
|
return proxy.invoke(factoryBean, args);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return fbProxy;
|
return fbProxy;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2012 the original author or authors.
|
* Copyright 2002-2018 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -24,18 +24,18 @@ import org.springframework.core.task.TaskExecutor;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapter that takes a Spring {@link org.springframework.core.task.TaskExecutor})
|
* Adapter that takes a Spring {@link org.springframework.core.task.TaskExecutor}
|
||||||
* and exposes a full {@code java.util.concurrent.ExecutorService} for it.
|
* and exposes a full {@code java.util.concurrent.ExecutorService} for it.
|
||||||
*
|
*
|
||||||
* <p>This is primarily for adapting to client components that communicate via the
|
* <p>This is primarily for adapting to client components that communicate via the
|
||||||
* {@code java.util.concurrent.ExecutorService} API. It can also be used as
|
* {@code java.util.concurrent.ExecutorService} API. It can also be used as
|
||||||
* common ground between a local Spring {@code TaskExecutor} backend and a
|
* common ground between a local Spring {@code TaskExecutor} backend and a
|
||||||
* JNDI-located {@code ManagedExecutorService} in a Java EE 6 environment.
|
* JNDI-located {@code ManagedExecutorService} in a Java EE 7 environment.
|
||||||
*
|
*
|
||||||
* <p><b>NOTE:</b> This ExecutorService adapter does <em>not</em> support the
|
* <p><b>NOTE:</b> This ExecutorService adapter does <em>not</em> support the
|
||||||
* lifecycle methods in the {@code java.util.concurrent.ExecutorService} API
|
* lifecycle methods in the {@code java.util.concurrent.ExecutorService} API
|
||||||
* ("shutdown()" etc), similar to a server-wide {@code ManagedExecutorService}
|
* ("shutdown()" etc), similar to a server-wide {@code ManagedExecutorService}
|
||||||
* in a Java EE 6 environment. The lifecycle is always up to the backend pool,
|
* in a Java EE 7 environment. The lifecycle is always up to the backend pool,
|
||||||
* with this adapter acting as an access-only proxy for that target pool.
|
* with this adapter acting as an access-only proxy for that target pool.
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
Loading…
Reference in New Issue