Skip to content

Commit

Permalink
chore: 사용하지 않는 import 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
wonyongChoi05 committed Oct 7, 2023
1 parent 3146f8b commit 1b6076c
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.integrated.techhub.auth.application.client;

import com.integrated.techhub.auth.application.client.dto.response.GithubPrInfoResponse;
import com.integrated.techhub.auth.domain.AccessToken;
import com.integrated.techhub.auth.domain.RefreshToken;
import com.integrated.techhub.auth.domain.repository.AccessTokenRepository;
import com.integrated.techhub.auth.domain.repository.RefreshTokenRepository;
import com.integrated.techhub.auth.application.client.dto.response.GithubPrInfoResponse;
import com.integrated.techhub.auth.exception.GithubRefreshTokenNotFoundException;
import com.integrated.techhub.member.domain.Member;
import com.integrated.techhub.member.domain.repository.MemberRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.integrated.techhub.auth.application.client;

import com.integrated.techhub.auth.application.client.dto.request.GithubTokenRequest;
import com.integrated.techhub.auth.application.client.dto.request.GithubTokenRefreshRequest;
import com.integrated.techhub.auth.application.client.dto.request.GithubTokenRequest;
import com.integrated.techhub.auth.application.client.dto.response.GithubPrInfoResponse;
import com.integrated.techhub.auth.application.client.dto.response.OAuthGithubUsernameResponse;
import com.integrated.techhub.auth.application.client.dto.response.OAuthTokensResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

Expand Down Expand Up @@ -55,7 +54,6 @@ public OAuthGithubUsernameResponse getGithubUsername(final String accessToken) {
final HttpHeaders headers = new HttpHeaders();
headers.setBearerAuth(accessToken);
final HttpEntity<Void> request = new HttpEntity<>(headers);

return restTemplate.exchange(
getMemberInfoUrl(),
GET,
Expand All @@ -82,7 +80,12 @@ private List<GithubPrInfoResponse> fetchPrs(final String accessToken, final Stri
final HttpHeaders headers = new HttpHeaders();
headers.setBearerAuth(accessToken);
final HttpEntity<Void> request = new HttpEntity<>(headers);
return restTemplate.exchange(url, HttpMethod.GET, request, new ParameterizedTypeReference<List<GithubPrInfoResponse>>() {}).getBody();
return restTemplate.exchange(
url,
GET,
request,
new ParameterizedTypeReference<List<GithubPrInfoResponse>>() {}
).getBody();
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.integrated.techhub.auth.application.client.dto.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.integrated.techhub.pr.domain.PullRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package com.integrated.techhub.auth.application.client.dto.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.integrated.techhub.auth.domain.AccessToken;
import com.integrated.techhub.auth.domain.RefreshToken;

import java.io.Serializable;

import static com.fasterxml.jackson.databind.PropertyNamingStrategies.*;
import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;

@JsonNaming(SnakeCaseStrategy.class)
public record OAuthTokensResponse (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.integrated.techhub.auth.application.AuthService;
import com.integrated.techhub.auth.application.client.GithubRestTemplateClient;
import com.integrated.techhub.auth.application.client.dto.response.OAuthTokensResponse;
import com.integrated.techhub.auth.dto.request.LoginRequest;
import com.integrated.techhub.auth.dto.request.SignUpRequest;
import com.integrated.techhub.auth.application.client.dto.response.OAuthTokensResponse;
import com.integrated.techhub.auth.dto.response.TokenResponse;
import com.integrated.techhub.common.auth.annotation.Auth;
import com.integrated.techhub.common.auth.resolver.AuthProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.integrated.techhub.common.auth.jwt.JwtProvider;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.support.WebDataBinderFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
import redis.embedded.RedisServer;

Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/integrated/techhub/mission/domain/Mission.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package com.integrated.techhub.mission.domain;

import jakarta.persistence.*;
import lombok.*;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import static jakarta.persistence.GenerationType.IDENTITY;
import static lombok.AccessLevel.PROTECTED;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.integrated.techhub.mission.domain;

import com.integrated.techhub.mission.domain.type.StepStatus;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import static jakarta.persistence.EnumType.STRING;
import static jakarta.persistence.FetchType.LAZY;
import static jakarta.persistence.GenerationType.*;
import static jakarta.persistence.GenerationType.IDENTITY;
import static lombok.AccessLevel.PROTECTED;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.integrated.techhub.auth.application.client.dto.response.GithubPrInfoResponse;
import com.integrated.techhub.mission.domain.Step;
import com.integrated.techhub.mission.domain.exception.StepNotFoundException;
import com.integrated.techhub.mission.domain.repository.StepRepository;
import com.integrated.techhub.pr.domain.PullRequest;
import com.integrated.techhub.pr.domain.repository.PullRequestRepository;
import com.integrated.techhub.mission.domain.exception.StepNotFoundException;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import com.integrated.techhub.pr.domain.PullRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Optional;

public interface PullRequestRepository extends JpaRepository<PullRequest, Long> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.integrated.techhub.pr.infra.persist;

import com.integrated.techhub.pr.domain.PullRequest;
import com.integrated.techhub.pr.infra.dto.PullRequestQueryResponse;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.integrated.techhub.pr.infra.persist;

import com.integrated.techhub.pr.domain.PullRequest;
import com.integrated.techhub.pr.infra.dto.PullRequestQueryResponse;
import com.integrated.techhub.pr.infra.dto.QPullRequestQueryResponse;
import com.querydsl.jpa.impl.JPAQueryFactory;
Expand All @@ -10,7 +9,7 @@
import java.util.List;

import static com.integrated.techhub.mission.domain.QMission.mission;
import static com.integrated.techhub.mission.domain.QStep.*;
import static com.integrated.techhub.mission.domain.QStep.step;
import static com.integrated.techhub.pr.domain.QPullRequest.pullRequest;

@Repository
Expand Down

0 comments on commit 1b6076c

Please sign in to comment.