spring boot 整合hibernate后,添加拦截器,报Could not obtain transaction-synchronized Session for current thread
在一个采用hibernate的spring boot项目中,增加拦截器,在进行sql操作时报异常:Could not obtain transaction-synchronized Session for current thread;
在发生sql操作的service方法上加**@Transactional**注解后不再报错。