diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 668b1b17ce..0da351606c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -3,7 +3,6 @@ org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpointAutoConf org.springframework.boot.actuate.autoconfigure.availability.AvailabilityHealthContributorAutoConfiguration org.springframework.boot.actuate.autoconfigure.availability.AvailabilityProbesAutoConfiguration org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration -org.springframework.boot.actuate.autoconfigure.cache.CachesEndpointAutoConfiguration org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive.ReactiveCloudFoundryActuatorAutoConfiguration org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundryActuatorAutoConfiguration org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpointAutoConfiguration diff --git a/spring-boot-project/spring-boot-cache/build.gradle b/spring-boot-project/spring-boot-cache/build.gradle index 109b4210ad..d11d871f95 100644 --- a/spring-boot-project/spring-boot-cache/build.gradle +++ b/spring-boot-project/spring-boot-cache/build.gradle @@ -13,7 +13,7 @@ dependencies { api(project(":spring-boot-project:spring-boot")) api("org.springframework:spring-context-support") - optional(project(":spring-boot-project:spring-boot-actuator")) + optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-data-couchbase")) optional(project(":spring-boot-project:spring-boot-data-redis")) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfiguration.java b/spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfiguration.java similarity index 88% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfiguration.java rename to spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfiguration.java index 85b6108810..f0551fffa9 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfiguration.java +++ b/spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.cache; +package org.springframework.boot.cache.actuate.endpoint.autoconfigure; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.SimpleAutowireCandidateResolver; @@ -27,6 +27,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.cache.actuate.endpoint.CachesEndpoint; import org.springframework.boot.cache.actuate.endpoint.CachesEndpointWebExtension; +import org.springframework.boot.cache.autoconfigure.CacheAutoConfiguration; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; @@ -35,10 +36,10 @@ import org.springframework.context.annotation.Bean; * * @author Johannes Edmeier * @author Stephane Nicoll - * @since 2.1.0 + * @since 4.0.0 */ -@AutoConfiguration(afterName = "org.springframework.boot.cache.autoconfigure.CacheAutoConfiguration") -@ConditionalOnClass({ CacheManager.class, CachesEndpoint.class }) +@AutoConfiguration(after = CacheAutoConfiguration.class) +@ConditionalOnClass({ CacheManager.class, ConditionalOnAvailableEndpoint.class }) @ConditionalOnAvailableEndpoint(CachesEndpoint.class) public class CachesEndpointAutoConfiguration { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/package-info.java b/spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/package-info.java similarity index 90% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/package-info.java rename to spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/package-info.java index 17321db999..b674291b72 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/main/java/org/springframework/boot/actuate/autoconfigure/cache/package-info.java +++ b/spring-boot-project/spring-boot-cache/src/main/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/package-info.java @@ -17,4 +17,4 @@ /** * Auto-configuration for actuator cache concerns. */ -package org.springframework.boot.actuate.autoconfigure.cache; +package org.springframework.boot.cache.actuate.endpoint.autoconfigure; diff --git a/spring-boot-project/spring-boot-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 29caa97163..983f9f64dd 100644 --- a/spring-boot-project/spring-boot-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1,2 @@ +org.springframework.boot.cache.actuate.endpoint.autoconfigure.CachesEndpointAutoConfiguration org.springframework.boot.cache.autoconfigure.CacheAutoConfiguration diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfigurationTests.java b/spring-boot-project/spring-boot-cache/src/test/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfigurationTests.java rename to spring-boot-project/spring-boot-cache/src/test/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfigurationTests.java index 6373c4f7de..a6ffc25e01 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure-all/src/test/java/org/springframework/boot/actuate/autoconfigure/cache/CachesEndpointAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-cache/src/test/java/org/springframework/boot/cache/actuate/endpoint/autoconfigure/CachesEndpointAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.actuate.autoconfigure.cache; +package org.springframework.boot.cache.actuate.endpoint.autoconfigure; import org.junit.jupiter.api.Test;