스프링 jdbc 템플릿을 사용하여 일부 데이터를 데이터베이스에 삽입 할 때이 오류가 발생했습니다. 기본적으로는 개체에서 값을 가져옵니다과 배열에 스틱과 JDBC 템플릿의 방법을 삽입하는 해당 배열을 통과,Spring Jdbc 템플릿 + MySQL = TransientDataAccessResourceException : 잘못된 인수 값 : Java.io.notSerializationException
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);
}
아주 긴 코드 ..하지만 :
여기 내 코드입니다.
도움이 될 것입니다.
http://forum.springsource.org/showthread.php?t=53267 – stacker