diff --git a/settings.gradle b/settings.gradle index b95c7580a5..8abe8d879b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -96,6 +96,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 47017743bc..def307eacf 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 e99fbb675a..1cc3339895 100644 --- a/spring-boot-project/spring-boot-data-redis/build.gradle +++ b/spring-boot-project/spring-boot-data-redis/build.gradle @@ -14,6 +14,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 ac17f6d484..f8d6730cd7 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2032,6 +2032,7 @@ bom { "spring-boot-mongodb", "spring-boot-mustache", "spring-boot-neo4j", + "spring-boot-netty", "spring-boot-properties-migrator", "spring-boot-pulsar", "spring-boot-quartz", @@ -2114,8 +2115,7 @@ bom { "spring-boot-undertow", "spring-boot-validation", "spring-boot-webflux", - "spring-boot-webmvc", - "spring-boot-webservices" + "spring-boot-webmvc" ] plugins = [ "spring-boot-maven-plugin" diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index cd9a4059ff..5cf28774d5 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -108,6 +108,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")) @@ -185,6 +186,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 0000000000..4333027e9a --- /dev/null +++ b/spring-boot-project/spring-boot-netty/build.gradle @@ -0,0 +1,22 @@ +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 92% 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 5f172d689f..9e6643953d 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 @@ -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.netty; +package org.springframework.boot.netty.autoconfigure; import io.netty.util.NettyRuntime; import io.netty.util.ResourceLeakDetector; @@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties * {@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 619a59d469..fac1b3cb81 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 85% 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 0784c137ec..fb4ee9d85f 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 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 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 0000000000..671fd2520c --- /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 0000000000..94f931820c --- /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 93% 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 92136193e7..b152e91ff2 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 @@ -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.netty; +package org.springframework.boot.netty.autoconfigure; import io.netty.util.ResourceLeakDetector; import org.junit.jupiter.api.Test; 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 91% 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 711eab081e..343e993a43 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 @@ -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.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 d029c46ece..9704b8a618 100644 --- a/spring-boot-project/spring-boot-reactor-netty/build.gradle +++ b/spring-boot-project/spring-boot-reactor-netty/build.gradle @@ -13,6 +13,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 450348877b..7ccdf45216 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 @@ -5,7 +5,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")) }