From 782ab2803e05269b651480d99f071bfed45bd5e9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 23 Feb 2018 14:51:56 +0000 Subject: [PATCH] Polish documentation regarding target class proxying Closes gh-12196 --- .../boot/autoconfigure/aop/AopAutoConfiguration.java | 6 +++--- .../boot/autoconfigure/aop/AopAutoConfigurationTests.java | 4 ++-- .../src/main/asciidoc/spring-boot-features.adoc | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/aop/AopAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/aop/AopAutoConfiguration.java index 7ff8bc9473..e9ad5cacb2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/aop/AopAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/aop/AopAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 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. @@ -32,8 +32,8 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy; * configuration. *

* The configuration will not be activated if {@literal spring.aop.auto=false}. The - * {@literal proxyTargetClass} attribute will be {@literal false}, by default, but can be - * overridden by specifying {@literal spring.aop.proxyTargetClass=true}. + * {@literal proxyTargetClass} attribute will be {@literal true}, by default, but can be + * overridden by specifying {@literal spring.aop.proxy-target-class=false}. * * @author Dave Syer * @author Josh Long diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java index c00d78d5c5..6828092c21 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java @@ -75,7 +75,7 @@ public class AopAutoConfigurationTests { } @Test - public void aopWithCustomConfiguration() { + public void customConfigurationWithProxyTargetClassDefaultDoesNotDisableProxying() { this.contextRunner.withUserConfiguration(CustomTestConfiguration.class) .run(proxyTargetClassEnabled()); } @@ -101,7 +101,7 @@ public class AopAutoConfigurationTests { }; } - @EnableAspectJAutoProxy(proxyTargetClass = true) + @EnableAspectJAutoProxy @Configuration @Import(TestConfiguration.class) protected static class CustomTestConfiguration { diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 5cc4b2aabb..1904f16ef8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -4575,9 +4575,6 @@ TIP: It is also possible to transparently {spring-reference}integration.html#cache-annotations-evict[evict] data from the cache. -NOTE: If you use the cache infrastructure with beans that are not interface-based, make -sure to enable the `proxyTargetClass` attribute of `@EnableCaching`. - === Supported Cache Providers The cache abstraction does not provide an actual store and relies on abstraction