摘要: 执行了save()方法 sql语句也执行了,但是数据并未插入数据库中 解决方法: 是因为执行了save()方法,也执行了sql语句,但是因为使用的是 注解,不是手动去提交事务,所以这一条语句已经插入到数据库了,但是当前不可见。 所以最后可以采用 方法,让它及时的flush到数据库中。 阅读全文
posted @ 2018-04-03 18:52 Angel挤一挤 阅读(5485) 评论(0) 推荐(1)
摘要: 身份证号码验证 本文将使用Java实现中国公民(15位或者18位)身份证号码的相关验证,功能如下: 身份证号有效性验证 分析详细身份证信息 生成一个虚拟的身份证号码。 1.身份证信息类 package com.sxd.test; /** * 身份证信息 * */ public class IDCod 阅读全文
posted @ 2018-04-03 14:11 Angel挤一挤 阅读(93) 评论(0) 推荐(1)
摘要: 报错如下: org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.Dat 阅读全文
posted @ 2018-04-03 10:53 Angel挤一挤 阅读(47304) 评论(0) 推荐(2)
摘要: 报错如下: org.springframework.orm.jpa.JpaObjectRetrievalFailureException: Unable to find com.rollong.chinatower.server.persistence.entity.staff.Department 阅读全文
posted @ 2018-04-03 10:44 Angel挤一挤 阅读(6351) 评论(0) 推荐(0)