
Spring: Developing Java Applications for the Enterprise
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Content
- Intro
- Copyright
- Credits
- Preface
- Module 1 Table of Contents
- Module 2 Table of Contents
- Module 3 Table of Contents
- Module 1: Introduction Page
- Chapter 1: Introducing the Spring Framework
- Introducing Spring
- Evolution of the Spring Framework
- Spring Framework Architecture
- Benefits of the Spring Framework
- Creating an application in Spring
- Exercise
- Summary
- Chapter 2: Inversion of Control in Spring
- Understanding Inversion of Control
- Dependency Injection
- Bean definition inheritance
- Autowiring in Spring
- The bean's scope
- The Spring bean life cycle
- Exercise
- Summary
- Chapter 3: DAO and JDBC in Spring
- Overview of database
- The DAO design pattern
- JDBC without Spring
- Spring JDBC packages
- JDBC with Spring
- What is JdbcTemplate
- JDBC batch operation in Spring
- Calling a stored procedure
- Exercise
- Summary
- Chapter 4: Hibernate with Spring
- Why Object/Relational Mapping?
- Introducing ORM, O/RM, and O/R mapping
- Introducing Hibernate
- Integrating Hibernate with the Spring Framework
- Hibernate Query Language
- Hibernate Criteria Query Language
- Exercise
- Summary
- Chapter 5: Spring Security
- What is Spring Security?
- Servlet filters review
- Security use case
- Spring Security configuration
- Securing web application's URL access
- Logging into web application
- Users authentication
- Method-level security
- Let's get down to business
- Exercise
- Summary
- Chapter 6: Spring Testing
- Testing using JUnit 4
- Testing using TestNG
- Agile software testing
- Create unit tests of the Spring MVC controller
- Spring MVC test framework
- Exercise
- Summary
- Chapter 7: Integrating JavaMail and JMS with Spring
- E-mail support in Spring
- Spring Java Messaging Service
- Exercise
- Summary
- Appendix A: Solutions to Exercises
- Chapter 1, Introducing the Spring Framework
- Chapter 2, Inversion of Control in Spring
- Chapter 3, DAO and JDBC in Spring
- Chapter 4, Hibernate with Spring
- Chapter 5, Spring Security
- Chapter 6, Spring Testing
- Chapter 7, Integrating JavaMail and JMS with Spring
- Appendix B: Setting up the Application Database - Apache Derby
- Module 2: Introduction Page
- Chapter 1: Configuring a Spring Development Environment
- Setting up Java
- [Time for action - installing JDK]
- Time for action - installing JDK
- Time for action - setting up environment variables
- Configuring a build tool
- [Time for action - installing the Maven build tool]
- Time for action - installing the Maven build tool
- Installing a web server
- [Time for action - installing the Tomcat web server]
- Time for action - installing the Tomcat web server
- Configuring a development environment
- [Time for action - installing Spring Tool Suite]
- Time for action - installing Spring Tool Suite
- Time for action - configuring Maven on STS
- Time for action - configuring Tomcat on STS
- Creating our first Spring MVC project
- [Time for action - creating a Spring MVC project in STS]
- Time for action - creating a Spring MVC project in STS
- Time for action - adding Java version properties in pom.xml
- What just happened?
- Spring MVC dependencies
- Time for action - adding Spring jars to the project
- What just happened?
- A jump-start to MVC
- Time for action - adding a welcome page
- What just happened?
- The Dispatcher servlet
- Time for action - configuring the Dispatcher servlet
- What just happened?
- Deploying our project
- [Time for action - running the project]
- Time for action - running the project
- Summary
- Chapter 2: Spring MVC Architecture - Architecting Your Web Store
- Dispatcher servlet
- [Time for action - examining request mapping]
- Time for action - examining request mapping
- What just happened?
- Pop quiz - request mapping
- Understanding the Dispatcher servlet configuration
- [Time for action - examining the servlet mapping]
- Time for action - examining the servlet mapping
- What just happened?
- Servlet mapping versus request mapping
- Pop quiz - servlet mapping
- Web application context
- View resolvers
- Time for action - understanding web application context
- What just happened?
- Understanding the web application context configuration
- [Pop quiz - web application context configuration]
- Pop quiz - web application context configuration
- Model View Controller
- Overview of the Spring MVC request flow
- The web application architecture
- The Domain layer
- Time for action - creating a domain object
- What just happened?
- The Persistence layer
- Time for action - creating a repository object
- What just happened?
- The Service layer
- Time for action - creating a service object
- What just happened?
- Have a go hero - accessing the product domain object via a service
- An overview of the web application architecture
- [Have a go hero - listing all our customers]
- Have a go hero - listing all our customers
- Summary
- Chapter 3: Control Your Store with Controllers
- The role of a Controller in Spring MVC
- Defining a Controller
- [Time for action - adding class-level request mapping]
- Time for action - adding class-level request mapping
- What just happened?
- Default request mapping method
- Pop quiz - class level request mapping
- Handler mapping
- Using URI template patterns
- [Time for action - showing products based on category]
- Time for action - showing products based on category
- What just happened?
- Pop quiz - request path variable
- Using matrix variables
- [Time for action - showing products based on filters]
- Time for action - showing products based on filters
- What just happened?
- Understanding request parameters
- [Time for action - adding a product detail page]
- Time for action - adding a product detail page
- What just happened?
- Pop quiz - the request parameter
- Time for action - implementing a master detail View
- What just happened?
- Have a go hero - adding multiple filters to list products
- Summary
- Chapter 4: Working with Spring Tag Libraries
- The JavaServer Pages Standard Tag Library
- Serving and processing forms
- [Time for action - serving and processing forms]
- Time for action - serving and processing forms
- What just happened?
- Have a go hero - customer registration form
- Customizing data binding
- [Time for action - whitelisting form fields for binding]
- Time for action - whitelisting form fields for binding
- What just happened?
- Pop quiz - data binding
- Externalizing text messages
- [Time for action - externalizing messages]
- Time for action - externalizing messages
- What just happened?
- Have a go hero - externalizing all the labels from all the pages
- Summary
- Chapter 5: Working with View Resolver
- Resolving Views
- RedirectView
- [Time for action - examining RedirectView]
- Time for action - examining RedirectView
- What just happened?
- Pop quiz - RedirectView
- Flash attribute
- Serving static resources
- [Time for action - serving static resources]
- Time for action - serving static resources
- What just happened?
- Pop quiz - static view
- Time for action - adding images to the product detail page
- What just happened?
- Multipart requests in action
- [Time for action - adding images to a product]
- Time for action - adding images to a product
- What just happened?
- Have a go hero - uploading product user manuals to the server
- Using ContentNegotiatingViewResolver
- [Time for action - configuring ContentNegotiatingViewResolver]
- Time for action - configuring ContentNegotiatingViewResolver
- What just happened?
- Working with HandlerExceptionResolver
- [Time for action - adding a ResponseStatus exception]
- Time for action - adding a ResponseStatus exception
- What just happened?
- Time for action - adding an exception handler
- What just happened?
- Summary
- Chapter 6: Internalize Your Store with Interceptor
- Working with interceptors
- [Time for action - configuring an interceptor]
- Time for action - configuring an interceptor
- What just happened?
- Pop quiz - interceptors
- LocaleChangeInterceptor - internationalization
- [Time for action - adding internationalization]
- Time for action - adding internationalization
- What just happened?
- Have a go hero - fully internationalize the product details page
- Mapped interceptors
- [Time for action - mapped intercepting offer page requests]
- Time for action - mapped intercepting offer page requests
- What just happened?
- Summary
- Chapter 7: Incorporating Spring Security
- Using Spring Security
- [Time for action - authenticating users based on roles]
- Time for action - authenticating users based on roles
- What just happened?
- Pop quiz - Spring Security
- Have a go hero - play with Spring Security
- Summary
- Chapter 8: Validate Your Products with a Validator
- Bean Validation
- [Time for action - adding Bean Validation support]
- Time for action - adding Bean Validation support
- What just happened?
- Have a go hero - adding more validation in the Add new product page
- Custom validation with JSR-303/Bean Validation
- [Time for action - adding Bean Validation support]
- Time for action - adding Bean Validation support
- What just happened?
- Have a go hero - adding custom validation to a category
- Spring validation
- [Time for action - adding Spring validation]
- Time for action - adding Spring validation
- What just happened?
- Time for action - combining Spring validation and Bean Validation
- What just happened?
- Have a go hero - adding Spring validation to a product image
- Summary
- Chapter 9: Give REST to Your Application with Ajax
- Introduction to REST
- [Time for action - implementing RESTful web services]
- Time for action - implementing RESTful web services
- What just happened?
- Time for action - consuming REST web services
- What just happened?
- Handling web services in Ajax
- [Time for action - consuming REST web services via Ajax]
- Time for action - consuming REST web services via Ajax
- What just happened?
- Summary
- Chapter 10: Float Your Application with Web Flow
- Working with Spring Web Flow
- [Time for action - implementing the order processing service]
- Time for action - implementing the order processing service
- What just happened?
- Time for action - implementing the checkout flow
- What just happened?
- Understanding flow definitions
- Understanding checkout flow
- Pop quiz - web flow
- Time for action - creating Views for every view state
- What just happened?
- Have a go hero - adding a decision state
- Summary
- Chapter 11: Template with Tiles
- Enhancing reusability through Apache Tiles
- [Time for action - creating Views for every View state]
- Time for action - creating Views for every View state
- What just happened?
- Pop quiz - Apache Tiles
- Summary
- Chapter 12: Testing Your Application
- Unit testing
- [Time for action - unit testing domain objects]
- Time for action - unit testing domain objects
- What just happened?
- Have a go hero - adding tests for Cart
- Integration testing with the Spring Test context framework
- [Time for action - testing product validator]
- Time for action - testing product validator
- What just happened?
- Time for action - testing product Controllers
- What just happened?
- Time for action - testing REST Controllers
- What just happened?
- Have a go hero - adding tests for the remaining REST methods
- Summary
- Thank you readers!
- Appendix A: Using the Gradle Build Tool
- Installing Gradle
- The Gradle build script for your project
- Understanding the Gradle script
- Appendix B: Pop Quiz Answers
- Chapter 2, Spring MVC Architecture - Architecting Your Web Store
- Chapter 3, Control Your Store with Controllers
- Chapter 4, Working with Spring Tag Libraries
- Chapter 5, Working with View Resolver
- Chapter 6, Internalize Your Store with Interceptor
- Chapter 7, Incorporating Spring Security
- Chapter 10, Float Your Application with Web Flow
- Chapter 11, Template with Tiles
- Module 3: Introduction Page
- Chapter 1: Demystifying Microservices
- The evolution of microservices
- What are microservices?
- Microservices - the honeycomb analogy
- Principles of microservices
- Characteristics of microservices
- Microservices examples
- Microservices benefits
- Relationship with other architecture styles
- Microservice use cases
- Summary
- Chapter 2: Building Microservices with Spring Boot
- Setting up a development environment
- Developing a RESTful service - the legacy approach
- Moving from traditional web applications to microservices
- Using Spring Boot to build RESTful microservices
- Getting started with Spring Boot
- Developing the Spring Boot microservice using the CLI
- Developing the Spring Boot Java microservice using STS
- Developing the Spring Boot microservice using Spring Initializr - the HATEOAS example
- What's next?
- The Spring Boot configuration
- Changing the default embedded web server
- Implementing Spring Boot security
- Enabling cross-origin access for microservices
- Implementing Spring Boot messaging
- Developing a comprehensive microservice example
- Spring Boot actuators
- Configuring application information
- Adding a custom health module
- Documenting microservices
- Summary
- Chapter 3: Applying Microservices Concepts
- Patterns and common design decisions
- Microservices challenges
- The microservices capability model
- Summary
- Chapter 4: Microservices Evolution - A Case Study
- Reviewing the microservices capability model
- Understanding the PSS application
- Death of the monolith
- Microservices to the rescue
- The business case
- Plan the evolution
- Migrate modules only if required
- Target architecture
- Target implementation view
- Summary
- Chapter 5: Scaling Microservices with Spring Cloud
- Reviewing microservices capabilities
- Reviewing BrownField's PSS implementation
- What is Spring Cloud?
- Setting up the environment for BrownField PSS
- Spring Cloud Config
- Feign as a declarative REST client
- Ribbon for load balancing
- Eureka for registration and discovery
- Zuul proxy as the API gateway
- Streams for reactive microservices
- Summarizing the BrownField PSS architecture
- Summary
- Chapter 6: Autoscaling Microservices
- Reviewing the microservice capability model
- Scaling microservices with Spring Cloud
- Understanding the concept of autoscaling
- Autoscaling approaches
- Autoscaling BrownField PSS microservices
- Summary
- Chapter 7: Logging and Monitoring Microservices
- Reviewing the microservice capability model
- Understanding log management challenges
- A centralized logging solution
- The selection of logging solutions
- Monitoring microservices
- Data analysis using data lakes
- Summary
- Chapter 8: Containerizing Microservices with Docker
- Reviewing the microservice capability model
- Understanding the gaps in BrownField PSS microservices
- What are containers?
- The difference between VMs and containers
- The benefits of containers
- Microservices and containers
- Introduction to Docker
- Deploying microservices in Docker
- Running RabbitMQ on Docker
- Using the Docker registry
- Microservices on the cloud
- Running BrownField services on EC2
- Updating the life cycle manager
- The future of containerization - unikernels and hardened security
- Summary
- Chapter 9: Managing Dockerized Microservices with Mesos and Marathon
- Reviewing the microservice capability model
- The missing pieces
- Why cluster management is important
- What does cluster management do?
- Relationship with microservices
- Relationship with virtualization
- Cluster management solutions
- Cluster management with Mesos and Marathon
- Implementing Mesos and Marathon for BrownField microservices
- A place for the life cycle manager
- The technology metamodel
- Summary
- Chapter 10: The Microservices Development Life Cycle
- Reviewing the microservice capability model
- The new mantra of lean IT - DevOps
- Meeting the trio - microservices, DevOps, and cloud
- Practice points for microservices development
- Microservices development governance, reference architectures, and libraries
- Summary
- Bibliography
- Thanks Page
- _GoBack
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.