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
All 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
Java 9 Dependency Injection

You're reading from   Java 9 Dependency Injection Write loosely coupled code with Spring 5 and Guice

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788296250
Length 246 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Nilang Patel Nilang Patel
Author Profile Icon Nilang Patel
Nilang Patel
Krunal Patel Krunal Patel
Author Profile Icon Krunal Patel
Krunal Patel
Arrow right icon
View More author details
Toc

Summary


In this chapter, we learned one of the important ways to achieve separation of concerns called AOP. Conceptually, we are removing the dependency of cross-cutting concerns from business code and applying them with plug-and -play fashion and in a more controlled way with AOP. It solves the design problem that we never could resolve with the traditional AOP model. 

We understood the need of AOP by taking an example where we need to keep changing business code when common functionality is changed. We have also seen various terminologies used in AOP, which is very crucial to understanding underlying concepts.

Soon after learning the theory of AOP, we started our journey with Spring AOP to understand the practical concepts. First, we learned to define AOP configuration in an XML file, followed by declaring various artifacts such as aspect, point-cut, and advice. Details about point-cut expressions and advice types were shown with various examples and code samples. 

Next, we learned how to...

lock icon The rest of the chapter is locked
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
Visually different images