Beginning Spring:
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Indianapolis, Ind.
Wrox/Wiley
2015
|
Schriftenreihe: | Wrox programmer to programmer
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis Klappentext |
Beschreibung: | XXXVIII, 438 S. Ill., graph. Darst. |
ISBN: | 9781118892923 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV042061462 | ||
003 | DE-604 | ||
005 | 20150506 | ||
007 | t | ||
008 | 140905s2015 ad|| |||| 00||| eng d | ||
020 | |a 9781118892923 |c pbk. |9 978-1-118-89292-3 | ||
035 | |a (OCoLC)907626637 | ||
035 | |a (DE-599)BVBBV042061462 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-91G |a DE-11 |a DE-573 |a DE-739 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a DAT 332f |2 stub | ||
084 | |a DAT 368f |2 stub | ||
100 | 1 | |a Çalişkan, Mert |e Verfasser |0 (DE-588)1037316789 |4 aut | |
245 | 1 | 0 | |a Beginning Spring |c Mert Caliskan ; Kenan Sevindik |
264 | 1 | |a Indianapolis, Ind. |b Wrox/Wiley |c 2015 | |
300 | |a XXXVIII, 438 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Wrox programmer to programmer | |
650 | 0 | 7 | |a Spring |g Programmiersprache |0 (DE-588)4830455-4 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Spring |g Programmiersprache |0 (DE-588)4830455-4 |D s |
689 | 0 | |5 DE-604 | |
700 | 1 | |a Sevindik, Kenan |e Sonstige |4 oth | |
776 | 0 | 8 | |i Erscheint auch als |n Online-Ausgabe |z 978-1-118-89303-6 |
776 | 0 | 8 | |i Erscheint auch als |n Online-Ausgabe |z 978-1-118-89311-1 |
856 | 4 | 2 | |m Digitalisierung UB Passau - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
856 | 4 | 2 | |m Digitalisierung UB Passau - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000002&line_number=0002&func_code=DB_RECORDS&service_type=MEDIA |3 Klappentext |
999 | |a oai:aleph.bib-bvb.de:BVB01-027502333 |
Datensatz im Suchindex
_version_ | 1804152499907592192 |
---|---|
adam_text | CONTENTS
FOREWORDS xxvii
INTRODUCTION xxxi
CHAPTER 1: POJO PROGRAMMING MODEL, LIGHTWEIGHT CONTAINERS, AND INVERSION OF CONTROL 1
POJO Programming Model 2
Problems of the Old EJB Programming Model 2
Benefits of the POJO Programming Model 7
Lightweight Containers and Inversion of Control (loC) 8
Lightweight Containers 8
Inversion of Control (loC) 9
Dependency Injection 10
Setter Injection 11
Constructor Injection 11
Setter or Constructor Injection 12
Summary 12
CHAPTER 2: DEPENDENCY INJECTION WITH SPRING 17
Spring loC Container 18
Configuration Metadata 18
Configuring and Using the Container 21
Dependency Injection 29
Setter Injection 30
Constructor Injection 31
Circular Dependencies 34
Dependency Resolution Process 35
Overriding Bean Definitions 36
Using the depends-on Attribute 38
Autowiring 39
Bean Lookups 43
Spring-Managed Beans 44
Naming Beans 44
Bean Instantiation Methods 45
Bean Scopes 48
Lazy Initialization 51
CONTENTS
Life-Cycle Callbacks 52
Bean Definition Profiles 54
Environment 56
Summary 59
CHAPTER 3: BUILDING WEB APPLICATIONS USING SPRING MVC 63
Learning the Features and Benefits of Spring MVC 64
Using the Dispatcher Servlet Mechanism 65
Defining the Servlet 66
Accessing Servlet Context 67
Creating Your First Spring MVC Application 68
Configuring Spring MVC with Annotations 71
Handling Forms with JSP 73
Configuring the Form Tag Library 73
Understanding the Power of Binding 74
Working with Forms 74
Using Input Elements 75
Entering Dates 76
Selecting from a Drop-Down 77
Selecting with Radio Buttons 78
Selecting with Checkboxes 78
Adding Labels 78
Placing Buttons 79
Styling 79
Exploiting the Power of Annotations 84
©Controller 84
@RequestMapping 84
@ModelAttribute 84
@PathVariable 85
@ControllerAdvice 85
@lnitBinder 85
@ExceptlonHandler 85
Validating User Input 86
Uploading Files 90
Handling Exceptions 93
Implementing Internationalization (I18n) 95
Using Themes 97
Summary 100
xviii
CONTENTS
CHAPTER 4: JDBC DATA ACCESS WITH SPRING 103
Problems with Using Vanilla JDBC 104
Introducing Spring s JDBC Support 105
Managing JDBC Connections 105
Embedded DB Support 108
Using a Connection-Pooled DataSource 110
Initializing DB 111
Configuring and Using Spring s JDBC Support 112
Performing Data Access Operations with Spring 114
Running Queries 114
Queries with Named Parameters 117
Writing Queries Using the IN Clause 118
Using PreparedStatements within JdbcTemplate 119
Inserting, Updating, and Deleting Records 121
Calling Stored Procedures and Stored Functions 124
Performing Batch Operations 126
Handling BLOB and CLOB Objects 126
Accessing Vendor-Specific JDBC Methods 127
Executing DDL Operations 127
Modeling JDBC Operations as Java Objects 128
Encapsulating SQL Query Executions 128
Encapsulating SQL DML Operations 130
Encapsulating Stored Procedure Executions 131
Exception Handling and Error Code Translation 132
Common Data Access Exception Hierarchy 132
Automatic Handling and Translation of SQLException 132
Summary 133
CHAPTER 5: DATA ACCESS WITH JPA USING SPRING 137
Brief Introduction to ORM and JPA 138
Paradigm Mismatch 138
Building Blocks of an ORM Framework 139
What JPA Offers 139
Mapping the Object Model to the Relational Model 140
Defining Entities 140
Mapping Attributes to Columns 141
Creating Associations between Objects 142
Mapping Java Types to SQL Types 145
XIX
CONTENTS
Configuring and Using JPA 147
Performing CRUD Operations on Objects 150
Querying with Object Query Language 155
Spring s JPA Support 156
Setting Up JPA in Spring Container 156
Implementing DAOs Based on Plain JPA 161
Handling and Translating Exceptions 166
Further JPA Configuration in Spring Environment 167
JpaDialect 168
JpaVendorAdapter 168
JPA and Load Time Weaving 169
Dealing with Multiple Persistence Units 170
Summary 171
CHAPTER 6: MANAGING TRANSACTIONS WITH SPRING 175
Understanding Transaction Management 176
Spring s Transaction Abstraction Model 180
Local versus Global Transactions 182
PlatformTransactionManager Implementations 182
Advantages of Spring s Abstract Transaction Model 183
Declarative Transaction Management with Spring 183
Isolating the Service Layer from Data Access Technology Details 186
Customizing Default Transactional Behavior 189
Using @Transactional on the Class Level 190
Understanding Transaction Propagation Rules 191
Propagation REQUIRED 191
Propagation REQUIRES_NEW 192
Propagation NESTED 192
Propagation SUPPORTS 192
Propagation NONSUPPORTED 192
Propagation NEVER 193
Propagation MANDATORY 193
Using tx:advice for Declarative Transaction Management 195
Programmatic Transaction Management
with Spring 197
Using the PlatformTransactionManager Approach 201
Executing Custom Logic Before or After Transactions 203
Advising Transactional Operations 203
Executing Logic after Transactions Using TransactionSynchronization 204
Summary 205
xx
CONTENTS
CHAPTER 7: TEST-DRIVEN DEVELOPMENT WITH SPRING 209
Configuring and Caching ApplicationContext 210
Using XML- and Java-Based Context Configuration in Tests 210
Configuring Context with ApplicationContextlnitializer 214
Inheriting Context Configuration 214
ApplicationContext Caching 216
Injecting Dependencies of Test Fixtures 217
Using Transaction Management in Tests 219
Testing Web Applications 222
Context Hierarchies in Tests 225
Testing Request- and Session-Scoped Beans 225
Testing Spring MVC Projects 227
Testing Controllers 227
Testing Form Submit 228
Testing Exception Handlers 230
Printing Mock Request and Response 231
Using Mock Objects and Other Utilities for Testing 231
Spring Provided Mock Objects for Testing 231
Other Utilities and Test Annotations 232
Summary 233
CHAPTER 8: ASPECT-ORIENTED PROGRAMMING WITH SPRING 237
Getting Started with AOP with Spring 239
Becoming Familiar with Types of Advices 243
Before 245
After Returning 245
After Throwing 245
After (Finally) 246
Around 247
Defining Point-Cut Designators 248
The Type Signature Expressions 248
The Method Signature Expressions 249
Other Alternative Point-Cut Designators 249
Wildcards 250
Capitalizing on the Power of Annotations 250
@Before 250
@Pointcut 251
@ After 252
@AfterReturning 252
xxi
CONTENTS
@AfterThrowing 252
@Aspect 253
@Around 253
@DeclareParents 254
Blending AspectJ with Spring 255
Configuring Spring AOP with Annotations 259
Summary 259
CHAPTER 9: SPRING EXPRESSION LANGUAGE 263
Configuring Applications with SpEL 264
Creating a Parser 267
Invoking Methods 270
Calling Constructors 272
Calling Static Methods 272
Working with Variables and Functions 273
#root 273
#this 274
Accessing System Properties and Environment 274
Inline Lists 274
Registering Functions 274
Understanding SpEL Operators 275
Relational Operators 276
Arithmetic Operators 276
Logical Operators 276
Conditional Operators 277
Regular Expression Operator 278
Safe Navigation Operator 278
Collection Selection and Projection 279
Selecting the First and Last Element of a Collection 280
Using Utilities in SpEL 280
Accessing Spring Beans 280
spring:eval 281
Expressions in Caching 281
Summary 281
CHAPTER 10: CACHING 285
Building Your First Caching Application 286
Configuring the Cache Manager with a Different Name 289
Configuring the Caching Abstraction with Annotations 289
Working with Cache Annotations 290
XXII
CONTENTS
©Cacheable 290
Key Generator 291
Conditional Caching 291
@CacheEvict 292
@CachePut 292
@Caching 293
Implementing Cache Managers 293
SimpleCacheManager 293
NoOpCacheManager 294
ConcurrentMapCacheManager 294
CompositeCacheManager 294
Casting Your SpEL on Caches 295
Initializing Your Caches Programmatically 296
Finding Alternative Cache Providers 298
Ehcache 299
Guava 302
Hazelcast 302
Summary 303
CHAPTER 11: RESTFUL WEB SERVICES WITH SPRING 305
Creating Your First REST Web Service 306
Returning Different HTTP Status Codes
from REST Web Service 318
Learning an Annotation-Based
Configuration Alternative 318
Using REST Web Services with XML 320
Using the Exception Handling Mechanism 322
Unit Testing RESTful Services 326
Summary 328
CHAPTER 12: SECURING WEB APPLICATIONS WITH
SPRING SECURITY 331
Why Spring Security? 332
Features of Spring Security 333
Configuring and Using Spring Security 334
Understanding the Fundamental Building Blocks of Spring Security 340 Authenticating Users 341
Unsuccessful Login Flow 342
Successful Login Flow 342
Anonymous Authentication 344
xxüî
CONTENTS
Customizing the Login Page 344
Logout Process 346
Accessing UserDetails Using JDBC 346
Encrypting Passwords 349
Remember-Me Support 350
User Session Management 351
Basic Authentication 352
Authorizing Web Requests and Service Method Calls 353
Authorizing Web Requests 353
How Does Authorization Work? 355
Expression-Based Authorization 357
Using JSP Security Tags 358
Authorize Tag 359
Authenticate Tag 359
Authorizing Service Methods 359
Summary 364
CHAPTER 13: NEXT STOP: SPRING 4.0 369
Keeping Up with the Latest: Java 8 and Java EE7 Support 370
Lambda Expressions 370
Method References 373
Bean Validation Integration 374
JSR 310: Date Time Value Type Support 374
Configuring Injection with Conditional Dependency 374
Ordering the Elements of Autowired Collections 377
Repeating Annotations 379
Introducing New Annotations 381
Documenting with ©Description 381
Using the @RestController Annotation 382
Summary 382
APPENDIX: SOLUTIONS TO EXERCISES 385
Chapter 1 385
Chapter 2 388
Chapter 3 393
Chapter 4 393
Chapter 5 399
Chapter 6 403
Chapter 7 406
Chapter 8 409
XXIV
CONTENTS
Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13
INDEX
411
414
417
420
423
425
XXV
This is your thorough introduction to the Spring Framework, the most popular framework among Java developers and the de facto standard for enterprise application development. Specifically focused on real-world enterprise solutions, Beginning Spring provides comprehensive examples and hands-on learning in each chapter to help you quickly build a skillset that exploits the lull capabilities of Java and to drive successful application development Coverage includes the foundations of the POJO model, ORM support, Spring MVC, REST services, Spring Security, and much more to provide a comprehensive guide to the real-world functionality of this complete enterprise application toolset.
Beginning Spring:
• Covers all aspects of application development using Spring Framework 4.0, which supports Java® 8.0 and Java® EE 7
• Emphasizes practicality by addressing real-world needs and providing actionable insight with hands-on practice
• Includes extensive examples for concrete experimentation reference and thorough exploitation of Java s full capabilities
• Builds skill upon skill to help developers master the most commonly used tools and fundamental concepts in any Spring project
• Features detailed discussion on the cross-cutting concerns every enterprise application needs, such as transaction management and security
|
any_adam_object | 1 |
author | Çalişkan, Mert |
author_GND | (DE-588)1037316789 |
author_facet | Çalişkan, Mert |
author_role | aut |
author_sort | Çalişkan, Mert |
author_variant | m ç mç |
building | Verbundindex |
bvnumber | BV042061462 |
classification_rvk | ST 250 |
classification_tum | DAT 332f DAT 368f |
ctrlnum | (OCoLC)907626637 (DE-599)BVBBV042061462 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01835nam a2200397 c 4500</leader><controlfield tag="001">BV042061462</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20150506 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">140905s2015 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781118892923</subfield><subfield code="c">pbk.</subfield><subfield code="9">978-1-118-89292-3</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)907626637</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV042061462</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-91G</subfield><subfield code="a">DE-11</subfield><subfield code="a">DE-573</subfield><subfield code="a">DE-739</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 332f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 368f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Çalişkan, Mert</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)1037316789</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Beginning Spring</subfield><subfield code="c">Mert Caliskan ; Kenan Sevindik</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Indianapolis, Ind.</subfield><subfield code="b">Wrox/Wiley</subfield><subfield code="c">2015</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXXVIII, 438 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Wrox programmer to programmer</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Spring</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4830455-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Spring</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4830455-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Sevindik, Kenan</subfield><subfield code="e">Sonstige</subfield><subfield code="4">oth</subfield></datafield><datafield tag="776" ind1="0" ind2="8"><subfield code="i">Erscheint auch als</subfield><subfield code="n">Online-Ausgabe</subfield><subfield code="z">978-1-118-89303-6</subfield></datafield><datafield tag="776" ind1="0" ind2="8"><subfield code="i">Erscheint auch als</subfield><subfield code="n">Online-Ausgabe</subfield><subfield code="z">978-1-118-89311-1</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Passau - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Passau - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000002&line_number=0002&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Klappentext</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-027502333</subfield></datafield></record></collection> |
id | DE-604.BV042061462 |
illustrated | Illustrated |
indexdate | 2024-07-10T01:11:41Z |
institution | BVB |
isbn | 9781118892923 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-027502333 |
oclc_num | 907626637 |
open_access_boolean | |
owner | DE-91G DE-BY-TUM DE-11 DE-573 DE-739 |
owner_facet | DE-91G DE-BY-TUM DE-11 DE-573 DE-739 |
physical | XXXVIII, 438 S. Ill., graph. Darst. |
publishDate | 2015 |
publishDateSearch | 2015 |
publishDateSort | 2015 |
publisher | Wrox/Wiley |
record_format | marc |
series2 | Wrox programmer to programmer |
spelling | Çalişkan, Mert Verfasser (DE-588)1037316789 aut Beginning Spring Mert Caliskan ; Kenan Sevindik Indianapolis, Ind. Wrox/Wiley 2015 XXXVIII, 438 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier Wrox programmer to programmer Spring Programmiersprache (DE-588)4830455-4 gnd rswk-swf Spring Programmiersprache (DE-588)4830455-4 s DE-604 Sevindik, Kenan Sonstige oth Erscheint auch als Online-Ausgabe 978-1-118-89303-6 Erscheint auch als Online-Ausgabe 978-1-118-89311-1 Digitalisierung UB Passau - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis Digitalisierung UB Passau - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000002&line_number=0002&func_code=DB_RECORDS&service_type=MEDIA Klappentext |
spellingShingle | Çalişkan, Mert Beginning Spring Spring Programmiersprache (DE-588)4830455-4 gnd |
subject_GND | (DE-588)4830455-4 |
title | Beginning Spring |
title_auth | Beginning Spring |
title_exact_search | Beginning Spring |
title_full | Beginning Spring Mert Caliskan ; Kenan Sevindik |
title_fullStr | Beginning Spring Mert Caliskan ; Kenan Sevindik |
title_full_unstemmed | Beginning Spring Mert Caliskan ; Kenan Sevindik |
title_short | Beginning Spring |
title_sort | beginning spring |
topic | Spring Programmiersprache (DE-588)4830455-4 gnd |
topic_facet | Spring Programmiersprache |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=027502333&sequence=000002&line_number=0002&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT caliskanmert beginningspring AT sevindikkenan beginningspring |