Spring学习-05:Myeclipse配置schema约束

来源:互联网 发布:微信打开淘宝客户端 编辑:程序博客网 时间:2024/06/16 01:04

配置了beans的applicationContext.xml文件内容:

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="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="userBean1" class="com.js.demo1.HelloServiceImpl"><property name="info" value="蒋帅"></property></bean></beans>
复制路径:http://www.springframework.org/schema/beans/spring-beans.xsd

myeclipse-->window-->preference-->xml catalog-->user specified entries-->add-->找到本地的schema文件-->key type选择schema location 并把上面复制的路径粘贴到key中,点击ok即可。


0 0
原创粉丝点击