Disable the "default" Netty port for a Springboot RSocket project

1.2k views Asked by At

Question regarding a Springboot RSocket project please.

I am building an application where I use only Springboot RSocket.

I do not need Webflux, the project only exposes RSocket @MessageMapping("someRoutes").

However, on each start on the application, I am seeing:

2020-12-08 05:06:21.437  INFO [myservice,,] 26627 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port(s): 8080
2020-12-08 05:06:21.449  INFO [myservice,,] 26627 --- [           main] o.s.b.rsocket.netty.NettyRSocketServer   : Netty RSocket started on port(s): 7000

May I ask how to simply disable the Netty one? (maybe coming from Webflux?)

It is not doing any harm etc, some might say just to "ignore it or leave it" but I would like to just know the technicality on how to disable it.

Thanks

1

There are 1 answers

1
Yuri Schimke On BEST ANSWER

Think this answers it How to prevent embedded netty server from starting with spring-boot-starter-webflux?

spring.main.web-application-type=none

https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/html/howto-embedded-web-servers.html#howto-disable-web-server

Although I haven't tested, but a lot of this comes from Spring-Boot starting everything included in your dependencies by default.