我正在使用春 j模板将一些数据输入数据库,我正在发现这一错误。
我的法典如下:
JdbcTemplate insert = new JdbcTemplate(dataSource);
for(ResultType result : response.getResultSet().getResult())
{
Object[] args = new Object[] {result.getAddress(), result.getCity(), result.getState(), result.getPhone(), result.getLatitude(), result.getLongitude(),result.getRating().getAverageRating(), result.getRating().getAverageRating(), result.getRating().getTotalRatings(), result.getRating().getTotalReviews(), result.getRating().getLastReviewDate(), result.getRating().getLastReviewIntro(), result.getDistance(), result.getUrl(), result.getClickUrl(), result.getBusinessUrl(), result.getBusinessClickUrl()};
insert.update("INSERT INTO data.carwashes ( address, city, state, phone, lat, lng, rating, average_rating, total_ratings, total reviews, last_review_date, last_review_intro, distance, url, click_url, business_url, business_click_url, category_id, zipcode_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,96925724,78701)", args);
}
相当长的代码,但基本上从物体到阵列,然后通过该阵列,以插入jdbc模板。
任何帮助都将受到赞赏。