Tests for @Enable/@ComponentScan without @Configuration

Issue: SPR-10660
master
Juergen Hoeller 9 years ago
parent c95dfca726
commit d18b3f049a
  1. 4
      spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java
  2. 8
      spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java

@ -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 {

@ -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();
}
}

Loading…
Cancel
Save