passing different types of arguments to jdbctemplate query
问题 I am trying to retrieve records from the database by using where clause with few different types of arguments. This is the simple method which I wrote where I am passing breedId and gender as an arguments. public List<Dog> listByBreedIdAndGender(long breedId, String gender) { return query("SELECT * FROM dog_entity WHERE breed__id = ? AND gender = ?", new MapSqlParameterSource(":breedId", breedId) .addValue(":gender", gender)); } private List<Dog> query(String sql, MapSqlParameterSource