title: connect spring boot app to mongodb
body: <p>i'm trying to connect my spring boot app to a remote mongodb database.
  When i run my app i got this error:</p>
  
  <p>2017-05-25 15:22:57.829  INFO 4532 --- [*******:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server <strong>mongodb-server-address:27017</strong></p>
  
  <p>com.mongodb.MongoSocketOpenException: Exception opening socket
      at com.mongodb.connection.SocketStream.open(SocketStream.java:63) ~[mongodb-driver-core-3.4.2.jar:na]
      at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115) ~[mongodb-driver-core-3.4.2.jar:na]
      at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:113) ~[mongodb-driver-core-3.4.2.jar:na]
      at java.lang.Thread.run(Unknown Source) [na:1.7.0_79]
  Caused by: java.net.ConnectException: <strong>Connection refused: connect</strong></p>