다음 예제에서 EmailCommentNotificationProxy 클래스의 변경 사항을 볼 수 있다.
예제 4-9 EmailCommentNotificationProxy 클래스에 @Component 추가하기
@Component
public class EmailCommentNotificationProxy
implements CommentNotificationProxy {
@Override
public void sendComment(Comment comment) {
System.out.println(
"Sending notification for comment: " + comment.getText());
}
}