Spring JdbcTemplate
ThemethodqueryForObject(String,Object[],RowMapper)inthetypeJdbcTemplateisnotapplicabl...
The method queryForObject(String, Object[], RowMapper) in the type JdbcTemplate is not applicable for the arguments (String, GroupsDAOImpl.RowMappers, Serializable)
报这个异常
代码
public Groups findById(Serializable id) {
JdbcTemplate template = getJdbcTemplate();
String sql = "select * from t_user_groups where group_id = ?";
Groups groups = template.queryForObject(sql, newRowMappers(), id);//queryForObject出错
return null;
} 展开
报这个异常
代码
public Groups findById(Serializable id) {
JdbcTemplate template = getJdbcTemplate();
String sql = "select * from t_user_groups where group_id = ?";
Groups groups = template.queryForObject(sql, newRowMappers(), id);//queryForObject出错
return null;
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询