Skip to content

Commit

Permalink
Merge pull request #687 from plajko/spring-jpa-aspect-improvements
Browse files Browse the repository at this point in the history
additional advices for JaversSpringDataJpaAuditableRepositoryAspect
  • Loading branch information
bartoszwalacik committed Jul 9, 2018
2 parents ca18b17 + b668c81 commit d5ac085
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,28 @@ public void onDeleteExecuted(JoinPoint pjp) {
onDelete(pjp);
}

@AfterReturning("execution(public * deleteAll(..)) && this(org.springframework.data.repository.CrudRepository)")
public void onDeleteAllExecuted(JoinPoint jp) {
onDelete(jp);
}

@AfterReturning("execution(public * save(..)) && this(org.springframework.data.repository.CrudRepository)")
public void onSaveExecuted(JoinPoint pjp) {
onSave(pjp);
}

@AfterReturning("execution(public * saveAll(..)) && this(org.springframework.data.repository.CrudRepository)")
public void onSaveAllExecuted(JoinPoint jp) {
onSave(jp);
}

@AfterReturning("execution(public * saveAndFlush(..)) && this(org.springframework.data.jpa.repository.JpaRepository)")
public void onSaveAndFlushExecuted(JoinPoint pjp) {
onSave(pjp);
}

@AfterReturning("execution(public * deleteInBatch(..)) && this(org.springframework.data.jpa.repository.JpaRepository)")
public void onDeleteInBatchExecuted(JoinPoint pjp) {
onSave(pjp);
}
}

0 comments on commit d5ac085

Please sign in to comment.