Spring异常 -- application.xml ${jdbc.driver} 无法获取

我出错的原因,是 applicationContext = new ClassPathXmlApplicationContext("classpath:mybatis/applicationContext.xml"); 这里面的applicationContext.xml位置没有配对。将applicationContext.xml配置正确。${jdbc.driver} 属性由红变绿。

一般是这个没有配对

<context:property-placeholder location="classpath:mybatis/db.properties" />
原文地址:https://www.cnblogs.com/junzifeng/p/11736800.html