Could not resolve placeholder 'jdbc.password' in string value "${jdbc.password}"(jdbc)
spring连接数据库时报错

org.springframework.beans.factory.BeanDefinitionStoreException:

Invalid bean definition with name 'dataSource' defined in class path resource [spring-dao.xml]: Could not resolve placeholder 'jdbc.password' in string value "${jdbc.password}";

nested exception is java.lang.IllegalArgumentException:

Could not resolve placeholder 'jdbc.password' in string value "${jdbc.password}"

原因

xml配置文件中password与properties数据源文件中pwd不同;

解决

xml配置文件中与properties数据源文件中数据库密码命名一致

posted on 2022-08-18 23:45  Wyz1022  阅读(158)  评论(0编辑  收藏  举报