Polishing
This commit is contained in:
@@ -53,8 +53,8 @@ import org.springframework.util.ClassUtils;
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.5
|
||||
* @see ContextAnnotationAutowireCandidateResolver
|
||||
* @see CommonAnnotationBeanPostProcessor
|
||||
* @see ConfigurationClassPostProcessor
|
||||
* @see CommonAnnotationBeanPostProcessor
|
||||
* @see org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
|
||||
* @see org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor
|
||||
* @see org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
|
||||
@@ -102,7 +102,6 @@ public class AnnotationConfigUtils {
|
||||
public static final String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME =
|
||||
"org.springframework.context.annotation.internalPersistenceAnnotationProcessor";
|
||||
|
||||
|
||||
private static final String PERSISTENCE_ANNOTATION_PROCESSOR_CLASS_NAME =
|
||||
"org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor";
|
||||
|
||||
@@ -155,7 +154,7 @@ public class AnnotationConfigUtils {
|
||||
}
|
||||
}
|
||||
|
||||
Set<BeanDefinitionHolder> beanDefs = new LinkedHashSet<BeanDefinitionHolder>(4);
|
||||
Set<BeanDefinitionHolder> beanDefs = new LinkedHashSet<BeanDefinitionHolder>(8);
|
||||
|
||||
if (!registry.containsBeanDefinition(CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME)) {
|
||||
RootBeanDefinition def = new RootBeanDefinition(ConfigurationClassPostProcessor.class);
|
||||
@@ -202,6 +201,7 @@ public class AnnotationConfigUtils {
|
||||
def.setSource(source);
|
||||
beanDefs.add(registerPostProcessor(registry, def, EVENT_LISTENER_PROCESSOR_BEAN_NAME));
|
||||
}
|
||||
|
||||
if (!registry.containsBeanDefinition(EVENT_LISTENER_FACTORY_BEAN_NAME)) {
|
||||
RootBeanDefinition def = new RootBeanDefinition(DefaultEventListenerFactory.class);
|
||||
def.setSource(source);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,7 @@ import org.springframework.core.Ordered;
|
||||
/**
|
||||
* Default {@link EventListenerFactory} implementation that supports the
|
||||
* regular {@link EventListener} annotation.
|
||||
*
|
||||
* <p>Used as "catch-all" implementation by default.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
@@ -33,15 +34,17 @@ public class DefaultEventListenerFactory implements EventListenerFactory, Ordere
|
||||
|
||||
private int order = LOWEST_PRECEDENCE;
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(int order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return this.order;
|
||||
}
|
||||
|
||||
|
||||
public boolean supportsMethod(Method method) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,8 +44,7 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
* Register {@link EventListener} annotated method as individual {@link ApplicationListener}
|
||||
* instances.
|
||||
* Registers {@link EventListener} methods as individual {@link ApplicationListener} instances.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Juergen Hoeller
|
||||
|
||||
Reference in New Issue
Block a user