title: Spring JPA selecting from where clause
body: <p>I am using Spring JPA to perform all database operations. However I don't know how to select specific rows (connected by simple WHERE clause) from a table in Spring JPA?</p>
  
  <p>For example:</p>
  
  <pre><code>SELECT * FROM user where name=agrawalo AND email=abc@example.com 
  </code></pre>
  
  <p>User Class:</p>
  
  <pre><code>@Entity
  Class User {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long userId;
  
      @Column(nullable = false)
      private String name;
  
      @Column(nullable = false)
      private String email;
  
     // Getters and Setters
  }
  </code></pre>
  
  <p>Repository:</p>
  
  <pre><code>public interface UserRepository extends JpaRepository&lt;User, Integer&gt; {
  
  }
  </code></pre>