Create spring-boot-netty module

This commit is contained in:
Andy Wilkinson
2025-04-28 15:18:53 +01:00
committed by Phillip Webb
parent 343b9a8276
commit a527e028a7
15 changed files with 49 additions and 15 deletions

View File

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

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

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

View File

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

View File

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

View File

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

View File

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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