title: java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
body: <p>I'm doing this project with spring boot and I tried to write some tests but sadly I get this exception stacktrace:</p>
  
  <pre><code>java.lang.IllegalStateException: Failed to load ApplicationContext
  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [somepath/config/PostgresJpaConfig.class]; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
  Caused by: java.lang.NoClassDefFoundError: org/springframework/data/repository/config/BootstrapMode
  </code></pre>
  
  <p>I looked if some sort of dependency was missing in my <strong>build.gradle</strong>, but I don't think so. The <em>BootstrapMode</em> thingy doesn't exist anywhere, not even on the Central Maven Repository. I searched through my entire project with IntelliJ for any type of <em>BootstrapMode</em> appearance, without any luck.</p>
  
  <p>These are my gradle dependencies:
  <a href="https://i.stack.imgur.com/bG3kH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bG3kH.png" alt="Gradle Dependencies"></a></p>
  
  <p>This is my PostgrsJpaConfig class:
  <a href="https://i.stack.imgur.com/VPbdQ.png" rel="noreferrer">PostgresJpaConfig class</a></p>