title: In a springboot integration test, how do I force bean creating of test service before jpa/hibernate?
body: <p>I am setting up a SpringBootTest for a spring-data-jpa enabled application. We are trying to set up a second level caching using Redis/Reddison, and hibernate is configured to use a RedisRegionFactory in its properties.</p>
  <p>In our integration test we want to spin up a local Redis instance using a RedisServer bean that we configure in a TestConfiguration class. When the tests start up, it fails with a bean creation exception due to Hibernbate spinning up first and the RedisRegionFactory instance running into a dead IP connection due to RedisServer not yet spun up.</p>
  <p>We tried a couple of tricks to get The TestConfiguration class and its beans to be loaded first, like adding an @Order annotation. But in debugging we find that the configuration beans are not touched before hibernate spins up. We do not really want to redefine autoconfigured beans here, is there another way to force SpringBootTest to load the beans before JPA?</p>