测试Dao时报错
来源:2-6 逐层完成SSM的各项配置
御坂o御坂
2019-07-02
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name ‘DataSource’ defined in class path resource [spring/spring-dao.xml]: Could not resolve placeholder ‘jdbc.master.url’ in value “jdbc.master.url";nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholder′jdbc.master.url′invalue"{jdbc.master.url}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.master.url' in value "jdbc.master.url";nestedexceptionisjava.lang.IllegalArgumentException:Couldnotresolveplaceholder′jdbc.master.url′invalue"{jdbc.master.url}”
2回答
-
加载不到jdbc.master.url的值,检查一下。
022019-07-03 -
翔仔
2019-07-03
同学好,在没有解决相关问题能力之前,请不要使用最终源码的配置哈,最终源码里面我们有读写分离之类的配置,这里说的就是缺少主从库的设置,因此会报错。建议跟着视频来,否则得不偿失,还会遇到各种各样奇怪的问题
022019-07-03
相似问题