没有合适的资源?快使用搜索试试~ 我知道了~
首页Spring 3.2官方参考文档:最新版,适合Kindle阅读
Spring 3.2 是一款著名的开源企业级应用开发框架,由Rod Johnson、Juergen Hoeller等众多开发者共同贡献。Spring Framework Reference 3.2.0.RELEASE 是该版本的官方文档,提供了对Spring框架各个模块的详细介绍,旨在帮助开发人员更好地理解和使用Spring技术。
该文档的结构清晰,分为多个部分:
1. **概述**(I. Overview of Spring Framework): 这部分介绍了Spring框架的整体概念,包括依赖注入(Dependency Injection, DI)和控制反转(Inversion of Control, IoC)的核心理念,以及Spring框架的主要模块如核心容器(Core Container)、数据访问与集成(Data Access/Integration)、Web模块、面向切面编程(AOP, Aspect-Oriented Programming)和测试支持。
2. **模块详解**:
- **核心容器(Core Container)**: 提供了构建和管理应用程序组件的服务,如BeanFactory和ApplicationContext。
- **数据访问/集成(Data Access/Integration)**: 包括数据访问抽象(Data Access Abstraction)和JDBC、ORM(如Hibernate和MyBatis)的支持,以及与消息队列和事务管理的集成。
- **Web**:Spring MVC、Spring WebFlux等模块,用于简化web应用的开发,提供强大的控制器、视图解析和HTTP请求处理机制。
- **AOP和Instrumentation**: 面向切面编程(AOP)用于实现横切关注点,如日志、事务管理和性能监控,而Instrumentation则涉及运行时行为的修改。
- **测试(Test)**: 提供了Spring Test框架,便于单元测试和集成测试的编写。
3. **使用场景(Usagescenarios)**: 文档还列举了一些实际应用场景,帮助读者理解如何在不同项目中灵活运用Spring框架。
4. **依赖管理和命名规范(DependencyManagement and Naming Conventions)**: 提供了关于项目中如何管理依赖以及推荐的命名规则,以确保代码的一致性和可维护性。
Spring 3.2文档适合于想要深入学习或更新对Spring框架理解的开发人员,无论是初次接触还是经验丰富的开发者,都能从中找到所需的信息。此外,由于文档支持高清版阅读,它非常适合Kindle等电子设备。版权方面,允许用户复制文档供个人使用或免费分发,但必须保留版权声明。
Spring Framework
3.2.0.RELEASE
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.RELEASE
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.RELEASE
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.RELEASE
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.RELEASE
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页未读,继续阅读
2018-10-22 上传
2021-10-01 上传
2012-05-15 上传
2022-07-25 上传
2015-12-15 上传
2017-03-01 上传
2014-01-11 上传
2015-12-03 上传
leon_qiulin
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- AES:AES算法库在C中以128位192位256位实现
- 【地产资料】XX地产 新LOGO_的PPT模板及使用规范P8.zip
- java学习
- Excel模板学生成绩统计表Excel(含图含公式).zip
- abacus:CLI应用程序的简单遥测
- editorconfig-lint:符合 editorconfig 的 Lint 代码
- php-cli-tools:一系列可帮助PHP命令行实用程序的工具
- homelab:Matt Layher机器的配置管理。 麻省理工学院许可
- coffemud-mapper:CoffeeMud映射器
- 毕业设计&课设--毕业设计选题系统.zip
- 半导体国产替代系列十二:5G浪潮来袭,滤波器需求与替代的成长旋律-200221.rar
- smartcrop-sharp:通过SharplibVips使用Smartcrop的节点模块
- Pyro4:Pyro 4.x-Python远程对象
- mucahitsaratar.github.io
- apigeeOrgAdmin:用于管理 Apigee 组织
- Excel模板财务收支表87.zip
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功