|
Beginning Spring provides Java developers with a thorough introduction to the popular Spring Framework, the most popular choice for Java application development. After covering all the basics, the book leads the most important concepts of doing enterprise application development. The book includes:
The Latest version Spring, the 4.0: covers the latest features coming with Spring version 4.0, which contains support for Java 8.0 and Java EE 7. The Dependency Injection and Inversion of Control with Spring: covers the core idea the POJO programming model that blazed a trail in the enterprise application development world. Aspect Oriented Programming and Transaction Management: covers the cross cutting concerns that every enterprise application needs like transaction management. Building web applications using Spring MVC: show how to meet your customers` demands with Spring MVC. RESTful Web Services in Spring: covers how to produce REST based services from Spring beans and ways to consume it within UI by giving a sample with PrimeUI framework.
The ideal reader for this book is the enterprise application developer who wants to learn Spring Framework features with its latest version that covers most used and important concepts of an enterprise application
Forewords Introduction
Chapter 1: Pojo Programming Model, Lightweight Containers, and Inversion of Control Pojo Programming Model Problems of the Old Ejb Programming Model Benefits of the Pojo Programming Model Lightweight Containers and Inversion of Control (LOC) Lightweight Containers Inversion of Control (Ioc) Dependency Injection Setter Injection Constructor Injection Setter or Constructor Injection Summary
Chapter 2: Dependency Injection with Spring Spring Ioc Container Configuration Metadata Configuring and Using the Container Dependency Injection Setter Injection Constructor Injection Circular Dependencies Dependency Resolution Process Overriding Bean Definitions Using the Depends On Attribute Autowiring Bean Lookups Spring Managed Beans Naming Beans Bean Instantiation Methods Bean Scopes Lazy Initialization Life-Cycle Callbacks Bean Definition Profiles Environment Summary
Chapter 3: Building Web Applications Using Spring MVC Learning the Features and Benefits of Spring MVC Using the Dispatcher Servlet Mechanism Defining the Servlet Accessing Servlet Context Creating Your First Spring MVC Application Configuring Spring MVC with Annotations Handling Forms with Jsp Configuring the Form Tag Library Understanding the Power of Binding Working with Forms Using Input Elements Entering Dates Selecting from a Drop Down Selecting with Radio Buttons Selecting with Checkboxes Adding Labels Placing Buttons Styling Exploiting the Power of Annotations @Controller @Requestmapping @Modelattribute @Pathvariable @Controlleradvice @Initbinder @Exceptionhandler Validating User Input Uploading Files Handling Exceptions Implementing Internationalization (I18N) Using Themes Summary
Chapter 4: JDBC Data Access with Spring Problems with Using Vanilla JDBC Introducing Spring’s JDBC Support Managing JDBC Connections Embedded Db Support Using a Connection Pooled Datasource Initializing Db Configuring and Using Spring’s JDBC Support Performing Data Access Operations with Spring Running Queries Queries with Named Parameters Writing Queries Using the in Clause Using Prepared statements Within JDBC template Inserting, Updating, and Deleting Records Calling Stored Procedures and Stored Functions Performing Batch Operations Handling Blob and Clob Objects Accessing Vendor Specific JDBC Methods Executing Ddl Operations Modeling JDBC Operations As Java Objects Encapsulating SQL Query Executions Encapsulating SQL Dml Operations Encapsulating Stored Procedure Executions Exception Handling and Error Code Translation Common Data Access Exception Hierarchy Automatic Handling and Translation of SGL exception Summary
Chapter 5: Data Access with JPA Using Spring Brief Introduction to Orm and JPA Paradigm Mismatch Building Blocks of an Orm Framework What JPA Offers Mapping the Object Model to the Relational Model Defining Entities Mapping Attributes to Columns Creating Associations Between Objects Mapping Java Types to SQL Types Configuring and Using JPA Performing Crud Operations on Objects Querying with Object Query Language Spring’s JPA Support Setting Up JPA in Spring Container Implementing Daos Based on Plain JPA Handling and Translating Exceptions Further JPA Configuration in Spring Environment JPA dialect JPA vendor adapter JPA and Load Time Weaving Dealing with Multiple Persistence Units Summary
Chapter 6: Managing Transactions with Spring Understanding Transaction Management Spring’s Transaction Abstraction Model Local Versus Global Transactions Platform transaction manager Implementations Advantages of Spring’s Abstract Transaction Model Declarative Transaction Management with Spring Isolating the Service Layer from Data Access Technology Details Customizing Default Transactional Behavior Using @Transactional on the Class Level Understanding Transaction Propagation Rules Propagation Required Propagation Requires_New Propagation Nested Propagation Supports Propagation Not_Supported Propagation Never Propagation Mandatory Using for Declarative Transaction Management Programmatic Transaction Management with Spring Using the Platformtransactionmanager Approach Executing Custom Logic Before or After Transactions Advising Transactional Operations Executing Logic After Transactions Using Transactionsynchronization Summary
Chapter 7: Test Driven Development with Spring Configuring and Caching Applicationcontext Using Xml and Java Based Context Configuration in Tests Confi Guring Context with Applicationcontextinitializer Inheriting Context Configuration Applicationcontext Caching Injecting Dependencies of Test Fixtures Using Transaction Management in Tests Testing Web Applications Context Hierarchies in Tests Testing Request and Session Scoped Beans Testing Spring MVC Projects Testing Controllers Testing Form Submit Testing Exception Handlers Printing Mock Request and Response Using Mock Objects and Other Utilities for Testing Spring Provided Mock Objects for Testing Other Utilities and Test Annotations Summary
Chapter 8: Aspect Oriented Programming with Spring Getting Started with AOP with Spring Becoming Familiar with Types of Advices Before After Returning After Throwing After (Finally) Around Defining Point Cut Designators The Type Signature Expressions The Method Signature Expressions Other Alternative Point Cut Designators Wildcards Capitalizing on the Power of Annotations @Before @Pointcut @After @After Returning @After Throwing @Aspect @Around @DeclarePparents Blending Aspect with Spring Configuring Spring AOP with Annotations Summary
Chapter 9: Spring Expression Language Configuring Applications with SPEL Creating a Parser Invoking Methods Calling Constructors Calling Static Methods Working with Variables and Functions #Root #This Accessing System Properties and Environment Inline Lists Registering Functions Understanding SPEL Operators Relational Operators Arithmetic Operators Logical Operators Conditional Operators Regular Expression Operator Safe Navigation Operator Collection Selection and Projection Selecting the First and Last Element of a Collection Using Utilities in SPEL Accessing Spring Beans Expressions in Caching Summary
Chapter 10: Caching Building Your First Caching Application Configuring the Cache Manager with a Different Name Configuring the Caching Abstraction with Annotations Working with Cache Annotations @Cacheable Key Generator Conditional Caching @Cacheevict @Cacheput @Caching Implementing Cache Managers Simplecachemanager Noopcachemanager 2 Concurrentmapcachemanager Compositecachemanager Casting Your Spel on Caches Initializing Your Caches Programmatically Finding Alternative Cache Providers Ehcache Guava Hazelcast Summary
Chapter 11: Restful Web Services with Spring Creating Your First Rest Web Service Returning Different Http Status Codes from Rest Web Service Learning an Annotation Based Configuration Alternative Using Rest Web Services with Xml Using the Exception Handling Mechanism Unit Testing Restful Services Summary
Chapter 12: Securing Web Applications with Spring Security Why Spring Security? Features of Spring Security Configuring and Using Spring Security Understanding the Fundamental Building Blocks of Spring Security Authenticating Users Unsuccessful Login Flow Successful Login Flow Anonymous Authentication
ISBN - 9788126554881
|
|
Pages : 480
|