mybatis怎么使用jdbc配置文件
我们可以在xml配置文件中使用properties标签来引入配置文件。
如:
<properties url="file:///D:/IdeaProjects/day02_eesy_01mybatisCRUD/src/main/resources/jdbcConfig.properties"></properties>
url也可以换成resource属性。区别在于url用的是Url写法,而resource是按照类路径的写法。
而后:<property name="driver" value="${jdbc.driver}"></property>
就可以获取陪着文件信息了