Код: Выделить всё
public interface LeaderboardService {
List getTopScores(Long tournamentId, int limit);
}
< /code>
Для этого я создал аспект: < /p>
@Aspect
public class LeaderBoardServiceMDCAspect {
@Around(value = "execution(* t.s.l.LeaderboardService.getTopScores(..))")
public Object checkMDC(ProceedingJoinPoint pjp) throws Throwable {
return forTournament(pjp);
}
}
Код: Выделить всё
@Aspect
public class LeaderBoardServiceMDCAspect {
@Around(value = "execution(* t.s.l.LeaderboardService.getTopScores(..))", argNames = "tournamentId,limit")
public Object checkMDC(ProceedingJoinPoint pjp, Long tournamentId, int limit) throws Throwable {
return forTournament(pjp);
}
}
Подробнее здесь: https://stackoverflow.com/questions/795 ... -specified