For a simple login access check I am using jdbcTemplate with the following DAO method :-

```
    @Autowired
        JdbcTemplate jdbcTemplate;

        public List<User> hasAccess (String user, String pass) {
            return jdbcTemplate.query(new PreparedStatementCreator() {
                @Override
                public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
                    PreparedStatement ps = connection.prepareStatement("SELECT * FROM SHB_USERS WHERE USER=? AND PASS=?");
                    ps.setString(1, user);
                    ps.setString(2, pass);
                    return ps;
                }
            }, new RowMapper<User>() {
                @Override
                public User mapRow(ResultSet resultSet, int rownum) throws SQLException {
                    String user = resultSet.getString("USER");
                    String pass = resultSet.getString("PASS");
                    User userObj = new User(user, pass);
                    System.out.println(userObj.toString());
                    return userObj;
                }
            });
        }

```

But somehow `mapRow` is not called. When I use direct String instead of `PreparedStatement` for example `select * from shb_users where rownum <2` it works.
I am new to Spring boot and cannot find out the mistake.