Atnaujinkite slapukų nuostatas

El. knyga: Beginning Spring

  • Formatas: EPUB+DRM
  • Išleidimo metai: 30-Jan-2015
  • Leidėjas: Wrox Press
  • Kalba: eng
  • ISBN-13: 9781118893111
Kitos knygos pagal šią temą:
  • Formatas: EPUB+DRM
  • Išleidimo metai: 30-Jan-2015
  • Leidėjas: Wrox Press
  • Kalba: eng
  • ISBN-13: 9781118893111
Kitos knygos pagal šią temą:

DRM apribojimai

  • Kopijuoti:

    neleidžiama

  • Spausdinti:

    neleidžiama

  • El. knygos naudojimas:

    Skaitmeninių teisių valdymas (DRM)
    Leidykla pateikė šią knygą šifruota forma, o tai reiškia, kad norint ją atrakinti ir perskaityti reikia įdiegti nemokamą programinę įrangą. Norint skaityti šią el. knygą, turite susikurti Adobe ID . Daugiau informacijos  čia. El. knygą galima atsisiųsti į 6 įrenginius (vienas vartotojas su tuo pačiu Adobe ID).

    Reikalinga programinė įranga
    Norint skaityti šią el. knygą mobiliajame įrenginyje (telefone ar planšetiniame kompiuteryje), turite įdiegti šią nemokamą programėlę: PocketBook Reader (iOS / Android)

    Norint skaityti šią el. knygą asmeniniame arba „Mac“ kompiuteryje, Jums reikalinga  Adobe Digital Editions “ (tai nemokama programa, specialiai sukurta el. knygoms. Tai nėra tas pats, kas „Adobe Reader“, kurią tikriausiai jau turite savo kompiuteryje.)

    Negalite skaityti šios el. knygos naudodami „Amazon Kindle“.

Introduces the Spring Framework, covering all aspects of application development using it, including dependency injection, transaction management, and aspect-oriented programming, with comprehensive real-world examples and hands-on practice.

Get up to speed quickly with this comprehensive guide toSpring

Beginning Spring is the complete beginner's guide toJava's most popular framework. Written with an eye towardreal-world enterprises, the book covers all aspects of applicationdevelopment within the Spring Framework. Extensive samples withineach chapter allow developers to get up to speed quickly byproviding concrete references for experimentation, building askillset that drives successful application development byexploiting the full capabilities of Java's latest advances.

Spring provides the exact toolset required to build anenterprise application, and has become the standard within thefield. This book covers Spring 4.0, which contains support for Java8 and Java EE 7. Readers begin with the basics of the framework,then go on to master the most commonly used tools and fundamentalconcepts inherent in any Spring project. The book emphasizespracticality and real-world application by addressing needs such asmeeting customer demand and boosting productivity, and by providingactionable information that helps developers get the most out ofthe framework. Topics include:

  • Dependency Injection and Inversion of Control
  • Unit testing Spring enabled Web Applications
  • Data Access using Spring JDBC and ORM support along withTransaction Management
  • Building Web Applications and RESTful Web Services with SpringMVC
  • Securing Web Applications using Spring Security
  • Spring Expression Language with its Extensive Features
  • Aspect Oriented Programming Facilities Provided by SpringAOP
  • Caching with 3rd Party Cache Providers’ Support
  • The Best of the Breed: Spring 4.0

The information is organized and structured an ideal way forstudents and corporate training programs, and explanations aboutinner workings of the framework make it a handy desk reference evenfor experienced developers. For novices,Beginning Spring isinvaluable as a comprehensive guide to the real-world functionalityof Spring.

Forewords xxvii
Introduction xxxi
Chapter 1 POJO Programming Model, Lightweight Containers, And Inversion Of Control 1(16)
POJO Programming Model
2(6)
Problems of the Old EJB Programming Model
2(5)
Benefits of the POJO Programming Model
7(1)
Lightweight Containers and Inversion of Control (IoC)
8(2)
Lightweight Containers
8(1)
Inversion of Control (IoC)
9(1)
Dependency Injection
10(2)
Setter Injection
11(1)
Constructor Injection
11(1)
Setter or Constructor Injection
12(1)
Summary
12(5)
Chapter 2 Dependency Injection With Spring 17(46)
Spring IoC Container
18(11)
Configuration Metadata
18(3)
Configuring and Using the Container
21(8)
Dependency Injection
29(15)
Setter Injection
30(1)
Constructor Injection
31(3)
Circular Dependencies
34(1)
Dependency Resolution Process
35(1)
Overriding Bean Definitions
36(2)
Using the depends-on Attribute
38(1)
Autowiring
39(4)
Bean Lookups
43(1)
Spring-Managed Beans
44(15)
Naming Beans
44(1)
Bean Instantiation Methods
45(3)
Bean Scopes
48(3)
Lazy Initialization
51(1)
Life-Cycle Callbacks
52(2)
Bean Definition Profiles
54(2)
Environment
56(3)
Summary
59(4)
Chapter 3 Building Web Applications Using Spring MVC 63(40)
Learning the Features and Benefits of Spring MVC
64(1)
Using the Dispatcher Servlet Mechanism
65(3)
Defining the Servlet
66(1)
Accessing Servlet Context
67(1)
Creating Your First Spring MVC Application
68(3)
Configuring Spring MVC with Annotations
71(2)
Handling Forms with JSP
73(11)
Configuring the Form Tag Library
73(1)
Understanding the Power of Binding
74(1)
Working with Forms
74(1)
Using Input Elements
75(1)
Entering Dates
76(1)
Selecting from a Drop-Down
77(1)
Selecting with Radio Buttons
78(1)
Selecting with Checkboxes
78(1)
Adding Labels
78(1)
Placing Buttons
79(1)
Styling
79(5)
Exploiting the Power of Annotations
84(2)
@Controller
84(1)
@RequestMapping
84(1)
@ModelAttribute
84(1)
@PathVariable
85(1)
@ControllerAdvice
85(1)
@InitBinder
85(1)
@ExceptionHandler
85(1)
Validating User Input
86(4)
Uploading Files
90(3)
Handling Exceptions
93(2)
Implementing Internationalization (i18n)
95(2)
Using Themes
97(3)
Summary
100(3)
Chapter 4 JDBC Data Access With Spring 103(34)
Problems with Using Vanilla JDBC
104(1)
Introducing Spring's JDBC Support
105(9)
Managing JDBC Connections
105(7)
Embedded DB Support
108(2)
Using a Connection-Pooled DataSource
110(1)
Initializing DB
111(1)
Configuring and Using Spring's JDBC Support
112(2)
Performing Data Access Operations with Spring
114(14)
Running Queries
114(3)
Queries with Named Parameters
117(1)
Writing Queries Using the IN Clause
118(1)
Using PreparedStatements within JdbcTemplate
119(2)
Inserting, Updating, and Deleting Records
121(3)
Calling Stored Procedures and Stored Functions
124(2)
Performing Batch Operations
126(1)
Handling BLOB and CLOB Objects
126(1)
Accessing Vendor-Specific JDBC Methods
127(1)
Executing DDL Operations
127(1)
Modeling JDBC Operations as Java Objects
128(4)
Encapsulating SQL Query Executions
128(2)
Encapsulating SQL DML Operations
130(1)
Encapsulating Stored Procedure Executions
131(1)
Exception Handling and Error Code Translation
132(1)
Common Data Access Exception Hierarchy
132(1)
Automatic Handling and Translation of SQLException
132(1)
Summary
133(4)
Chapter 5 Data Access With JPA Using Spring 137(38)
Brief Introduction to ORM and JPA
138(18)
Paradigm Mismatch
138(1)
Building Blocks of an ORM Framework
139(1)
What JPA Offers
139(1)
Mapping the Object Model to the Relational Model
140(7)
Defining Entities
140(1)
Mapping Attributes to Columns
141(1)
Creating Associations between Objects
142(3)
Mapping Java Types to SQL Types
145(2)
Configuring and Using JPA
147(9)
Performing CRUD Operations on Objects
150(5)
Querying with Object Query Language
155(1)
Spring's JPA Support
156(15)
Setting Up JPA in Spring Container
156(5)
Implementing DAOs Based on Plain JPA
161(5)
Handling and Translating Exceptions
166(1)
Further JPA Configuration in Spring Environment
167(13)
JpaDialect
168(1)
JpaVendorAdapter
168(1)
JPA and Load Time Weaving
169(1)
Dealing with Multiple Persistence Units
170(1)
Summary
171(4)
Chapter 6 Managing Transactions With Spring 175(34)
Understanding Transaction Management
176(4)
Spring's Transaction Abstraction Model
180(3)
Local versus Global Transactions
182(1)
PlatformTransactionManager Implementations
182(1)
Advantages of Spring's Abstract Transaction Model
183(1)
Declarative Transaction Management with Spring
183(14)
Isolating the Service Layer from Data Access Technology Details
186(3)
Customizing Default Transactional Behavior
189(1)
Using @Transactional on the Class Level
190(1)
Understanding Transaction Propagation Rules
191(4)
Propagation REQUIRED
191(1)
Propagation REQUIRES_NEW
192(1)
Propagation NESTED
192(1)
Propagation SUPPORTS
192(1)
Propagation NOT_SUPPORTED
192(1)
Propagation NEVER
193(1)
Propagation MANDATORY
193(2)
Using <tx:advice> for Declarative Transaction Management
195(2)
Programmatic Transaction Management with Spring
197(6)
Using the PlatformTransactionManager Approach
201(2)
Executing Custom Logic Before or After Transactions
203(2)
Advising Transactional Operations
203(1)
Executing Logic after Transactions Using TransactionSynchronization
204(1)
Summary
205(4)
Chapter 7 Test-Driven Development With Spring 209(28)
Configuring and Caching ApplicationContext
210(7)
Using XML- and Java-Based Context Configuration in Tests
210(4)
Configuring Context with ApplicationContextlnitializer
214(1)
Inheriting Context Configuration
214(2)
ApplicationContext Caching
216(1)
Injecting Dependencies of Test Fixtures
217(2)
Using Transaction Management in Tests
219(3)
Testing Web Applications
222(9)
Context Hierarchies in Tests
225(1)
Testing Request- and Session-Scoped Beans
225(2)
Testing Spring MVC Projects
227(4)
Testing Controllers
227(1)
Testing Form Submit
228(2)
Testing Exception Handlers
230(1)
Printing Mock Request and Response
231(1)
Using Mock Objects and Other Utilities for Testing
231(2)
Spring Provided Mock Objects for Testing
231(1)
Other Utilities and Test Annotations
232(1)
Summary
233(4)
Chapter 8 Aspect-Oriented Programming With Spring 237(26)
Getting Started with AOP with Spring
239(4)
Becoming Familiar with Types of Advices
243(5)
Before
245(1)
After Returning
245(1)
After Throwing
245(1)
After (Finally)
246(1)
Around
247(1)
Defining Point-Cut Designators
248(2)
The Type Signature Expressions
248(1)
The Method Signature Expressions
249(1)
Other Alternative Point-Cut Designators
249(1)
Wildcards
250(1)
Capitalizing on the Power of Annotations
250(5)
@Before
250(1)
@Pointcut
251(1)
@After
252(1)
@AfterReturning
252(1)
@AfterThrowing
252(1)
@Aspect
253(1)
@Around
253(1)
@DeclareParents
254(1)
Blending AspectJ with Spring
255(4)
Configuring Spring AOP with Annotations
259(1)
Summary
259(4)
Chapter 9 Spring Expression Language 263(22)
Configuring Applications with SpEL
264(3)
Creating a Parser
267(3)
Invoking Methods
270(3)
Calling Constructors
272(1)
Calling Static Methods
272(1)
Working with Variables and Functions
273(2)
#root
273(1)
#this
274(1)
Accessing System Properties and Environment
274(1)
Inline Lists
274(1)
Registering Functions
274(1)
Understanding SpEL Operators
275(5)
Relational Operators
276(1)
Arithmetic Operators
276(1)
Logical Operators
276(1)
Conditional Operators
277(1)
Regular Expression Operator
278(1)
Safe Navigation Operator
278(1)
Collection Selection and Projection
279(1)
Selecting the First and Last Element of a Collection
280(1)
Using Utilities in SpEL
280(1)
Accessing Spring Beans
280(1)
<spring:eval>
281(1)
Expressions in Caching
281(1)
Summary
281(4)
Chapter 10 Caching 285(20)
Building Your First Caching Application
286(4)
Configuring the Cache Manager with a Different Name
289(1)
Configuring the Caching Abstraction with Annotations
289(1)
Working with Cache Annotations
290(3)
@Cacheable
290(2)
Key Generator
291(1)
Conditional Caching
291(1)
@CacheEvict
292(1)
@CachePut
292(1)
@Caching
293(1)
Implementing Cache Managers
293(2)
SimpleCacheManager
293(1)
NoOpCacheManager
294(1)
ConcurrentMapCacheManager
294(1)
CompositeCacheManager
294(1)
Casting Your SpEL on Caches
295(1)
Initializing Your Caches Programmatically
296(2)
Finding Alternative Cache Providers
298(5)
Ehcache
299(3)
Guava
302(1)
Hazelcast
302(1)
Summary
303(2)
Chapter 11 Restful Web Services With Spring 305(26)
Creating Your First REST Web Service
306(12)
Returning Different HTTP Status Codes from REST Web Service
318(1)
Learning an Annotation-Based Configuration Alternative
318(2)
Using REST Web Services with XML
320(2)
Using the Exception Handling Mechanism
322(4)
Unit Testing RESTful Services
326(2)
Summary
328(3)
Chapter 12 Securing Web Applications With Spring Security 331(38)
Why Spring Security?
332(1)
Features of Spring Security
333(1)
Configuring and Using Spring Security
334(6)
Understanding the Fundamental Building Blocks of Spring Security
340(1)
Authenticating Users
341(12)
Unsuccessful Login Flow
342(1)
Successful Login Flow
342(2)
Anonymous Authentication
344(1)
Customizing the Login Page
344(2)
Logout Process
346(1)
Accessing UserDetails Using JDBC
346(3)
Encrypting Passwords
349(1)
Remember-Me Support
350(1)
User Session Management
351(1)
Basic Authentication
352(1)
Authorizing Web Requests and Service Method Calls
353(11)
Authorizing Web Requests
353(2)
How Does Authorization Work?
355(2)
Expression-Based Authorization
357(1)
Using JSP Security Tags
358(1)
Authorize Tag
359(1)
Authenticate Tag
359(1)
Authorizing Service Methods
359(5)
Summary
364(5)
Chapter 13 Next Stop: Spring 4.0 369(16)
Keeping Up with the Latest: Java 8 and Java EE7 Support
370(4)
Lambda Expressions
370(11)
Method References
373(1)
Bean Validation Integration
374(1)
JSR 310: Date Time Value Type Support
374(1)
Configuring Injection with Conditional Dependency
374(3)
Ordering the Elements of Autowired Collections
377(2)
Repeating Annotations
379(2)
Introducing New Annotations
381(1)
Documenting with @Description
381(1)
Using the @RestController Annotation
382(1)
Summary
382(3)
Appendix: Solutions To Exercises 385(40)
Chapter 1
385(3)
Chapter 2
388(5)
Chapter 3
393(1)
Chapter 4
393(6)
Chapter 5
399(4)
Chapter 6
403(3)
Chapter 7
406(3)
Chapter 8
409(2)
Chapter 9
411(3)
Chapter 10
414(3)
Chapter 11
417(3)
Chapter 12
420(3)
Chapter 13
423(2)
Index 425
Mert Ēalkan is an Oracle Java Champion and has been working as Principal Architect in Turkey. He has more than 10 years experience in software development, where he has focused on architectural design of enterprise web applications. Kenan Sevindik is a Sun certified Java J2EE Business and Web Component developer, with more than 15 years of Java development experience. He has extensive experience with the major enterprise Java frameworks and gives seminars on a variety of Java concepts.