|
|
|
@ -108,22 +108,23 @@ abstract class ConfigurationClassUtils { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> orderAttributes = metadata.getAnnotationAttributes(Order.class.getName()); |
|
|
|
|
if (orderAttributes != null) { |
|
|
|
|
beanDef.setAttribute(ORDER_ATTRIBUTE, orderAttributes.get(AnnotationUtils.VALUE)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isFullConfigurationCandidate(metadata)) { |
|
|
|
|
beanDef.setAttribute(CONFIGURATION_CLASS_ATTRIBUTE, CONFIGURATION_CLASS_FULL); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
else if (isLiteConfigurationCandidate(metadata)) { |
|
|
|
|
beanDef.setAttribute(CONFIGURATION_CLASS_ATTRIBUTE, CONFIGURATION_CLASS_LITE); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// It's a full or lite configuration candidate... Let's determine the order value, if any.
|
|
|
|
|
Map<String, Object> orderAttributes = metadata.getAnnotationAttributes(Order.class.getName()); |
|
|
|
|
if (orderAttributes != null) { |
|
|
|
|
beanDef.setAttribute(ORDER_ATTRIBUTE, orderAttributes.get(AnnotationUtils.VALUE)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -203,6 +204,7 @@ abstract class ConfigurationClassUtils { |
|
|
|
|
* @param beanDef the bean definition to check |
|
|
|
|
* @return the {@link @Order} annotation value on the configuration class, |
|
|
|
|
* or {@link Ordered#LOWEST_PRECEDENCE} if none declared |
|
|
|
|
* @since 4.2 |
|
|
|
|
*/ |
|
|
|
|
public static int getOrder(BeanDefinition beanDef) { |
|
|
|
|
Integer order = (Integer) beanDef.getAttribute(ORDER_ATTRIBUTE); |
|
|
|
|