Could not obtain transaction-synchronized Session for current thread

来源:互联网 发布:餐饮收银软件排名 编辑:程序博客网 时间:2024/05/21 10:08

hibernate 报此处错误,如果是声明式事务配置,那么你的切面没有切入到service层

下面是配置多个切面的方法

<aop:config>               <aop:pointcut expression="execution(* com.sjq.*.*.service.*.*(..)) || execution(* com.sjq.*.service.*.*(..))" id="txPointcut"/>        <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut"/>     </aop:config>  
阅读全文
0 0
原创粉丝点击