关于no transaction is in progress错误的解决方法
来源:互联网 发布:安畅网络认证 编辑:程序博客网 时间:2024/06/08 17:51
在使用spring +jpa开发中
结构dao+service+action三层
dao继承basedao
basedao中写了方法 public T merge(T entity) { T returnObj = this.getJpaTemplate().merge(entity); this.getJpaTemplate().flush(); return returnObj; }
在service中自动注入dao
@Autowired private CityDao cityDao @Transactional public City merge (City city){ if (city == null) return city; return cityDao.merge(city); }
如果不写@Transactional就报错,no transaction is in progress
写上就正常,原因调查中。。。
- 关于no transaction is in progress错误的解决方法
- no transaction is in progress
- javax.persistence.TransactionRequiredException: no transaction is in progress
- spring,springMVC,Hibernate,RESTfull,no transaction is in progress
- MySql之错误异常--Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is no
- Google App Engine: Another transaction by user xxx is already in progress for app yyy ...
- Oracle数据库关闭异常(ORA-01089: immediate shutdown in progress - no operations are permitted)的解决方法
- Oracle数据库关闭异常(ORA-01089: immediate shutdown in progress - no operations are permitted)的解决方法
- 关于socket通信中在connect()遇到的Operation now in progress错误
- android中关于No enclosing instance of the type Alarm0 is accessible in scope此类错误的原因
- 错误Name node is in safe mode的解决方法
- hadoop错误Name node is in safe mode的解决方法
- 错误Name node is in safe mode的解决方法
- 错误Name node is in safe mode的解决方法
- uploadify"ID SWFUpload_0 is already in use..."错误的解决方法
- 错误Name node is in safe mode的解决方法
- 错误Name node is in safe mode的解决方法
- HDFS错误Name node is in safe mode的解决方法
- Bayer Pattern to RGB
- Oracle常见数据库对象—序列
- Time, Date & Place
- 探知Google员工离职背后的故事 称Google无创新
- linux c 大文件使用
- 关于no transaction is in progress错误的解决方法
- 在MFC中通过opencv显示摄像头视频或者文件视频
- android 调试中 addr2line 命令的使用
- js 函数
- WebService AXIS
- IOS开发之UIScrollVIew运用
- 程序设计与语言
- Style of WebService: REST vs. SOAP
- RHEL6 XWindow安装