spring1.1--约束文件

spring下载地址:

  https://repo.spring.io/libs-release-local/org/springframework/spring/5.0.11.RELEASE/

 

解压之后,有一个schema文件夹,里面就是约束文件。

 

在eclipse里面增加约束文件 ,点击window->Preferences

 

add 之后,file system,选择本地的约束文件

 

记得在key后面增加上约束的文件名称。

 

OK,添加完成。

 

之后在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"
    >
    
    
</beans>

 

这个时候,约束文件也可以点进去看

 

 

posted @ 2019-07-23 15:33  walkerluo  阅读(237)  评论(0编辑  收藏  举报