前缀"xsi"指的是"xsi".对于属性"xsi:schemaLocation"与元素类型"beans"相关联的"beans"与"beans"相关联.没有约束 [英] The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "beans" is not bound

查看:372
本文介绍了前缀"xsi"指的是"xsi".对于属性"xsi:schemaLocation"与元素类型"beans"相关联的"beans"与"beans"相关联.没有约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为什么会出现此错误

[致命错误]:与元素类型"beans"相关联的属性"xsi:schemaLocation"的前缀"xsi"未绑定.

[Fatal Error]: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "beans" is not bound.

位于我的XML文件的标题处:

at the header of my XML file:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans      
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx.xsd">

错误在我的XML声明的最后一行. 请问我该怎么做才能消除此错误?

The error is at the last line of my XML declaration. Please what can I do to remove this error?

推荐答案

只需添加

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

您的bean元素,以消除该错误.

to your bean element to eliminate that error.

这篇关于前缀"xsi"指的是"xsi".对于属性"xsi:schemaLocation"与元素类型"beans"相关联的"beans"与"beans"相关联.没有约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆