I am trying to implement the Spring RowMapper interface, however my IDE offers me to return the return object to "T", and I do not understand why. Can anyone explain what I am missing?
public class UserMapper<T> implements RowMapper<T> {
public T mapRow(ResultSet rs, int row) throws SQLException {
User user = new User();
user.firstName(rs.getInt("fname"));
user.lastName(rs.getFloat("lname"));
return user;
}
}
source
share