diff --git a/settings.gradle b/settings.gradle index 037cf5cc53b..3982722f9b0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -112,6 +112,7 @@ include "spring-boot-project:spring-boot-neo4j" include "spring-boot-project:spring-boot-mail" include "spring-boot-project:spring-boot-mongodb" include "spring-boot-project:spring-boot-mustache" +include "spring-boot-project:spring-boot-netty" include "spring-boot-project:spring-boot-parent" include "spring-boot-project:spring-boot-pulsar" include "spring-boot-project:spring-boot-quartz" 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 47017743bcf..def307eacf9 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 @@ -4,7 +4,6 @@ org.springframework.boot.autoconfigure.http.client.HttpClientAutoConfiguration org.springframework.boot.autoconfigure.http.client.service.HttpServiceClientAutoConfiguration org.springframework.boot.autoconfigure.http.client.reactive.ClientHttpConnectorAutoConfiguration org.springframework.boot.autoconfigure.http.client.reactive.service.ReactiveHttpServiceClientAutoConfiguration -org.springframework.boot.autoconfigure.netty.NettyAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration diff --git a/spring-boot-project/spring-boot-data-redis/build.gradle b/spring-boot-project/spring-boot-data-redis/build.gradle index b396b035f73..09725042ba9 100644 --- a/spring-boot-project/spring-boot-data-redis/build.gradle +++ b/spring-boot-project/spring-boot-data-redis/build.gradle @@ -31,6 +31,8 @@ dependencies { api("io.lettuce:lettuce-core") api("org.springframework.data:spring-data-redis") + implementation(project(":spring-boot-project:spring-boot-netty")) + optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional("redis.clients:jedis") diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 860ed0e49c0..6ca08eded95 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2041,6 +2041,7 @@ bom { "spring-boot-mongodb", "spring-boot-mustache", "spring-boot-neo4j", + "spring-boot-netty", "spring-boot-properties-migrator", "spring-boot-pulsar", "spring-boot-quartz", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index a2fdc9ca724..2ab8e101c31 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -124,6 +124,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-mongodb", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-neo4j", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-netty", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-quartz", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata")) @@ -201,6 +202,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-mongodb", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-mustache", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-neo4j", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-netty", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-quartz", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-netty/build.gradle b/spring-boot-project/spring-boot-netty/build.gradle new file mode 100644 index 00000000000..fec2d608b4b --- /dev/null +++ b/spring-boot-project/spring-boot-netty/build.gradle @@ -0,0 +1,39 @@ +/* + * Copyright 2012-present 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +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 Netty" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + + implementation("io.netty:netty-common") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + + testRuntimeOnly("ch.qos.logback:logback-classic") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfiguration.java b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfiguration.java rename to spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfiguration.java index 49fe159f926..4c6486aba3b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfiguration.java +++ b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.netty; +package org.springframework.boot.netty.autoconfigure; import io.netty.util.NettyRuntime; import io.netty.util.ResourceLeakDetector; @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean; * {@link EnableAutoConfiguration Auto-configuration} for Netty. * * @author Brian Clozel - * @since 2.5.0 + * @since 4.0.0 */ @AutoConfiguration @ConditionalOnClass(NettyRuntime.class) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyProperties.java b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyProperties.java rename to spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java index 92cba3de4c1..1bafaa00489 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyProperties.java +++ b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.netty; +package org.springframework.boot.netty.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; * These properties apply globally to the Netty library, used as a client or a server. * * @author Brian Clozel - * @since 2.5.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.netty") public class NettyProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/package-info.java b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/package-info.java rename to spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java index 02456354576..ee697617198 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/package-info.java +++ b/spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java @@ -17,4 +17,4 @@ /** * Auto-configuration for the Netty library. */ -package org.springframework.boot.autoconfigure.netty; +package org.springframework.boot.netty.autoconfigure; diff --git a/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 00000000000..671fd2520c2 --- /dev/null +++ b/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,4 @@ +{ + "groups": [], + "properties": [] +} diff --git a/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000000..94f931820c1 --- /dev/null +++ b/spring-boot-project/spring-boot-netty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.springframework.boot.netty.autoconfigure.NettyAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfigurationTests.java b/spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfigurationTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfigurationTests.java rename to spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfigurationTests.java index a58c8072503..eee40246606 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.netty; +package org.springframework.boot.netty.autoconfigure; import io.netty.util.ResourceLeakDetector; import org.junit.jupiter.api.AfterEach; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyPropertiesTests.java b/spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyPropertiesTests.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyPropertiesTests.java rename to spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyPropertiesTests.java index 8cb05186889..2cda77dda7b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyPropertiesTests.java +++ b/spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.netty; +package org.springframework.boot.netty.autoconfigure; import io.netty.util.ResourceLeakDetector; import io.netty.util.ResourceLeakDetector.Level; diff --git a/spring-boot-project/spring-boot-reactor-netty/build.gradle b/spring-boot-project/spring-boot-reactor-netty/build.gradle index e1469ea18bb..8c78235219e 100644 --- a/spring-boot-project/spring-boot-reactor-netty/build.gradle +++ b/spring-boot-project/spring-boot-reactor-netty/build.gradle @@ -30,6 +30,9 @@ dependencies { api("io.projectreactor.netty:reactor-netty-http") api("org.springframework:spring-web") + implementation(project(":spring-boot-project:spring-boot-netty")) + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) testImplementation(project(":spring-boot-project:spring-boot-test")) diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle index 32bb9e752cf..9a6a3e78f56 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle @@ -21,7 +21,7 @@ plugins { description = "Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client" dependencies { - api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-data-redis")) + api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-tx")) }