This story offers a great way for you to learn Aspect Oriented Programming by studying concrete examples. In particular, I will showcase SpringBoot AOP by implementing 4 Aspects.

Table of Contents:

  • What is an Aspect?
  • @Cacheable: a standard Spring Advice
  • Log REST calls (with a custom Aspect)
  • Performance monitoring (with AOP)
  • Retry mechanism (with AOP)

If you’re the person who wants to skip lengthy descriptions and just look at concrete code, I’ve got you covered:

What is an Aspect?

So there are some great resources out there for an overview of Spring AOP, including this Baeldung article and the official Spring AOP documentation. …

Recently I received the maintenance responsibility for two legacy projects in my company. One of the projects is 8 years old, the other is so old even our tester doesn’t know when the project started — definitely before he joined 12 years ago. Obviously, both projects use pretty old technologies like Ant-scripts and both have many features which aren’t even used by the customer any more.

So how do you deal with such an old project — as a motivated and proactive engineer?

In this blog, I’ll show you how you can make the best of such a situation, and…

A path with many great news: from Java 8 to Java 15

This blog will give you samples of awesome new feature added since Java 7. I’ll showcase at least one major improvement for each Java version, all the way to Java 15 which was released in fall 2020. Java now fully supports lambdas, functional programming, type inference via var, immutable collections with simple constructors, and multi-line strings. Moreover, there are exciting new experimental features like data classes (record), and sealed classes. Finally I’ll talk about the Java REPL which offers high value for quick experiments.

Table of Contents:

· Functional Programming (Java 8)
· Streams (Java 8)
· Optional (Java 8)
· JShell (Java…

This blog covers the basics of Aspect Oriented Programming (AOP). I’ll show a simple working example of AOP: a common task like logging of REST calls can be generically defined in an Advice, which can then be applied to various target places in our code (so called Pointcuts) via an Aspect.

For the impatient: you can find the end result on my Github repo:

Programming Paradigms

Back in the 1996, when Java 1.0 was released, Java developers were all hyped up about object oriented programming, also called OOP. …

Philipp Gysel

I love Java☕. 6 years of professional experience. I am interested in Architecture, SpringBoot, and new Java features.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store