Spring in Action, Fourth Edition: Covers Spring 4 / Edition 4

Spring in Action, Fourth Edition: Covers Spring 4 / Edition 4

by Craig Walls
ISBN-10:
161729120X
ISBN-13:
9781617291203
Pub. Date:
11/28/2014
Publisher:
Manning
ISBN-10:
161729120X
ISBN-13:
9781617291203
Pub. Date:
11/28/2014
Publisher:
Manning
Spring in Action, Fourth Edition: Covers Spring 4 / Edition 4

Spring in Action, Fourth Edition: Covers Spring 4 / Edition 4

by Craig Walls
$49.99 Current price is , Original price is $49.99. You
$49.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores
$19.09 
  • SHIP THIS ITEM

    Temporarily Out of Stock Online

    Please check back later for updated availability.

    • Condition: Good
    Note: Access code and/or supplemental material are not guaranteed to be included with used textbook.

Overview

Summary

Spring in Action, Fourth Edition is a hands-on guide to the Spring Framework, updated for version 4. It covers the latest features, tools, and practices including Spring MVC, REST, Security, Web Flow, and more. You'll move between short snippets and an ongoing example as you learn to build simple and efficient J2EE applications. Author Craig Walls has a special knack for crisp and entertaining examples that zoom in on the features and techniques you really need.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Designed in 2003 as a lighter approach to J2EE development, Spring Framework has since become a standard choice for building enterprise applications and required knowledge for Java developers. Spring 4, the latest major version, provides full Java 8 integration along with key upgrades like new annotations for the IoC container, improvements to Spring Expression Language, and much-needed support for REST. Whether you're just discovering Spring or you want to absorb the new features, there's no better way to master Spring than with this book.

About the Book

Spring in Action, Fourth Edition is a hands-on guide to the Spring Framework. It covers Spring core, along with the latest updates to Spring MVC, Security, Web Flow, and more. You'll move between short snippets and an ongoing example as you learn to build simple and efficient JEE applications. Author Craig Walls has a special knack for crisp and entertaining examples that zoom in on the features and techniques you really need.

Nearly 100,000 developers have used this book to learn Spring! It requires a working knowledge of Java.

What's Inside
  • Updated for Spring 4
  • Spring Data for NoSQL
  • Simplifying configuration with annotations and definition profiles
  • Working with RESTful resources

About the Author

Craig Walls is a software developer at Pivotal. He's a popular author and a frequent speaker at user groups and conferences. Craig lives in Cross Roads, Texas.

Table of Contents
  1. Springing into action
  2. Wiring beans
  3. Advanced wiring
  4. Aspect-oriented Spring
  5. Building Spring web applications
  6. Rendering web views
  7. Advanced Spring MVC
  8. Working with Spring Web Flow
  9. Securing web applications
  10. Hitting the database with Spring and JDBC
  11. Persisting data with object-relational mapping
  12. Working with NoSQL databases
  13. Caching data
  14. Securing methods
  15. Working with remote services
  16. Creating REST APIs with Spring MVC
  17. Messaging in Spring
  18. Messaging with WebSocket and STOMP
  19. Sending email with Spring
  20. Managing Spring beans with JMX
  21. Simplifying Spring development with Spring Boot

Product Details

ISBN-13: 9781617291203
Publisher: Manning
Publication date: 11/28/2014
Edition description: 4th Edition
Pages: 624
Sales rank: 748,988
Product dimensions: 7.30(w) x 9.10(h) x 1.40(d)

About the Author

Craig Walls is an engineer at VMware, a member of the Spring engineering team, a popular author, and a frequent conference speaker.

Table of Contents

Prefacexvii
Acknowledgmentsxx
About this bookxxiii
Part 1Spring essentials1
1A Spring jump start3
1.1Why Spring?5
A day in the life of a J2EE developer5
Spring's pledge6
1.2What is Spring?8
Spring modules9
1.3Spring jump start12
1.4Understanding inversion of control15
Injecting dependencies16
IoC in action16
IoC in enterprise applications23
1.5Applying aspect-oriented programming25
Introducing AOP25
AOP in action27
AOP in the enterprise30
1.6Spring alternatives33
Comparing Spring to EJB33
Considering other lightweight containers36
Web frameworks38
Persistence frameworks40
1.7Summary40
2Wiring beans42
2.1Containing your beans44
Introducing the BeanFactory44
Working with an application context46
A bean's life47
2.2Basic wiring50
Wiring with XML54
Adding a bean55
Injecting dependencies via setter methods58
Injecting dependencies via constructor65
2.3Autowiring69
Handling ambiguities of autowiring71
Mixing auto and explicit wiring72
Autowiring by default72
To autowire or not to autowire72
2.4Working with Spring's special beans73
Postprocessing beans74
Postprocessing the bean factory76
Externalizing the configuration78
Customizing property editors80
Resolving text messages83
Listening for events85
Publishing events86
Making beans aware87
2.5Summary90
3Creating aspects91
3.1Introducing AOP92
Defining AOP terminology93
Spring's AOP implementation95
3.2Creating advice97
Before advice99
After advice101
Around advice102
Throws advice104
Introduction advice105
3.3Defining pointcuts105
Defining a pointcut in Spring105
Understanding advisors107
Using Spring's static pointcuts107
Using dynamic pointcuts111
Pointcut operations113
3.4Creating introductions115
Implementing IntroductionInterceptor115
Creating an IntroductionAdvisor119
Using introduction advice carefully120
3.5Using ProxyFactoryBean122
3.6Autoproxying124
BeanNameAutoProxyCreator124
DefaultAdvisorAutoProxyCreator126
Metadata autoproxying128
3.7Summary128
Part 2Spring in the business layer131
4Hitting the database133
4.1Learning Spring's DAO philosophy134
Understanding Spring's DataAccessException135
Working with DataSources137
Consistent DAO support139
4.2Using JDBC with Spring141
The problem with JDBC code142
Using JdbcTemplate144
Creating operations as objects152
Auto-incrementing keys155
4.3Introducing Spring's ORM framework support156
4.4Integrating Hibernate with Spring157
Hibernate overview157
Managing Hibernate resources159
Accessing Hibernate through HibernateTemplate162
Subclassing HibernateDaoSupport163
4.5Spring and JDO164
Configuring JDO164
Accessing data with JdoTemplate165
4.6Spring and iBATIS166
Setting up SQL Maps167
Using SqlMapClientTemplate168
4.7Spring and OJB169
Setting up OJB's PersistenceBroker169
4.8Summary171
5Managing transactions173
5.1Understanding transactions174
Explaining transactions in only four words176
Understanding Spring's transaction management support177
Introducing Spring's transaction manager178
5.2Programming transactions in Spring181
5.3Declaring transactions183
Understanding transaction attributes185
Declaring a simple transaction policy189
5.4Declaring transactions by method name191
Using NameMatchTransactionAttributeSource191
Shortcutting name-matched transactions194
5.5Declaring transactions with metadata195
Sourcing transaction attributes from metadata196
Declaring transactions with Commons Attributes197
5.6Trimming down transaction declarations201
Inheriting from a parent TransactionProxyFactoryBean202
Autoproxying transactions203
5.7Summary206
6Remoting207
6.1Spring remoting overview208
6.2Working with RMI212
Wiring RMI services212
Exporting RMI services214
6.3Remoting with Hessian and Burlap218
Accessing Hessian/Burlap services219
Exposing bean functionality with Hessian/Burlap220
6.4Using Http invoker223
Accessing services via HTTP224
Exposing beans as HTTP Services225
6.5Working with EJBs226
Accessing EJBs227
Developing Spring-enabled EJBs231
6.6Using JAX-RPC web services233
Referencing a web service with JAX-RPC234
Wiring a web service in Spring236
6.7Summary238
7Accessing enterprise services240
7.1Retrieving objects from JNDI241
Working with conventional JNDI241
Proxying JNDI objects243
7.2Sending e-mail244
7.3Scheduling tasks248
Scheduling with Java's Timer248
Using the Quartz scheduler250
Invoking methods on a schedule254
7.4Sending messages with JMS256
Sending messages with JMS templates257
Consuming messages261
Converting messages263
7.5Summary266
Part 3Spring in the web layer267
8Building the web layer269
8.1Getting started with Spring MVC270
A day in the life of a request271
Configuring DispatcherServlet272
Spring MVC in a nutshell275
8.2Mapping requests to controllers279
Mapping URLs to bean names280
Using SimpleUrlHandlerMapping281
Using metadata to map controllers281
Working with multiple handler mappings282
8.3Handling requests with controllers283
Writing a simple controller285
Processing commands287
Processing form submissions289
Processing complex forms with wizards294
Handling multiple actions in one controller301
Working with Throwaway controllers305
8.4Resolving views307
Using template views308
Resolving view beans310
Choosing a view resolver313
8.5Using Spring's bind tag314
8.6Handling exceptions317
8.7Summary317
9View layer alternatives319
9.1Using Velocity templates321
Defining the Velocity view321
Configuring the Velocity engine322
Resolving Velocity views323
Formatting dates and numbers324
Exposing request and session attributes325
Binding form fields in Velocity326
9.2Working with FreeMarker327
Constructing a FreeMarker view328
Configuring the FreeMarker engine329
Resolving FreeMarker views330
Binding form fields in FreeMarker330
9.3Designing page layout with Tiles332
Tile views332
Tile controllers335
9.4Generating non-HTML output337
Producing Excel spreadsheets338
Generating PDF documents340
Generating other non-HTML files343
9.5Summary344
10Working with other web frameworks346
10.1Working with Jakarta Struts347
Registering the Spring plug-in348
Implementing Spring-aware Struts actions348
Delegating actions350
10.2Working with Tapestry352
Replacing the Tapestry Engine353
Loading Spring beans into Tapestry pages355
10.3Integrating with JavaServer Faces357
Resolving variables357
Publishing request handled events361
10.4Integrating with WebWork362
WebWork 1363
XWork/WebWork2364
10.5Summary365
11Securing Spring applications367
11.1Introducing the Acegi Security System368
Security interceptors369
Authentication managers370
Access decisions managers370
Run-as managers370
11.2Managing authentication371
Configuring a provider manager371
Authenticating against a database373
Authenticating against an LDAP repository382
Enabling Single Sign-On with Acegi and Yale CAS384
11.3Controlling access389
Voting access decisions389
Deciding how to vote390
Handling voter abstinence392
11.4Securing web applications392
Proxying Acegi's filters394
Enforcing web security397
Processing a login400
Setting up the security context406
Ensuring a secure channel407
Using the Acegi tag library411
11.5Securing method invocations412
Creating a security aspect412
Securing methods using metadata414
11.6Summary416
Appendix ASpring setup417
A.1Downloading Spring418
A.2Choosing a distribution418
A.3Setting up your project419
A.4Building with Ant420
Appendix BSpring-related projects422
B.1AppFuse423
B.2Rich Client Project424
B.3Spring.NET424
Index427
From the B&N Reads Blog

Customer Reviews