Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory**.BeanInitializationException: Could not process key ‘url’ in PropertyOverrideConfigurer;** nested exception is org.springframework.beans.factory.BeanInitializationException: Invalid key ‘url’: expected ‘beanName.property’
org.springframework.beans.factory.BeanInitializationException: Could not process key ‘url’ in PropertyOverrideConfigurer; nested exception is org.springframework.beans.factory.BeanInitializationException: Invalid key ‘url’: expected ‘beanName.property’
原因:bean id=“config” class=“org.springframework.beans.factory.config.PropertyOverrideConfigurer”>
property name=“locations”>
list>
classpath:db.properties
/list>
/property>
/bean>
错误
改正为:bean id=“config” class=“org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
property name=“locations”>
list>
value>classpath:db.properties
/list>
/property>
/bean>