问题描述:
org.springframework.dao.InvalidDataAccessResourceUsageException: error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work
解决方案:在实体类的主键上边加上这个注解就可以了:
@GeneratedValue(strategy = GenerationType.IDENTITY)
原因:主键是自增的。