<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="sqlSessionFactory" />
</bean>Spring + mybatis 配置中如果缺少 scope="prototype"属性会报Warn:Invocation of destroy method 'close' failed on bean with name 'sqlSession'
本文探讨了Spring结合MyBatis进行配置时,如果遗漏了scope=prototype属性会导致的警告问题:Invocation of destroy method 'close' failed on bean with name 'sqlSession'. 通过正确的配置示例,本文为开发者提供了避免此类警告的有效方案。
2402

被折叠的 条评论
为什么被折叠?



