Andrew Golovko
@andrewgolovko
Blog of a self-taught programmer writing about the experience, tips and other stuff
153 posts
Spring AOP

M02 Q09 What is ProceedingJoinPoint?

ProceedingJoinPoint is an object that can be provided to @Around advice as the first argument. It is a type of JoinPoint which can be used to change method arguments during method execution in runtime or block execution of original method entirely.

M02 Q08 What is the JoinPoint argument used for?

A JoinPoint argument is an object that can be used to retrieve additional information about join point during execution. JoinPoint needs to be the first parameter of Advice, only, in that case, Spring Framework will inject JoinPoint into advice method.

M02 Q07 Syntax and types of pointcut expressions

Pointcut designator types supported by Spring AOP:

M02 Q06 How to enable the detection of the @Aspect annotation?

To enable detection of @Aspect annotation you need to perform the following steps

M02 Q05 How many advice types does Spring support?

Spring supports the following advice types:

M02 Q04 Which are the limitations of the two proxy-types?

Some limitations are similar, for example, neither proxy supports self-invocation. Most of the requirements come from the way how the proxy works.

M02 Q03 How does Spring solve (implement) a cross-cutting concern?

Spring Implements cross-cutting concerns with the usage of Spring AOP module. Spring AOP uses AspectJ expression syntax for Pointcut expressions, which are matched against Join Point, code is altered with logic implemented in advices. In Spring AOP Joint Point is always method invocation.

M02 Q02 What is a pointcut, a join point, an advice, an aspect, weaving?

Firstly, let's consider the Join Point because in AOP everything is executed around a Join Point.

M02 Q01 What is the concept of AOP?

AOP – Aspect Oriented Programming – a programming paradigm that complements Object-oriented Programming (OOP) by providing a way to separate groups of cross-cutting concerns from business logic code.