title: java.lang.NoClassDefFoundError: org/springframework/core/NativeDetector
body: <p>I'm brushing up on spring with this <a href="https://medium.com/bb-tutorials-and-thoughts/how-to-develop-and-build-angular-app-with-java-backend-87fb603c6e17" rel="nofollow noreferrer">tutorial</a> and getting the following dependency issue on JPARepository:</p>
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userPersistence' defined in persistence.UserPersistence defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/NativeDetector
  </code></pre>
  <p>The <code>UserPersistence</code> class is like this:</p>
  <pre><code>import org.springframework.data.jpa.repository.JpaRepository;
  import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
  import org.springframework.data.querydsl.QuerydslPredicateExecutor;
  import org.springframework.data.rest.core.annotation.RepositoryRestResource;
  
  
  @RepositoryRestResource()
  public interface UserPersistence extends JpaRepository&lt;UserDAO, Integer&gt;, JpaSpecificationExecutor&lt;UserDAO&gt;, QuerydslPredicateExecutor&lt;UserDAO&gt; {}
  </code></pre>
  <p>and I'm using this <code>build.gradle</code>:</p>
  <pre><code>plugins {
      id 'org.springframework.boot' version '2.3.9.RELEASE'
      id 'io.spring.dependency-management' version '1.0.11.RELEASE'
      id 'java'
  }
  
  group = 'org.example'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = '11'
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      implementation 'org.springframework.boot:spring-boot-starter'
      implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
      implementation 'org.springframework.boot:spring-boot-starter-data-rest'
      implementation group: 'org.springframework.data', name: 'spring-data-commons', version: '2.4.5'
      implementation group: 'com.querydsl', name: 'querydsl-jpa', version: '4.4.0'
      implementation group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
      implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
      compileOnly 'org.projectlombok:lombok'
      runtimeOnly 'com.h2database:h2'
      annotationProcessor 'org.projectlombok:lombok'
      testImplementation('org.springframework.boot:spring-boot-starter-test') {
          exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
      }
  }
  
  test {
      useJUnitPlatform()
  }
  </code></pre>
  <p>Many thanks to anyone with any knowledge about this issue!</p>