title: JdbcTemplate "queryForObject" and "query" is deprecated in Spring. What should it be replaced by?
body: <p>Query for object,</p>
  <pre class="lang-java prettyprint-override"><code>Student student = return jdbcTemplate.queryForObject(&quot;select * from student_id = ?&quot;, new Object[] { studentId }, studentRowMapper);
  </code></pre>
  <p>For query,</p>
  <pre class="lang-java prettyprint-override"><code>List&lt;Student&gt; students = return jdbcTemplate.query(&quot;select * from class_room_id = ?&quot;, new Object[] { classRoomId }, studentRowMapper);
  </code></pre>
  <p>Both <code>jdbcTemplate.queryForObject</code> and <code>jdbcTemplate.query</code> are deprecated in spring boot 2.4.X above</p>