Skip to content
Advertisement

Tag: spring-data-mongodb-reactive

Mongo Replicaset monitoring replaces hostnames with IP and leads to failed hostname verification

we have a problem with the mongo java driver and the monitoring thread. We are running a 3 server replicaset and connect our spring boot microservices by using the hostnames. mongodb://<username>:<password>@A:27017,B:27017,C:27017/?tls=true Up until now we always used the non-reactive mongo driver and everything is working fine. However I now wanted to use the reactive/netty version and we’re getting a java.security.cert.CertificateException

Update 1 or multiple specific field MongoDB using Spring boot WebFlux,Spring Data MongoDB Reactive and ReactiveMongoRepository

I’m newbie with java. I tried to implement update method for my API. I want to update some field of my data. Here is my data class: My service interface: And implement for services: My Controller: And Task Repository: My data in DB: My request body: I expected: But it responsed: It update my missing value in request with null

How do you test a reactive mongo repository?

I’m trying to test the findByPhoneNumber method in this repository ATM, my test looks like this When I run it, I get this error org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘io.freesale.repository.UserRepositoryTest’: Unsatisfied dependency expressed through field ‘repository’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘io.freesale.repository.UserRepository’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:

Advertisement