Atjaunināt sīkdatņu piekrišanu

E-grāmata: Pro Spring 5: An In-Depth Guide to the Spring Framework and Its Tools

3.85/5 (105 ratings by Goodreads)
  • Formāts: PDF+DRM
  • Izdošanas datums: 11-Oct-2017
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484228081
  • Formāts - PDF+DRM
  • Cena: 42,82 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Ielikt grozā
  • Pievienot vēlmju sarakstam
  • Šī e-grāmata paredzēta tikai personīgai lietošanai. E-grāmatas nav iespējams atgriezt un nauda par iegādātajām e-grāmatām netiek atmaksāta.
  • Formāts: PDF+DRM
  • Izdošanas datums: 11-Oct-2017
  • Izdevniecība: APress
  • Valoda: eng
  • ISBN-13: 9781484228081

DRM restrictions

  • Kopēšana (kopēt/ievietot):

    nav atļauts

  • Drukāšana:

    nav atļauts

  • Lietošana:

    Digitālo tiesību pārvaldība (Digital Rights Management (DRM))
    Izdevējs ir piegādājis šo grāmatu šifrētā veidā, kas nozīmē, ka jums ir jāinstalē bezmaksas programmatūra, lai to atbloķētu un lasītu. Lai lasītu šo e-grāmatu, jums ir jāizveido Adobe ID. Vairāk informācijas šeit. E-grāmatu var lasīt un lejupielādēt līdz 6 ierīcēm (vienam lietotājam ar vienu un to pašu Adobe ID).

    Nepieciešamā programmatūra
    Lai lasītu šo e-grāmatu mobilajā ierīcē (tālrunī vai planšetdatorā), jums būs jāinstalē šī bezmaksas lietotne: PocketBook Reader (iOS / Android)

    Lai lejupielādētu un lasītu šo e-grāmatu datorā vai Mac datorā, jums ir nepieciešamid Adobe Digital Editions (šī ir bezmaksas lietotne, kas īpaši izstrādāta e-grāmatām. Tā nav tas pats, kas Adobe Reader, kas, iespējams, jau ir jūsu datorā.)

    Jūs nevarat lasīt šo e-grāmatu, izmantojot Amazon Kindle.

Master Spring basics and core topics, and share the authors insights and realworld experiences with remoting, Hibernate, and EJB. Beyond the basics, you'll learn how to leverage the Spring Framework to build the various tiers and parts of an enterprise Java application: transactions, web and presentation tiers, deployment, and much more. A full sample application allows you to apply many of the technologies and techniques covered in Pro Spring 5 and see how they work together.

This book updates the perennial bestseller with the latest that the new Spring Framework 5 has to offer. Now in its fifth edition, this popular title is by far the most comprehensive and definitive treatment of Spring available. It covers the new functional web framework and interoperability with Java 9.

After reading this definitive book, you'll be armed with the power of Spring to build complex Spring applications, top to bottom.

The agile, lightweight, open-source Spring Framework

continues to be the de facto leading enterprise Java application development framework for today's Java programmers and developers. It works with other leading open-source, agile, and lightweight Java technologies such as Hibernate, Groovy, MyBatis, and more. Spring now works with Java EE and JPA 2 as well.













What You'll Learn









Discover whats new in Spring Framework 5

Use the Spring Framework with Java 9

Master data access and transactions 

Work with the new functional web framework 

Create microservices and other web services 







Who This Book Is For



Experienced Java and enterprise Java developers and programmers. Some experience with Spring highly recommended.  
About the Authors xxiii
About the Technical Reviewer xxv
Acknowledgments xxvii
Introduction xxix
Chapter 1 Introducing Spring
1(18)
What Is Spring?
1(14)
Evolution of the Spring Framework
2(6)
Inverting Control or Injecting Dependencies?
8(1)
Evolution of Dependency Injection
8(2)
Beyond Dependency Injection
10(5)
The Spring Project
15(2)
Origins of Spring
15(1)
The Spring Community
15(1)
The Spring Tool Suite
16(1)
The Spring Security Project
16(1)
Spring Boot
16(1)
Spring Batch and Integration
17(1)
Many Other Projects
17(1)
Alternatives to Spring
17(1)
JBoss Seam Framework
17(1)
Google Guice
17(1)
PicoContainer
17(1)
JEE 7 Container
18(1)
Summary
18(1)
Chapter 2 Getting Started
19(18)
Obtaining the Spring Framework
20(1)
Getting Started Quickly
20(1)
Checking Spring Out of GitHub
20(1)
Using the Right JDK
21(1)
Understanding Spring Packaging
21(14)
Choosing Modules for Your Application
24(1)
Accessing Spring Modules on the Maven Repository
24(2)
Accessing Spring Modules Using Gradle
26(1)
Using Spring Documentation
26(1)
Putting a Spring into Hello World
27(1)
Building the Sample Hello World Application
27(4)
Refactoring with Spring
31(4)
Summary
35(2)
Chapter 3 Introducing IoC and DI in Spring
37(88)
Inversion of Control and Dependency Injection
37(1)
Types of Inversion of Control
38(7)
Dependency Pull
38(1)
Contextualized Dependency Lookup
39(1)
Constructor Dependency Injection
40(1)
Setter Dependency Injection
41(1)
Injection vs. Lookup
41(1)
Setter Injection vs. Constructor Injection
42(3)
Inversion of Control in Spring
45(1)
Dependency Injection in Spring
46(2)
Beans and BeanFactory
46(1)
BeanFactory Implementations
46(2)
ApplicationContext
48(1)
Configuring ApplicationContext
48(61)
Setting Spring Configuration Options
49(1)
Basic Configuration Overview
49(1)
Declaring Spring Components
50(34)
Using Method Injection
84(11)
Understanding Bean Naming
95(10)
Understanding Bean Instantiation Mode
105(4)
Resolving Dependencies
109(3)
Autowiring Your Bean
112(10)
When to Use Autowiring
121(1)
Setting Bean Inheritance
122(2)
Summary
124(1)
Chapter 4 Spring Configuration in Detail and Spring Boot
125(86)
Spring's Impact on Application Portability
126(1)
Bean Life-Cycle Management
127(1)
Hooking into Bean Creation
128(9)
Executing a Method When a Bean Is Created
128(4)
Implementing the InitializingBean Interface
132(2)
Using the JSR-250 @PostConstruct Annotation
134(3)
Declaring an Initialization Method Using @Bean
137(2)
Understanding Order of Resolution
138(1)
Hooking into Bean Destruction
139(1)
Executing a Method When a Bean Is Destroyed
139(4)
Implementing the DisposableBean Interface
141(2)
Using the JSR-250 @PreDestroy Annotation
143(1)
Declaring a Destroy Method Using @Bean
144(2)
Understanding Order of Resolution
146(1)
Using a Shutdown Hook
146(1)
Making Your Beans "Spring Aware"
146(5)
Using the BeanNameAware Interface
147(1)
Using the ApplicationContextAware Interface
148(3)
Use of FactoryBeans
151(5)
FactoryBean Example: The MessageDigestFactoryBean
151(5)
Accessing a FactoryBean Directly
156(1)
Using the factory-bean and factory-method Attributes
157(1)
JavaBeans PropertyEditors
158(9)
Using the Built-in PropertyEditors
159(5)
Creating a Custom PropertyEditor
164(3)
More Spring ApplicationContext Configuration
167(7)
Internationalization with the MessageSource
168(3)
Using MessageSource in Stand-Alone Applications
171(1)
Application Events
171(3)
Accessing Resources
174(1)
Configuration Using Java Classes
175(12)
ApplicationContext Configuration in Java
175(10)
Spring Mixed Configuration
185(2)
Java or XML Configuration?
187(1)
Profiles
187(3)
An Example of Using the Spring Profiles Feature
187(3)
Spring Profiles Using Java Configuration
190(3)
Considerations for Using Profiles
193(1)
Environment and PropertySource Abstraction
193(5)
Configuration Using JSR-330 Annotations
198(3)
Configuration Using Groovy
201(3)
Spring Boot
204(6)
Summary
210(1)
Chapter 5 Introducing Spring AOP
211(86)
AOP Concepts
212(1)
Types of AOP
213(1)
Using Static AOP
213(1)
Using Dynamic AOP
213(1)
Choosing an AOP Type
213(1)
AOP in Spring
214(2)
The AOP Alliance
214(1)
Hello World in AOP
214(2)
Spring AOP Architecture
216(17)
Joinpoints in Spring
216(1)
Aspects in Spring
217(1)
About the ProxyFactory Class
217(1)
Creating Advice in Spring
217(2)
Interfaces for Advice
219(1)
Creating Before Advice
219(1)
Securing Method Access by Using Before Advice
220(4)
Creating After-Returning Advice
224(3)
Creating Around Advice
227(3)
Creating Throws Advice
230(2)
Choosing an Advice Type
232(1)
Advisors and Pointcuts in Spring
233(16)
The Pointcut Interface
233(2)
Available Pointcut Implementations
235(1)
Using DefaultPointcutAdvisor
236(1)
Creating a Static Pointcut by Using StaticMethodMatcherPointcut
236(3)
Creating a Dynamic Pointcut by Using DyanmicMethodMatcherPointcut
239(3)
Using Simple Name Matching
242(2)
Creating Pointcuts with Regular Expressions
244(2)
Creating Pointcuts with AspectJ Pointcut Expression
246(1)
Creating Annotation Matching Pointcuts
247(1)
Convenience Advisor Implementations
248(1)
Understanding Proxies
249(7)
Using JDK Dynamic Proxies
250(1)
Using CGLIB Proxies
250(1)
Comparing Proxy Performance
251(5)
Choosing a Proxy to Use
256(1)
Advanced Use of Pointcuts
256(7)
Using Control Flow Pointcuts
256(3)
Using a Composable Pointcut
259(3)
Composition and the Pointcut Interface
262(1)
Pointcut Summary
262(1)
Getting Started with Introductions
263(7)
Introduction Basics
263(2)
Object Modification Detection with Introductions
265(5)
Introduction Summary
270(1)
Framework Services for AOP
271(13)
Configuring AOP Declaratively
271(1)
Using ProxyFactoryBean
271(6)
Using the aop Namespace
277(7)
Using @AspectJ-Style Annotations
284(7)
Considerations for Declarative Spring AOP Configuration
291(1)
AspectJ Integration
291(4)
About AspectJ
291(1)
Using Singleton Aspects
292(3)
Summary
295(2)
Chapter 6 Spring JDBC Support
297(58)
Introducing Lambda Expressions
298(1)
Sample Data Model for Example Code
298(6)
Exploring the JDBC Infrastructure
304(5)
Spring JDBC Infrastructure
309(1)
Overview and Used Packages
309(1)
Database Connections and DataSources
310(5)
Embedded Database Support
315(2)
Using DataSources in DAO Classes
317(2)
Exception Handling
319(2)
The JdbcTemplate Class
321(6)
Initializing JdbcTemplate in a DAO Class
321(2)
Using Named Parameters with NamedParameterJdbcTemplate
323(2)
Retrieving Domain Objects with RowMapper<T>
325(2)
Retrieving Nested Domain Objects with ResultSetExtractor
327(3)
Spring Classes That Model JDBC Operations
330(3)
Querying Data by Using MappingSqlQuery<T>
333(7)
Updating Data by Using SqlUpdate
337(3)
Inserting Data and Retrieving the Generated Key
340(2)
Batching Operations with BatchSqlUpdate
342(5)
Calling Stored Functions by Using SqlFunction
347(2)
Spring Data Project: JDBC Extensions
349(1)
Considerations for Using JDBC
349(1)
Spring Boot JDBC
350(3)
Summary
353(2)
Chapter 7 Using Hibernate in Spring
355(38)
Sample Data Model for Example Code
356(2)
Configuring Hibernate's SessionFactory
358(4)
ORM Mapping Using Hibernate Annotations
362(9)
Simple Mappings
363(4)
One-to-Many Mappings
367(2)
Many-to-Many Mappings
369(2)
The Hibernate Session Interface
371(7)
Querying Data by Using the Hibernate Query Language
372(1)
Simple Querying with Lazy Fetching
372(3)
Querying with Associations Fetching
375(3)
Inserting Data
378(4)
Updating Data
382(2)
Deleting Data
384(2)
Configuring Hibernate to Generate Tables from Entities
386(3)
Annotating Methods or Fields?
389(2)
Considerations When Using Hibernate
391(1)
Summary
392(1)
Chapter 8 Data Access in Spring with JPA2
393(74)
Introducing JPA 2.1
394(6)
Sample Data Model for Example Code
394(1)
Configuring JPA's EntityManagerFactory
395(3)
Using JPA Annotations for ORM Mapping
398(2)
Performing Database Operations with JPA
400(12)
Using the Java Persistence Query Language to Query Data
400(10)
Querying with Untyped Results
410(2)
Querying for a Custom Result Type with a Constructor Expression
412(8)
Inserting Data
415(2)
Updating Data
417(2)
Deleting data
419(1)
Using a Native Query
420(1)
Using a Simple Native Query
421(1)
Native Querying with SQL ResultSet Mapping
421(8)
Using the JPA 2 Criteria API for a Criteria Query
422(7)
Introducing Spring Data JPA
429(7)
Adding Spring Data JPA Library Dependencies
429(1)
Using Spring Data JPA Repository Abstraction for Database Operations
430(6)
Using JpaRepository
436(1)
Spring Data JPA with Custom Queries
437(14)
Keeping Track of Changes on the Entity Class
440(11)
Keeping Entity Versions by Using Hibernate Envers
451(8)
Adding Tables for Entity Versioning
452(1)
Configuring EntityManagerFactory for Entity Versioning
453(3)
Enabling Entity Versioning and History Retrieval
456(1)
Testing Entity Versioning
457(2)
Spring Boot JPA
459(6)
Considerations When Using JPA
465(1)
Summary
466(1)
Chapter 9 Transaction Management
467(42)
Exploring the Spring Transaction Abstraction Layer
468(1)
Transaction Types
468(1)
Implementations of the PlatformTransactionManager
469(1)
Analyzing Transaction Properties
470(3)
The TransactionDefinition Interface
471(1)
The TransactionStatus Interface
472(1)
Sample Data Model and Infrastructure for Example Code
473(15)
Creating a Simple Spring JPA Project with Dependencies
473(2)
Sample Data Model and Common Classes
475(11)
Using AOP Configuration for Transaction Management
486(2)
Using Programmatic Transactions
488(2)
Considerations on Transaction Management
490(1)
Global Transactions with Spring
490(17)
Infrastructure for Implementing the JTA Sample
491(1)
Implementing Global Transactions with JTA
491(10)
Spring Boot JTA
501(6)
Considerations on Using JTA Transaction Manager
507(1)
Summary
507(2)
Chapter 10 Validation with Type Conversion and Formatting
509(28)
Dependencies
510(1)
Spring Type Conversion System
510(1)
Conversion from a String Using PropertyEditors
511(3)
Introducing Spring Type Conversion
514(7)
Implementing a Custom Converter
514(1)
Configuring ConversionService
515(2)
Converting Between Arbitrary Types
517(4)
Field Formatting in Spring
521(3)
Implementing a Custom Formatter
521(2)
Configuring ConversionServiceFactoryBean
523(1)
Validation in Spring
524(10)
Using the Spring Validator Interface
525(2)
Using JSR-349 Bean Validation
527(1)
Configuring Bean Validation Support in Spring
528(3)
Creating a Custom Validator
531(3)
Using AssertTrue for Custom Validation
534(1)
Considerations for Custom Validation
535(1)
Deciding Which Validation API to Use
535(1)
Summary
535(2)
Chapter 11 Task Scheduling
537(20)
Dependencies for the Task Scheduling Samples
537(1)
Task Scheduling in Spring
538(16)
Introducing the Spring TaskScheduler Abstraction
539(1)
Exploring a Sample Task
540(7)
Using Annotations for Task Scheduling
547(4)
Asynchronous Task Execution in Spring
551(3)
Task Execution in Spring
554(2)
Summary
556(1)
Chapter 12 Using Spring Remoting
557(58)
Using a Data Model for Samples
558(2)
Adding Required Dependencies for the JPA Back End
560(2)
Implementing and Configuring SingerService
562(8)
Implementing SingerService
562(2)
Configuring SingerService
564(3)
Exposing the Service
567(1)
Invoking the Service
568(2)
Using JMS in Spring
570(6)
Implementing a JMS Listener in Spring
573(1)
Sending JMS Messages in Spring
574(2)
Spring Boot Artemis Starter
576(3)
Using RESTful-WS in Spring
579(3)
Introducing RESTful Web Services
579(1)
Adding Required Dependencies for Samples
580(1)
Designing the Singer RESTful Web Service
580(1)
Using Spring MVC to Expose RESTful Web Services
581(1)
Configuring Castor XML
582(20)
Implementing SingerController
584(2)
Configuring a Spring Web Application
586(4)
Using curl to Test RESTful-WS
590(2)
Using RestTemplate to Access RESTful-WS
592(5)
Securing RESTful-WS with Spring Security
597(5)
RESTful-WS with Spring with Spring Boot
602(3)
Using AMQP in Spring
605(8)
Using AMQP with Spring Boot
611(2)
Summary
613(2)
Chapter 13 Spring Testing
615(24)
Introducing Testing Categories
616(1)
Using Spring Test Annotations
617(1)
Implementing Logic Unit Tests
618(5)
Adding Required Dependencies
619(1)
Unit Testing Spring MVC Controllers
620(3)
Implementing an Integration Test
623(14)
Adding Required Dependencies
623(1)
Configuring the Profile for Service-Layer Testing
623(2)
Java Configuration Version
625(2)
Implementing the Infrastructure Classes
627(3)
Unit Testing the Service Layer
630(4)
Dropping DbUnit
634(3)
Implementing a Front-End Unit Test
637(1)
Introducing Selenium
638(1)
Summary
638(1)
Chapter 14 Scripting Support in Spring
639(16)
Working with Scripting Support in Java
640(1)
Introducing Groovy
641(3)
Dynamic Typing
642(1)
Simplified Syntax
643(1)
Closure
643(1)
Using Groovy with Spring
644(10)
Developing the Singer Domain
645(1)
Implementing the Rule Engine
646(2)
Implementing the Rule Factory as a Spring Refreshable Bean
648(2)
Testing the Age Category Rule
650(2)
Inlining Dynamic Language Code
652(2)
Summary
654(1)
Chapter 15 Application Monitoring
655(10)
JMX Support in Spring
655(1)
Exporting a Spring Bean to JMX
656(1)
Using Java VisualVM for JMX Monitoring
657(2)
Monitoring Hibernate Statistics
659(2)
JMX with Spring Boot
661(3)
Summary
664(1)
Chapter 16 Web Applications
665(86)
Implementing the Service Layer for Samples
666(6)
Using a Data Model for the Samples
666(4)
Implementing the DAO Layer
670(1)
Implementing the Service Layer
670(2)
Configuring SingerService
672(1)
Introducing MVC and Spring MVC
673(13)
Introducing MVC
674(1)
Introducing Spring MVC
675(1)
Spring MVC WebApplicationContext Hierarchy
675(1)
Spring MVC Request Life Cycle
676(2)
Spring MVC Configuration
678(3)
Creating the First View in Spring MVC
681(2)
Configuring DispatcherServlet
683(1)
Implementing SingerController
684(1)
Implementing the Singer List View
685(1)
Testing the Singer List View
686(1)
Understanding the Spring MVC Project Structure
686(1)
Enabling Internationalization (i18n)
687(4)
Configuring i18n in the DispatcherServlet Configuration
688(2)
Modifying the Singer List View for i18n Support
690(1)
Using Theming and Templating
691(2)
Theming Support
691(2)
View Templating with Apache Tiles
693(5)
Designing the Template Layout
693(1)
Implementing Page Layout Components
694(4)
Configuring Tiles in Spring MVC
698(1)
Implementing the Views for Singer Information
699(12)
Mapping URLs to the Views
699(1)
Implementing the Show Singer View
700(3)
Implementing the Edit Singer View
703(5)
Implementing the Add Singer View
708(1)
Enabling JSR-349 (Bean Validation)
709(2)
Using jQuery and jQuery UI
711(10)
Introducing jQuery and jQuery UI
711(1)
Enabling jQuery and jQuery UI in a View
712(2)
Rich-Text Editing with CKEditor
714(1)
Using jqGrid for a Data Grid with Pagination
715(1)
Enabling jqGrid in the Singer List View
715(2)
Enabling Pagination on the Server Side
717(4)
Handling File Upload
721(5)
Configuring File Upload Support
721(2)
Modifying Views for File Upload Support
723(1)
Modifying Controllers for File Upload Support
724(2)
Securing a Web Application with Spring Security
726(6)
Configuring Spring Security
726(3)
Adding Login Functions to the Application
729(2)
Using Annotations to Secure Controller Methods
731(1)
Creating Spring Web Applications with Spring Boot
732(1)
Setting Up the DAO Layer
733(5)
Setting Up the Service Layer
735(1)
Setting Up the Web Layer
735(2)
Setting Up Spring Security
737(1)
Creating Thymeleaf Views
738(5)
Using Thymeleaf Extensions
743(6)
Using Webjars
747(2)
Summary
749(2)
Chapter 17 WebSocket
751(22)
Introducing WebSocket
751(1)
Using WebSocket with Spring
752(1)
Using the WebSocket API
752(13)
Using SockJS
760(5)
Sending Messages with STOMP
765(7)
Summary
772(1)
Chapter 18 Spring Projects: Batch, Integration, XD, and More
773(56)
Spring Batch
774(9)
JSR-352
783(3)
Spring Boot Batch
786(4)
Spring Integration
790(6)
Spring XD
796(2)
Spring Framework's Five Most Notable Features
798(29)
The Functional Web Framework
799(12)
Java 9 Interoperabiliy
811(1)
JDK Modularity
811(3)
Reactive Programming with Java 9 and Spring WebFlux
814(3)
Spring Support for JUnit 5 Jupiter
817(10)
Summary
827(2)
Appendix A Setting Up Your Development Environment
829(12)
Introducing Project pro-spring-15
829(2)
Understanding the Gradle Configuration
831(3)
Building and Troubleshooting
834(3)
Deploy on Apache Tomcat
837(4)
Index 841
Iuliana Cosmina is a Spring Certified Web Developer and is also Spring Certified Core Spring Professional.  She is a Spring certified expert, as defined by Pivotal, the makers of Spring Framework, Boot and other tools.  She has authored books with Apress on Core Spring certification and Spring Certified web development.  She is a software architect at Bearing Point Software and is an active coder and software contributor on GitHub, StackOverFlow and more.   Rob Harrop is a software consultant specializing in delivering high-performance, highly-scalable enterprise applications. He is an experienced architect with a particular flair for understanding and solving complex design issues. With a thorough knowledge of both Java and .NET, Harrop has successfully deployed projects across both platforms. He also has extensive experience across a variety of sectors, retail and government in particular. Harrop is the author of five books, including Pro Spring, a widely-acclaimed, comprehensive resource on the Spring Framework.  Chris Schaefer is a Principle Software Developer for Spring project at Pivotal, the makers of Spring Framework, Boot and other Spring tools. Clarence Ho is the Senior Java Architect of a HK-based software consultancy firm, SkywideSoft Technology Limited. Having been worked in the IT field for over 20 years, Clarence had been the team leader of many in-house application development projects, as well as providing consultancy services on enterprise solutions to clients.