spring整合mybatis时所遇到的问题
时间:2021-03-13 11:51:22
收藏:0
阅读:28
spring整合mybatis时所遇到的问题
在spring的配置文件ApplicationContext.xml中,需要将原先mybatis的配置文件MybatisConfig.xml迁移过来。
迁移之前的代码
MybatisConfig.xml
<properties resource="db.properties"/>
迁移之前的代码
ApplicationContext.xml
<!--引入外部配置文件-->
<context:property-placeholder location="classpath:db.properties"/>
原文:https://www.cnblogs.com/finger001/p/14527983.html
评论(0)