Spring: Developing Java Applications for the Enterprise

Leverage the power of Spring MVC, Spring Boot, Spring Cloud, and additional popular web frameworks
Preview in Mapt

Spring: Developing Java Applications for the Enterprise

Ravi Kant Soni, Amuthan Ganeshan, Rajesh R V

Leverage the power of Spring MVC, Spring Boot, Spring Cloud, and additional popular web frameworks

Quick links: > What will you learn?> Table of content

Mapt Subscription
FREE
$29.99/m after trial
eBook
$47.60
RRP $67.99
Save 29%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$47.60
$29.99 p/m after trial
RRP $67.99
Subscription
eBook
Start 14 Day Trial

Frequently bought together


Spring: Developing Java Applications for the Enterprise Book Cover
Spring: Developing Java Applications for the Enterprise
$ 67.99
$ 47.60
Spring 5.0 Microservices - Second Edition Book Cover
Spring 5.0 Microservices - Second Edition
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $72.98
Add to Cart

Book Details

ISBN 139781787127555
Paperback1023 pages

Book Description

This carefully designed course aims to get you started with Spring, the most widely adopted Java framework, and then goes on to more advanced topics such as building microservices using Spring Boot within Spring. With additional coverage of popular web frameworks such as Struts, WebWork, Java Server Faces, Tapestry, Docker, and Mesos, you'll have all the skills and expertise you need to build great applications.

Starting with the Spring Framework architecture and setting up the key components of the Spring Application Development Environment, you will learn how to configure Spring Container and manage Spring beans using XML and Annotation. Next, you will delve into Spring MVC, which will help you build flexible and loosely coupled web applications. You'll also get to grips with testing applications for reliability. Moving on, this course will help you implement the microservice architecture in Spring Framework, Spring Boot, and Spring Cloud. Written to the latest specifications of Spring, this book will help you build modern, Internet-scale Java applications in no time.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

Table of Contents

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
Chapter 8: Configuring a Spring Development Environment
Setting up Java
Configuring a build tool
Installing a web server
Configuring a development environment
Creating our first Spring MVC project
Spring MVC dependencies
A jump-start to MVC
The Dispatcher servlet
Deploying our project
Summary
Chapter 9: Spring MVC Architecture – Architecting Your Web Store
Dispatcher servlet
Understanding the Dispatcher servlet configuration
Servlet mapping versus request mapping
Web application context
View resolvers
Understanding the web application context configuration
Model View Controller
Overview of the Spring MVC request flow
The web application architecture
The Domain layer
The Persistence layer
The Service layer
An overview of the web application architecture
Summary
Chapter 10: Control Your Store with Controllers
The role of a Controller in Spring MVC
Defining a Controller
Default request mapping method
Handler mapping
Using URI template patterns
Using matrix variables
Understanding request parameters
Summary
Chapter 11: Working with Spring Tag Libraries
The JavaServer Pages Standard Tag Library
Serving and processing forms
Customizing data binding
Externalizing text messages
Summary
Chapter 12: Working with View Resolver
Resolving Views
RedirectView
Flash attribute
Serving static resources
Multipart requests in action
Using ContentNegotiatingViewResolver
Working with HandlerExceptionResolver
Summary
Chapter 13: Internalize Your Store with Interceptor
Working with interceptors
LocaleChangeInterceptor - internationalization
Mapped interceptors
Summary
Chapter 14: Incorporating Spring Security
Using Spring Security
Summary
Chapter 15: Validate Your Products with a Validator
Bean Validation
Custom validation with JSR-303/Bean Validation
Spring validation
Summary
Chapter 16: Give REST to Your Application with Ajax
Introduction to REST
Handling web services in Ajax
What just happened?
Summary
Chapter 17: Float Your Application with Web Flow
Working with Spring Web Flow
Understanding flow definitions
Understanding checkout flow
Summary
Chapter 18: Template with Tiles
Enhancing reusability through Apache Tiles
Summary
Chapter 19: Testing Your Application
Unit testing
Integration testing with the Spring Test context framework
Summary
Thank you readers!
Chapter 20: 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 21: 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 22: Applying Microservices Concepts
Patterns and common design decisions
Microservices challenges
The microservices capability model
Summary
Chapter 23: 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 24: 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 25: 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 26: 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 27: 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 28: 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 29: 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

What You Will Learn

  • Understand the architecture of Spring Framework and how to set up the key components of the Spring Application Development Environment
  • Configure Spring Container and manage Spring beans using XML and Annotation
  • Practice Spring AOP concepts such as Aspect, Advice, Pointcut, and Introduction
  • Integrate bean validation and custom validation
  • Use error handling and exception resolving
  • Get to grips with REST-based web service development and Ajax
  • Use Spring Boot to develop microservices
  • Find out how to avoid common pitfalls when developing microservices
  • Get familiar with end-to-end microservices written in Spring Framework and Spring Boot

Authors

Table of Contents

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
Chapter 8: Configuring a Spring Development Environment
Setting up Java
Configuring a build tool
Installing a web server
Configuring a development environment
Creating our first Spring MVC project
Spring MVC dependencies
A jump-start to MVC
The Dispatcher servlet
Deploying our project
Summary
Chapter 9: Spring MVC Architecture – Architecting Your Web Store
Dispatcher servlet
Understanding the Dispatcher servlet configuration
Servlet mapping versus request mapping
Web application context
View resolvers
Understanding the web application context configuration
Model View Controller
Overview of the Spring MVC request flow
The web application architecture
The Domain layer
The Persistence layer
The Service layer
An overview of the web application architecture
Summary
Chapter 10: Control Your Store with Controllers
The role of a Controller in Spring MVC
Defining a Controller
Default request mapping method
Handler mapping
Using URI template patterns
Using matrix variables
Understanding request parameters
Summary
Chapter 11: Working with Spring Tag Libraries
The JavaServer Pages Standard Tag Library
Serving and processing forms
Customizing data binding
Externalizing text messages
Summary
Chapter 12: Working with View Resolver
Resolving Views
RedirectView
Flash attribute
Serving static resources
Multipart requests in action
Using ContentNegotiatingViewResolver
Working with HandlerExceptionResolver
Summary
Chapter 13: Internalize Your Store with Interceptor
Working with interceptors
LocaleChangeInterceptor - internationalization
Mapped interceptors
Summary
Chapter 14: Incorporating Spring Security
Using Spring Security
Summary
Chapter 15: Validate Your Products with a Validator
Bean Validation
Custom validation with JSR-303/Bean Validation
Spring validation
Summary
Chapter 16: Give REST to Your Application with Ajax
Introduction to REST
Handling web services in Ajax
What just happened?
Summary
Chapter 17: Float Your Application with Web Flow
Working with Spring Web Flow
Understanding flow definitions
Understanding checkout flow
Summary
Chapter 18: Template with Tiles
Enhancing reusability through Apache Tiles
Summary
Chapter 19: Testing Your Application
Unit testing
Integration testing with the Spring Test context framework
Summary
Thank you readers!
Chapter 20: 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 21: 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 22: Applying Microservices Concepts
Patterns and common design decisions
Microservices challenges
The microservices capability model
Summary
Chapter 23: 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 24: 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 25: 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 26: 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 27: 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 28: 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 29: 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

Book Details

ISBN 139781787127555
Paperback1023 pages
Read More

Read More Reviews

Recommended for You

Spring 5.0 Microservices - Second Edition Book Cover
Spring 5.0 Microservices - Second Edition
$ 39.99
$ 28.00
Building Web Apps with Spring 5 and Angular 4 Book Cover
Building Web Apps with Spring 5 and Angular 4
$ 39.99
$ 28.00
Spring 5.0 Cookbook Book Cover
Spring 5.0 Cookbook
$ 39.99
$ 28.00
Microservices: Building Scalable Software Book Cover
Microservices: Building Scalable Software
$ 71.99
$ 50.40
Using Spring and Angular for Web Application [Video] Book Cover
Using Spring and Angular for Web Application [Video]
$ 124.99
$ 106.25
Java EE 8 Application Development Book Cover
Java EE 8 Application Development
$ 39.99
$ 28.00