title: Caused by: java.io.FileNotFoundException: class path resource [application.properties] cannot be opened because it does not exist
body: <p>I am creating an spring boot Batch application. That Batch loads data from postgres and insert into MongoDB. I have written the code , but while running the spring boot application, its shows error that <code>application.properties</code> file is not found. below are error snippets:</p>
  
  <pre><code>'Caused by: java.io.FileNotFoundException: class path resource [application.properties] cannot be opened because it does not exist'
  org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.example.batch.SpringBatchExample]; nested exception is java.io.FileNotFoundException: class path resource [application.properties] cannot be opened because it does not exist
  </code></pre>
  
  <p>Below are <code>application.properties</code> file contents: </p>
  
  <pre><code>spring.data.mongodb.host=localhost
  spring.data.mongodb.port=27017
  spring.data.mongodb.database=Test_Data
  
  #logging
  logging.level.org.springframework.data=DEBUG
  logging.level.=ERROR
  logging.level.com.mastercard.refdata.*=DEBUG
  
  
  #By default, Spring runs all the job as soon as it has started its context.
  spring.batch.job.enabled=false
  
  #Chunk Size to save data
  spring.chunk.size=200
  
  #Postgres DATASOURCE
  spring.datasource.url=jdbc:postgresql://localhost:5432/Company-Test
  spring.datasource.username=postgres
  spring.datasource.password=test123
  spring.datasource.driver-class-name=org.postgresql.Driver
  </code></pre>
  
  <p>Please let me know why I am getting this issue??</p>