A normal spring-web application can be deployed to tomcat standalone as war file as follows: Question: how can I deploy such an application after migrating to spring-webflux to tomcat? Docs say: https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html#webflux-httphandler To deploy…
Tag: spring-webflux
How do I increase the default timeout in the Cassandra Java driver using the DriverConfigLoader?
Small question regarding a Spring Webflux Reactive Cassandra application please. On a setup Spring Boot 2.6.4 with Webflux and reactive Cassandra, I am using the app to insert some data in Cassandra tables. Things works fine, until when there is a higher load, I am seeing an issue (stack trace attached) The t…
Webflux collectMap resulting Mono<Map<String, Mono>>
I’m quite new in the reactive world My code looks like this: The result is of type Map<String, Mono<String>> . I would like it to be of type Map<String, String>. Any ideas? Answer I suggest to use flatMap operator before collecting the elements into a Map
Getting error while configuring Swagger-ui with spring reactive
While integrating swagger-ui with a reactive spring project generated using JHipster 7.1.0 for Java 11. I added the below dependencies. The application has below dependencies of swagger POM dependencies Apart from that we added a configuration SwaggerConfig.java Please share your feedback or inputs if you hav…
How to setServletPath() in Spring Junit WebTestClient?
This creates a MockHttpServletRequest that is send to the @RestContoller servlets. Problem: my servlets make use of HttpServletRequest.getServletPath(), but which is always empty using the WebTestClient approach above. Question: how can I explicit set the servletPath in my junit tests? Answer I could solve it…
Spring: re-initialized a bean
This is my Spring bean in the configuration class that creates a gRPC ManagedChannel: The controller method is provided below: The service class is: For each request, I create a new ManagedChannel in the service method processRequest and shut it down using the method called shutdownManagedChannel. Earlier, I …
How to convert List into a Mono
i’m trying to convert this method to an a reactive method I Have something like this but i don’t know how to conver the ArrayList to return an Mono<List> Answer If you really want a Mono, then just wrap the value that you want to transport in it: But I doubt you really want to return a list …
Calling blocking endpoint on non-blocking asynchronous service
If my reactive endpoint needs to call an external, non-reactive endpoint which does blocking stuff, is my reactive endpoint still reactive? I have 2 services running that levergaes Spring Boot MVC and Spring Webflux. Service A Spring Webflux Service B Spring MVC Now my Service A which is reactive calling the …
spring-webflux : How to Extract user defined object from Mono or Flux from the response without blocking?
getUserDetails Method returns Mono of Type JsonNode. But I Actually want to return a Mono<User.java> or Flux<User.java>. please help modifying getBulkUserInfo or getUserDetails to get the Mono<User.java> or Flux<User.java> But The json response from the Url is something like I tried di…
ReactiveMongoRepository can’t save to database
I’m newbie with Java. I’m create an API with Webflux and ReactiveMongoRepository. I try to save my data from another API. My repository: My service implements: My services: My model: After function findByIdAccountsApiTrack() run I can’t find any document created in my database. I can see my …