- 浏览: 159760 次
- 性别:
- 来自: 武汉
文章分类
- 全部博客 (116)
- 随笔 (2)
- spring (24)
- struts (1)
- hibernate (6)
- log4j (0)
- mysql (14)
- oracle (0)
- ext (0)
- jQuery (0)
- HTML+CSS (2)
- Javascript (1)
- 其它杂碎 (0)
- IT (3)
- J2EE综合 (15)
- SQLServer (1)
- 好文章URL 待阅读 (3)
- 编辑器 (2)
- 版本控制 (5)
- Tomcat (4)
- DoJo (0)
- Ubuntu (11)
- Hadoop (3)
- cxf (3)
- maven (6)
- CI (5)
- H2 (1)
- JVM (1)
- FirefoxOS (1)
- Jboss (1)
- 操作系统 (1)
- C3P0 (2)
- Quartz (1)
- maps (10)
- 设计模式 (5)
最新评论
-
yogurt2012:
请问··我如果要调试H2数据库来分析其JOIN算法应该怎么做呢 ...
H2笔记 -
carlosfu:
很好很全,很有收获
Spring3笔记之 JDBC -
ponlya:
coldrush 写道看了你的配置 ,刚绝 file:后加绝对 ...
添加使用dtd文件 -
ponlya:
byp19980911 写道这不是很好的解决办法,最好是使用连 ...
java.net.SocketException:Software caused connection abort: socket write error -
ponlya:
ayanami001 写道为什么spring没有封装分页吗,那 ...
Spring3笔记之 JDBC(分页)
2.5
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
......
</beans>
3.0
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
">
......
</beans>
Spring3中的xsd文件的位置:
org.springframework.beans.factory.xml包下
同目录下还有Srping-beans.dtd Srping-beans-2.0.dtd
Srping-beans-2.0.xsd Srping-beans-2.5.xsd Srping-beans-3.0.xsd
Srping-tool-2.0.xsd Srping-tool-2.5.xsd Srping-tool-3.0.xsd
Srping-util-2.0.xsd Srping-util-2.5.xsd Srping-util-3.0.xsd
org.springframework.aop.config.包下
有Srping-aop-2.0.xsd Srping-aop-2.5.xsd Srping-aop-3.0.xsd
org.springframework.jdbc.config 包下Srping-jdbc-3.0.xsd
org.springframework.transaction.config.包下
有Srping-tx-2.0.xsd Srping-tx-2.5.xsd Srping-tx-3.0.xsd
org.springframework.context.config包下
有 Srping-context-2.5.xsd Srping-context-3.0.xsd
添加xsd到本地:window - preferences - Myeclipse enterprise - Files and Editors - xml - xml catalog - Add
然后key type选url,然后在location里导入导入
另xsd文件
参考From:http://wenku.baidu.com/view/3b9ff43a580216fc700afd1a.html
一、xmlns="http://www.springframework.org/schema/beans" 定义当前文档的默认的命名空间.
二、xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 定义命名空间,xsi这个命名空间是w3c定义的,使用它的原因 是下面"xsi:schemaLocation=" 中的schemaLocation属性是在http://www.w3.org/2001/XMLSchema-instance中定义的,所以要使用这个属性,就得引入它所在的命名空间.
三、xsi:schemaLocation=" schemaLocation属性的作用是用于指定名称空间所对应的XMLSchema模式文档在中里.这个属性在前面定义的xsi名称空间中,所以必须在前面加上表示其名称空间的前缀。设置值包括二部分:a)命名空间的URI;b)名称空间所标识的XML Schema文件的位置或者URL地址,这二个部分使用空格分隔。
EG:http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
XSD是指XML结构定义 ( XML Schemas Definition )
(From:http://zhidao.baidu.com/question/74740740.html ):
XML Schema 是DTD的替代品。XML Schema语言也就是XSD。
XML Schema描述了XML文档的结构。可以用一个指定的XML Schema来验证某个XML文档,以检查该XML文档是否符合其要求。文档设计者可以通过XML Schema指定一个XML文档所允许的结构和内容,并可据此检查一个XML文档是否是有效的。XML Schema本身是一个XML文档,它符合XML语法结构。可以用通用的XML解析器解析它。
一个XML Schema会定义:文档中出现的元素、文档中出现的属性、子元素、子元素的数量、子元素的顺序、元素是否为空、元素和属性的数据类型、元素或属性的默认和固定值。
XSD是DTD替代者的原因,一是据将来的条件可扩展,二是比DTD丰富和有用,三是用XML书写,四是支持数据类型,五是支持命名空间。
XSD文件的后缀名为.xsd。
XML Schema的优点:
1) XML Schema基于XML,没有专门的语法
2) XML可以象其他XML文件一样解析和处理
3) XML Schema支持一系列的数据类型(int、float、Boolean、date等)
4) XML Schema提供可扩充的数据模型。
5) XML Schema支持综合命名空间
6) XML Schema支持属性组。
Xsd可参考:http://bdk82924.iteye.com/blog/721443
发表评论
-
Spring整合Hibernate(摘录)
2011-05-07 09:48 710简要步骤From:http://blog.csdn.net/s ... -
Spring3笔记之 JDBC(分页)
2011-04-25 22:08 1987接上篇的实体,DAO接口,实现,测试及XML http://p ... -
Spring3笔记之 JDBC
2011-04-25 22:02 7760使用Spring 的JDBC 先创建表: DROP TAB ... -
Spring3笔记之 事务传播
2011-04-24 15:51 1180摘自:http://zhxing.iteye.com/blog ... -
Spring3笔记之 AOP
2011-04-24 14:24 1859Spring AOP部分使用JDK动态代理或者CGLIB来为目 ... -
Spring3笔记之 AOP Cglib 代理
2011-04-24 14:13 1326JDK的Proxy实现代理要求 ... -
Spring3笔记之 AOP JDK 代理
2011-04-24 14:09 1009使用JDK代理,代理对象必须实现一接口 com.spring ... -
Spring3之 Resource
2011-04-21 22:49 3944主要是org.springframework.core.io. ... -
Spring3之 bean 注解
2011-04-20 22:18 1474小记下,spring注解相关: com.spring305. ... -
Spring3之 bean 定制bean特性
2011-04-19 21:10 1260Customizing the nature of a bea ... -
Spring3之 bean 作用域scope
2011-04-18 22:21 1427Bean scopes 作用域 5个:singleton,p ... -
Spring3之 bean Method injection
2011-04-17 20:04 1434Method injection(方法注入) bean都是s ... -
Spring3之 bean AutoWire
2011-04-17 12:01 5895Autowiring collaborators 自动装配 ... -
Spring3之 bean depends-on
2011-04-17 08:56 3226depends-on depend-on用来表 ... -
Spring3之 bean Lazy-initialized beans
2011-04-17 08:48 1938Lazy-initialized beans延迟 ... -
Spring3之 集合对象属性注入
2011-04-16 23:17 1181com.spring305.test.beanInit.cpo ... -
Spring3之 bean idref?
2011-04-16 18:39 916很是奇怪idref是干什么 ... -
Spring3之 bean简单属性注入
2011-04-16 17:40 1315DI (依赖注入)有二种: Constructor-based ... -
Spring3之 实例化bean2
2011-04-16 14:30 981Spring3之 bean命名(http://ponlya.i ... -
Spring3之 bean命名
2011-04-16 11:36 1971一、bean的命名采用标准Java命名约定:小写字母开头,首字 ...
相关推荐
包含 spring-aop.xsd spring-beans.xsd spring-cache.xsd spring-jdbc spring-jms spring-lang 等
关于Springmvc,SpringBoot,SpringCould项目的xsd文件大全
spring3.0 xsd文件 spring3.0 xsd文件 spring3.0 xsd文件 spring3.0 xsd文件 spring3.0 xsd文件 spring3.0 xsd文件
spring-context-3.2.xsd
spring5.0的xsd文件,放在本地,免得eclipse从网上下载检测慢
spring3.0的xsd文件.rar,网上整理的
spring-beans-4.3.xsd spring-beans-4.3.xsd spring-beans-4.3.xsd spring-beans-4.3.xsd
里面有两个xsd文件,springmodules-ehcache和springmodules-cache.xsd。需求:因为有时候在你在xml中用某个标签时,提示错误,有时候就是少了xsd的引入
Spring默认在启动时是要加载XSD文件来验证xml文件的,所以如果有的时候断网了,或者一些开源软件切换域名,那么就很容易碰到应用启动不了。我记得当时Oracle收购Sun公司时,遇到过这个情况。为了防止这种情况,...
内含spring-aop-4.0.xsd、spring-beans-4.0.xsd、spring-context-4.0.xsd、spring-mvc-4.0.xsd、spring-tool-4.0.xsd、spring-tx-4.0.xsd、spring-util-4.0.xsd,在xml中引入相应xsd文件,便可以自动提示
spring-context.xsd用于spring DI开发代码提示。用于Java开发。(包含2.5/3.1/3.2版本)
spring-mvc-3.0.xsd
spring-beans-3.0.xsd
Spring-3.0.xsd
spring-aop.xsd用于spring aop开发代码提示。用于Java开发。(包含2.5/3.1/3.2版本)
文件用于spring mvc等项目的开发
Spring默认在启动时是要加载XSD文件来验证xml文件的,所以如果有的时候断网了,或者一些开源软件切换域名,那么就很容易碰到应用启动不了。我记得当时Oracle收购Sun公司时,遇到过这个情况。为了防止这种情况,...