PHP4 | Flash | ASP | CSS | VBScript | ADO | MySQL | JavaScript | Spring | Hibernate | win32api | 正则表达式 | 注册表 | xmlhttp .
当前位置:首页 → Spring    下一篇 A.2. XML Schema-based c…
在当前chm中查找:
目录
·附录 A. XML Schema-based configuration
·A.2. XML Schema-based configuration
·A.3. Setting up your IDE
·附录 B. Extensible XML authoring
·B.2. Authoring the schema
·B.3. Coding a NamespaceHandler
·B.4. Coding a BeanDefinitionParser
·B.5. Registering the handler and the schema
·附录 C. spring-beans.dtd
·附录 D. spring.tld
·D.2. The bind tag
·D.3. The escapeBody tag
·D.4. The hasBindErrors tag
·D.5. The htmlEscape tag
·D.6. The message tag
·D.7. The nestedPath tag
·D.8. The theme tag
·D.9. The transform tag
·附录 E. spring-form.tld
·E.2. The checkbox tag
·E.3. The errors tag
·E.4. The form tag
·E.5. The hidden tag
·E.6. The input tag
·E.7. The label tag
·E.8. The option tag
·E.9. The options tag
·E.10. The password tag
·E.11. The radiobutton tag
·E.12. The select tag
·E.13. The textarea tag
·附录 F. Spring 2.0 开发手册中文化项目
·F.2. 致谢
·F.3. 参与人员及任务分配
·F.4. Spring 2.0 正式版开发手册翻译说明
·F.5. 项目历程
·第 1 章 简介
·1.2. 使用场景
·第 2 章 Spring 2.0 的新特性
·2.2. 控制反转(IoC)容器
·2.3. 面向切面编程(AOP)
·2.4. 中间层
·2.5. Web层
·2.6. 其他特性
·2.7. 移植到Spring 2.0
·2.8. 更新的样例应用
·2.9. 改进的文档
·第 3 章 控制反转容器
·3.2. 容器和bean的基本原理
·3.3. 依赖
·3.4. bean的作用域
·3.5. 定制bean特性
·3.6. bean定义的继承
·3.7. 容器扩展点
·3.8. ApplicationContext
·3.9. 粘合代码和可怕的singleton
·第 4 章 资源
·4.2.  Resource 接口
·4.3. 内置 Resource 实现
·4.4. ResourceLoader
·4.5.  ResourceLoaderAware 接口
·4.6. 把Resource作为属性来配置
·4.7. Application context 和Resource 路径
·第 5 章 校验,数据绑定,BeanWrapper,与属性编辑器
·5.2. 使用Spring的Validator接口进行校验
·5.3. 从错误代码到错误信息
·5.4. Bean处理和BeanWrapper
·第 6 章 使用Spring进行面向切面编程(AOP)
·6.2. @AspectJ支持
·6.3. Schema-based AOP support
·6.4. AOP声明风格的选择
·6.5. 混合切面类型
·6.6. 代理机制
·6.7. 编程方式创建@AspectJ代理
·6.8. 在Spring应用中使用AspectJ
·6.9. 其它资源
·第 7 章 Spring AOP APIs
·7.2. Spring中的切入点API
·7.3. Spring的通知API
·7.4. Spring里的advisor(Advisor) API
·7.5. 使用ProxyFactoryBean创建AOP代理
·7.6. 简化代理定义
·7.7. 使用ProxyFactory通过编程创建AOP代理
·7.8. 操作被通知对象
·7.9. 使用“自动代理(autoproxy)”功能
·7.10. 使用TargetSources
·7.11. 定义新的通知类型
·7.12. 更多资源
·第 8 章 测试
·8.2. 单元测试
·8.3. 集成测试
·8.4. 更多资源
·第 9 章 事务管理
·9.2. 动机
·9.3. 关键抽象
·9.4. 使用资源同步的事务
·9.5. 声明式事务管理
·9.6. 编程式事务管理
·9.7. 选择编程式事务管理还是声明式事务管理
·9.8. 与特定应用服务器集成
·9.9. 公共问题的解决方案
·9.10. 更多的资源
·第 10 章 DAO支持
·10.2. 一致的异常层次
·10.3. 一致的DAO支持抽象类
·第 11 章 使用JDBC进行数据访问
·11.2. 利用JDBC核心类实现JDBC的基本操作和错误处理
·11.3. 控制数据库连接
·11.4. 用Java对象来表达JDBC操作
·第 12 章 使用ORM工具进行数据访问
·12.2. Hibernate
·12.3. JDO
·12.4. Oracle TopLink
·12.5. iBATIS SQL Maps
·12.6. JPA
·第 13 章 Web框架
·13.2. DispatcherServlet
·13.3. 控制器
·13.4. 处理器映射(handler mapping)
·13.5. 视图与视图解析
·13.6. 本地化解析器
·13.7. 使用主题
·13.8. Spring对分段文件上传(multipart file upload)的支持
·13.9. 使用Spring的表单标签库
·13.10. 处理异常
·13.11. 惯例优先原则(convention over configuration)
·13.12. 其它资源
·第 14 章 集成视图技术
·14.2. JSP和JSTL
·14.3. Tiles
·14.4. Velocity和FreeMarker
·14.5. XSLT
·14.6. 文档视图(PDF/Excel)
·14.7. JasperReports
·第 15 章 集成其它Web框架
·15.2. 通用配置
·15.3. JavaServer Faces
·15.4. Struts
·15.5. Tapestry
·15.6. WebWork
·15.7. 更多资源
·第 16 章 Portlet MVC框架
·16.2.  DispatcherPortlet
·16.3. ViewRendererServlet
·16.4. 控制器
·16.5. 处理器映射
·16.6. 视图和它们的解析
·16.7. Multipart文件上传支持
·16.8. 异常处理
·16.9. Portlet应用的部署
·第 17 章 使用Spring进行远程访问与Web服务
·17.2. 使用RMI暴露服务
·17.3. 使用Hessian或者Burlap通过HTTP远程调用服务
·17.4. 使用HTTP调用器暴露服务
·17.5. Web服务
·17.6. 对远程接口不提供自动探测
·17.7. 在选择这些技术时的一些考虑
·第 18 章 Enterprise Java Bean(EJB)集成
·18.2. 访问EJB
·18.3. 使用Spring提供的辅助类实现EJB组件
·第 19 章 JMS
·19.2. 使用Spring JMS
·19.3. 发送一条消息
·19.4. 接收消息
·第 20 章 JMX
·20.2. 输出bean到JMX
·20.3. 控制bean的管理接口
·20.4. 控制bean的 ObjectName
·20.5. JSR-160连接器
·20.6. 通过代理访问MBeans
·20.7. 通知
·20.8. 更多资源
·第 21 章 JCA CCI
·21.2. 配置CCI
·21.3. 使用Spring的 CCI访问支持
·21.4. 建模CCI访问为操作对象
·21.5. 事务
·第 22 章 Spring邮件抽象层
·22.2. Spring邮件抽象结构
·22.3. 使用Spring邮件抽象
·22.4. 使用 JavaMail MimeMessageHelper
·第 23 章 Spring中的定时调度(Scheduling)和线程池(Thread Pooling)
·23.2. 使用OpenSymphony Quartz 调度器
·23.3. 使用JDK Timer支持类
·23.4. SpringTaskExecutor抽象
·第 24 章 动态语言支持
·24.2. 第一个例子
·24.3. 定义动态语言支持的bean
·24.4. 场景
·24.5. 更多的资源
·第 25 章 注解和源代码级的元数据支持
·25.2. Spring的元数据支持
·25.3. 注解
·25.4. 集成Jakarta Commons Attributes
·25.5. 元数据和Spring AOP自动代理
·25.6. 使用属性来减少MVC web层配置
·25.7. 元数据属性的其它用法
·25.8. 增加对额外元数据API的支持
·Spring Framework 开发参考手册
·前言
·部分 I. 核心技术
·部分 II. 中间层数据访问
·部分 III. Web
·部分 IV. 整合
附录 A. XML Schema-based configuration


附录 A. XML Schema-based configuration


A.1. Introduction


www.51chm.com This section of the reference documentation details the XML Schema based configuration introduced in Spring 2.0.

The central motivation for moving to XML Schema based configuration files was to make Spring XML configuration easier. The 'classic' <bean/>-based approach is good, but its generic-nature comes with a price in terms of configuration overhead.

From the Spring IoC containers point-of-view, everything is a bean. That's great news for the Spring IoC container, because if everything is a bean then everything can be treated in the exact same fashion. The same, however, is not true from a developer's point-of-view. The objects defined in a Spring XML configuration file are not all generic, vanilla beans. Usually, each bean requires some degree of specific configuration.

Spring 2.0's new XML Schema-based configuration addresses this issue. The <bean/> element is still present, and if you wanted to, you could continue to write the exact same style of Spring XML configuration using only <bean/> elements. The new XML Schema-based configuration does, however, make Spring XML configuration files substantially clearer to read. In addition, it allows you to express the intent of a bean definition.

The key thing to remember is that the new custom tags work best for infrastructure or integration beans: for example, AOP, collections, transactions, integration with 3rd-party frameworks such as Mule, etc, while the existing bean tags are best suited to application-specific beans, such as DAOs, service layer objects, validators, etc.

The examples included below will hopefully convince you that the inclusion of XML Schema support in Spring 2.0 was a good idea. The reception in the community has been encouraging; something that is not covered in this section (at least not right now) is the fact that this new configuration mechanism is totally customisable and extensible. This means you can write your own domain-specific configuration tags that would better represent your application's domain.

更多内容
·A.3. Setting up your IDE
·附录 B. Extensible XML authoring
·B.2. Authoring the schema
·B.3. Coding a NamespaceHandler
·B.4. Coding a BeanDefinitionParser
·B.5. Registering the handler and the schema
·附录 C. spring-beans.dtd
·附录 D. spring.tld
·D.2. The bind tag
·D.3. The escapeBody tag
    首页 |  友情链接 |  网站地图      京ICP备07034540号    © 2007 www.51chm.com       Powered by xichy{at}163.com