调用service的 空构造方法 初始化service对象 后再查找service中的依赖对象并注入
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.class 中的inject(Object bean,String beanName,PropertyValues pvs)方法
BeanFactory factory = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());
loginTokenService = (LoginTokenService) factory.getBean("loginTokenService");
使用这种方式跟踪 初始化的过程
原生 mybatis Mapper中 多个方法使用同一个Session 而spring整合中后每个方法开启一个新的session问题
浙公网安备 33010602011771号