随笔分类 -  错误集锦

摘要:最近学习ssh框架,总是出现这问题,后查证是没有开启事务。 如果采用注解方式,直接在业务层加@Transactional 并引入import org.springframework.transaction.annotation.Transactional; 详细信息,可以参考下面博客: 参考资料:h 阅读全文
posted @ 2018-03-06 13:50 刘旭是一头小水猪 阅读(350) 评论(0) 推荐(0)
摘要:初次使用Hibernate,进行junit测试,报如下错误。 原因:Hibernate帮我们管理主键了,我们不需要对主键赋值,并且主键是自增的。所以在数据库中,逐渐选项应当勾选 org.hibernate.exception.GenericJDBCException: could not execu 阅读全文
posted @ 2017-12-22 21:16 刘旭是一头小水猪 阅读(26831) 评论(0) 推荐(0)