title: Spring boot (JPA Test) : Unable to find a @SpringBootConfiguration when doing a JpaTest
body: <p>I'm trying to run a simple Junit test to see if my JpaRepository are indeed working.</p>
  
  <p>The error I keep getting is:</p>
  
  <pre><code>Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test java.lang.IllegalStateException doesn't spring boot configure itself?
  </code></pre>
  
  <p>My Test Class :</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @DataJpaTest
  public class LogConnectionTest {
  
      @Autowired
      private TestEntityManager entityManager;
  
      @Autowired
      private LogConnectionDao logConnectionDao;
  
      @Test
      public void ajouterTest() throws Exception{
          this.entityManager.persist(new LogConnection("Test",4));
          LogConnection logConnection = this.logConnectionDao.findOne((long)1);
          assertThat(logConnection.getClasseName().equals("Test"));
          assertThat(logConnection.getOriginalId() != 5);
      }
  }
  </code></pre>
  
  <p>My Spring boot application :</p>
  
  <pre><code>@SpringBootApplication
  public class UpsysmarocLibraryLogApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(UpsysmarocLibraryLogApplication.class, args);
      }
  }
  </code></pre>
  
  <p>My Repository :</p>
  
  <pre><code>public interface LogConnectionDao extends JpaRepository&lt;LogConnection,Long&gt; {
  
  }
  </code></pre>