title: Can't use method findOne() in Spring boot
body: <p>My project is about a User-Manager web.</p>
  
  <p>I'm a new in Spring and Java.</p>
  
  <p>Here is my code:In the UserController</p>
  
  <pre><code>@RequestMapping(value="/users/{name}",method = RequestMethod.GET)
  public User showUser(@PathVariable("name") String name){
      return userService.findUser(name);
  }
  </code></pre>
  
  <p>In the UserService:</p>
  
  <pre><code> public User findUser(String name){
      return userRepository.findOne(name);
  }
  </code></pre>
  
  <p>And in the Postman when I go to the link:<a href="http://localhost:8080/users/hunghip4" rel="noreferrer">http://localhost:8080/users/hunghip4</a> (hunghip4 is a user I created)</p>
  
  <pre><code>{
    "timestamp": 1460570912129,
    "status": 500,
    "error": "Internal Server Error",
    "exception": "org.springframework.dao.InvalidDataAccessApiUsageException",
    "message": "Provided id of the wrong type for class     com.uet.dhqg.usermanage.model.User. Expected: class java.lang.Integer, got class java.lang.String; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type for class com.uet.dhqg.usermanage.model.User. Expected: class java.lang.Integer, got class java.lang.String",
    "path": "/users/hunghip4"
  }
  </code></pre>
  
  <p>The User model:</p>
  
  <pre><code>@Entity
  @Table(name="user")
  public class User extends HypermediaLinks {
  @Id
  @Column(name="id")
  private int id;
  @Column(name="name")
  private String name;
  @Column(name="pass")
  private String pass;
  
  public int getId(){
      return id;
  }
  
  public String getName(){
      return name;
  }
  
  public void serName(String name){
      this.name = name;
  }
  
  public String getPass(){
      return pass;
  }
  
  public void serPass(String pass){
      this.pass = pass;
  }
  
  }
  </code></pre>
  
  <p>The UserRepository:</p>
  
  <pre><code>@Repository
  public interface UserRepository extends CrudRepository&lt;User,String&gt;{
  }
  </code></pre>