From 22e37aac444812eab6982a9f658d70656dd6a729 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Mon, 28 Nov 2011 06:57:04 +0000 Subject: [PATCH] Polish .aop copy of SpringConfiguredBDP Add 'infrastructure' bean role to follow suit with original .context SCPDP Encountered while working on SPR-7888 (@EnableSpringConfigured) --- .../config/SpringConfiguredBeanDefinitionParser.java | 11 ++++++----- .../config/SpringConfiguredBeanDefinitionParser.java | 6 ++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java b/org.springframework.aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java index 65668efa88..36c2a9c911 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2011 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. @@ -26,13 +26,13 @@ import org.springframework.beans.factory.xml.ParserContext; /** * {@link BeanDefinitionParser} responsible for parsing the - * <aop:spring-configured/> tag. + * {@code } tag. * *

NOTE: This is essentially a duplicate of Spring 2.5's * {@link org.springframework.context.config.SpringConfiguredBeanDefinitionParser} - * for the <context:spring-configured/> tag, mirrored here - * for compatibility with Spring 2.0's <aop:spring-configured/> - * tag (avoiding a direct dependency on the context package). + * for the {@code } tag, mirrored here for compatibility with + * Spring 2.0's {@code } tag (avoiding a direct dependency on the + * context package). * * @author Rob Harrop * @author Juergen Hoeller @@ -55,6 +55,7 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { RootBeanDefinition def = new RootBeanDefinition(); def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME); def.setFactoryMethodName("aspectOf"); + def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); def.setSource(parserContext.extractSource(element)); parserContext.registerBeanComponent(new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME)); } diff --git a/org.springframework.context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java b/org.springframework.context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java index 3094136710..98e3c3a025 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java +++ b/org.springframework.context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 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. @@ -26,7 +26,7 @@ import org.springframework.beans.factory.xml.ParserContext; /** * {@link BeanDefinitionParser} responsible for parsing the - * <context:spring-configured/> tag. + * {@code } tag. * * @author Juergen Hoeller * @since 2.5 @@ -48,8 +48,6 @@ class SpringConfiguredBeanDefinitionParser implements BeanDefinitionParser { RootBeanDefinition def = new RootBeanDefinition(); def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME); def.setFactoryMethodName("aspectOf"); - - // Mark as infrastructure bean and attach source location. def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); def.setSource(parserContext.extractSource(element)); parserContext.registerBeanComponent(new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME));