背景
一个任务, 需要开启多个线程,同时跑,
我开启的线程中, 用SpringContextUtil.getBean("")获取了一个service类,
这个service中, 有许多的service和dao 用来处理任务
在这个处理方法中, Transaction trans = this.creditchanneldao.getCSession().getTransaction();
通过提取出事务控制,来进行每个线程的独立事务控制
但是,抛异常
No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here