Polish
This commit is contained in:
parent
c6a2c89408
commit
7f1d5d790e
|
@ -267,10 +267,6 @@ public abstract class AbstractMethodMessageHandler<T>
|
|||
|
||||
|
||||
private void initHandlerMethods() {
|
||||
if (this.applicationContext == null) {
|
||||
logger.warn("No ApplicationContext available for detecting beans with message handling methods.");
|
||||
return;
|
||||
}
|
||||
if (this.handlers != null) {
|
||||
for (Object handler : this.handlers) {
|
||||
detectHandlerMethods(handler);
|
||||
|
@ -281,6 +277,11 @@ public abstract class AbstractMethodMessageHandler<T>
|
|||
logger.warn("[" + getBeanName() + "] Auto-detection of message handling methods is off.");
|
||||
return;
|
||||
}
|
||||
if (this.applicationContext == null) {
|
||||
logger.warn("No ApplicationContext available " +
|
||||
"for auto-detection of beans with message handling methods.");
|
||||
return;
|
||||
}
|
||||
for (String beanName : this.applicationContext.getBeanNamesForType(Object.class)) {
|
||||
if (!beanName.startsWith(SCOPED_TARGET_NAME_PREFIX)) {
|
||||
Class<?> beanType = null;
|
||||
|
|
Loading…
Reference in New Issue