mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-29 21:59:02 +00:00
Merge branch '3.5.x' into 4.0.x
Closes gh-49593
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ public final class RSocketServerAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(name = "spring.rsocket.server.port", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.rsocket.server.port", havingValue = "false", matchIfMissing = true)
|
||||
static class HasNoPortConfigured {
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -84,6 +84,17 @@ class RSocketServerAutoConfigurationTests {
|
||||
.run((context) -> assertThat(context).hasSingleBean(RSocketWebSocketNettyRouteProvider.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldNotCreateWebSocketRouteProviderWhenDedicatedPortIsSet() {
|
||||
reactiveWebContextRunner()
|
||||
.withPropertyValues("spring.rsocket.server.port=0", "spring.rsocket.server.transport=websocket",
|
||||
"spring.rsocket.server.mapping-path=/rsocket")
|
||||
.run((context) -> {
|
||||
assertThat(context).hasSingleBean(RSocketServerFactory.class);
|
||||
assertThat(context).doesNotHaveBean(RSocketWebSocketNettyRouteProvider.class);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldCreateDefaultBeansForRSocketServerWhenPortIsSet() {
|
||||
reactiveWebContextRunner().withPropertyValues("spring.rsocket.server.port=0")
|
||||
|
||||
Reference in New Issue
Block a user