Error creating bean with name 'XXX: Unsatisfied dependency expressed through field 'XXX'
<p>Below is the trace :</p>

<blockquote>
  <p>org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error creating bean with name 'testController': Unsatisfied dependency
  expressed through field 'testDao'; nested exception is
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'testDAO': Invocation of init method failed;
  nested exception is java.lang.IllegalArgumentException: Not a managed
  type: class modele.Test</p>
</blockquote>

<p>...</p>

<blockquote>
  <p>Caused by: org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'testDAO': Invocation of init method
  failed; nested exception is java.lang.IllegalArgumentException: Not a
  managed type: class modele.Test</p>
</blockquote>

<p>...</p>

<blockquote>
  <p>Caused by: java.lang.IllegalArgumentException: Not a managed type:
  class modele.Test</p>
</blockquote>

<p>From my understanding the root error is <code>Not a managed type: class modele.Test</code>, which would have something to do with Test not being recognized as an entity ?</p>

<p>Here's my project :</p>

<p>Architecture : <a href="https://imgur.com/a/2xsI4" rel="nofollow noreferrer">http://imgur.com/a/2xsI4</a></p>

<p><strong>Application.java</strong></p>

<pre><code>@SpringBootApplication
@ComponentScan("boot")
@ComponentScan("dao")
@ComponentScan("modele")
@EnableJpaRepositories("dao")
public class Application {

    public static void main (String[] args){
        SpringApplication.run(Application.class, args);
    }

}
</code></pre>

<p><strong>TestDAO.java</strong></p>

<pre><code>@Transactional
public interface TestDAO extends CrudRepository&lt;Test, Long &gt; {

  /**
   * This method will find an User instance in the database by its email.
   * Note that this method is not implemented and its working code will be
   * automagically generated from its signature by Spring Data JPA.
   */
  public Test findByEmail(String email);

}
</code></pre>

<p><strong>Test.java</strong></p>

<pre><code>@Entity
@Table(name = "test")
public class Test {

    // An autogenerated id (unique for each user in the db)
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    @NotNull
    private String email;

    @NotNull
    private String name;

    // Public methods

    public Test() {
    }

    public Test(long id) {
        this.id = id;
    }

    public Test(String email, String name) {
        this.email = email;
        this.name = name;
    }
//setters and getters
</code></pre>

<p>I'd appreciate any help. Thanks!</p>