嵌套异常是org.xml.sax.SAXParseException; lineNumber:3; columnNumber:128; cvc-elt.1:无法找到元素' bean的声明。

时间:2018-01-12 05:45:28

标签: java xml spring

我正确添加了xsi:schemaLocation,但显示错误

<beans xmlsn="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
  http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean   id="welcomebean"    class="com.sathya.beans.WelcomeBean">
    <property name="message"    value="welcome to Spring"></property>   
    </bean>

</beans>

1 个答案:

答案 0 :(得分:0)

<beans xmlsn="...">更改为<beans xmlns="...">