title: Can't use findOne() in my code with JpaRepository
body: <p>I have a project with class Personne</p>
  
  <pre><code>package com.example.entities;
  
  import java.io.Serializable;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  
  @SuppressWarnings("serial")
  @Entity  
  public class Personne implements Serializable {
  
      @Id
      @GeneratedValue
      private Long id;
      @Column(length = 80, name = "NOM")
      private String nom;
      @Column(length = 80, name = "PRENOM")
      private String prenom;
      @Column(length = 80, name = "ADRESSE")
      private String adresse;
      @Column(length = 80, name = "EMAIL")
      private String email;
      @Column(length = 80, name = "TELEPHONE")
      private String telephone;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getNom() {
          return nom;
      }
  
      public void setNom(String nom) {
          this.nom = nom;
      }
  
      public String getPrenom() {
          return prenom;
      }
  
      public void setPrenom(String prenom) {
          this.prenom = prenom;
      }
  
      public String getAdresse() {
          return adresse;
      }
  
      public void setAdresse(String adresse) {
          this.adresse = adresse;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public String getTelephone() {
          return telephone;
      }
  
      public void setTelephone(String telephone) {
          this.telephone = telephone;
      }
  
      public Personne() {
          super();
      }
  }
  </code></pre>
  
  <p>and the interface of PersonRepository is here </p>
  
  <pre><code>package com.example.repositories;
  
  import org.springframework.data.jpa.repository.JpaRepository;
  import com.example.entities.Personne;
  
  public interface IPersonneRepository extends JpaRepository&lt;Personne, Long&gt; {    
  
  }
  </code></pre>
  
  <p>And in the Controller i add the methode of CRUD (Create, Read, Update, and Delete) those methodes are in this class </p>
  
  <pre><code>import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.DeleteMapping;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.PutMapping;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  import com.example.entities.Personne;
  import com.example.repositories.IPersonneRepository;
  
  @RestController
  @RequestMapping(value = "/personne")
  public class PersonController {
  
      @Autowired
      private IPersonneRepository iPersonneRepository;
  
      @PostMapping(value = "/create")
      public Personne createPersonne(@RequestBody Personne personne) {
          return iPersonneRepository.save(personne);
      }
  
      @PutMapping(value = "/update/{id}")
      public Personne updatePersonne(@PathParam(value = "id") Long id, @RequestBody Personne personne) {
          if (id != null) {
              Personne p = iPersonneRepository.findOne(id);
              if (p != null) {
                  iPersonneRepository.save(personne);
              }
          }
          return personne;
      }
  
      @DeleteMapping(value = "/delete/{id}")
      public void delete(@PathParam(value = "id") Long id) {
          if (id != null) {
              Personne p = iPersonneRepository.findOne(id);
              if (p != null) {
                  iPersonneRepository.delete(p);
              }
          }
      }
  
      @GetMapping(value = "/all")
      public List&lt;Personne&gt; allPerson() {
          return iPersonneRepository.findAll();
      }
  
      @GetMapping(value = "/per/{id}")
      public Personne getOne(@PathParam(value = "id") Long id) {
          if (id != null) {
              Personne p = iPersonneRepository.findOne(id);
              return p;
          } 
  
      }
  }
  </code></pre>
  
  <p>the application.properties is </p>
  
  <pre><code>spring.datasource.url = jdbc:mysql://localhost:3306/spring_boot_DB? 
  createDatabaseIfNotExist=true
  spring.datasource.username=root
  spring.datasource.password=
  spring.datasource.driverClassName = com.mysql.jdbc.Driver
  spring.jpa.database=MYSQL
  spring.jpa.show-sql = true 
  spring.jpa.hibernate.ddl-auto = update
  spring.jpa.hibernate.naming- 
  strategy=org.hibernate.cfg.ImprovedNamingStrategy
  spring.jpa.properties.hibernate.dialect = 
  org.hibernate.dialect.MySQL5Dialect
  server.port=8081
  </code></pre>
  
  <p>I tried to change the JpaRepository in CrudRepository but the same problem the same mistake is <strong>The method findOne(Example) in the type QueryByExampleExecutor is not applicable for the arguments (Long)</strong> 
  i tried to change the method to getOne() but is not perfect
  I have already used this method before but this time it does not work I do not know why in the same editor. I know very well that I did not yet have the techniques to solve this kind of problem because of the experience that I ask you to show me or due the problem and thank you in advance for the help :) </p>