I'm learning Spring and things were going well but suddenly running into this issue where it cannot find a qualified bean. Hitting the wall, even in a new app I'm getting this.
Let me know if you need more, going to take a break! I must be missing something very simple.
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
  No qualifying bean of type [com.alco.repository.ContactRepository]
  found for dependency [com.alco.repository.ContactRepository]:
  expected at least 1 bean which qualifies as autowire candidate for this dependency.
  Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
My dependencies:
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-hateoas</artifactId>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>
Contact class:
package com.example.entity;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class Contact implements Serializable {
private static final long serialVersionUID = -1340978779095092824L;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private String id;
private String firstName;
private String lastName;
private String address;
private String phoneNumber;
private String email;
}
The simple interface:
package com.alco.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import com.alco.entity.Contact;
public interface ContactRepository extends JpaRepository<Contact, String> {
}
 
     
     
     
     
    