使用jdbcTemplate.queryForObject()报错
org.springframework.jdbc.BadSqlGrammarException:StatementCallback; bad SQL grammar [select dname from dept where deptno=?];
nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1
原因
jdbcTemplate.queryForObject()缺参
解决
jdbcTemplate.queryForObject()加参,参数在最后