im trying to connect my mongodb atlas with spring with the following.
<!-- Spring Data JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Spring Data MongoDB -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>3.2.4</version>
</dependency>
application.properties
spring.data.mongodb.uri=mongodb+srv://username:[email protected]/?retryWrites=true&w=majority&appName=lolSearch
it isn’t working, when i try to test the connection is like it doesn’t read mongodb+ its starting from srv:// but when i force the mongodb+ in the connection test it works. I dont know how to fix it. im using itellij.
I tried to replace the + sign to %2B but it didnt work
1