没有合适的资源?快使用搜索试试~ 我知道了~
首页Spring 3.2官方文档:模块详解与依赖管理
Spring Framework 3.2.0.BUILD-SNAPSHOT 官方文档是一份全面介绍Spring框架的重要参考资料。该文档由Spring团队的多位知名开发者共同编写,包括Rod Johnson、Juergen Hoeller、Keith Donald等,版权属于2004年至2012年。这份文档允许用户在个人使用和非商业性质的分享时复制,但必须保留版权声明。
文档的结构清晰,分为多个部分:
1. **概述**:首先,文档提供了Spring框架的整体介绍,涵盖了其核心概念,如依赖注入(Dependency Injection,DI)和控制反转(Inversion of Control,IoC)。Spring框架通过这些机制,帮助开发者管理应用程序中的对象关系,使得代码更加模块化且易于测试。
2. **核心容器**:这部分详细解释了Spring的核心组件,即所谓的"Spring Container",它是应用程序的启动点,负责创建和管理对象实例,以及配置应用的生命周期管理。
3. **数据访问与集成**:文档涉及Spring如何支持数据库访问、事务管理以及与其他系统的集成,包括JDBC、ORM(如Hibernate、MyBatis)、消息队列等,强调了Spring在企业级应用中的集成能力。
4. **面向切面编程(AOP)与动态代理**:Spring AOP让开发者能够将横切关注点(如日志、事务处理)抽取出来,以提高代码的可维护性和可复用性。文档展示了如何使用Spring AOP实现声明式编程。
5. **测试支持**:Spring提供了强大的测试工具,包括Spring Test框架,帮助开发者编写单元测试和集成测试,确保代码质量。
6. **使用场景**:文档还列举了Spring框架在不同场景下的典型应用,如Web开发、服务端架构、轻量级应用等,帮助读者了解其适用范围。
7. **依赖管理和命名空间(Namespace)**:Spring 3.2版本引入了依赖管理的概念,简化了配置文件,特别是对于XML配置,使用命名空间(Namespace)的方式使得配置更加简洁。
通过阅读这份文档,开发者可以深入理解Spring框架的各个方面,掌握如何在实际项目中高效地利用Spring来构建、管理和扩展复杂的应用程序。无论是初次接触Spring还是进阶学习,这份文档都是不可或缺的参考资料。
Spring Framework
3.2.0.BUILD-SNAPSHOT
Spring Framework
Reference Documentation xvi
Configuration .......................................................................................... 509
The form tag ......................................................................................... 509
The input tag ....................................................................................... 511
The checkbox tag ................................................................................. 511
The checkboxes tag ............................................................................. 514
The radiobutton tag ........................................................................... 514
The radiobuttons tag ......................................................................... 515
The password tag ................................................................................. 515
The select tag ..................................................................................... 515
The option tag ..................................................................................... 516
The options tag ................................................................................... 516
The textarea tag ................................................................................. 517
The hidden tag ..................................................................................... 517
The errors tag ..................................................................................... 517
HTTP Method Conversion ....................................................................... 520
HTML5 Tags .......................................................................................... 521
18.3. Tiles .............................................................................................................. 521
Dependencies ................................................................................................ 521
How to integrate Tiles ..................................................................................... 521
UrlBasedViewResolver .................................................................... 522
ResourceBundleViewResolver ........................................................ 522
SimpleSpringPreparerFactory and
SpringBeanPreparerFactory ............................................................ 522
18.4. Velocity & FreeMarker .................................................................................... 523
Dependencies ................................................................................................ 523
Context configuration ...................................................................................... 523
Creating templates ......................................................................................... 524
Advanced configuration ................................................................................... 525
velocity.properties ................................................................................... 525
FreeMarker ............................................................................................. 525
Bind support and form handling ....................................................................... 526
The bind macros .................................................................................... 526
Simple binding ........................................................................................ 526
Form input generation macros ................................................................. 527
HTML escaping and XHTML compliance ................................................. 531
18.5. XSLT ............................................................................................................. 532
My First Words ............................................................................................... 532
Bean definitions ...................................................................................... 532
Standard MVC controller code ................................................................. 532
Convert the model data to XML ............................................................... 533
Defining the view properties .................................................................... 533
Document transformation ........................................................................ 534
Summary ....................................................................................................... 534
18.6. Document views (PDF/Excel) .......................................................................... 535
Introduction .................................................................................................... 535
Configuration and setup .................................................................................. 535
Document view definitions ....................................................................... 535
Controller code ....................................................................................... 535
Subclassing for Excel views .................................................................... 535
Subclassing for PDF views ..................................................................... 537
Spring Framework
3.2.0.BUILD-SNAPSHOT
Spring Framework
Reference Documentation xvii
18.7. JasperReports ............................................................................................... 538
Dependencies ................................................................................................ 538
Configuration .................................................................................................. 538
Configuring the ViewResolver .............................................................. 538
Configuring the Views ............................................................................ 538
About Report Files .................................................................................. 539
Using JasperReportsMultiFormatView ............................................. 539
Populating the ModelAndView ....................................................................... 540
Working with Sub-Reports ............................................................................... 541
Configuring Sub-Report Files .................................................................. 541
Configuring Sub-Report Data Sources ..................................................... 542
Configuring Exporter Parameters ..................................................................... 542
18.8. Feed Views ................................................................................................... 542
18.9. XML Marshalling View .................................................................................... 543
18.10. JSON Mapping View .................................................................................... 544
19. Integrating with other web frameworks ....................................................................... 545
19.1. Introduction .................................................................................................... 545
19.2. Common configuration ................................................................................... 546
19.3. JavaServer Faces 1.1 and 1.2 ........................................................................ 547
DelegatingVariableResolver (JSF 1.1/1.2) ........................................................ 547
SpringBeanVariableResolver (JSF 1.1/1.2) ....................................................... 548
SpringBeanFacesELResolver (JSF 1.2+) ......................................................... 548
FacesContextUtils ........................................................................................... 548
19.4. Apache Struts 1.x and 2.x .............................................................................. 549
ContextLoaderPlugin ....................................................................................... 549
DelegatingRequestProcessor ................................................................... 550
DelegatingActionProxy ............................................................................ 550
ActionSupport Classes .................................................................................... 551
19.5. WebWork 2.x ................................................................................................. 551
19.6. Tapestry 3.x and 4.x ...................................................................................... 552
Injecting Spring-managed beans ..................................................................... 553
Dependency Injecting Spring Beans into Tapestry pages ........................... 555
Component definition files ....................................................................... 556
Adding abstract accessors ...................................................................... 557
Dependency Injecting Spring Beans into Tapestry pages - Tapestry 4.x
style ....................................................................................................... 559
19.7. Further Resources ......................................................................................... 560
20. Portlet MVC Framework ............................................................................................ 561
20.1. Introduction .................................................................................................... 561
Controllers - The C in MVC ............................................................................ 562
Views - The V in MVC .................................................................................... 562
Web-scoped beans ......................................................................................... 562
20.2. The DispatcherPortlet ............................................................................ 562
20.3. The ViewRendererServlet ........................................................................ 564
20.4. Controllers ..................................................................................................... 565
AbstractController and PortletContentGenerator ............................. 566
Other simple controllers .................................................................................. 567
Command Controllers ..................................................................................... 567
PortletWrappingController .................................................................... 568
20.5. Handler mappings .......................................................................................... 568
Spring Framework
3.2.0.BUILD-SNAPSHOT
Spring Framework
Reference Documentation xviii
PortletModeHandlerMapping .................................................................... 569
ParameterHandlerMapping ........................................................................ 569
PortletModeParameterHandlerMapping .................................................. 570
Adding HandlerInterceptors ..................................................................... 570
HandlerInterceptorAdapter .................................................................... 571
ParameterMappingInterceptor ................................................................ 571
20.6. Views and resolving them .............................................................................. 571
20.7. Multipart (file upload) support ......................................................................... 572
Using the PortletMultipartResolver ....................................................... 572
Handling a file upload in a form ...................................................................... 573
20.8. Handling exceptions ....................................................................................... 576
20.9. Annotation-based controller configuration ........................................................ 576
Setting up the dispatcher for annotation support ............................................... 576
Defining a controller with @Controller .......................................................... 577
Mapping requests with @RequestMapping ..................................................... 578
Supported handler method arguments ............................................................. 579
Binding request parameters to method parameters with @RequestParam .......... 581
Providing a link to data from the model with @ModelAttribute ....................... 581
Specifying attributes to store in a Session with @SessionAttributes ............. 582
Customizing WebDataBinder initialization ...................................................... 582
Customizing data binding with @InitBinder .......................................... 582
Configuring a custom WebBindingInitializer ................................... 583
20.10. Portlet application deployment ...................................................................... 583
VI. Integration ......................................................................................................................... 584
21. Remoting and web services using Spring ................................................................... 585
21.1. Introduction .................................................................................................... 585
21.2. Exposing services using RMI .......................................................................... 586
Exporting the service using the RmiServiceExporter ................................... 586
Linking in the service at the client ................................................................... 587
21.3. Using Hessian or Burlap to remotely call services via HTTP .............................. 587
Wiring up the DispatcherServlet for Hessian and co. ................................. 587
Exposing your beans by using the HessianServiceExporter ....................... 588
Linking in the service on the client .................................................................. 589
Using Burlap .................................................................................................. 589
Applying HTTP basic authentication to a service exposed through Hessian or
Burlap ............................................................................................................ 589
21.4. Exposing services using HTTP invokers .......................................................... 590
Exposing the service object ............................................................................ 590
Linking in the service at the client ................................................................... 591
21.5. Web services ................................................................................................. 591
Exposing servlet-based web services using JAX-RPC ....................................... 592
Accessing web services using JAX-RPC .......................................................... 593
Registering JAX-RPC Bean Mappings ............................................................. 595
Registering your own JAX-RPC Handler .......................................................... 595
Exposing servlet-based web services using JAX-WS ........................................ 596
Exporting standalone web services using JAX-WS ........................................... 597
Exporting web services using the JAX-WS RI's Spring support .......................... 598
Accessing web services using JAX-WS ........................................................... 598
21.6. JMS .............................................................................................................. 599
Server-side configuration ................................................................................. 600
Spring Framework
3.2.0.BUILD-SNAPSHOT
Spring Framework
Reference Documentation xix
Client-side configuration .................................................................................. 601
21.7. Auto-detection is not implemented for remote interfaces ................................... 602
21.8. Considerations when choosing a technology .................................................... 602
21.9. Accessing RESTful services on the Client ....................................................... 603
RestTemplate ................................................................................................. 603
Working with the URI .............................................................................. 605
Dealing with request and response headers ............................................. 606
HTTP Message Conversion ............................................................................ 606
StringHttpMessageConverter ................................................................... 607
FormHttpMessageConverter .................................................................... 607
ByteArrayHttpMessageConverter ............................................................. 607
MarshallingHttpMessageConverter ........................................................... 607
MappingJackson2HttpMessageConverter (or
MappingJacksonHttpMessageConverter with Jackson 1.x) ........................ 608
SourceHttpMessageConverter ................................................................. 608
BufferedImageHttpMessageConverter ...................................................... 608
22. Enterprise JavaBeans (EJB) integration ..................................................................... 609
22.1. Introduction .................................................................................................... 609
22.2. Accessing EJBs ............................................................................................. 609
Concepts ........................................................................................................ 609
Accessing local SLSBs ................................................................................... 609
Accessing remote SLSBs ................................................................................ 611
Accessing EJB 2.x SLSBs versus EJB 3 SLSBs ............................................... 611
22.3. Using Spring's EJB implementation support classes ......................................... 612
EJB 2.x base classes ..................................................................................... 612
EJB 3 injection interceptor .............................................................................. 614
23. JMS (Java Message Service) .................................................................................... 616
23.1. Introduction .................................................................................................... 616
23.2. Using Spring JMS .......................................................................................... 616
JmsTemplate ................................................................................................ 616
Connections ................................................................................................... 617
Caching Messaging Resources ............................................................... 617
SingleConnectionFactory ......................................................................... 617
CachingConnectionFactory ...................................................................... 618
Destination Management ................................................................................. 618
Message Listener Containers .......................................................................... 619
SimpleMessageListenerContainer ............................................................ 619
DefaultMessageListenerContainer ............................................................ 619
Transaction management ................................................................................ 619
23.3. Sending a Message ....................................................................................... 620
Using Message Converters ............................................................................. 621
SessionCallback and ProducerCallback ................................................ 622
23.4. Receiving a message ..................................................................................... 622
Synchronous Reception .................................................................................. 622
Asynchronous Reception - Message-Driven POJOs .......................................... 622
The SessionAwareMessageListener interface ........................................... 623
The MessageListenerAdapter ................................................................... 624
Processing messages within transactions ........................................................ 625
23.5. Support for JCA Message Endpoints ............................................................... 626
23.6. JMS Namespace Support ............................................................................... 628
Spring Framework
3.2.0.BUILD-SNAPSHOT
Spring Framework
Reference Documentation xx
24. JMX ......................................................................................................................... 632
24.1. Introduction .................................................................................................... 632
24.2. Exporting your beans to JMX .......................................................................... 632
Creating an MBeanServer ............................................................................. 634
Reusing an existing MBeanServer ................................................................. 634
Lazy-initialized MBeans ................................................................................... 635
Automatic registration of MBeans .................................................................... 635
Controlling the registration behavior ................................................................. 636
24.3. Controlling the management interface of your beans ........................................ 637
The MBeanInfoAssembler Interface ............................................................. 637
Using Source-Level Metadata (JDK 5.0 annotations) ........................................ 637
Source-Level Metadata Types ......................................................................... 639
The AutodetectCapableMBeanInfoAssembler interface ............................ 641
Defining management interfaces using Java interfaces ..................................... 641
Using MethodNameBasedMBeanInfoAssembler ........................................... 643
24.4. Controlling the ObjectNames for your beans .................................................. 643
Reading ObjectNames from Properties ...................................................... 643
Using the MetadataNamingStrategy ........................................................... 644
Configuring annotation based MBean export .................................................... 645
24.5. JSR-160 Connectors ...................................................................................... 646
Server-side Connectors ................................................................................... 646
Client-side Connectors .................................................................................... 647
JMX over Burlap/Hessian/SOAP ...................................................................... 647
24.6. Accessing MBeans via Proxies ....................................................................... 647
24.7. Notifications ................................................................................................... 648
Registering Listeners for Notifications .............................................................. 648
Publishing Notifications ................................................................................... 652
24.8. Further Resources ......................................................................................... 654
25. JCA CCI .................................................................................................................. 655
25.1. Introduction .................................................................................................... 655
25.2. Configuring CCI ............................................................................................. 655
Connector configuration .................................................................................. 655
ConnectionFactory configuration in Spring ................................................. 656
Configuring CCI connections ........................................................................... 656
Using a single CCI connection ........................................................................ 657
25.3. Using Spring's CCI access support ................................................................. 658
Record conversion .......................................................................................... 658
The CciTemplate ......................................................................................... 659
DAO support .................................................................................................. 660
Automatic output record generation ................................................................. 660
Summary ....................................................................................................... 661
Using a CCI Connection and Interaction directly ...................................... 662
Example for CciTemplate usage ................................................................... 663
25.4. Modeling CCI access as operation objects ...................................................... 665
MappingRecordOperation .......................................................................... 665
MappingCommAreaOperation ...................................................................... 665
Automatic output record generation ................................................................. 666
Summary ....................................................................................................... 666
Example for MappingRecordOperation usage ............................................. 666
Example for MappingCommAreaOperation usage ......................................... 668
剩余842页未读,继续阅读
点击了解资源详情
点击了解资源详情
点击了解资源详情
2016-09-27 上传
2013-06-08 上传
2014-07-29 上传
2013-04-09 上传
2014-05-05 上传
ad8224
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- addressable:Addressable是URI实现的替代实现,它是Ruby标准库的一部分。 它非常灵活,提供启发式解析,并且还为IRI和URI模板提供了广泛的支持
- canteenmanagement
- EnterpriseProject,java源码网,oa系统源码java
- messageboard
- API610标准在大型中高温浓硫酸液下泵设计中的应用.rar
- Sitio_Web_Blog_Cafe-Mobile_First
- fe-record-websource:前端记录资源导航的网页版原始码,使用react编写的静态页面
- Jake Peralta Theme-crx插件
- Javasourcecodequerysystem,java线程池源码,java酷狗
- subtlechat-vue:微言语聊天室是基于前初步分离,采用SpringBoot + Vue开发的网页版聊天室。这是项目的前端vue工程
- translations-app:已实现翻译的示例Web应用程序(react-i18next)
- 班主任工作计划和总结打包.rar
- lambdaUnzipper:AWS Lambda 的解压缩功能
- 异质检测
- Pervy Pastry Puffinator-crx插件
- shengyintupian,java源码阅读,企业java源码下载
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功