title: How can I override Spring Boot application properties for tests without using profiles?
body: <p>I find extremely scarce all information about having a typical setup in Spring Boot with a main production db and a test in-mem db.</p>
  
  <ul>
  <li><p>There's no convention for test properties, application.properties in test override the ones in main obviously, and there's no fallback mechanism like application-test.properties -> application.properties. I don't want to use profiles, because I would like them to define strictly the environment, which is another dimension (local, production), and I would need the cartesian product main-local, test-local, main-production, test-production..</p></li>
  <li><p>So I am gonna let Spring do magic for me, therefore I set @DataJpaTest annotation on my RepositoryTest. Spring certainly creates the H2 db on-the-fly, but I don't find a way to set a custom schema or enable H2 console, as application.properties are ignored.</p></li>
  </ul>
  
  <p>How it is the most standard way to deal with this?</p>
  
  <p>P.S. I think the easy way to do that is overriding properties in my test by means of <code>@SpringBootTest(properties = { "h2.console.enabled: true", "h2.console.path: /myconsole" })</code> but I cant find the way for @DataJpaTest to bind them</p>