myservelet-servelet.xml中的<context:property-placeholder> erroer

时间:2015-05-12 11:46:50

标签: java xml spring hibernate

我正在使用hibernate编写Spring mvc。我有一个属性文件database.properties,我在其中定义了数据库配置。

database.properties

enter image description here

sdnext-servlet.xml中 enter image description here 当我在sdnext-servlet.xml中指定路径时,它会抛出异常。 在上图中我得到了一个例外。

  

cvc-complex-type.2.1:元素&#39;上下文:property-placeholder&#39;必须   没有字符或元素信息项[children],因为   类型的内容类型为空。

请帮帮我。

1 个答案:

答案 0 :(得分:1)

您必须在不打开儿童的情况下关闭该元素: <context:property-placeholder location="classpath*:...."/>

相关问题