diff --git a/settings.gradle b/settings.gradle index 51c0510bf80..5d4722ea257 100644 --- a/settings.gradle +++ b/settings.gradle @@ -56,6 +56,7 @@ include "spring-boot-project:spring-boot-elasticsearch" include "spring-boot-project:spring-boot-flyway" include "spring-boot-project:spring-boot-freemarker" include "spring-boot-project:spring-boot-groovy-templates" +include "spring-boot-project:spring-boot-hazelcast" include "spring-boot-project:spring-boot-integration" include "spring-boot-project:spring-boot-jackson" include "spring-boot-project:spring-boot-jdbc" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 8d7fc80bd75..120d52f2909 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -23,6 +23,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-flyway")) + optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-integration")) optional(project(":spring-boot-project:spring-boot-jackson")) optional(project(":spring-boot-project:spring-boot-jdbc")) @@ -42,7 +43,6 @@ dependencies { } optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml") optional("com.github.ben-manes.caffeine:caffeine") - optional("com.hazelcast:hazelcast") optional("com.hazelcast:hazelcast-spring") optional("com.zaxxer:HikariCP") optional("io.lettuce:lettuce-core") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java index 51b4a503190..584f9ea1c61 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfiguration.java @@ -28,7 +28,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.context.annotation.Bean; /** diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java index 2c0cad8eeb5..01b9cc4fe89 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationIntegrationTests.java @@ -24,7 +24,7 @@ import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator; import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Status; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithResource; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java index 02a8f55a461..4c76a8a1fb4 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/hazelcast/HazelcastHealthContributorAutoConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration; import org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithResource; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java index b53b4fd091b..3fbf088d2da 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java @@ -34,11 +34,11 @@ import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoCo import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration; import org.springframework.boot.context.annotation.UserConfigurations; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner; diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index 3cb29937205..f3fc4b46cbd 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -40,7 +40,6 @@ dependencies { optional("com.fasterxml.jackson.core:jackson-databind") optional("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") optional("com.github.ben-manes.caffeine:caffeine") - optional("com.hazelcast:hazelcast") optional("com.hazelcast:hazelcast-spring") optional("com.zaxxer:HikariCP") optional("io.lettuce:lettuce-core") @@ -100,6 +99,7 @@ dependencies { optional("org.springframework.session:spring-session-core") testImplementation(project(":spring-boot-project:spring-boot-autoconfigure-all")) + testImplementation(project(":spring-boot-project:spring-boot-hazelcast")) testImplementation(project(":spring-boot-project:spring-boot-jackson")) testImplementation(project(":spring-boot-project:spring-boot-jsonb")) testImplementation(project(":spring-boot-project:spring-boot-reactor-netty")) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java index c2be0161256..3e299451714 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicatorTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Status; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.testsupport.classpath.resources.WithResource; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 932b71315ca..79441d9f7c7 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -46,6 +46,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-flyway")) + optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-jackson")) optional(project(":spring-boot-project:spring-boot-jdbc")) optional(project(":spring-boot-project:spring-boot-jsonb")) @@ -66,7 +67,6 @@ dependencies { optional("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations") optional("com.fasterxml.jackson.module:jackson-module-parameter-names") optional("com.google.code.gson:gson") - optional("com.hazelcast:hazelcast") optional("com.hazelcast:hazelcast-spring") optional("com.h2database:h2") optional("com.nimbusds:oauth2-oidc-sdk") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java index 948b9ff428b..92cad5d9046 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java @@ -27,7 +27,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor; import org.springframework.cache.CacheManager; @@ -53,10 +52,9 @@ import org.springframework.util.Assert; * @since 1.3.0 * @see EnableCaching */ -@AutoConfiguration( - after = { CouchbaseDataAutoConfiguration.class, HazelcastAutoConfiguration.class, - RedisAutoConfiguration.class }, - afterName = "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration") +@AutoConfiguration(after = { CouchbaseDataAutoConfiguration.class, RedisAutoConfiguration.class }, + afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration", + "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" }) @ConditionalOnClass(CacheManager.class) @ConditionalOnBean(CacheAspectSupport.class) @ConditionalOnMissingBean(value = CacheManager.class, name = "cacheResolver") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastCacheConfiguration.java b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastCacheConfiguration.java index 569d03e0738..76d56d44ff2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastCacheConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/HazelcastCacheConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -22,8 +22,8 @@ import com.hazelcast.spring.cache.HazelcastCacheManager; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConfigResourceCondition; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConfigResourceCondition; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java index 63dc3c1d04b..4e3ed6b79a2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -31,7 +31,6 @@ import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfigurat import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; @@ -67,10 +66,11 @@ import org.springframework.session.web.http.HttpSessionIdResolver; * @since 1.4.0 */ @AutoConfiguration( - after = { HazelcastAutoConfiguration.class, MongoDataAutoConfiguration.class, - MongoReactiveDataAutoConfiguration.class, RedisAutoConfiguration.class, - RedisReactiveAutoConfiguration.class, WebSessionIdResolverAutoConfiguration.class }, - afterName = { "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration", + after = { MongoDataAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class, + RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class, + WebSessionIdResolverAutoConfiguration.class }, + afterName = { "org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration", + "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration", "org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration" }, before = { HttpHandlerAutoConfiguration.class, WebFluxAutoConfiguration.class }) @ConditionalOnClass(Session.class) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 66bd7212095..ab54642243e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -46,8 +46,6 @@ org.springframework.boot.autoconfigure.graphql.servlet.GraphQlWebMvcAutoConfigur org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration -org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration -org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration org.springframework.boot.autoconfigure.http.client.HttpClientAutoConfiguration org.springframework.boot.autoconfigure.http.client.reactive.ClientHttpConnectorAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java index f0810d8db02..fe6cb5b69c5 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java @@ -49,7 +49,7 @@ import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider; import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider.MockCacheManager; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.test.context.assertj.AssertableApplicationContext; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.cache.Cache; diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 27570fb5374..a31933c82f3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2029,6 +2029,7 @@ bom { "spring-boot-flyway", "spring-boot-freemarker", "spring-boot-groovy-templates", + "spring-boot-hazelcast", "spring-boot-integration", "spring-boot-jackson", "spring-boot-jarmode-tools", diff --git a/spring-boot-project/spring-boot-docker-compose/build.gradle b/spring-boot-project/spring-boot-docker-compose/build.gradle index 976f6e0017e..b65eb782260 100644 --- a/spring-boot-project/spring-boot-docker-compose/build.gradle +++ b/spring-boot-project/spring-boot-docker-compose/build.gradle @@ -17,7 +17,6 @@ dependencies { dockerTestImplementation(project(":spring-boot-project:spring-boot-pulsar")) dockerTestImplementation(project(":spring-boot-project:spring-boot-r2dbc")) dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) - dockerTestImplementation("com.hazelcast:hazelcast") dockerTestImplementation("com.redis:testcontainers-redis") dockerTestImplementation("org.assertj:assertj-core") dockerTestImplementation("org.awaitility:awaitility") @@ -42,6 +41,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-flyway")) + optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-jdbc")) optional(project(":spring-boot-project:spring-boot-liquibase")) optional(project(":spring-boot-project:spring-boot-pulsar")) diff --git a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactoryIntegrationTests.java index 189f079edc2..237507f6361 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -24,8 +24,8 @@ import com.hazelcast.config.Config; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.map.IMap; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConnectionDetails; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConnectionDetails; import org.springframework.boot.testsupport.container.TestImage; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactory.java index ad86ca1d656..78f16834b22 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/hazelcast/HazelcastDockerComposeConnectionDetailsFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -18,10 +18,10 @@ package org.springframework.boot.docker.compose.service.connection.hazelcast; import com.hazelcast.client.config.ClientConfig; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConnectionDetails; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConnectionDetails; /** * {@link DockerComposeConnectionDetailsFactory} to create diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index df7e4c08152..88b9c4683c0 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -64,6 +64,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-hazelcast", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-integration", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "autoConfigurationMetadata")) @@ -98,6 +99,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-hazelcast", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-integration", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-hazelcast/build.gradle b/spring-boot-project/spring-boot-hazelcast/build.gradle new file mode 100644 index 00000000000..bd716821e68 --- /dev/null +++ b/spring-boot-project/spring-boot-hazelcast/build.gradle @@ -0,0 +1,25 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot Hazelcast" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("com.hazelcast:hazelcast") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-jpa")) + optional("com.hazelcast:hazelcast-spring") + optional("org.slf4j:slf4j-api") + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + + testRuntimeOnly("com.h2database:h2") + testRuntimeOnly("ch.qos.logback:logback-classic") +} \ No newline at end of file diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfiguration.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfiguration.java index a5b5d90952b..8be9eac0104 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.core.HazelcastInstance; @@ -31,7 +31,7 @@ import org.springframework.context.annotation.Import; * * @author Stephane Nicoll * @author Vedran Pavic - * @since 1.3.0 + * @since 4.0.0 * @see HazelcastConfigResourceCondition */ @AutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableCondition.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableCondition.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableCondition.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableCondition.java index 2260e6f6124..8000cb03c3c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableCondition.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.io.IOException; import java.io.InputStream; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfiguration.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfiguration.java index 5c6c0585ab0..e3837660789 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.client.HazelcastClient; import com.hazelcast.core.HazelcastInstance; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientInstanceConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientInstanceConfiguration.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientInstanceConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientInstanceConfiguration.java index 824967cd79d..e6f13f7700e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientInstanceConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientInstanceConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.client.HazelcastClient; import com.hazelcast.client.config.ClientConfig; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigCustomizer.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigCustomizer.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigCustomizer.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigCustomizer.java index f6cebb79e4f..eca845be920 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigCustomizer.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.config.Config; @@ -24,7 +24,7 @@ import com.hazelcast.config.Config; * * @author Jaromir Hamala * @author Stephane Nicoll - * @since 2.7.0 + * @since 4.0.0 */ @FunctionalInterface public interface HazelcastConfigCustomizer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigResourceCondition.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigResourceCondition.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigResourceCondition.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigResourceCondition.java index 9ff61bf97df..835e412a40f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConfigResourceCondition.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConfigResourceCondition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import org.springframework.boot.autoconfigure.condition.ConditionOutcome; import org.springframework.boot.autoconfigure.condition.ResourceCondition; @@ -31,7 +31,7 @@ import org.springframework.util.Assert; * @author Stephane Nicoll * @author Madhura Bhave * @author Vedran Pavic - * @since 1.3.0 + * @since 4.0.0 */ public abstract class HazelcastConfigResourceCondition extends ResourceCondition { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetails.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetails.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetails.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetails.java index 7b98f817d6c..e23e54b230c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetails.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.client.config.ClientConfig; @@ -24,7 +24,7 @@ import org.springframework.boot.autoconfigure.service.connection.ConnectionDetai * Details required to establish a client connection to a Hazelcast instance. * * @author Dmytro Nosan - * @since 3.4.0 + * @since 4.0.0 */ public interface HazelcastConnectionDetails extends ConnectionDetails { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetailsConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetailsConfiguration.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetailsConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetailsConfiguration.java index 797da5fbbd2..85a2f365b51 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastConnectionDetailsConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastConnectionDetailsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.client.config.ClientConfig; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfiguration.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfiguration.java index ff37ec7243b..4686777c8ed 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.core.HazelcastInstance; import jakarta.persistence.EntityManagerFactory; @@ -23,7 +23,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.AllNestedConditions; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnConfiguration; import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; @@ -36,7 +36,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; * the {@code hazelcastInstance} bean. * * @author Stephane Nicoll - * @since 1.3.2 + * @since 4.0.0 */ @AutoConfiguration(after = HazelcastAutoConfiguration.class, afterName = "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java index 98687ca86a8..571903934e4 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastProperties.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.core.io.Resource; @@ -24,7 +24,7 @@ import org.springframework.util.Assert; * Configuration properties for the hazelcast integration. * * @author Stephane Nicoll - * @since 1.3.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.hazelcast") public class HazelcastProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastServerConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastServerConfiguration.java index 0829ed0a96a..21620a6b839 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastServerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.io.IOException; import java.io.InputStream; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/PropertiesHazelcastConnectionDetails.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/PropertiesHazelcastConnectionDetails.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/PropertiesHazelcastConnectionDetails.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/PropertiesHazelcastConnectionDetails.java index 8f20e236a77..421d62d2073 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/PropertiesHazelcastConnectionDetails.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/PropertiesHazelcastConnectionDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/package-info.java b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/package-info.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/package-info.java rename to spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/package-info.java index e4de5f0b689..92f954e7008 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/hazelcast/package-info.java +++ b/spring-boot-project/spring-boot-hazelcast/src/main/java/org/springframework/boot/hazelcast/autoconfigure/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Auto-configuration for Hazelcast. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; diff --git a/spring-boot-project/spring-boot-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000000..8df7fdbec6a --- /dev/null +++ b/spring-boot-project/spring-boot-hazelcast/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration +org.springframework.boot.hazelcast.autoconfigure.HazelcastJpaDependencyAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationClientTests.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java rename to spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationClientTests.java index 56bac015067..d0c93448250 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java +++ b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.io.File; import java.io.FileReader; @@ -87,7 +87,7 @@ class HazelcastAutoConfigurationClientTests { @Test void systemPropertyWithXml() { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.xml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.xml"); this.contextRunner .withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY + "=" + config.getAbsolutePath()) .run(assertSpecificHazelcastClient("explicit-xml")); @@ -96,7 +96,7 @@ class HazelcastAutoConfigurationClientTests { @Test void systemPropertyWithYaml() { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.yaml"); this.contextRunner .withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY + "=" + config.getAbsolutePath()) .run(assertSpecificHazelcastClient("explicit-yaml")); @@ -105,7 +105,7 @@ class HazelcastAutoConfigurationClientTests { @Test void systemPropertyWithYml() { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.yml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.yml"); this.contextRunner .withSystemProperties(HazelcastClientConfiguration.CONFIG_SYSTEM_PROPERTY + "=" + config.getAbsolutePath()) .run(assertSpecificHazelcastClient("explicit-yml")); @@ -114,7 +114,7 @@ class HazelcastAutoConfigurationClientTests { @Test void explicitConfigUrlWithXml() throws MalformedURLException { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.xml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.xml"); this.contextRunner.withPropertyValues("spring.hazelcast.config=" + config.toURI().toURL()) .run(assertSpecificHazelcastClient("explicit-xml")); } @@ -122,7 +122,7 @@ class HazelcastAutoConfigurationClientTests { @Test void explicitConfigUrlWithYaml() throws MalformedURLException { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.yaml"); this.contextRunner.withPropertyValues("spring.hazelcast.config=" + config.toURI().toURL()) .run(assertSpecificHazelcastClient("explicit-yaml")); } @@ -130,7 +130,7 @@ class HazelcastAutoConfigurationClientTests { @Test void explicitConfigUrlWithYml() throws MalformedURLException { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.yml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.yml"); this.contextRunner.withPropertyValues("spring.hazelcast.config=" + config.toURI().toURL()) .run(assertSpecificHazelcastClient("explicit-yml")); } @@ -170,7 +170,7 @@ class HazelcastAutoConfigurationClientTests { void clientConfigWithInstanceNameCreatesClientIfNecessary() throws MalformedURLException { assertThat(HazelcastClient.getHazelcastClientByName("spring-boot")).isNull(); File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-instance.xml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-instance.xml"); this.contextRunner.withPropertyValues("spring.hazelcast.config=" + config.toURI().toURL()) .run((context) -> assertThat(context).getBean(HazelcastInstance.class) .extracting(HazelcastInstance::getName) @@ -180,7 +180,7 @@ class HazelcastAutoConfigurationClientTests { @Test void autoConfiguredClientConfigUsesApplicationClassLoader() throws MalformedURLException { File config = prepareConfiguration("src/test/resources/org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-client-specific.xml"); + + "boot/hazelcast/autoconfigure/hazelcast-client-specific.xml"); this.contextRunner.withPropertyValues("spring.hazelcast.config=" + config.toURI().toURL()).run((context) -> { HazelcastInstance hazelcast = context.getBean(HazelcastInstance.class); assertThat(hazelcast).isInstanceOf(HazelcastClientProxy.class); diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationServerTests.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java rename to spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationServerTests.java index 682286c1f26..f7813661ade 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java +++ b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationServerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -73,7 +73,7 @@ class HazelcastAutoConfigurationServerTests { void systemPropertyWithXml() { this.contextRunner .withSystemProperties(HazelcastServerConfiguration.CONFIG_SYSTEM_PROPERTY - + "=classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml") + + "=classpath:org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml") .run((context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); assertThat(config.getMapConfigs().keySet()).containsOnly("foobar"); @@ -84,7 +84,7 @@ class HazelcastAutoConfigurationServerTests { void systemPropertyWithYaml() { this.contextRunner .withSystemProperties(HazelcastServerConfiguration.CONFIG_SYSTEM_PROPERTY - + "=classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml") + + "=classpath:org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yaml") .run((context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); assertThat(config.getMapConfigs().keySet()).containsOnly("foobar"); @@ -95,7 +95,7 @@ class HazelcastAutoConfigurationServerTests { void systemPropertyWithYml() { this.contextRunner .withSystemProperties(HazelcastServerConfiguration.CONFIG_SYSTEM_PROPERTY - + "=classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yml") + + "=classpath:org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yml") .run((context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); assertThat(config.getMapConfigs().keySet()).containsOnly("foobar"); @@ -105,55 +105,55 @@ class HazelcastAutoConfigurationServerTests { @Test void explicitConfigFileWithXml() { this.contextRunner - .withPropertyValues("spring.hazelcast.config=org/springframework/boot/autoconfigure/hazelcast/" + .withPropertyValues("spring.hazelcast.config=org/springframework/boot/hazelcast/autoconfigure/" + "hazelcast-specific.xml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml")); } @Test void explicitConfigFileWithYaml() { this.contextRunner - .withPropertyValues("spring.hazelcast.config=org/springframework/boot/autoconfigure/hazelcast/" + .withPropertyValues("spring.hazelcast.config=org/springframework/boot/hazelcast/autoconfigure/" + "hazelcast-specific.yaml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yaml")); } @Test void explicitConfigFileWithYml() { this.contextRunner - .withPropertyValues("spring.hazelcast.config=org/springframework/boot/autoconfigure/hazelcast/" + .withPropertyValues("spring.hazelcast.config=org/springframework/boot/hazelcast/autoconfigure/" + "hazelcast-specific.yml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yml")); } @Test void explicitConfigUrlWithXml() { this.contextRunner .withPropertyValues("spring.hazelcast.config=classpath:org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-specific.xml") + + "boot/hazelcast/autoconfigure/hazelcast-specific.xml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml")); } @Test void explicitConfigUrlWithYaml() { this.contextRunner .withPropertyValues("spring.hazelcast.config=classpath:org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-specific.yaml") + + "boot/hazelcast/autoconfigure/hazelcast-specific.yaml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yaml")); } @Test void explicitConfigUrlWithYml() { this.contextRunner .withPropertyValues("spring.hazelcast.config=classpath:org/springframework/" - + "boot/autoconfigure/hazelcast/hazelcast-specific.yml") + + "boot/hazelcast/autoconfigure/hazelcast-specific.yml") .run(assertSpecificHazelcastServer( - "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yml")); + "org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yml")); } private ContextConsumer assertSpecificHazelcastServer(String location) { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationTests.java b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationTests.java rename to spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationTests.java index def1dcb1888..42c76d360b2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import com.hazelcast.config.Config; import com.hazelcast.core.HazelcastInstance; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableConditionTests.java b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableConditionTests.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableConditionTests.java rename to spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableConditionTests.java index f26e71ffb89..c1750157d1f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfigAvailableConditionTests.java +++ b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastClientConfigAvailableConditionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import org.junit.jupiter.api.Test; @@ -41,7 +41,7 @@ class HazelcastClientConfigAvailableConditionTests { @Test void explicitConfigurationWithClientConfigMatches() { ConditionOutcome outcome = getMatchOutcome(new MockEnvironment().withProperty("spring.hazelcast.config", - "classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.xml")); + "classpath:org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.xml")); assertThat(outcome.isMatch()).isTrue(); assertThat(outcome.getMessage()).contains("Hazelcast client configuration detected"); } @@ -49,7 +49,7 @@ class HazelcastClientConfigAvailableConditionTests { @Test void explicitConfigurationWithServerConfigDoesNotMatch() { ConditionOutcome outcome = getMatchOutcome(new MockEnvironment().withProperty("spring.hazelcast.config", - "classpath:org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml")); + "classpath:org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml")); assertThat(outcome.isMatch()).isFalse(); assertThat(outcome.getMessage()).contains("Hazelcast server configuration detected"); } @@ -57,7 +57,7 @@ class HazelcastClientConfigAvailableConditionTests { @Test void explicitConfigurationWithMissingConfigDoesNotMatch() { ConditionOutcome outcome = getMatchOutcome(new MockEnvironment().withProperty("spring.hazelcast.config", - "classpath:org/springframework/boot/autoconfigure/hazelcast/test-config-does-not-exist.xml")); + "classpath:org/springframework/boot/hazelcast/autoconfigure/test-config-does-not-exist.xml")); assertThat(outcome.isMatch()).isFalse(); assertThat(outcome.getMessage()).contains("Hazelcast configuration does not exist"); } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java rename to spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfigurationTests.java index b5c86bb315d..cc208655ba9 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/autoconfigure/HazelcastJpaDependencyAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.hazelcast; +package org.springframework.boot.hazelcast.autoconfigure; import java.util.Arrays; import java.util.Collections; @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnPostProcessor; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnPostProcessor; import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor; import org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-instance.xml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-instance.xml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-instance.xml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-instance.xml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.xml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.xml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.xml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.xml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.yaml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.yaml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.yaml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.yml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.yml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-client-specific.yml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-client-specific.yml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.xml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yaml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yaml diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yml b/spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yml similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yml rename to spring-boot-project/spring-boot-hazelcast/src/test/resources/org/springframework/boot/hazelcast/autoconfigure/hazelcast-specific.yml diff --git a/spring-boot-project/spring-boot-testcontainers/build.gradle b/spring-boot-project/spring-boot-testcontainers/build.gradle index 28a70030c5d..155d09f0163 100644 --- a/spring-boot-project/spring-boot-testcontainers/build.gradle +++ b/spring-boot-project/spring-boot-testcontainers/build.gradle @@ -27,7 +27,6 @@ dependencies { exclude group: "commons-logging", module: "commons-logging" } dockerTestImplementation("com.couchbase.client:java-client") - dockerTestImplementation("com.hazelcast:hazelcast") dockerTestImplementation("io.micrometer:micrometer-registry-otlp") dockerTestImplementation("io.rest-assured:rest-assured") { exclude group: "commons-logging", module: "commons-logging" @@ -65,6 +64,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-elasticsearch")) optional(project(":spring-boot-project:spring-boot-flyway")) + optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-jdbc")) optional(project(":spring-boot-project:spring-boot-kafka")) optional(project(":spring-boot-project:spring-boot-liquibase")) @@ -96,7 +96,6 @@ dependencies { optional("org.testcontainers:redpanda") optional("org.testcontainers:r2dbc") optional("com.redis:testcontainers-redis") - optional("com.hazelcast:hazelcast") testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) diff --git a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/CustomClusterNameHazelcastContainerConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/CustomClusterNameHazelcastContainerConnectionDetailsFactoryIntegrationTests.java index a2e4a504401..553fd4840c1 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/CustomClusterNameHazelcastContainerConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/CustomClusterNameHazelcastContainerConnectionDetailsFactoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -29,8 +29,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConnectionDetails; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConnectionDetails; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testsupport.container.HazelcastContainer; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactoryIntegrationTests.java index 876b9f1e8bb..183aae5ae79 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -26,8 +26,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConnectionDetails; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConnectionDetails; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.boot.testsupport.container.HazelcastContainer; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactory.java b/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactory.java index 5203854b13b..c845da1a276 100644 --- a/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/hazelcast/HazelcastContainerConnectionDetailsFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -22,7 +22,7 @@ import com.hazelcast.client.config.ClientConfig; import org.testcontainers.containers.Container; import org.testcontainers.containers.GenericContainer; -import org.springframework.boot.autoconfigure.hazelcast.HazelcastConnectionDetails; +import org.springframework.boot.hazelcast.autoconfigure.HazelcastConnectionDetails; import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory; import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/build.gradle index 1b8da4ba6b2..be084b7b976 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/build.gradle @@ -39,7 +39,7 @@ dependencies { ehcache("org.ehcache:ehcache::jakarta") hazelcast(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies"))) - hazelcast("com.hazelcast:hazelcast") + hazelcast(project(":spring-boot-project:spring-boot-hazelcast")) hazelcast("com.hazelcast:hazelcast-spring") implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator")) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/build.gradle index a0f0aad0133..76d2e2fad78 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/build.gradle @@ -5,10 +5,10 @@ plugins { description = "Spring Boot Session smoke test" dependencies { + implementation(project(":spring-boot-project:spring-boot-hazelcast")) implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator")) implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-security")) implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) - implementation("com.hazelcast:hazelcast") implementation("org.springframework.session:spring-session-hazelcast") { exclude group: "javax.annotation", module: "javax.annotation-api" }