A Primer
E-Book, Englisch, 331 Seiten, eBook
ISBN: 978-1-4302-6533-7
Verlag: APRESS
Format: PDF
Kopierschutz: Wasserzeichen (»Systemvoraussetzungen)
Zielgruppe
Popular/general
Autoren/Hrsg.
Weitere Infos & Material
1;Contents at a Glance;3
2;Contents;322
3;About the Author;329
4;About the Technical Reviewer;330
5;Acknowledgments;331
6;Introduction;5
7;Part I: Spring Framework Basics;7
7.1;Chapter 1: Your First Spring Application;8
7.1.1;Pre-Requirements;9
7.1.1.1;Hello World Example;10
7.1.1.2;Running the Hello World Application;11
7.1.1.3;Spring Boot: Even Easier;13
7.1.1.4;Running the Spring Boot Application;14
7.1.1.5;Spring Boot, à la Groovy;16
7.1.2;Summary;17
7.2;Chapter 2: Working with Classes and Dependencies;18
7.2.1;My Spring Application – My Documents;18
7.2.1.1;Requirements of My Documents;19
7.2.1.2;Defining Classes and Dependencies;19
7.2.2;Using the Spring Framework;24
7.2.3;Spring Framework and Dependency Injection;26
7.2.4;Summary;28
7.3;Chapter 3: Applying Different Configurations;29
7.3.1;My Documents XML Configuration;29
7.3.2;Using Spring Annotations;37
7.3.3;Spring Stereotypes;41
7.3.4;Using the Java Bean Configuration;41
7.3.5;Using the GroovyBeanDefinitionReader Class;44
7.3.6;Which Configuration to Choose?;47
7.3.7;Summary;47
7.4;Chapter 4: Using Beans Scopes;48
7.4.1;Scopes;48
7.4.2;Using the @Scope Annotation;52
7.4.3;Using Bean Scopes in the New GroovyBeanDefinitionReader Context;54
7.4.4;Summary;55
7.5;Chapter 5: Working with Collections and Custom Types;56
7.5.1;List, Map, and Properties;56
7.5.2;Collections in Your XML Configuration;58
7.5.3;Merging Collections;60
7.5.4;Summary;63
7.6;Chapter 6: Using Resource Files;64
7.6.1;Using Resources;64
7.6.2;Using Property Files;70
7.6.3;Using a Different Language: Do You Speak Spanish?;74
7.6.4;Summary;76
7.7;Chapter 7: Testing Your Spring Application;77
7.7.1;Testing with Annotations;77
7.7.2;Using Profiles;79
7.7.3;More Test Annotations;85
7.7.4;Summary;87
8;Part II: Spring Framework;88
8.1;Chapter 8: Give Advice to Your Spring Application;89
8.1.1;Advice to My Documents;89
8.1.2;AOP to the Rescue;91
8.1.2.1;AOP Concepts;92
8.1.2.2;Before Advice;96
8.1.2.3;After Advice;98
8.1.2.4;Around Advice;100
8.1.2.5;After Throwing Advice;102
8.1.3;AOP with Annotations;107
8.1.4;Summary;109
8.2;Chapter 9: Adding Persistence to Your Spring Application;110
8.2.1;Adding Persistence;110
8.2.2;Embedding a Database;125
8.2.3;A New Way to Collect Data: JdbcTemplate and RowMapper;128
8.2.4;Summary;131
8.3;Chapter 10: Showing Your Spring Application on the Web;132
8.3.1;Persistence Layer;132
8.3.2;Spring MVC;134
8.3.3;Internationalization: i18n;140
8.3.4;Summary;143
8.4;Chapter 11: Integrating Your Spring Application with External Systems;144
8.4.1;Java Message Service;145
8.4.2;Spring JMS;149
8.4.3;RabbitMQ and Spring Rabbit;158
8.4.4;Summary;166
8.5;Chapter 12: Exposing a REST API;167
8.5.1;RESTful;167
8.5.1.1;HTTP-GET;175
8.5.1.2;HTTP-POST;176
8.5.1.3;HTTP-PUT;178
8.5.1.4;HTTP-DELETE;179
8.5.2;Summary;180
8.6;Chapter 13: Adding E-mail and Scheduling Tasks;181
8.6.1;Sending E-mails;181
8.6.2;Let’s Talk About Asynchronous Tasks;184
8.6.3;Let’s Schedule;187
8.6.4;Summary;190
9;Part III: Spring Framework Advanced;191
9.1;Chapter 14: Using Dynamic Languages;192
9.1.1;Get More Dynamic;192
9.1.2;Doing Something Groovy;194
9.1.3;Using JRuby and Bean Shell;197
9.1.4;Summary;199
9.2;Chapter 15: Spring Data Within Your Spring Application;200
9.2.1;Using NoSQL Databases;200
9.2.2;Implementing the DocumentDAO;204
9.2.3;Testing MongoDB;207
9.2.4;A Complete DocumentDAO Test;211
9.2.5;Summary;213
9.3;Chapter 16: Messaging with Your Spring Application;214
9.3.1;Using RabbitMQ;214
9.3.1.1;RabbitMQ: Exchanges, Bindings, and Queues;215
9.3.1.2;Using a XML Marshaller for Message Conversion;217
9.3.1.2.1;;222
9.3.1.2.2;;222
9.3.1.2.3; and ;223
9.3.1.2.4;;223
9.3.1.2.5; and ;223
9.3.2;Test the Rabbit;223
9.3.3;Summary;226
9.4;Chapter 17: Be Social and Go Mobile;227
9.4.1;Using Spring Social;227
9.4.2;Spring Social Twitter;227
9.4.2.1;Registering Your Application in Twitter;228
9.4.2.2;Let’s Tweet;240
9.4.3;Sending Tweets from My Spring Application;243
9.4.4;Summary;246
10;Part IV: Spring I/O;247
10.1;Chapter 18: Spring and Groovy;248
10.1.1;Let’s Code Groovy;248
10.1.2;Let’s Test Groovy;252
10.1.3;DSL Syntax;254
10.1.4;Summary;257
10.2;Chapter 19: Spring Boot, Simplifying Everything;258
10.2.1;Spring Boot;258
10.2.2;Deploying MyDocuments;264
10.2.2.1;Creating an Executable Jar;264
10.2.2.2;Creating a WAR File;265
10.2.3;Spring Boot À La Groovy;267
10.2.4;Summary;271
10.3;Chapter 20: Your First Spring XD Application;272
10.3.1;Installing Spring XD;272
10.3.1.1;Using the Spring XD Distribution;272
10.3.1.2;Using OSX Homebrew Installation;272
10.3.2;Spring XD;273
10.3.2.1;Modules;273
10.3.2.2;Taps;273
10.3.3;Using Spring XD with My Documents;274
10.3.4;Let’s Do Analytics;278
10.3.5;Summary;282
10.4;Appendix A: Installing Tools;283
10.4.1;Installing Java;283
10.4.1.1;Installing Java for Windows OS;284
10.4.1.2;Setting Environment Variables;287
10.4.1.3;Installing Java for OS X;292
10.4.2;Tools for Mac OS X;295
10.4.2.1;Installing Homebrew;295
10.4.2.2;Installing GVM;296
10.4.3;Installing Gradle;298
10.4.3.1;Installing Gradle on Windows;298
10.4.3.2;Installing Gradle on a Mac OS X or Linux;300
10.4.4;Installing Groovy;300
10.4.4.1;Installing Groovy on Windows;301
10.4.4.2;Installing Groovy on a Mac OS X or Linux;302
10.4.5;Installing MongoDB;302
10.4.5.1;Installing MongoDB on Windows;303
10.4.5.1.1;Start MongoDB server;304
10.4.5.1.2;Stop MongoDB Server;305
10.4.5.2;Installing MongoDB on a Mac OS X;305
10.4.5.2.1;Start MongoDB server;305
10.4.5.2.2;Stop MongoDB server;305
10.4.5.2.3;Start MongoDB at Login;305
10.4.6;Installing Apache Active MQ;306
10.4.6.1;Installing Apache ActiveMQ on Windows;306
10.4.6.1.1;Start ActiveMQ;306
10.4.6.1.2;Stop ActiveMQ;307
10.4.6.1.3;Accessing the ActiveMQ Web Console Hawtio;307
10.4.6.2;Installing Apache ActiveMQ on a Mac OS X;307
10.4.6.2.1;Start ActiveMQ;307
10.4.6.2.2;Stop ActiveMQ;308
10.4.7;Installing RabbitMQ;308
10.4.7.1;Installing RabbitMQ on Windows;309
10.4.7.1.1;Installing the RabbitMQ Web Console;309
10.4.7.2;Installing RabbitMQ on a Mac OS X;309
10.4.7.2.1;RabbitMQ Useful Commands;309
10.4.7.2.2;Start RabbitMQ;309
10.4.7.2.3;Stop RabbitMQ;310
10.4.7.2.4;RabbitMQ Status;310
10.4.7.2.5;Installing the RabbitMQ Web Console;310
10.4.7.2.6;Start RabbitMQ at Login;310
10.4.8;Installing Spring Boot;310
10.4.8.1;Installing Spring Boot on Windows;311
10.4.8.2;Installing Spring Boot on a Mac OS X or Linux;312
10.4.9;Installing Spring XD;312
10.4.9.1;Installing Spring XD on Windows;313
10.4.9.2;Installing Spring XD on a Mac OS X;313
10.4.10;Summary;313
11;Index;314