title: SpringBoot: Configuration Production Vs Development environments
body: <p>I have a problem with SpringBoot 1.5.1. I've create <code>application.properties</code> and <code>application-dev.properties</code> for my dev enviroment.</p>
  
  <p>The main difference is the persistence: in production (<code>application.properties</code>) there is a JNDI (configured on Tomcat) and in dev there is a local db (H2). </p>
  
  <p>This is my conf in <code>application.properties</code>:</p>
  
  <pre><code>spring.datasource.jndi-name=jdbc/db
  </code></pre>
  
  <p>And this is the <code>application-dev.properties</code>:</p>
  
  <pre><code>spring.datasource.url=jdbc:h2:file:~/db
  spring.datasource.username=sa
  spring.datasource.password=
  spring.datasource.driverClassName=org.h2.Driver
  </code></pre>
  
  <p>But when I'm starting in with dev profile</p>
  
  <pre><code>2017-02-24 15:25:39.948  INFO 7912 --- [           main] it.geny.MmqApplication                   : The following profiles are active: dev
  </code></pre>
  
  <p>my app stops because it didn't find the JNDI jdbc/db!!!! I'm trying to change log configuration on my <code>application-dev.properties</code> and it works! But not the changes on persistence configuration. </p>
  
  <p>Thanks in advance</p>