parent
cf752d3ae8
commit
d86d94be1b
|
@ -85,6 +85,7 @@ include "spring-boot-project:spring-boot-parent"
|
||||||
include "spring-boot-project:spring-boot-pulsar"
|
include "spring-boot-project:spring-boot-pulsar"
|
||||||
include "spring-boot-project:spring-boot-r2dbc"
|
include "spring-boot-project:spring-boot-r2dbc"
|
||||||
include "spring-boot-project:spring-boot-reactor-netty"
|
include "spring-boot-project:spring-boot-reactor-netty"
|
||||||
|
include "spring-boot-project:spring-boot-rsocket"
|
||||||
include "spring-boot-project:spring-boot-test"
|
include "spring-boot-project:spring-boot-test"
|
||||||
include "spring-boot-project:spring-boot-test-autoconfigure"
|
include "spring-boot-project:spring-boot-test-autoconfigure"
|
||||||
include "spring-boot-project:spring-boot-test-integration-tests"
|
include "spring-boot-project:spring-boot-test-integration-tests"
|
||||||
|
|
|
@ -41,8 +41,6 @@ dependencies {
|
||||||
optional("io.projectreactor:reactor-tools")
|
optional("io.projectreactor:reactor-tools")
|
||||||
optional("io.projectreactor.netty:reactor-netty-http")
|
optional("io.projectreactor.netty:reactor-netty-http")
|
||||||
optional("io.r2dbc:r2dbc-pool")
|
optional("io.r2dbc:r2dbc-pool")
|
||||||
optional("io.rsocket:rsocket-core")
|
|
||||||
optional("io.rsocket:rsocket-transport-netty")
|
|
||||||
optional("io.undertow:undertow-servlet")
|
optional("io.undertow:undertow-servlet")
|
||||||
optional("jakarta.persistence:jakarta.persistence-api")
|
optional("jakarta.persistence:jakarta.persistence-api")
|
||||||
optional("jakarta.servlet:jakarta.servlet-api")
|
optional("jakarta.servlet:jakarta.servlet-api")
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Application Context Initializers
|
|
||||||
org.springframework.context.ApplicationContextInitializer=\
|
|
||||||
org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer
|
|
||||||
|
|
||||||
# Environment Post Processors
|
# Environment Post Processors
|
||||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||||
org.springframework.boot.reactor.ReactorEnvironmentPostProcessor
|
org.springframework.boot.reactor.ReactorEnvironmentPostProcessor
|
||||||
|
|
|
@ -69,6 +69,7 @@ dependencies {
|
||||||
optional(project(":spring-boot-project:spring-boot-liquibase"))
|
optional(project(":spring-boot-project:spring-boot-liquibase"))
|
||||||
optional(project(":spring-boot-project:spring-boot-r2dbc"))
|
optional(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||||
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||||
|
optional(project(":spring-boot-project:spring-boot-rsocket"))
|
||||||
optional(project(":spring-boot-project:spring-boot-tomcat"))
|
optional(project(":spring-boot-project:spring-boot-tomcat"))
|
||||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||||
optional(project(":spring-boot-project:spring-boot-validation"))
|
optional(project(":spring-boot-project:spring-boot-validation"))
|
||||||
|
|
|
@ -29,7 +29,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
|
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.graphql.ExecutionGraphQlService;
|
import org.springframework.graphql.ExecutionGraphQlService;
|
||||||
import org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer;
|
import org.springframework.graphql.data.method.annotation.support.AnnotatedControllerConfigurer;
|
||||||
|
@ -45,7 +44,8 @@ import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHa
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = { GraphQlAutoConfiguration.class, RSocketMessagingAutoConfiguration.class })
|
@AutoConfiguration(after = GraphQlAutoConfiguration.class,
|
||||||
|
afterName = "org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration")
|
||||||
@ConditionalOnClass({ GraphQL.class, GraphQlSource.class, RSocketServer.class, HttpServer.class })
|
@ConditionalOnClass({ GraphQL.class, GraphQlSource.class, RSocketServer.class, HttpServer.class })
|
||||||
@ConditionalOnBean({ RSocketMessageHandler.class, AnnotatedControllerConfigurer.class })
|
@ConditionalOnBean({ RSocketMessageHandler.class, AnnotatedControllerConfigurer.class })
|
||||||
@ConditionalOnProperty("spring.graphql.rsocket.mapping")
|
@ConditionalOnProperty("spring.graphql.rsocket.mapping")
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.graphql.client.RSocketGraphQlClient;
|
import org.springframework.graphql.client.RSocketGraphQlClient;
|
||||||
|
@ -42,7 +41,7 @@ import org.springframework.util.MimeTypeUtils;
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = RSocketRequesterAutoConfiguration.class)
|
@AutoConfiguration(afterName = "org.springframework.boot.rsocket.autoconfigure.RSocketRequesterAutoConfiguration")
|
||||||
@ConditionalOnClass({ GraphQL.class, RSocketGraphQlClient.class, RSocketRequester.class, RSocket.class,
|
@ConditionalOnClass({ GraphQL.class, RSocketGraphQlClient.class, RSocketRequester.class, RSocket.class,
|
||||||
TcpClientTransport.class })
|
TcpClientTransport.class })
|
||||||
public class RSocketGraphQlClientAutoConfiguration {
|
public class RSocketGraphQlClientAutoConfiguration {
|
||||||
|
|
|
@ -25,7 +25,6 @@ import io.rsocket.transport.netty.server.TcpServerTransport;
|
||||||
|
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.AnyNestedCondition;
|
import org.springframework.boot.autoconfigure.condition.AnyNestedCondition;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
|
||||||
|
@ -37,7 +36,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnThreading;
|
||||||
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
|
import org.springframework.boot.autoconfigure.condition.SearchStrategy;
|
||||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.jmx.JmxProperties;
|
import org.springframework.boot.autoconfigure.jmx.JmxProperties;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition;
|
import org.springframework.boot.autoconfigure.sql.init.OnDatabaseInitializationCondition;
|
||||||
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.thread.Threading;
|
import org.springframework.boot.autoconfigure.thread.Threading;
|
||||||
|
@ -88,7 +86,8 @@ import org.springframework.util.StringUtils;
|
||||||
* @author Yanming Zhou
|
* @author Yanming Zhou
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = { JmxAutoConfiguration.class, TaskSchedulingAutoConfiguration.class },
|
@AutoConfiguration(beforeName = "org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration",
|
||||||
|
after = { JmxAutoConfiguration.class, TaskSchedulingAutoConfiguration.class },
|
||||||
afterName = "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration")
|
afterName = "org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration")
|
||||||
@ConditionalOnClass(EnableIntegration.class)
|
@ConditionalOnClass(EnableIntegration.class)
|
||||||
@EnableConfigurationProperties({ IntegrationProperties.class, JmxProperties.class })
|
@EnableConfigurationProperties({ IntegrationProperties.class, JmxProperties.class })
|
||||||
|
@ -310,7 +309,6 @@ public class IntegrationAutoConfiguration {
|
||||||
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
@ConditionalOnClass(TcpServerTransport.class)
|
@ConditionalOnClass(TcpServerTransport.class)
|
||||||
@AutoConfigureBefore(RSocketMessagingAutoConfiguration.class)
|
|
||||||
protected static class IntegrationRSocketServerConfiguration {
|
protected static class IntegrationRSocketServerConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
@ -57,7 +56,8 @@ import org.springframework.util.StringUtils;
|
||||||
* @author Madhura Bhave
|
* @author Madhura Bhave
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(before = ReactiveSecurityAutoConfiguration.class, after = RSocketMessagingAutoConfiguration.class)
|
@AutoConfiguration(before = ReactiveSecurityAutoConfiguration.class,
|
||||||
|
afterName = "org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration")
|
||||||
@ConditionalOnClass({ ReactiveAuthenticationManager.class })
|
@ConditionalOnClass({ ReactiveAuthenticationManager.class })
|
||||||
@ConditionalOnMissingBean(
|
@ConditionalOnMissingBean(
|
||||||
value = { ReactiveAuthenticationManager.class, ReactiveUserDetailsService.class,
|
value = { ReactiveAuthenticationManager.class, ReactiveUserDetailsService.class,
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.security.rsocket;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessageHandlerCustomizer;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketMessageHandlerCustomizer;
|
||||||
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
@ -38,7 +38,7 @@ import org.springframework.security.rsocket.core.SecuritySocketAcceptorIntercept
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration
|
@AutoConfiguration
|
||||||
@EnableRSocketSecurity
|
@EnableRSocketSecurity
|
||||||
@ConditionalOnClass(SecuritySocketAcceptorInterceptor.class)
|
@ConditionalOnClass({ RSocketServerCustomizer.class, SecuritySocketAcceptorInterceptor.class })
|
||||||
public class RSocketSecurityAutoConfiguration {
|
public class RSocketSecurityAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -1466,92 +1466,6 @@
|
||||||
"level": "error"
|
"level": "error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.bundle",
|
|
||||||
"description": "Name of a configured SSL bundle."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.certificate",
|
|
||||||
"description": "Path to a PEM-encoded SSL certificate file."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.certificate-private-key",
|
|
||||||
"description": "Path to a PEM-encoded private key file for the SSL certificate."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.ciphers",
|
|
||||||
"description": "Supported SSL ciphers."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.client-auth",
|
|
||||||
"description": "Client authentication mode. Requires a trust store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.enabled",
|
|
||||||
"description": "Whether to enable SSL support.",
|
|
||||||
"defaultValue": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.enabled-protocols",
|
|
||||||
"description": "Enabled SSL protocols."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-alias",
|
|
||||||
"description": "Alias that identifies the key in the key store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-password",
|
|
||||||
"description": "Password used to access the key in the key store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-store",
|
|
||||||
"description": "Path to the key store that holds the SSL certificate (typically a jks file)."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-store-password",
|
|
||||||
"description": "Password used to access the key store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-store-provider",
|
|
||||||
"description": "Provider for the key store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.key-store-type",
|
|
||||||
"description": "Type of the key store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.protocol",
|
|
||||||
"description": "SSL protocol to use.",
|
|
||||||
"defaultValue": "TLS"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.server-name-bundles",
|
|
||||||
"description": "Mapping of host names to SSL bundles for SNI configuration."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-certificate",
|
|
||||||
"description": "Path to a PEM-encoded SSL certificate authority file."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-certificate-private-key",
|
|
||||||
"description": "Path to a PEM-encoded private key file for the SSL certificate authority."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-store",
|
|
||||||
"description": "Trust store that holds SSL certificates."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-store-password",
|
|
||||||
"description": "Password used to access the trust store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-store-provider",
|
|
||||||
"description": "Provider for the trust store."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spring.rsocket.server.ssl.trust-store-type",
|
|
||||||
"description": "Type of the trust store."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "spring.security.filter.dispatcher-types",
|
"name": "spring.security.filter.dispatcher-types",
|
||||||
"defaultValue": [
|
"defaultValue": [
|
||||||
|
|
|
@ -66,10 +66,6 @@ org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.netty.NettyAutoConfiguration
|
org.springframework.boot.autoconfigure.netty.NettyAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration
|
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
|
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration
|
|
||||||
org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration
|
|
||||||
org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration
|
|
||||||
org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration
|
|
||||||
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
|
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
|
||||||
org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
|
org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
|
||||||
|
|
|
@ -27,15 +27,15 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
|
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.graphql.GraphQlTestDataFetchers;
|
import org.springframework.boot.autoconfigure.graphql.GraphQlTestDataFetchers;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
|
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
|
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration;
|
import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration;
|
||||||
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
|
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
|
||||||
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
|
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
|
||||||
import org.springframework.boot.reactor.netty.NettyRouteProvider;
|
import org.springframework.boot.reactor.netty.NettyRouteProvider;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketServerAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration;
|
||||||
import org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer;
|
import org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer;
|
||||||
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
||||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.springframework.boot.autoconfigure.graphql.rsocket;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketRequesterAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration;
|
||||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
|
@ -41,10 +41,6 @@ import org.springframework.beans.PropertyAccessorFactory;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
|
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
||||||
import org.springframework.boot.context.annotation.UserConfigurations;
|
import org.springframework.boot.context.annotation.UserConfigurations;
|
||||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||||
|
@ -54,6 +50,10 @@ import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerA
|
||||||
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
||||||
import org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration;
|
import org.springframework.boot.jdbc.autoconfigure.JdbcTemplateAutoConfiguration;
|
||||||
import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer;
|
import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketRequesterAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketServerAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration;
|
||||||
import org.springframework.boot.sql.init.DatabaseInitializationMode;
|
import org.springframework.boot.sql.init.DatabaseInitializationMode;
|
||||||
import org.springframework.boot.sql.init.DatabaseInitializationSettings;
|
import org.springframework.boot.sql.init.DatabaseInitializationSettings;
|
||||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||||
|
|
|
@ -21,10 +21,10 @@ import java.time.Duration;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration;
|
||||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||||
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
||||||
|
|
|
@ -20,8 +20,8 @@ import io.rsocket.core.RSocketServer;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration;
|
||||||
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
||||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||||
|
|
|
@ -2017,6 +2017,7 @@ bom {
|
||||||
"spring-boot-pulsar",
|
"spring-boot-pulsar",
|
||||||
"spring-boot-r2dbc",
|
"spring-boot-r2dbc",
|
||||||
"spring-boot-reactor-netty",
|
"spring-boot-reactor-netty",
|
||||||
|
"spring-boot-rsocket",
|
||||||
"spring-boot-starter",
|
"spring-boot-starter",
|
||||||
"spring-boot-starter-activemq",
|
"spring-boot-starter-activemq",
|
||||||
"spring-boot-starter-actuator",
|
"spring-boot-starter-actuator",
|
||||||
|
|
|
@ -98,6 +98,7 @@ dependencies {
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "autoConfigurationMetadata"))
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata"))
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata"))
|
||||||
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "autoConfigurationMetadata"))
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata"))
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata"))
|
||||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tx", configuration: "autoConfigurationMetadata"))
|
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tx", configuration: "autoConfigurationMetadata"))
|
||||||
|
@ -129,6 +130,7 @@ dependencies {
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-pulsar", configuration: "configurationPropertiesMetadata"))
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata"))
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata"))
|
||||||
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "configurationPropertiesMetadata"))
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata"))
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata"))
|
||||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "configurationPropertiesMetadata"))
|
configurationProperties(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "configurationPropertiesMetadata"))
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* 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 RSocket"
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(project(":spring-boot-project:spring-boot"))
|
||||||
|
api("io.rsocket:rsocket-core")
|
||||||
|
api("org.springframework:spring-messaging")
|
||||||
|
|
||||||
|
implementation("org.springframework:spring-web")
|
||||||
|
|
||||||
|
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||||
|
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||||
|
optional(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||||
|
optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
|
||||||
|
optional("io.rsocket:rsocket-transport-netty")
|
||||||
|
|
||||||
|
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||||
|
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||||
|
testImplementation("io.projectreactor:reactor-test")
|
||||||
|
testImplementation("org.springframework:spring-webflux")
|
||||||
|
|
||||||
|
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||||
|
}
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHandler;
|
import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHandler;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHa
|
||||||
*
|
*
|
||||||
* @author Aarti Gupta
|
* @author Aarti Gupta
|
||||||
* @author Madhura Bhave
|
* @author Madhura Bhave
|
||||||
* @since 2.3.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface RSocketMessageHandlerCustomizer {
|
public interface RSocketMessageHandlerCustomizer {
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import io.rsocket.transport.netty.server.TcpServerTransport;
|
import io.rsocket.transport.netty.server.TcpServerTransport;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHa
|
||||||
* Messaging.
|
* Messaging.
|
||||||
*
|
*
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @since 2.2.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
||||||
@ConditionalOnClass({ RSocketRequester.class, io.rsocket.RSocket.class, TcpServerTransport.class })
|
@ConditionalOnClass({ RSocketRequester.class, io.rsocket.RSocket.class, TcpServerTransport.class })
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.util.unit.DataSize;
|
||||||
*
|
*
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @author Chris Bono
|
* @author Chris Bono
|
||||||
* @since 2.2.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties("spring.rsocket")
|
@ConfigurationProperties("spring.rsocket")
|
||||||
public class RSocketProperties {
|
public class RSocketProperties {
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import io.rsocket.transport.netty.server.TcpServerTransport;
|
import io.rsocket.transport.netty.server.TcpServerTransport;
|
||||||
import reactor.netty.http.server.HttpServer;
|
import reactor.netty.http.server.HttpServer;
|
||||||
|
@ -40,7 +40,7 @@ import org.springframework.messaging.rsocket.RSocketStrategies;
|
||||||
* requester instances with different configurations.
|
* requester instances with different configurations.
|
||||||
*
|
*
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @since 2.2.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
||||||
@ConditionalOnClass({ RSocketRequester.class, io.rsocket.RSocket.class, HttpServer.class, TcpServerTransport.class })
|
@ConditionalOnClass({ RSocketRequester.class, io.rsocket.RSocket.class, HttpServer.class, TcpServerTransport.class })
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketProperties.Server.Spec;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.boot.context.properties.PropertyMapper;
|
import org.springframework.boot.context.properties.PropertyMapper;
|
||||||
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyConfigurations;
|
import org.springframework.boot.reactor.netty.autoconfigure.ReactorNettyConfigurations;
|
||||||
|
import org.springframework.boot.rsocket.autoconfigure.RSocketProperties.Server.Spec;
|
||||||
import org.springframework.boot.rsocket.context.RSocketServerBootstrap;
|
import org.springframework.boot.rsocket.context.RSocketServerBootstrap;
|
||||||
import org.springframework.boot.rsocket.netty.NettyRSocketServerFactory;
|
import org.springframework.boot.rsocket.netty.NettyRSocketServerFactory;
|
||||||
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
import org.springframework.boot.rsocket.server.RSocketServerCustomizer;
|
||||||
|
@ -61,7 +61,7 @@ import org.springframework.util.unit.DataSize;
|
||||||
*
|
*
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @author Scott Frederick
|
* @author Scott Frederick
|
||||||
* @since 2.2.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
@AutoConfiguration(after = RSocketStrategiesAutoConfiguration.class)
|
||||||
@ConditionalOnClass({ RSocketServer.class, RSocketStrategies.class, HttpServer.class, TcpServerTransport.class })
|
@ConditionalOnClass({ RSocketServer.class, RSocketStrategies.class, HttpServer.class, TcpServerTransport.class })
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.dataformat.cbor.CBORFactory;
|
import com.fasterxml.jackson.dataformat.cbor.CBORFactory;
|
||||||
|
@ -39,7 +39,7 @@ import org.springframework.web.util.pattern.PathPatternRouteMatcher;
|
||||||
* {@link EnableAutoConfiguration Auto-configuration} for {@link RSocketStrategies}.
|
* {@link EnableAutoConfiguration Auto-configuration} for {@link RSocketStrategies}.
|
||||||
*
|
*
|
||||||
* @author Brian Clozel
|
* @author Brian Clozel
|
||||||
* @since 2.2.0
|
* @since 4.0.0
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration(afterName = "org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration")
|
@AutoConfiguration(afterName = "org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration")
|
||||||
@ConditionalOnClass({ io.rsocket.RSocket.class, RSocketStrategies.class, PooledByteBufAllocator.class })
|
@ConditionalOnClass({ io.rsocket.RSocket.class, RSocketStrategies.class, PooledByteBufAllocator.class })
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
|
@ -17,4 +17,4 @@
|
||||||
/**
|
/**
|
||||||
* Auto-configuration for RSocket.
|
* Auto-configuration for RSocket.
|
||||||
*/
|
*/
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"properties": [
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Application Context Initializers
|
||||||
|
org.springframework.context.ApplicationContextInitializer=\
|
||||||
|
org.springframework.boot.rsocket.context.RSocketPortInfoApplicationContextInitializer
|
|
@ -0,0 +1,4 @@
|
||||||
|
org.springframework.boot.rsocket.autoconfigure.RSocketMessagingAutoConfiguration
|
||||||
|
org.springframework.boot.rsocket.autoconfigure.RSocketRequesterAutoConfiguration
|
||||||
|
org.springframework.boot.rsocket.autoconfigure.RSocketServerAutoConfiguration
|
||||||
|
org.springframework.boot.rsocket.autoconfigure.RSocketStrategiesAutoConfiguration
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import reactor.netty.http.server.WebsocketServerSpec;
|
import reactor.netty.http.server.WebsocketServerSpec;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.rsocket.RSocketProperties.Server.Spec;
|
import org.springframework.boot.rsocket.autoconfigure.RSocketProperties.Server.Spec;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import org.assertj.core.api.InstanceOfAssertFactories;
|
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Disabled;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
|
@ -14,12 +14,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
|
|
||||||
import org.springframework.boot.rsocket.messaging.RSocketStrategiesCustomizer;
|
import org.springframework.boot.rsocket.messaging.RSocketStrategiesCustomizer;
|
||||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
@ -41,8 +41,11 @@ import static org.mockito.Mockito.mock;
|
||||||
*/
|
*/
|
||||||
class RSocketStrategiesAutoConfigurationTests {
|
class RSocketStrategiesAutoConfigurationTests {
|
||||||
|
|
||||||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().withConfiguration(
|
@SuppressWarnings("removal")
|
||||||
AutoConfigurations.of(JacksonAutoConfiguration.class, RSocketStrategiesAutoConfiguration.class));
|
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||||
|
.withConfiguration(AutoConfigurations.of(RSocketStrategiesAutoConfiguration.class))
|
||||||
|
.withBean(org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.class)
|
||||||
|
.withBean(ObjectMapper.class);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
|
@ -14,20 +14,18 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.rsocket;
|
package org.springframework.boot.rsocket.autoconfigure;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||||
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration;
|
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration;
|
import org.springframework.boot.logging.LogLevel;
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration;
|
|
||||||
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
|
|
||||||
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
|
import org.springframework.boot.reactor.netty.NettyReactiveWebServerFactory;
|
||||||
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
|
||||||
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
|
import org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext;
|
||||||
|
@ -37,12 +35,15 @@ import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.server.reactive.HttpHandler;
|
||||||
import org.springframework.messaging.handler.annotation.MessageMapping;
|
import org.springframework.messaging.handler.annotation.MessageMapping;
|
||||||
import org.springframework.messaging.rsocket.RSocketRequester;
|
import org.springframework.messaging.rsocket.RSocketRequester;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.reactive.config.EnableWebFlux;
|
||||||
|
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -56,14 +57,13 @@ class RSocketWebSocketNettyRouteProviderTests {
|
||||||
@Test
|
@Test
|
||||||
void webEndpointsShouldWork() {
|
void webEndpointsShouldWork() {
|
||||||
new ReactiveWebApplicationContextRunner(AnnotationConfigReactiveWebServerApplicationContext::new)
|
new ReactiveWebApplicationContextRunner(AnnotationConfigReactiveWebServerApplicationContext::new)
|
||||||
.withConfiguration(AutoConfigurations.of(HttpHandlerAutoConfiguration.class, WebFluxAutoConfiguration.class,
|
.withConfiguration(AutoConfigurations.of(PropertyPlaceholderAutoConfiguration.class,
|
||||||
ErrorWebFluxAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class,
|
|
||||||
JacksonAutoConfiguration.class, CodecsAutoConfiguration.class,
|
|
||||||
RSocketStrategiesAutoConfiguration.class, RSocketServerAutoConfiguration.class,
|
RSocketStrategiesAutoConfiguration.class, RSocketServerAutoConfiguration.class,
|
||||||
RSocketMessagingAutoConfiguration.class, RSocketRequesterAutoConfiguration.class))
|
RSocketMessagingAutoConfiguration.class, RSocketRequesterAutoConfiguration.class))
|
||||||
.withUserConfiguration(WebConfiguration.class)
|
.withUserConfiguration(WebConfiguration.class)
|
||||||
.withPropertyValues("spring.rsocket.server.transport=websocket",
|
.withPropertyValues("spring.rsocket.server.transport=websocket",
|
||||||
"spring.rsocket.server.mapping-path=/rsocket")
|
"spring.rsocket.server.mapping-path=/rsocket")
|
||||||
|
.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
|
||||||
.run((context) -> {
|
.run((context) -> {
|
||||||
ReactiveWebServerApplicationContext serverContext = (ReactiveWebServerApplicationContext) context
|
ReactiveWebServerApplicationContext serverContext = (ReactiveWebServerApplicationContext) context
|
||||||
.getSourceApplicationContext();
|
.getSourceApplicationContext();
|
||||||
|
@ -99,9 +99,15 @@ class RSocketWebSocketNettyRouteProviderTests {
|
||||||
.websocket(URI.create("ws://localhost:" + port + "/rsocket"));
|
.websocket(URI.create("ws://localhost:" + port + "/rsocket"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EnableWebFlux
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
static class WebConfiguration {
|
static class WebConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
HttpHandler httpHandler(ApplicationContext context) {
|
||||||
|
return WebHttpHandlerBuilder.applicationContext(context).build();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
WebController webController() {
|
WebController webController() {
|
||||||
return new WebController();
|
return new WebController();
|
||||||
|
@ -114,6 +120,17 @@ class RSocketWebSocketNettyRouteProviderTests {
|
||||||
return serverFactory;
|
return serverFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
ObjectMapper objectMapper() {
|
||||||
|
return new ObjectMapper();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@SuppressWarnings({ "removal", "deprecation" })
|
||||||
|
org.springframework.http.converter.json.Jackson2ObjectMapperBuilder objectMapperBuilder() {
|
||||||
|
return new org.springframework.http.converter.json.Jackson2ObjectMapperBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Controller
|
@Controller
|
|
@ -21,11 +21,10 @@ plugins {
|
||||||
description = "Starter for building RSocket clients and servers"
|
description = "Starter for building RSocket clients and servers"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
api(project(":spring-boot-project:spring-boot-rsocket"))
|
||||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-json"))
|
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-json"))
|
||||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-reactor-netty"))
|
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-reactor-netty"))
|
||||||
api("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
|
api("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor")
|
||||||
api("io.rsocket:rsocket-core")
|
|
||||||
api("io.rsocket:rsocket-transport-netty")
|
api("io.rsocket:rsocket-transport-netty")
|
||||||
api("org.springframework:spring-messaging")
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue