I think you can't use both -web and -webflux starters at the same time.
l
Luiz Aguiar
05/16/2023, 10:17 AM
you can... but not all Reactive components are available/started since the application type is still
servlet
.
that's my question's point
j
Jacob
05/16/2023, 12:27 PM
If we're talking boot, there's a property you can set that will flip things to reactive mode. The reason this is guarded by a property is so that non-reactive users can put webflux on the classpath for the purposes of WebClient and still have their webserver be plain old requet-per-thread
modules in your application results in Spring Boot auto-configuring Spring MVC, not WebFlux. This behavior has been chosen because many Spring developers add
spring-boot-starter-webflux
to their Spring MVC application to use the reactive
WebClient
. You can still enforce your choice by setting the chosen application type to
I think I know the answer... but the point was if it may be still possible to use Coroutines while the Spring application is set to mvc/servlet... but having
webflux
also in the classpath.
j
Jacob
05/16/2023, 2:06 PM
sure, you'll just need to wrap every entry point in a runBlocking