熬夜的小藝 2021-09-19 22:19:39 阅读数:733
數據源也可以使用:
Spring 的 DriverManagerDataSource
MyBatis 的 PooledDataSource
這裏配置的連接池,默認會自動提交事務
[](
)整合 MyBatis - SqlSessionFactoryBean
=====================================================================================================
[](
)整合 MyBatis - MapperScannerConfigurer
=======================================================================================================
配置完後可以通過 getBean 方法獲取 dao 的代理對象,bean 的 id 是 dao 類名的小駝峰形式
[](
)完整配置文件
=========================================================================
[applicationContext.xml](
)
版权声明:本文为[熬夜的小藝]所创,转载请带上原文链接,感谢。 https://gsmany.com/2021/09/20210919221938617a.html