title: Spring boot has error creating beans for JpaRepository
body: <p>i bumped into a problem with my school project i was attempting to set up h2 database for.
  Everything ran fine i guess untill i created Repository interface for my database, which looks simply like this</p>
  
  <pre><code>package com.protonmail.jan.backend.repository;
  
  import org.springframework.data.jpa.repository.JpaRepository;
  
  public interface RecordRepository extends JpaRepository {
  }
  </code></pre>
  
  <p>When i run the application without the repository code, the app at least starts, i'm pretty new to spring-boot, so i have no idea what's going on here, but i guess it's some dependencies or something needet to create beans missing on my pom.xml file? Please help, here is some of the error log i got:</p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Unsatisfied dependency expressed through method 'requestMappingHandlerAdapter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recordRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class java.lang.Object
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recordRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class java.lang.Object
  Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recordRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class java.lang.Object
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'recordRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class java.lang.Object
  Caused by: java.lang.IllegalArgumentException: Not a managed type: class java.lang.Object
  
  </code></pre>
  
  <p>this is my Record</p>
  
  <pre><code>package com.protonmail.jan.backend.entity;
  
  import javax.persistence.*;
  import javax.validation.constraints.NotEmpty;
  import javax.validation.constraints.NotNull;
  import java.util.Collection;
  import java.util.Date;
  import java.util.HashMap;
  import java.util.Map;
  
  @Entity
  public class Record extends AbstractEntity {
      @NotNull
      @NotEmpty
      private Date date;
  
      @NotNull
      @NotEmpty
      private static Map&lt;Integer, Room&gt; rooms;
      static {
          rooms = new HashMap&lt;Integer, Room&gt;(){
              {
                  put(1, new Room());
                  put(2, new Room());
                  put(3, new Room());
              }
          };
      }
  
      public Collection&lt;Room&gt; getAllRooms(){
          return this.rooms.values();
      }
  }
  </code></pre>
  
  <p>this is Room, which is contained in Record</p>
  
  <pre><code>package com.protonmail.jan.backend.entity;
  
  import javax.persistence.*;
  import javax.validation.constraints.NotEmpty;
  import javax.validation.constraints.NotNull;
  import java.util.Map;
  
  @Entity
  public class Room extends AbstractEntity{
      private String name = "pokoj";
      private Boolean lit = false;
      private long temp = 0;
  
      public Room() {
      }
      public Boolean getLit() {
          return lit;
      }
      public void setLit(Boolean lit) {
          this.lit = lit;
      }
      public long getTemp() {
          return temp;
      }
      public void setTemp(long temp) {
          this.temp = temp;
      }
  }
  </code></pre>
  
  <p>this is AbstractEntity class</p>
  
  <pre><code>package com.protonmail.jan.backend.entity;
  
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.MappedSuperclass;
  
  @MappedSuperclass
  public abstract class AbstractEntity {
      @Id
      @GeneratedValue(strategy= GenerationType.SEQUENCE)
      private Long id;
  
      public Long getId() {
          return id;
      }
  
      public boolean isPersisted() {
          return id != null;
      }
  
      @Override
      public int hashCode() {
          if (getId() != null) {
              return getId().hashCode();
          }
          return super.hashCode();
      }
  
      @Override
      public boolean equals(Object obj) {
          if (this == obj) {
              return true;
          }
          if (obj == null) {
              return false;
          }
          if (getClass() != obj.getClass()) {
              return false;
          }
          AbstractEntity other = (AbstractEntity) obj;
          if (getId() == null || other.getId() == null) {
              return false;
          }
          return getId().equals(other.getId());
      }
  }
  </code></pre>
  
  <p>i also have used</p>
  
  <pre><code>public interface RecordRepository extends JpaRepository&lt;Repository, Long&gt; {}
  </code></pre>