Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] ControllerLoggingAspect 리팩토링 #395

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leegwichan
Copy link
Contributor

@leegwichan leegwichan commented Nov 7, 2024

Issue Number

Closed #393

As-Is

  • 현재 클래스의 Prefix를 통해서 메서드 대상을 관리 (ex. execution(* ddangkong.controller..*Controller.*(..)))
    • 네이밍 컨밴션을 모두 인지하고 있어야 한다는 인지 비용 발생
  • 클래스의 어노테이션(@RestController)을 통해 관리하도록 수정
    • 컨트롤러에 필수적으로 사용되므로 따로 인지비용 없이 바로 사용될 수 있다.

To-Be

  • @Pointcut 내부 내용 수정

Check List

  • 테스트가 전부 통과되었나요?
  • 모든 commit이 push 되었나요?
  • merge할 branch를 확인했나요?
  • Assignee를 지정했나요?
  • Label을 지정했나요?

Test Screenshot

image
image

(Optional) Additional Description

@leegwichan leegwichan added ♻️ refactor 리팩토링 🍃 BE back end labels Nov 7, 2024
@leegwichan leegwichan self-assigned this Nov 7, 2024
@leegwichan leegwichan changed the title feat: 클래스 패키지 네이밍 대신 어노테이션을 통해 메서드를 선별하도록 수정 #393 [REFACTOR] ControllerLoggingAspect 리팩토링 Nov 7, 2024
Copy link
Member

@PgmJun PgmJun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전에 대화했던 내용이군요~ 굿굿입니다~~

@@ -18,7 +18,7 @@
abstract class ControllerLoggingAspect {
private static final String TRACE_ID_KEY = "traceId";

@Pointcut("execution(* ddangkong.controller..*Controller.*(..))")
@Pointcut("@within(org.springframework.web.bind.annotation.RestController)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

within으로 잘 처리해주셨네요~ 굿굿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍃 BE back end ♻️ refactor 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] ControllerLoggingAspect 리팩토링
2 participants