title: spring-boot: start application without database if password fails
body: <p>I am using the application in two instances that have different database passwords. My code only needs to access and query one instance, and doesn't need to access database on another instance. If I try to deploy the app with wrong password, it gives me "password authentication" error and doesn't start the application. </p>
  
  <p>I want the app to ignore the database connection if password authentication is failed.</p>
  
  <p>Here is my application.properties file.</p>
  
  <pre><code>spring.security.enabled=false
  management.security.enabled=false
  security.basic.enabled=false
  
  ## Postgresql for storing backup details
  spring.jpa.hibernate.ddl-auto=update
  spring.datasource.driver-class-name=org.postgresql.Driver
  spring.datasource.url= jdbc:postgresql://localhost:5432/dbName
  spring.datasource.username=username
  spring.datasource.password=password
  #spring.datasource.continue-on-error=true
  #spring.datasource.initialize=false
  spring.jpa.database-platform = org.hibernate.dialect.PostgreSQL94Dialect
  spring.datasource.primary.continueOnError=true
  spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
  </code></pre>
  
  <p>Spring boot version is 1.5.9</p>