我使用的是jdbcTemplate,因為忘記向list中加入參數,所以報錯。
解決方案,: String sql = "select * from table where id = ?";
List list = new ArrayList();
list.add(param);