Eclipse引入spring约束详细教程

1、打开eclipse的window-preferences,搜索catalog。

 

2、点击add,点击File System,弹出页面选择spring-beans-4.2.xsd。

3、key type 选择schema location。

在key的后方加上斜杠/及约束的名字。

4、点击ok。下一个页面继续点击OK。

5、新建applicationContext.xml。输入<beans></beans>。

6、点击applicationContext.xml下方的design。右键beans,单击edit namespace。

7、点击add,先导入xsi。

8、点击add,导入约束

 

 9、点击source,回到配置页面,按alt+/,发现已经可以提示了。至此spring约束导入成功,可以在离线模式下进行使用。

 


 

posted @ 2018-11-28 20:54  经典鸡翅  阅读(1843)  评论(1编辑  收藏  举报