Closed gilles-phan closed 2 years ago
Hi,
Description: For the page "Accessing Relational Data using JDBC with Spring", the method RelationalDataAccessApplication#run call to a deprecated function: jdbcTemplate.query(....
Details: Deprecated function "query" in JdbcTemplate:
@Deprecated @Override public <T> List<T> query(String sql, @Nullable Object[] args, RowMapper<T> rowMapper) throws DataAccessException { return result(query(sql, args, new RowMapperResultSetExtractor<>(rowMapper))); }
The function to call
@Override public <T> List<T> query(String sql, RowMapper<T> rowMapper, @Nullable Object... args) throws DataAccessException { return result(query(sql, args, new RowMapperResultSetExtractor<>(rowMapper))); }
Fix: To fix it, we should simply invert the two last param (args and rowmapper).
Regards, Gilles
Issue moved to correct guide.
Hi,
Description: For the page "Accessing Relational Data using JDBC with Spring", the method RelationalDataAccessApplication#run call to a deprecated function: jdbcTemplate.query(....
Details: Deprecated function "query" in JdbcTemplate:
The function to call
Fix: To fix it, we should simply invert the two last param (args and rowmapper).
Regards, Gilles