Not connect to Mongodb atlas

Hi everybody,
My project somehow works fine when connecting to Mongodb local but not when connecting to Mongodb atlas.

application.properties:
spring.data.mongodb.uri=mongodb+srv://nghia:*******@cluster0.givjhry.mongodb.net/NTCinemaDB?retryWrites=true&w=majority

Pom.xml:

<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-mongodb</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>me.paulschwarz</groupId>
			<artifactId>spring-dotenv</artifactId>
			<version>2.5.4</version>
		</dependency>
	</dependencies>

Thanks for your help.

Hey @Nghia_Vo,

Welcome to the MongoDB Community :sparkles:

Looking at the shared error logs it appears that the issue may be related to SSL. Have you had a chance to look at the Enable TLS/SSL on a Connection documentation? I think it would be helpful to set up a TLS connection to MongoDB from your Java application which may resolve the issue.

I hope it helps!

Regards,
Kushagra