在没有加入aop之前的配置如下
这么配置,只要使用hibernateTemplete 操作数据库,那么就会抛出 org.springframework.dao.InvalidDataAccessApiUsageException 大概就是说 你只能读,不能写。
在使用断点跟踪进入到hibernateTemplete时,
好了,我的问题是,当加入aop的时候,到底发生了什么,为什么就可以从当前线程获取到session了
下面是加入aop
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
光阴似箭催人老,日月如移越少年。