Caching annotations on interface methods with CGLIB proxies

Issue: SPR-15271
This commit is contained in:
Juergen Hoeller
2017-04-26 18:16:47 +02:00
parent 6c43d14a77
commit 8b50f887db
3 changed files with 25 additions and 9 deletions

View File

@@ -21,7 +21,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -180,7 +179,7 @@ public class CacheReproTests {
assertSame(tb, cache.get("tb1").get());
}
@Test @Ignore // TODO
@Test
public void spr15271FindsOnInterfaceWithCglibProxy() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Spr15271ConfigB.class);
Spr15271Interface bean = context.getBean(Spr15271Interface.class);

View File

@@ -246,8 +246,7 @@ public class AnnotationCacheOperationSourceTests {
@Test
public void cacheConfigFromInterface() {
assertNull(getOps(InterfaceCacheConfig.class, "interfaceCacheConfig"));
Collection<CacheOperation> ops = getOps(CacheConfigIfc.class, "interfaceCacheConfig");
Collection<CacheOperation> ops = getOps(InterfaceCacheConfig.class, "interfaceCacheConfig");
CacheOperation cacheOperation = ops.iterator().next();
assertSharedConfig(cacheOperation, "", "", "", "myCache");
}