Cannot open connection 解决办法

试了很多种网上找的办法,都不行,最后才发现是我的beans.xml中完全把下面 这一段代码给遗忘了,忘记写了。添加我就ok了。

我能说花了我近1个小时吗?坑姐哦!

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>classpath:jdbc.properties</value>
</property>
</bean>

原文地址:https://www.cnblogs.com/m-xy/p/3749076.html