Tests for @Enable/@ComponentScan without @Configuration

Issue: SPR-10660
This commit is contained in:
Juergen Hoeller 2016-01-25 20:32:45 +01:00
parent c95dfca726
commit d18b3f049a
2 changed files with 2 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@ -96,13 +96,11 @@ public class EnableAspectJAutoProxyTests {
}
@Configuration
@ComponentScan("example.scannable")
@EnableAspectJAutoProxy
static class ConfigWithJdkProxy {
}
@Configuration
@ComponentScan("example.scannable")
@EnableAspectJAutoProxy(proxyTargetClass = true)
static class ConfigWithCglibProxy {

View File

@ -107,7 +107,7 @@ public class EnableAsyncTests {
@Test
public void customAsyncAnnotationIsPropagated() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(CustomAsyncAnnotationConfig.class);
ctx.register(CustomAsyncAnnotationConfig.class, CustomAsyncBean.class);
ctx.refresh();
Object bean = ctx.getBean(CustomAsyncBean.class);
@ -200,14 +200,8 @@ public class EnableAsyncTests {
}
@Configuration
@EnableAsync(annotation = CustomAsync.class)
static class CustomAsyncAnnotationConfig {
@Bean
public CustomAsyncBean asyncBean() {
return new CustomAsyncBean();
}
}