Create spring-boot-netty module

Issue: 46143
This commit is contained in:
Andy Wilkinson 2025-04-28 15:18:53 +01:00 committed by Phillip Webb
parent 676fca519e
commit 628501f087
15 changed files with 61 additions and 9 deletions

View File

@ -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"

View File

@ -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

View File

@ -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")

View File

@ -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",

View File

@ -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"))

View File

@ -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")
}

View File

@ -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)

View File

@ -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 {

View File

@ -17,4 +17,4 @@
/**
* Auto-configuration for the Netty library.
*/
package org.springframework.boot.autoconfigure.netty;
package org.springframework.boot.netty.autoconfigure;

View File

@ -0,0 +1,4 @@
{
"groups": [],
"properties": []
}

View File

@ -0,0 +1 @@
org.springframework.boot.netty.autoconfigure.NettyAutoConfiguration

View File

@ -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;

View File

@ -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;

View File

@ -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"))

View File

@ -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"))
}