Skip to content

Commit 22e37aa

Browse files
committed
Polish .aop copy of SpringConfiguredBDP
Add 'infrastructure' bean role to follow suit with original .context SCPDP Encountered while working on SPR-7888 (@EnableSpringConfigured)
1 parent e90c7ea commit 22e37aa

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

org.springframework.aop/src/main/java/org/springframework/aop/config/SpringConfiguredBeanDefinitionParser.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2007 the original author or authors.
2+
* Copyright 2002-2011 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,13 +26,13 @@
2626

2727
/**
2828
* {@link BeanDefinitionParser} responsible for parsing the
29-
* <code>&lt;aop:spring-configured/&gt;</code> tag.
29+
* {@code <aop:spring-configured/>} tag.
3030
*
3131
* <p><b>NOTE:</b> This is essentially a duplicate of Spring 2.5's
3232
* {@link org.springframework.context.config.SpringConfiguredBeanDefinitionParser}
33-
* for the <code>&lt;context:spring-configured/&gt;</code> tag, mirrored here
34-
* for compatibility with Spring 2.0's <code>&lt;aop:spring-configured/&gt;</code>
35-
* tag (avoiding a direct dependency on the context package).
33+
* for the {@code <context:spring-configured/>} tag, mirrored here for compatibility with
34+
* Spring 2.0's {@code <aop:spring-configured/>} tag (avoiding a direct dependency on the
35+
* context package).
3636
*
3737
* @author Rob Harrop
3838
* @author Juergen Hoeller
@@ -55,6 +55,7 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
5555
RootBeanDefinition def = new RootBeanDefinition();
5656
def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME);
5757
def.setFactoryMethodName("aspectOf");
58+
def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
5859
def.setSource(parserContext.extractSource(element));
5960
parserContext.registerBeanComponent(new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME));
6061
}

org.springframework.context/src/main/java/org/springframework/context/config/SpringConfiguredBeanDefinitionParser.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2011 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
2626

2727
/**
2828
* {@link BeanDefinitionParser} responsible for parsing the
29-
* <code>&lt;context:spring-configured/&gt;</code> tag.
29+
* {@code <context:spring-configured/>} tag.
3030
*
3131
* @author Juergen Hoeller
3232
* @since 2.5
@@ -48,8 +48,6 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
4848
RootBeanDefinition def = new RootBeanDefinition();
4949
def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME);
5050
def.setFactoryMethodName("aspectOf");
51-
52-
// Mark as infrastructure bean and attach source location.
5351
def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
5452
def.setSource(parserContext.extractSource(element));
5553
parserContext.registerBeanComponent(new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME));

0 commit comments

Comments
 (0)