天天看點

org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL

Junit 測試

DB service中:

org.springframework.dao.InvalidDataAccessResourceUsageException: could not prepare statement; SQL [insert into ..表名. values ..]nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement
           

解決辦法:檢視建立的表裡面缺少哪個字段,添加缺少的字段。