Closed Thinkenterprise closed 2 years ago
spring-boot-starter-webflux
has both HTTP and WebSocket support, whereas spring-boot-starter-web
only ships HTTP support. What happens if you also add spring-boot-starter-websocket
to your application?
Yes of course you were right. I opened the issue too quickly, sorry
No worries, thanks for testing before the release, this is helping!
@Thinkenterprise do you mind explaining what the problem was and what you did to solve it? Mostly for people like me who come here with the exact same setup and issue but don't have the same understanding?
I am using the following dependencies, including web
in place of webflux
(except for testing) but I DO include spring-boot-starter-websocket
and -security
and yet I still receive error like you generated it, originally using web
.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-graphql</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Database Feature Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<!-- Test Feature Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.graphql</groupId>
<artifactId>spring-graphql-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
I wrote the following test
For the test I have the following dependency active
In this setting, the test runs and works!!
If I change the first dependency from
to
the test fails. The error message is:
In both cases web and weblux a websocket configuration is active? I cant understand this problem?