Skip to content

Commit d18b3f0

Browse files
committed
Tests for @Enable/@componentscan without @configuration
Issue: SPR-10660
1 parent c95dfca commit d18b3f0

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -96,13 +96,11 @@ public void withAnnotationOnArgumentAndCglibProxy() {
9696
}
9797

9898

99-
@Configuration
10099
@ComponentScan("example.scannable")
101100
@EnableAspectJAutoProxy
102101
static class ConfigWithJdkProxy {
103102
}
104103

105-
@Configuration
106104
@ComponentScan("example.scannable")
107105
@EnableAspectJAutoProxy(proxyTargetClass = true)
108106
static class ConfigWithCglibProxy {

spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void orderAttributeIsPropagated() {
107107
@Test
108108
public void customAsyncAnnotationIsPropagated() {
109109
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
110-
ctx.register(CustomAsyncAnnotationConfig.class);
110+
ctx.register(CustomAsyncAnnotationConfig.class, CustomAsyncBean.class);
111111
ctx.refresh();
112112

113113
Object bean = ctx.getBean(CustomAsyncBean.class);
@@ -200,14 +200,8 @@ public Thread getThreadOfExecution() {
200200
}
201201

202202

203-
@Configuration
204203
@EnableAsync(annotation = CustomAsync.class)
205204
static class CustomAsyncAnnotationConfig {
206-
207-
@Bean
208-
public CustomAsyncBean asyncBean() {
209-
return new CustomAsyncBean();
210-
}
211205
}
212206

213207

0 commit comments

Comments
 (0)