CommentService와 같은 로직으로 UserService 클래스를 정의하는 코드는 다음과 같다.
@Service
public class UserService {
@Autowired
private CommentRepository commentRepository;
public CommentRepository getCommentRepository() {
return commentRepository;
}
}