在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