Browse Source

Reduce logging level of EventListenerMethodProcessor

Reduce logging level when no target annotation is found a on bean. For
consistency, update ScheduledAnnotationBeanPostProcessor and
JmsListenerAnnotationBeanPostProcessor that define the same log
statement.

Issue: SPR-12574
pull/745/merge
Stephane Nicoll 11 years ago
parent
commit
dff2a3d180
  1. 4
      spring-context/src/main/java/org/springframework/context/event/EventListenerMethodProcessor.java
  2. 4
      spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java
  3. 4
      spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerAnnotationBeanPostProcessor.java

4
spring-context/src/main/java/org/springframework/context/event/EventListenerMethodProcessor.java

@ -128,8 +128,8 @@ public class EventListenerMethodProcessor implements SmartInitializingSingleton, @@ -128,8 +128,8 @@ public class EventListenerMethodProcessor implements SmartInitializingSingleton,
}
if (annotatedMethods.isEmpty()) {
this.nonAnnotatedClasses.add(type);
if (logger.isDebugEnabled()) {
logger.debug("No @EventListener annotations found on bean class: " + type);
if (logger.isTraceEnabled()) {
logger.trace("No @EventListener annotations found on bean class: " + type);
}
}
else {

4
spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java

@ -231,8 +231,8 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor, @@ -231,8 +231,8 @@ public class ScheduledAnnotationBeanPostProcessor implements BeanPostProcessor,
});
if (annotatedMethods.isEmpty()) {
this.nonAnnotatedClasses.add(targetClass);
if (logger.isDebugEnabled()) {
logger.debug("No @Scheduled annotations found on bean class: " + bean.getClass());
if (logger.isTraceEnabled()) {
logger.trace("No @Scheduled annotations found on bean class: " + bean.getClass());
}
}
else {

4
spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerAnnotationBeanPostProcessor.java

@ -208,8 +208,8 @@ public class JmsListenerAnnotationBeanPostProcessor @@ -208,8 +208,8 @@ public class JmsListenerAnnotationBeanPostProcessor
});
if (annotatedMethods.isEmpty()) {
this.nonAnnotatedClasses.add(bean.getClass());
if (logger.isDebugEnabled()) {
logger.debug("No @JmsListener annotations found on bean class: " + bean.getClass());
if (logger.isTraceEnabled()) {
logger.trace("No @JmsListener annotations found on bean class: " + bean.getClass());
}
}
else {

Loading…
Cancel
Save