Browse Source

Create spring-boot-netty module

Closes gh-46143
pull/46230/head
Andy Wilkinson 8 months ago
parent
commit
35818d1f70
  1. 1
      settings.gradle
  2. 1
      spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  3. 2
      spring-boot-project/spring-boot-data-redis/build.gradle
  4. 1
      spring-boot-project/spring-boot-dependencies/build.gradle
  5. 2
      spring-boot-project/spring-boot-docs/build.gradle
  6. 39
      spring-boot-project/spring-boot-netty/build.gradle
  7. 4
      spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfiguration.java
  8. 4
      spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java
  9. 2
      spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java
  10. 4
      spring-boot-project/spring-boot-netty/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  11. 1
      spring-boot-project/spring-boot-netty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  12. 2
      spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfigurationTests.java
  13. 2
      spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyPropertiesTests.java
  14. 3
      spring-boot-project/spring-boot-reactor-netty/build.gradle
  15. 2
      spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle

1
settings.gradle

@ -112,6 +112,7 @@ include "spring-boot-project:spring-boot-neo4j" @@ -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"

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

2
spring-boot-project/spring-boot-data-redis/build.gradle

@ -31,6 +31,8 @@ dependencies { @@ -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")

1
spring-boot-project/spring-boot-dependencies/build.gradle

@ -2041,6 +2041,7 @@ bom { @@ -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",

2
spring-boot-project/spring-boot-docs/build.gradle

@ -124,6 +124,7 @@ dependencies { @@ -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 { @@ -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"))

39
spring-boot-project/spring-boot-netty/build.gradle

@ -0,0 +1,39 @@ @@ -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")
}

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfiguration.java → spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfiguration.java

@ -14,7 +14,7 @@ @@ -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; @@ -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)

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/NettyProperties.java → spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/NettyProperties.java

@ -14,7 +14,7 @@ @@ -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; @@ -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 {

2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/netty/package-info.java → spring-boot-project/spring-boot-netty/src/main/java/org/springframework/boot/netty/autoconfigure/package-info.java

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

4
spring-boot-project/spring-boot-netty/src/main/resources/META-INF/additional-spring-configuration-metadata.json

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

1
spring-boot-project/spring-boot-netty/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

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

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyAutoConfigurationTests.java → spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyAutoConfigurationTests.java

@ -14,7 +14,7 @@ @@ -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;

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/netty/NettyPropertiesTests.java → spring-boot-project/spring-boot-netty/src/test/java/org/springframework/boot/netty/autoconfigure/NettyPropertiesTests.java

@ -14,7 +14,7 @@ @@ -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;

3
spring-boot-project/spring-boot-reactor-netty/build.gradle

@ -30,6 +30,9 @@ dependencies { @@ -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"))

2
spring-boot-project/spring-boot-starters/spring-boot-starter-data-redis/build.gradle

@ -21,7 +21,7 @@ plugins { @@ -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"))
}

Loading…
Cancel
Save