报错原文:
Exception sending context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanDefinitionStoreException
: Invalid bean definition with name 'dataSource' defined in URL(xxxxx)
: Could not resolve placeholder 'jdbc.url' in value "${jdbc.url}";
nested exception is java.lang.IllegalArgumentException:
Could not resolve placeholder 'jdbc.url' in value "${jdbc.url}"
解决方案:
在spring整合mybaits中配置文件中:
a–context:property-placeholderlocation=“classpath:props/*.properties”/
b–<importresource=“classpath:applicationContext-mapper.xml”/>改为:
a–context:property-placeholderlocation=“classpath*:props/*.properties”/
b–<importresource=“classpath*:applicationContext-mapper.xml”/>
产生原因:
跨域(不是该项目下)调用配置文件时 classpath前要加个*;