title: JdbcTemplate not working with Spring Boot project
body: <p>and I'm using jdk8 and working on a SpringBoot project.  I'm getting "JdbcTemplate cannot be resolved to a type" I tried to maven->update project,after updating the project,I'm getting error in @Repository annotation and asking to update the JDKto1.5. The error in JdbcTemplate have gone but not able use any methods using its reference.Kindly help!</p>
  
  <pre><code>package com.boot.rest.repository;
  
  import java.sql.PreparedStatement;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.util.ArrayList;
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.context.annotation.Scope;
  import org.springframework.stereotype.Repository;
  import org.springframework.stereotype.Service;
  import com.boot.rest.model.User;
  
  @Repository
  public class UserService {
  
      @Autowired
      JdbcTemplate jdbcTemplate;
  
      public List&lt;String&gt; getUSerNames(){
  
          List&lt;String&gt; userlist = new ArrayList&lt;String&gt;();
  
          userlist.addAll(jdbcTemplate.queryForList("Select username from user"));
  
          return userlist;
  
  
      }
  }
  </code></pre>