自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 JPA在进行update、modify和insert操作时不加事务,会报错

javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call事务管理只有在service加上事务管理才起作用,query不需要事务管理但是del...

2018-07-02 10:51:16 6822

原创 org.hibernate.PersistentObjectException: detached entity passed to persist: cn.edu.xupt.bean.Users

persist持久化时,因为设置user表主键使用注解自动生成,所以当创建对象,id值不为0或是null就会报错。之前创建user对象时,没改对象的id值。

2018-07-01 19:37:31 304

转载 出现spring事务的异常:java.lang.IllegalStateException: Not allowed to create transaction on shared EntityMan

java.lang.IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead at org.springframework.orm.jpa.SharedEntityManagerCreator$Shared...

2018-07-01 19:29:21 7466 1

原创 spring集合JPA报错Cannot find class [org.hibernate.ejb.HibernatePersistence]

1、Cannot find class [org.hibernate.ejb.HibernatePersistence]严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.sprin...

2018-07-01 19:23:02 1430

翻译 算法:有序二维数组查找(类似于二分查找)

题目:二维数组元素中从上向下逐渐增大,从左到右逐渐递增,查找一个元素是否存在。不能从左上角或是右下角开始,只能无规律性的进行遍历。思想:应该从左下角开始查找,key比数组元素大,向右找;key比数组元素小,向上找;这样就可以排除一行或是一列元素,加快查找效率...

2018-06-15 17:39:51 1457

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除