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" />
posted @ 2019-10-25 10:49  指掀涛澜  阅读(507)  评论(0编辑  收藏  举报