Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
16f798dc
Commit
16f798dc
authored
Aug 12, 2019
by
Brian Clozel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply RSocket transport configuration on server
Fixes gh-17845
parent
20591474
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
RSocketProperties.java
...amework/boot/autoconfigure/rsocket/RSocketProperties.java
+4
-9
RSocketServerAutoConfiguration.java
...autoconfigure/rsocket/RSocketServerAutoConfiguration.java
+1
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java
View file @
16f798dc
...
...
@@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.rsocket;
import
java.net.InetAddress
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.rsocket.server.RSocketServer
;
/**
* {@link ConfigurationProperties properties} for RSocket support.
...
...
@@ -50,7 +51,7 @@ public class RSocketProperties {
/**
* RSocket transport protocol.
*/
private
Transport
transport
=
Transport
.
TCP
;
private
RSocketServer
.
TRANSPORT
transport
=
RSocketServer
.
TRANSPORT
.
TCP
;
/**
* Path under which RSocket handles requests (only works with websocket
...
...
@@ -74,11 +75,11 @@ public class RSocketProperties {
this
.
address
=
address
;
}
public
Transport
getTransport
()
{
public
RSocketServer
.
TRANSPORT
getTransport
()
{
return
this
.
transport
;
}
public
void
setTransport
(
Transport
transport
)
{
public
void
setTransport
(
RSocketServer
.
TRANSPORT
transport
)
{
this
.
transport
=
transport
;
}
...
...
@@ -90,12 +91,6 @@ public class RSocketProperties {
this
.
mappingPath
=
mappingPath
;
}
public
enum
Transport
{
TCP
,
WEBSOCKET
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketServerAutoConfiguration.java
View file @
16f798dc
...
...
@@ -92,6 +92,7 @@ public class RSocketServerAutoConfiguration {
ObjectProvider
<
ServerRSocketFactoryCustomizer
>
customizers
)
{
NettyRSocketServerFactory
factory
=
new
NettyRSocketServerFactory
();
factory
.
setResourceFactory
(
resourceFactory
);
factory
.
setTransport
(
properties
.
getServer
().
getTransport
());
PropertyMapper
map
=
PropertyMapper
.
get
().
alwaysApplyingWhenNonNull
();
map
.
from
(
properties
.
getServer
().
getAddress
()).
to
(
factory:
:
setAddress
);
map
.
from
(
properties
.
getServer
().
getPort
()).
to
(
factory:
:
setPort
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment