Both queryForInt() and queryForLong() are deprecated since version 3.2.2 (correct me if mistake). To fix it, replace the code with queryForObject(String, Class).
this.jdbcTemplate.queryForObject(
sql, Integer.class,
parameter1, parameter2);
As per spring docs
int queryForInt(String sql, Map<String,?> args)
Deprecated.
Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a map containing the arguments.
int queryForInt(String sql, Object... args)
Deprecated.
Query for an int passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
int queryForInt(String sql, SqlParameterSource args)
Deprecated.
Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.