alex-blog

applicationContext.xml内配置如下:

<bean

class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />

<property name="ignoreResourceNotFound" value="true" />

<property name="locations">

<list>

标准配置

<value>classpath*:application.properties</value>

</list>

</property>

</bean>

报错

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 20 in XML document from URL is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element \'list\' cannot have character [children], because the type\'s content type is element-only.

at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

修改为3.0后的配置

<context:property-placeholder location="file:D:/application.properties"/>

分类:

技术点:

相关文章:

  • 2021-11-21
  • 2021-11-25
  • 2021-10-01
  • 2021-09-19
  • 2021-11-11
  • 2022-01-13
  • 2021-12-14
  • 2021-10-19
猜你喜欢
  • 2021-10-29
  • 2021-05-04
  • 2022-01-01
  • 2021-09-19
  • 2021-04-11
  • 2021-07-08
  • 2021-08-18
相关资源
相似解决方案