Connessione a MongoDB con Java
Per Java la libreria più usata per la connessione a MongoDB pare sia mongo-java-driver.
Se usate Maven:
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.2</version>
</dependency>
</dependencies>