一、scheme约束文件没有提示问题解决
在Spring框架开发中,最核心的一步要数配置xml文件,在eclipse的工作环境下,由于网络等原因,eclipse不能自动在网上下载scheme约束对应的scheme文件,这时就需要我们手动加载文件。
步骤如下:
1.Windows - Preferences - XML Catalog - add
2.file system 选择Spring文件夹中的scheme文件,此处演示的是spring-aop-3.2.xsd文件的加载
3.选择key type 为scheme location
4.加载上之后,alt+/会出现需要的约束提示 此处是aop:的提示
二、xml文件 for more information解决
在手动加载了过多的xsd文件之后,可能系统会无法确定执行哪个约束,xml文件首行会报错 如图所示
解决方法:
Windows - Preferences - XML
取消掉 Honour all XML scheme locations 选项
问题解决!
Spring配置文件scheme约束加载问题及解决
在Spring框架开发中,eclipse无法自动加载scheme约束文件,导致配置XML无提示。通过Windows - Preferences - XML Catalog手动加载Spring的scheme文件(如spring-aop-3.2.xsd),设置key type为scheme location,可以解决提示问题。若xml文件报错,取消XML首选项的'Honour all XML scheme locations'选项,可消除for more information错误。
4698

被折叠的 条评论
为什么被折叠?



