提交 7f1d5d79 编写于 作者: R Rossen Stoyanchev

Polish

上级 c6a2c894
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册