ebook img

Spring in Action PDF

765 Pages·2008·12.03 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Spring in Action

Praise for the First Edition “This is one of those rare books that connect a tutorial for using a certain software product with a plethora of ideas on good software design and design patterns. I enjoyed this book very much...” —Computing Reviews “Covers all the bases with extensive examples and explicit instructions...a superbly organized and fluently written instruction and reference manual.” —Internet Bookwatch “...easy to read...and has just enough humor mixed in...” —Books-On-Line “While Spring’s reference documentation is high quality, this book makes learning Spring much more enjoyable. The book injects a fair amount of humor that keeps it entertaining. If you want to learn Spring, you can’t go wrong with this offering.” —Bill Siggelkow’s Weblog Author of Jakarta Struts Cookbook “Truly a great resource... The book clearly defines the power that Spring brings to enterprise programmers and how Spring abstracts away many of the tougher J2EE services that most serious applications use. The book has been through a rigorous early access program, so thankfully grammar and code errors are all but non-existent. To me, there is nothing worse than trying to learn a new technology from a poorly written and edited technical book. Thankfully, Craig, Ryan, and the Manning team have paid attention to detail and produced a book that I highly recommend.” —JavaLobby.org “A complete reference manual that covers nearly every aspect of Spring. This doesn’t mean it is complicated: every explanation is clear and there are a lot of code examples. ...[it] explains clearly what “Inversion of Control” and AOP mean and how Spring makes them possible. ...how you can write services and Daos, and how you can simply implement transaction management and service remoting. ...the third part talks about the Web layer covering Spring MVC as well as other technologies and frameworks. ...Overall an excellent resource for any developer interested in using Spring in his project.” —Java User Group Milano Spring in Action Second Edition CRAIG WALLS with Ryan Breidenbach MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. Sound View Court 3B Fax: (609) 877-8256 Greenwick, CT 06830 Email: [email protected] ©2008 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Liz Welch Sound View Court 3B Typesetter: Dottie Marsico Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-933988-13-4 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 13 12 11 10 09 08 07 For my wife Raymie and my daughters Maisy and Madison I am endlessly mystified as to how I merit the love of the world’s three most beautiful girls. 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 vii 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 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 ix

Description:
"Spring in Action" 2E is an expanded, completely updated second edition of the best selling "Spring in Action," Written by Craig Walls, one of Manning's best writers, this book covers the exciting new features of Spring 2.0, which was released in October 2006. Spring is a lightweight container frame
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.