Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Spring MVC Cookbook

You're reading from   Spring MVC Cookbook Over 40 recipes for creating cloud-ready Java web applications with Spring MVC

Arrow left icon
Product type Paperback
Published in Feb 2016
Last Updated in Feb 2025
Publisher
ISBN-13 9781784396411
Length 466 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alexandre Bretet Alexandre Bretet
Author Profile Icon Alexandre Bretet
Alexandre Bretet
Alex Bretet Alex Bretet
Author Profile Icon Alex Bretet
Alex Bretet
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Setup Routine for an Enterprise Spring Application FREE CHAPTER 2. Designing a Microservice Architecture with Spring MVC 3. Working with Java Persistence and Entities 4. Building a REST API for a Stateless Architecture 5. Authenticating with Spring MVC 6. Implementing HATEOAS 7. Developing CRUD Operations and Validations 8. Communicating Through WebSockets and STOMP 9. Testing and Troubleshooting Index

Modern application Logging with Log4j2


After 20 years of evolution in the Java ecosystem, the ways of Logging have seen different strategies, trends, and architectures. Nowadays, several Logging frameworks can be found among the used third-party dependencies. We must support them all to debug an application or to trace runtime events.

Getting ready

This recipe provides a future-proof implementation of Log4j2 for the CloudStreet Market application. It requires several Maven dependencies to be added to our modules. As a solution, it can appear quite complicated, but in reality the amount of Logging frameworks to support is limited, and the logic behind a Log4j2 migration is fairly straightforward.

How to do it…

  1. The following Maven dependencies have been added to the dependency-management section of the parent-module (cloudstreetmarket-parent):

        <!-- Logging dependencies -->
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Spring MVC Cookbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon