I'm getting an error by executing jdbc.update(sql, params) and I would like to see the sql that is executing jdbc.update but with the final values instead :param that is in the sql before execution.
Is there any method of JdbcTemplate that allows to do that?
public boolean create(User user) {
BeanPropertySqlParameterSource params =
new BeanPropertySqlParameterSource(user);
String sql = "INSERT INTO t_user (username, password, email)"
+ " VALUES (:username, :password, :email)";
return jdbc.update(sql, params) == 1;
}
I need to get sql that is going to execute jdbcTemplate, and it is something like
INSERT INTO t_user (username, password, email)
VALUES ("name", "password", "joe@mail.com")
I need this to check if the sql is right, because I have too many parameters to do all that by hand.