title: How to use Criteria Queries in Spring Boot Data Jpa Application
body: <p>I have an application that uses <em>Spring Boot Data jpa</em> .
  So far i am using a repository like this</p>
  
  <pre><code>public interface StudentRepository extends CrudRepository&lt;StudentEntity, Integer&gt;{
      @Query(value = "" 
          + "SELECT s.studentname "
          + "FROM   studententity s, "
          + "       courseentity c "
          + "WHERE  s.courseid = c.courseid "
          + "       AND s.courseid IN (SELECT c.courseid "
          + "                          FROM   courseentity c "
          + "                          WHERE  c.coursename = ?1)")
      List&lt;String&gt; nameByCourse(String coursename);
  }
  </code></pre>
  
  <p>How can i make use of <em>Criteria Query</em> that Hibernate provides for such cases in a Spring Boot Application</p>