diff --git a/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java index 9995fc5a02..2fad512225 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.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 { diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java index ed7ea99fef..3f04c76db3 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java @@ -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(); - } }