Spring 4.0 的 Schema文件

本文详细介绍了Spring4.0中使用的Schema配置文件,包括Bean、AOP、声明式事务、MVC、数据库配置等多个方面的Schema文件及其命名空间,阐述了Spring从DTD到Schema的配置演进。

对于基于XML的配置,Spring 1.0 的配置采用DTD格式,Spring 2.0 之后采用Schema格式,后者让不同类型的配置拥有了自己的命名空间,使得配置文件更具扩展性。

Schema文件说明
spring-beans-4.0.xsd[说明]:Spring4.0最主要的Schema,用于配置Bean
[命名空间]:http://www.springframework.org/schema/beans
[Schema文件]:http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
spring-aop-4.0.xsd[说明]:AOP的配置定义的Schema
[命名空间]:http://www.springframework.org/schema/aop
[Schema文件]:http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
spring-tx-4.0.xsd[说明]:声明式事务配置定义的Schema
[命名空间]:http://www.springframework.org/schema/tx
[Schema文件]:http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
spring-mvc-4.0.xsd[说明]:MVC配置的Schema,是Spring3.0新增的
[命名空间]:http://www.springframework.org/schema/mvc
[Schema文件]:http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
spring-util-4.0.xsd[说明]:为简化某些复杂的标准配置提供的Schema
[命名空间]:http://www.springframework.org/schema/util
[Schema文件]:http://www.springframework.org/schema/util/spring-util-4.0.xsd
spring-jee-4.0.xsd[说明]:为简化JavaEE中EJB、JNDI等功能的配置而提供的Schema
[命名空间]:http://www.springframework.org/schema/jee
[Schema文件]:http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
spring-jdbc-4.0.xsd[说明]:为配置Spring内嵌数据库提供的Schema,是Spring3.0新增的
[命名空间]:http://www.springframework.org/schema/jdbc
[Schema文件]:http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
spring-jms-4.0.xsd[说明]:JMS配置的Schema
[命名空间]:http://www.springframework.org/schema/jms
[Schema文件]:http://www.springframework.org/schema/jms/spring-jms-4.0.xsd
spring-lang-4.0.xsd[说明]:增加了对JRuby和Grooy等动态语言的支持,该Schema是为集成动态语言而定义的
[命名空间]:http://www.springframework.org/schema/lang
[Schema文件]:http://www.springframework.org/schema/lang/spring-lang-4.0.xsd
spring-oxm-4.0.xsd[说明]:配置对象XML映射的Scheme,是Spring3.0新增的
[命名空间]:http://www.springframework.org/schema/oxm
[Schema文件]:http://www.springframework.org/schema/oxm/spring-oxm-4.0.xsd
spring-task-4.0.xsd[说明]:任务调度的Schema
[命名空间]:http://www.springframework.org/schema/task
[Schema文件]:http://www.springframework.org/schema/task/spring-task-4.0.xsd
spring-tool-4.0.xsd[说明]:为集成Spring的一些有用工具定义的Schema
[命名空间]:http://www.springframework.org/schema/tool
[Schema文件]:http://www.springframework.org/schema/tool/spring-tool-4.0.xsd

虽然Spring 为 AOP、声明事务、Java EE 都提供了专门的Schema XML配置,但Spring也允许继续使用低版本的基于DTD的XML配置方式。Spring 4.0 配置的升级时向后兼容的,但还是建议使用新的基于Schema的配置方式。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值