I’m facing the same issue, but did not find any solution on the forum here which works.
I can connect to a DB on cluster0.dnqegeu.mongodb.net
or cluster0.xfzokj5.mongodb.net
with the MongoDB Compass application,
BUT my java spring application fails to connect to a URI with mongodb+srv://
While the mongodb driver should use the SRV entries of the DNS, it looks for a TXT entry.
The library in use is mongodb-driver-core-4.8.2.jar
Any suggestion please?