fix ResultSet not positioned properly, perhaps you need to call next.
This commit is contained in:
@@ -56,7 +56,7 @@ public class JdbcTemplateImpl implements JdbcTemplate {
|
||||
PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
|
||||
psp.process(preparedStatement);
|
||||
try (ResultSet resultSet = preparedStatement.executeQuery()) {
|
||||
return rse.extractData(resultSet);
|
||||
return resultSet.next() ? rse.extractData(resultSet) : null;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw throwDataAccessException(sql, e);
|
||||
|
||||
Reference in New Issue
Block a user