spring整合mybatis时所遇到的问题

spring整合mybatis时所遇到的问题

在spring的配置文件ApplicationContext.xml中,需要将原先mybatis的配置文件MybatisConfig.xml迁移过来。

迁移之前的代码

MybatisConfig.xml

<properties resource="db.properties"/>

迁移之前的代码

ApplicationContext.xml

<!--引入外部配置文件-->
    <context:property-placeholder location="classpath:db.properties"/>
posted @ 2021-03-13 11:11  迎港  阅读(22)  评论(0)    收藏  举报