Skip to content

Commit

Permalink
Pointcut updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MguAF committed Jun 22, 2021
1 parent 7663ba8 commit 6cd770d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/mgu/spring/supervision/Supervisor.java
Expand Up @@ -57,10 +57,10 @@ private long getDelay(String key) {
* We will supervise all public method from the com.afklm.tecc.supervision.service
* package.
*/
@Pointcut("execution(* com.afklm.tecc.supervision.service.*.*(..))")
@Pointcut("execution(* mgu.spring.supervision.service.*.*(..))")
private void selectPublicServiceMethods(){}

@Pointcut("execution(* com.afklm.tecc.supervision.service.*.*(..))")
@Pointcut("execution(* mgu.spring.supervision.service.*.*(..))")
private void selectAllServiceMethods(){}

/**
Expand All @@ -70,6 +70,7 @@ private void selectAllServiceMethods(){}
*/
@Before("selectPublicServiceMethods()")
public void loggingServiceCall(JoinPoint joinPoint){
System.err.println("MGU");
History history = new History();
history.setMethodName(joinPoint.getSignature().toShortString());
int updatedRows = repo.incrementInvocation(history.getMethodName());
Expand Down

0 comments on commit 6cd770d

Please sign in to comment.