title: Heroku Spring boot + Mongo DB on atlas
body: <p>I am getting Null pointer exception while deploying my application on Heroku, from the exception log</p>
  <pre><code>    2021-01-28T23:18:59.561585+00:00 app[web.1]: Caused by: java.lang.NullPointerException: null
  2021-01-28T23:18:59.561585+00:00 app[web.1]:    at com.mongodb.ConnectionString.&lt;init&gt;(ConnectionString.java:285) ~[mongodb-driver-core-3.11.2.jar!/:na]
  2021-01-28T23:18:59.561585+00:00 app[web.1]:    at com.mongodb.client.MongoClients.create(MongoClients.java:61) ~[mongodb-driver-3.11.2.jar!/:na]
  2021-01-28T23:18:59.561585+00:00 app[web.1]:    at com.shop.MongoConfiguration.mongoClient(MongoConfiguration.java:34) ~[classes!/:0.0.1-SNAPSHOT]
  2021-01-28T23:18:59.561586+00:00 app[web.1]:    at
  </code></pre>
  <p>which looks like the application is not reading my <strong>application.properties</strong> file</p>
  <pre><code>spring.data.mongodb.uri=mongodb+srv://****
  spring.data.mongodb.database=****
  </code></pre>
  <p><strong>The application is working file on local env</strong></p>
  <p>Any idea how to overcome this issue?</p>