0
点赞
收藏
分享

微信扫一扫

Hibernate: getCurrentSession报错

尤克乔乔 2022-07-27 阅读 55


需要在Spring的配置文件配置事务

<tx:advice id="txAdvice" transaction-manager="transactionManager">  
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>

<aop:config>
<aop:pointcut id="interceptorPointCuts" expression="execution(* service.*.*(..))"

/>
<aop:advisor advice-ref=“txAdvice” pointcut-ref=“interceptorPointCuts” />
</aop:config>


举报

相关推荐

Hibernate

0 条评论