Skip to content

Commit

Permalink
Merge pull request #104 from Recipe-Project/feature/add_aop
Browse files Browse the repository at this point in the history
aop 적용에 따른 파라미터 오류 수정
  • Loading branch information
joona95 authored Aug 10, 2024
2 parents afd41b8 + e859524 commit ff80e7d
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ public Object loginCheck(ProceedingJoinPoint proceedingJoinPoint) throws Throwab

log.info("Login User Id : " + user.getUserId());

Object[] args = new Object[]{user};

System.out.println(Arrays.toString(args));
Object[] args = Arrays.stream(proceedingJoinPoint.getArgs())
.map(arg -> {
if (arg instanceof User) {
return user;
}
return arg;
})
.toArray();

return proceedingJoinPoint.proceed(args);
}
Expand Down

0 comments on commit ff80e7d

Please sign in to comment.