title: Docker, Mongodb,Spring Boot on Windows getting Connection refused error
body: <p>I am using default docker image of MongoDB and trying to connect using simple spring Boot application on windows box.</p>
  
  <p>mongoDB image is getting stared correctly</p>
  
  <p><a href="https://i.stack.imgur.com/xkH6e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xkH6e.png" alt="enter image description here"></a> </p>
  
  <p><strong>IP in mongoDB image</strong> 
  <a href="https://i.stack.imgur.com/K5Qvz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K5Qvz.png" alt="enter image description here"></a>   </p>
  
  <p>I have <code>spring-boot-starter-data-mongodb</code> in my class path. i am using all spring boot default and only using below property in application.properties.   </p>
  
  <pre><code>spring.data.mongodb.host=192.168.99.100
  </code></pre>
  
  <p>On application startup getting  <strong>Connection refused: connect</strong> error </p>
  
  <p>Logs </p>
  
  <pre><code>019-03-06 06:15:06.096  INFO 4664 --- [           main] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[192.168.99.100:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
  2019-03-06 06:15:06.096  INFO 4664 --- [           main] org.mongodb.driver.cluster               : Adding discovered server 192.168.99.100:27017 to client view of cluster
  2019-03-06 06:15:06.356  WARN 4664 --- [           main] o.s.d.m.c.m.BasicMongoPersistentProperty : Customizing field name for id property not allowed! Custom name will not be considered!
  2019-03-06 06:15:06.928  INFO 4664 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
  2019-03-06 06:15:07.164  INFO 4664 --- [68.99.100:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server 192.168.99.100:27017
  </code></pre>
  
  <p>What i am missing here ? </p>