title: Error Run Spring Boot (Unsatisfied dependency expressed through field)
body: <p>I'm watching a class and I did everything exactly like a class and it's making a mistake in compiling.
  Follows Code and Class</p>
  
  <blockquote>
    <p>2019-10-16 22:49:39.528  INFO 7668 --- [           main]
    ConditionEvaluationReportLoggingListener : </p>
    
    <p>Error starting ApplicationContext. To display the conditions report
    re-run your application with 'debug' enabled. 2019-10-16 22:49:39.544
    ERROR 7668 --- [           main] o.s.boot.SpringApplication<br>
    : Application run failed</p>
    
    <p>org.springframework.beans.factory.UnsatisfiedDependencyException:
    Error creating bean with name 'pessoaController': Unsatisfied
    dependency expressed through field 'service'; nested exception is
    org.springframework.beans.factory.UnsatisfiedDependencyException:
    Error creating bean with name 'pessoaServiceImp': Unsatisfied
    dependency expressed through field 'repository'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'pessoaRepository': Invocation of init method
    failed; nested exception is java.lang.IllegalArgumentException: Failed
    to create query for method public abstract com.mydream.mydream.Pessoa
    com.mydream.mydream.PessoaRepository.findOne(java.lang.Long)! No
    property findOne found for type Pessoa!   at
    org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:598)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:376)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE]     at
    org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)</p>
  </blockquote>
  
  <p>Pessoa.java</p>
  
  <pre><code>package com.mydream.mydream;
  
  import javax.persistence.*;
  
  @Entity(name="PESSOA")
  public class Pessoa {
      @Id
      @Column
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      private String nome;
  
      private String apelido;
  
      public Long getId() {
          return id;
      }
  
      public void setId(final Long id) {
          this.id = id;
      }
  
      public String getNome() {
          return nome;
      }
  
      public void setNome(final String nome) {
          this.nome = nome;
      }
  
      public String getApelido() {
          return apelido;
      }
  
      public void setApelido(String apelido) {
          this.apelido = apelido;
      }
  
  }
  </code></pre>
  
  <p>PessoaService.java</p>
  
  <pre><code>package com.mydream.mydream;
  
  import java.util.List;
  
  public interface PessoaService {
      List&lt;Pessoa&gt;listar();
  
      Pessoa listarId(Long id);
  
      Pessoa add(Pessoa p);
      Pessoa edit(Pessoa p);
      Pessoa delete(Long id);
  }
  </code></pre>
  
  <p>PessoaServiceImp.java</p>
  
  <pre><code>package com.mydream.mydream;
  
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  
  @Service
  public class PessoaServiceImp implements PessoaService {
  
      @Autowired
      private PessoaRepository repository;
  
      @Override
      public List&lt;Pessoa&gt; listar() {
          return repository.findAll();
      }
  
      @Override
      public Pessoa listarId(Long id) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public Pessoa add(Pessoa p) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public Pessoa edit(Pessoa p) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public Pessoa delete(Long id) {
          // TODO Auto-generated method stub
          return null;
      }
  
  }
  </code></pre>
  
  <p>PessoaRepository.java</p>
  
  <pre><code>package com.mydream.mydream;
  
  import com.mydream.mydream.Pessoa;
  import java.util.List;
  import org.springframework.data.repository.Repository;
  
  public interface PessoaRepository extends Repository&lt;Pessoa, Long&gt;{
      List&lt;Pessoa&gt; findAll();
  
      Pessoa findOne(Long id);
      Pessoa save(Pessoa p);
      void delete(Pessoa p);
  
  }
  </code></pre>
  
  <p>PessoaController.java</p>
  
  <pre><code>package com.mydream.mydream;
  
  import com.mydream.mydream.Pessoa;
  import com.mydream.mydream.PessoaService;
  import java.util.List;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.CrossOrigin;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  @CrossOrigin(origins = "http://localhost:4200/", maxAge = 3600)
  @RestController
  @RequestMapping(path= "/pessoas")
  public class PessoaController {
  
      @Autowired
      PessoaService service;
  
      @GetMapping
      public List&lt;Pessoa&gt;listar(){
          return service.listar();
      }
  }
  </code></pre>
  
  <p>I already did what I had in other posts but I got no solution</p>