return getJdbcTemplate().queryForObject("select * from product where id = ? ", new ParameterizedSingleColumnRowMapper<Product>(){
@Override
public Product mapRow(ResultSet rs, int rowNum) throws SQLException {
Product product=new Product();
product.setId(rs.getInt(1));
product.setName(rs.getString(2));
product.setPrice(rs.getFloat(3));
product.setDescription(rs.getString(4));
product.setCategoryid(rs.getString(5));
return product;
}
},id);