在配置中,你有2个
PropertySourcesPlaceholderConfigurer实例。
applicationContext.xml
<bean > <property name="environment"> <bean /> </property></bean>
infraContext.xml
<context:property-placeholder location="classpath:context-core.properties"/>
默认情况下,a
PlaceholderConfigurer将快速失败,因此如果无法解析占位符,它将引发异常。该
applicationContext.xml文件中的实例没有属性,因此将在所有占位符上失败。
解决方案:从applicationContext.xml中删除一个,因为它不会添加任何东西,只会破坏事情。



