Skip to content

Conversation

@yu-so-young2
Copy link
Member

📝 작업 내용

  • 회원에 대해 생성된 알림 일괄 제거 API (개발용)

🔗 참고할만한 자료(선택)

💬 리뷰 요구사항(선택)

  • 개발용이므로 문서를 따로 작성하진 않았습니다..!

@yu-so-young2 yu-so-young2 requested a review from ssosee May 4, 2025 04:20
@yu-so-young2 yu-so-young2 self-assigned this May 4, 2025
@yu-so-young2 yu-so-young2 added the feat 기능 추가 label May 4, 2025
Copy link
Member

@ssosee ssosee left a comment

Choose a reason for hiding this comment

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

짱 고생하셨습니다!

return ResponseEntity.ok(BasicResponse.success());
}

// TODO: 개발용 API -> 추후 제거 필요
Copy link
Member

Choose a reason for hiding this comment

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

@Profile만 설정해주면 좋을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

@Profile이 빈 단위로 적용할 수 있는 설정으로 알고 있어서 따로 붙이진 않았는데, 아니면 아예 컨트롤러를 분리할까요?

Copy link
Member

Choose a reason for hiding this comment

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

오잉 method 단위도 되지 않나요?

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(ProfileCondition.class)
public @interface Profile {

	/**
	 * The set of profiles for which the annotated component should be registered.
	 */
	String[] value();

}
  • ElementType.TYPE → 클래스, 인터페이스, enum, 애노테이션 등 타입 선언에 사용 가능
  • ElementType.METHOD → 메서드에 사용 가능

Copy link
Member Author

@yu-so-young2 yu-so-young2 May 4, 2025

Choose a reason for hiding this comment

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

요게 제가 알기론 @Bean 이 붙은 메서드에만 적용이 가능한 것으로 알아요!! (링크)

Copy link
Member Author

Choose a reason for hiding this comment

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

직접 테스트 해보았을때 dev 로 해놓고 local 로 실행해두 호출이 되네유 ㅜ^ㅜ

Copy link
Member

Choose a reason for hiding this comment

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

오 맞네요! Bean 메소드만 해당되는 군요!
그러면 기존에 있는 TestController 를 활용하면 좋을 것 같아요!


@Operation(summary = "알림 제거", description = "회원에게 생성된 모든 알림을 제거")
@DeleteMapping("/notifications")
@Profile("dev")
Copy link
Member

@ssosee ssosee May 4, 2025

Choose a reason for hiding this comment

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

@Profile("dev") 이거 제거하면 될거 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

옴메 꼼꼼한 확인 감사합니다!

@ssosee ssosee merged commit 3dc93ff into develop May 4, 2025
1 check failed
@yu-so-young2 yu-so-young2 deleted the DP-516 branch May 9, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants