Skip to content

Commit 1c854b4

Browse files
committed
fix issue with autoconfiguring
1 parent 899efc6 commit 1c854b4

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ allprojects {
1717
apply plugin: 'java'
1818
apply plugin: 'eclipse'
1919
apply plugin: 'io.spring.dependency-management'
20+
apply plugin: 'maven-publish'
2021

2122
group = 'io.rsocket.spring.boot'
2223
version = '0.0.1.RELEASE'
@@ -45,4 +46,12 @@ allprojects {
4546
}
4647
}
4748
}
49+
50+
publishing {
51+
publications {
52+
maven(MavenPublication) {
53+
from components.java
54+
}
55+
}
56+
}
4857
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = 'demo'
1+
rootProject.name = 'spring-boot-rsocket'
22

33

44
include 'spring-boot-autoconfigure-rsocket'

spring-boot-autoconfigure-rsocket/src/main/java/io/rsocket/spring/boot/RSocketServerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@ConfigurationProperties(prefix = "rsocket.server", ignoreUnknownFields = true)
66
public class RSocketServerProperties {
7-
private String path;
7+
private String path = "/rs";
88

99
public String getPath() {
1010
return path;

spring-boot-autoconfigure-rsocket/src/main/java/io/rsocket/spring/boot/RSocketWebServerFactoryAutoConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ public ReactorResourceFactory reactorServerResourceFactory() {
6262
}
6363

6464
@Bean
65-
public RSocketNettyReactiveWebServerFactory nettyReactiveWebServerFactory(
65+
public RSocketNettyReactiveWebServerFactory rSocketNettyReactiveWebServerFactory(
6666
ReactorResourceFactory resourceFactory,
67+
RSocketServerProperties rSocketServerProperties,
6768
SocketAcceptor socketAcceptor
6869
) {
6970
RSocketNettyReactiveWebServerFactory serverFactory = new RSocketNettyReactiveWebServerFactory();
7071
serverFactory.setResourceFactory(resourceFactory);
7172
serverFactory.setSocketAcceptor(socketAcceptor);
73+
serverFactory.setPath(rSocketServerProperties.getPath());
7274
return serverFactory;
7375
}
7476
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2+
io.rsocket.spring.boot.RSocketWebServerFactoryAutoConfiguration

0 commit comments

Comments
 (0)