A5下载 - 努力做内容最丰富最安全的下载站!

A5站长下载站

当前位置:A5下载 > 书籍教程 > 程序语言 > JAVA教程 > Spring in Action
Spring in Action

Spring in Action

  • 软件大小:7.4 MB
  • 软件语言:英文
  • 更新时间:2011-02-15
  • 软件类型:国产软件 / JAVA教程
  • 运行环境:PDF
  • 软件授权:免费软件
  • 官方主页:http://
  • 软件等级 :
  • 软件厂商:zhangyi
立即高速安全下载
  • 介绍说明
  • 下载地址
  • 精品推荐
  • 相关软件
  • 网友评论

Manning+Spring+in+Action+2nd+Edition
Java EE轻量开发框架。
Action 系列的书籍质量你懂得,英文书籍。

brief contents
PART 1 CORE SPRING ...............................................................1
1 ■ Springing into action 3
2 ■ Basic bean wiring 31
3 ■ Advanced bean wiring 72
4 ■ Advising beans 116
PART 2 ENTERPRISE SPRING................................................. 153
5 ■ Hitting the database 155
6 ■ Managing transactions 220
7 ■ Securing Spring 247
8 ■ Spring and POJO-based remote services 305
9 ■ Building contract-first web services in Spring 343
10 ■ Spring messaging 384
11 ■ Spring and Enterprise JavaBeans 423
12 ■ Accessing enterprise services 441
viii BRIEF CONTENTS
PART 3 CLIENT-SIDE SPRING..................................................487
13 ■ Handling web requests 489
14 ■ Rendering web views 533
15 ■ Using Spring Web Flow 580
16 ■ Integrating with other web frameworks 623
appendix A Setting up Spring 667
appendix B Testing with (and without) Spring 678
ix
contents
preface xix
preface to the first edition xxii
acknowledgments xxv
about this book xxvii
about the title xxxiii
about the cover illustration xxxiv
PART 1 CORE SPRING................................................ 1
1 Springing into action 3
1.1 What is Spring? 5
Spring modules 6
1.2 A Spring jump start 11
1.3 Understanding dependency injection 14
Injecting dependencies 14 ■ Dependency injection in action 15
Dependency injection in enterprise applications 21
1.4 Applying aspect-oriented programming 24
Introducing AOP 24 ■ AOP in action 26
1.5 Summary 30
x CONTENTS
2 Basic bean wiring 31
2.1 Containing your beans 33
Introducing the BeanFactory 34 ■ Working with an application
context 35 ■ A bean’s life 37
2.2 Creating beans 40
Declaring a simple bean 40 ■ Injecting through constructors 42
2.3 Injecting into bean properties 46
Injecting simple values 47 ■ Referencing other beans 48
Wiring collections 52 ■ Wiring nothing (null) 58
2.4 Autowiring 58
The four types of autowiring 59 ■ Mixing auto with explicit
wiring 63 ■ To autowire or not to autowire 63
2.5 Controlling bean creation 64
Bean scoping 65 ■ Creating beans from factory methods 66
Initializing and destroying beans 68
2.6 Summary 71
3 Advanced bean wiring 72
3.1 Declaring parent and child beans 73
Abstracting a base bean type 74 ■ Abstracting common
properties 76
3.2 Applying method injection 79
Basic method replacement 80 ■ Using getter injection 83
3.3 Injecting non-Spring beans 85
3.4 Registering custom property editors 88
3.5 Working with Spring’s special beans 92
Postprocessing beans 93 ■ Postprocessing the bean factory 95
Externalizing configuration properties 96 ■ Resolving text
messages 99 ■ Decoupling with application events 101
Making beans aware 103
3.6 Scripting beans 106
Putting the lime in the coconut 107 ■ Scripting a bean 108
Injecting properties of scripted beans 111 ■ Refreshing scripted
beans 112 ■ Writing scripted beans inline 113
3.7 Summary 114
CONTENTS xi
4 Advising beans 116
4.1 Introducing AOP 118
Defining AOP terminology 119 ■ Spring’s AOP support 122
4.2 Creating classic Spring aspects 125
Creating advice 127 ■ Defining pointcuts and advisors 132
Using ProxyFactoryBean 136
4.3 Autoproxying 139
Creating autoproxies for Spring aspects 140 ■ Autoproxying
@AspectJ aspects 141
4.4 Declaring pure-POJO aspects 145
4.5 Injecting AspectJ aspects 149
4.6 Summary 152
PART 2 ENTERPRISE SPRING ................................. 153
5 Hitting the database 155
5.1 Learning Spring’s data access philosophy 157
Getting to know Spring’s data access exception hierarchy 158
Templating data access 161 ■ Using DAO support classes 163
5.2 Configuring a data source 165
Using JNDI data sources 165 ■ Using a pooled data source 167
JDBC driver-based data source 168
5.3 Using JDBC with Spring 170
Tackling runaway JDBC code 170 ■ Working with JDBC
templates 173 ■ Using Spring’s DAO support classes for
JDBC 180
5.4 Integrating Hibernate with Spring 183
Choosing a version of Hibernate 185 ■ Using Hibernate
templates 186 ■ Building Hibernate-backed DAOs 190
Using Hibernate 3 contextual sessions 192
5.5 Spring and the Java Persistence API 194
Using JPA templates 194 ■ Configuring an entity manager
factory 197 ■ Building a JPA-backed DAO 202
xii CONTENTS
5.6 Spring and iBATIS 203
Configuring an iBATIS client template 204 ■ Building
an iBATIS-backed DAO 207
5.7 Caching 208
Configuring a caching solution 210 ■ Proxying beans
for caching 215 ■ Annotation-driven caching 217
5.8 Summary 218
6 Managing transactions 220
6.1 Understanding transactions 222
Explaining transactions in only four words 223
Understanding Spring’s transaction management
support 224
6.2 Choosing a transaction manager 225
JDBC transactions 226 ■ Hibernate transactions 227
Java Persistence API transactions 227 ■ Java Data
Objects transactions 228 ■ Java Transaction API
transactions 229
6.3 Programming transactions in Spring 229
6.4 Declaring transactions 232
Defining transaction attributes 233 ■ Proxying
transactions 238 ■ Declaring transactions in
Spring 2.0 241 ■ Defining annotation-driven
transactions 243
6.5 Summary 245
7 Securing Spring 247
7.1 Introducing Spring Security 248
7.2 Authenticating users 252
Configuring a provider manager 253 ■ Authenticating
against a database 256 ■ Authenticating against
an LDAP repository 264
7.3 Controlling access 271
Voting access decisions 272 ■ Casting an access decision
vote 273 ■ Handling voter abstinence 275
CONTENTS xiii
7.4 Securing web applications 275
Proxying Spring Security’s filters 278 ■ Handling the
security context 285 ■ Prompting the user to log
in 286 ■ Handling security exceptions 291 ■ Enforcing
web security 293 ■ Ensuring a secure channel 294
7.5 View-layer security 297
Conditionally rendering content 298 ■ Displaying user
authentication information 299
7.6 Securing method invocations 300
Creating a security aspect 301 ■ Securing methods using
metadata 303
7.7 Summary 304
8 Spring and POJO-based remote services 305
8.1 An overview of Spring remoting 306
8.2 Working with RMI 309
Wiring RMI services 310 ■ Exporting RMI services 312
8.3 Remoting with Hessian and Burlap 316
Accessing Hessian/Burlap services 317 ■ Exposing bean
functionality with Hessian/Burlap 318
8.4 Using Spring’s HttpInvoker 322
Accessing services via HTTP 323 ■ Exposing beans as
HTTP Services 324
8.5 Spring and web services 326
Exporting beans as web services using XFire 326
Declaring web services with JSR-181 annotations 330
Consuming web services 333 ■ Proxying web services with
an XFire client 340
8.6 Summary 341
9 Building contract-first web services in Spring 343
9.1 Introducing Spring-WS 345
9.2 Defining the contract (first!) 347
Creating sample XML messages 348
xiv CONTENTS
9.3 Handling messages with service endpoints 353
Building a JDOM-based message endpoint 355 ■ Marshaling
message payloads 358
9.4 Wiring it all together 361
Spring-WS: The big picture 361 ■ Mapping messages to
endpoints 363 ■ Wiring the service endpoint 364
Configuring a message marshaler 364 ■ Handling endpoint
exceptions 367 ■ Serving WSDL files 369 ■ Deploying the
service 373
9.5 Consuming Spring-WS web services 373
Working with web service templates 374 ■ Using web service
gateway support 381
9.6 Summary 382
10 Spring messaging 384
10.1 A brief introduction to JMS 386
Architecting JMS 387 ■ Assessing the benefits of JMS 390
Setting up ActiveMQ in Spring 392
10.2 Using JMS with Spring 393
Tackling runaway JMS code 393 ■ Working with JMS
templates 395 ■ Converting messages 402 ■ Using Spring’s
gateway support classes for JMS 405
10.3 Creating message-driven POJOs 407
Creating a message listener 408 ■ Writing pure-POJO
MDPs 412
10.4 Using message-based RPC 416
Introducing Lingo 417 ■ Exporting the service 418
Proxying JMS 420
10.5 Summary 422
11 Spring and Enterprise JavaBeans 423
11.1 Wiring EJBs in Spring 425
Proxying session beans (EJB 2.x) 426 ■ Wiring EJBs into Spring
beans 430
11.2 Developing Spring-enabled EJBs (EJB 2.x) 431
CONTENTS xv
11.3 Spring and EJB3 434
Introducing Pitchfork 435 ■ Getting started with Pitchfork 436
Injecting resources by annotation 437 ■ Declaring interceptors
using annotations 438
11.4 Summary 440
12 Accessing enterprise services 441
12.1 Wiring objects from JNDI 442
Working with conventional JNDI 443 ■ Injecting JNDI
objects 446 ■ Wiring JNDI objects in Spring 2 449
12.2 Sending email 450
Configuring a mail sender 451 ■ Constructing the email 453
12.3 Scheduling tasks 456
Scheduling with Java’s Timer 457 ■ Using the Quartz
scheduler 460 ■ Invoking methods on a schedule 464
12.4 Managing Spring beans with JMX 466
Exporting Spring beans as MBeans 467 ■ Remoting
MBeans 477 ■ Handling notifications 482
12.5 Summary 485
PART 3 CLIENT-SIDE SPRING.................................. 487
13 Handling web requests 489
13.1 Getting started with Spring MVC 490
A day in the life of a request 491 ■ Configuring
DispatcherServlet 492 ■ Spring MVC in a nutshell 495
13.2 Mapping requests to controllers 502
Using SimpleUrlHandlerMapping 503 ■ Using
ControllerClassNameHandlerMapping 504 ■ Using metadata
to map controllers 505 ■ Working with multiple handler
mappings 505
13.3 Handling requests with controllers 506
Processing commands 509 ■ Processing form submissions 512
Processing complex forms with wizards 520 ■ Working with
throwaway controllers 528
xvi CONTENTS
13.4 Handling exceptions 531
13.5 Summary 532
14 Rendering web views 533
14.1 Resolving views 534
Using template views 535 ■ Resolving view beans 537
Choosing a view resolver 540
14.2 Using JSP templates 542
Binding form data 542 ■ Rendering externalized messages 544
Displaying errors 547
14.3 Laying out pages with Tiles 549
Tile views 550 ■ Creating Tile controllers 554
14.4 Working with JSP alternatives 556
Using Velocity templates 557 ■ Working with FreeMarker 564
14.5 Generating non-HTML output 569
Producing Excel spreadsheets 570 ■ Generating PDF
documents 573 ■ Developing custom views 576
14.6 Summary 578
15 Using Spring Web Flow 580
15.1 Getting started with Spring Web Flow 582
Installing Spring Web Flow 584 ■ Spring Web Flow
essentials 589 ■ Creating a flow 591
15.2 Laying the flow groundwork 591
Flow variables 591 ■ Start and end states 593 ■ Gathering
customer information 594 ■ Building a pizza order 601
Completing the order 605 ■ A few finishing touches 608
15.3 Advanced web flow techniques 611
Using decision states 612 ■ Extracting subflows and using
substates 614
15.4 Integrating Spring Web Flow with other frameworks 619
Jakarta Struts 619 ■ JavaServer Faces 620
15.5 Summary 622
CONTENTS xvii
16 Integrating with other web frameworks 623
16.1 Using Spring with Struts 624
Registering the Spring plug-in with Struts 626 ■ Writing Springaware
Struts actions 627 ■ Delegating to Spring-configured
actions 629 ■ What about Struts 2? 632
16.2 Working Spring into WebWork 2/Struts 2 633
16.3 Integrating Spring with Tapestry 636
Integrating Spring with Tapestry 3 637 ■ Integrating Spring with
Tapestry 4 641
16.4 Putting a face on Spring with JSF 643
Resolving JSF-managed properties 644 ■ Resolving Spring
beans 646 ■ Using Spring beans in JSF pages 646
Exposing the application context in JSF 648
16.5 Ajax-enabling applications in Spring with DWR 648
Direct web remoting 650 ■ Accessing Spring-managed beans
DWR 659
16.6 Summary 664
appendix A Setting up Spring 667
appendix B Testing with (and without) Spring 678
index 707
web content
web chapter Building portlet applications
appendix C Spring XML configuration reference
appendix D Spring JSP tag library reference
appendix E Spring Web Flow definition reference
appendix F Customizing Spring configuration

 

下载地址

  • PC版

本地下载

相关软件

查看所有评论+

网友评论

网友
您的评论需要经过审核才能显示

本类排名

本类推荐

装机必备

换一批

相关资讯

公众号