I am studying the Spring AOP module, and I have some doubts about how exactly the AROUND tip works.
Read the official documentation: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html
I can read this about AROUND ADVICE :
Around the council: council that surrounds the junction, such as the invocation method. This is the most powerful tip. Around the board can perform custom behavior before and after the method call. It is also responsible for deciding whether to jump to the junction point or to reduce the recommended execution of the method, returning its own to return a value or throw an exception.
And this is the sequence diagram around the board:

So, from what I can understand, I can determine the advice (my user behavior) that will be executed before and after the join point indicated by pointcut .
So, for example, I can define AROUND ADVICE as follows:
@Around("execution(@example.Cacheable * rewards.service..*.*(..))") public Object cache(ProceedingJoinPoint point) throws Throwable { Object value = cacheStore.get(cacheKey(point)); if (value == null) { value = point.proceed(); cacheStore.put(cacheKey(point), value); } return value; }
which perform the implemented caching behavior before and after this, is a service method. Right?
What I cannot fully understand is how and how it uses the ProceedingJoinPoint point parameter.
From what I understand, it is used to choose whether or not to perform a specific operation, but how exactly does it work?
Another doubt is related to how to use AOP advice correctly, how to answer the following question:
What advice should I use if I want to try and catch exceptions?
I think that in this case, the answer should be to use After throwing advice , because the advice is executed when the execution of the matching method is completed by throwing an exception.
But I'm not sure about this, because from what I understand, the advice is only executed if the method throws an exception . Or maybe in this case I should use ** AROUND ADVICE *?
Tpx