diff --git a/src/main/java/io/spring/api/CurrentUserApi.java b/src/main/java/io/spring/api/CurrentUserApi.java index dfa5e6e..5444dc8 100644 --- a/src/main/java/io/spring/api/CurrentUserApi.java +++ b/src/main/java/io/spring/api/CurrentUserApi.java @@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; diff --git a/src/main/java/io/spring/api/exception/ErrorResource.java b/src/main/java/io/spring/api/exception/ErrorResource.java index 84c8256..7ef1ab4 100644 --- a/src/main/java/io/spring/api/exception/ErrorResource.java +++ b/src/main/java/io/spring/api/exception/ErrorResource.java @@ -4,10 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; @JsonSerialize(using = ErrorResourceSerializer.class) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/src/main/java/io/spring/api/exception/InvalidRequestException.java b/src/main/java/io/spring/api/exception/InvalidRequestException.java index a2747c4..fd2c55f 100644 --- a/src/main/java/io/spring/api/exception/InvalidRequestException.java +++ b/src/main/java/io/spring/api/exception/InvalidRequestException.java @@ -1,7 +1,6 @@ package io.spring.api.exception; import com.fasterxml.jackson.annotation.JsonRootName; -import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; @SuppressWarnings("serial") diff --git a/src/main/java/io/spring/api/security/JwtTokenFilter.java b/src/main/java/io/spring/api/security/JwtTokenFilter.java index 335df3d..e29b5fd 100644 --- a/src/main/java/io/spring/api/security/JwtTokenFilter.java +++ b/src/main/java/io/spring/api/security/JwtTokenFilter.java @@ -3,8 +3,6 @@ package io.spring.api.security; import io.spring.application.JwtService; import io.spring.core.user.User; import io.spring.core.user.UserRepository; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContextHolder; diff --git a/src/main/java/io/spring/application/user/UserData.java b/src/main/java/io/spring/application/user/UserData.java index 04db5c8..40e1a5e 100644 --- a/src/main/java/io/spring/application/user/UserData.java +++ b/src/main/java/io/spring/application/user/UserData.java @@ -5,8 +5,6 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import javax.persistence.Entity; -import javax.persistence.Id; @Data @NoArgsConstructor diff --git a/src/main/java/io/spring/core/user/User.java b/src/main/java/io/spring/core/user/User.java index 3060068..bb41f43 100644 --- a/src/main/java/io/spring/core/user/User.java +++ b/src/main/java/io/spring/core/user/User.java @@ -1,6 +1,5 @@ package io.spring.core.user; -import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/io/spring/infrastructure/service/DefaultJwtService.java b/src/main/java/io/spring/infrastructure/service/DefaultJwtService.java index 1e6112b..add8cbd 100644 --- a/src/main/java/io/spring/infrastructure/service/DefaultJwtService.java +++ b/src/main/java/io/spring/infrastructure/service/DefaultJwtService.java @@ -4,13 +4,11 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.jsonwebtoken.SignatureException; import io.spring.application.JwtService; import io.spring.application.user.UserData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; import java.util.Date; import java.util.Optional; diff --git a/src/test/java/io/spring/api/CurrentUserApiTest.java b/src/test/java/io/spring/api/CurrentUserApiTest.java index 66f1d2c..6d94399 100644 --- a/src/test/java/io/spring/api/CurrentUserApiTest.java +++ b/src/test/java/io/spring/api/CurrentUserApiTest.java @@ -1,15 +1,9 @@ package io.spring.api; import io.restassured.RestAssured; -import io.spring.application.JwtService; -import io.spring.application.user.UserData; -import io.spring.application.user.UserReadService; -import io.spring.core.user.User; -import io.spring.core.user.UserRepository; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; diff --git a/src/test/java/io/spring/application/article/ArticleQueryServiceTest.java b/src/test/java/io/spring/application/article/ArticleQueryServiceTest.java index 5181299..5b51079 100644 --- a/src/test/java/io/spring/application/article/ArticleQueryServiceTest.java +++ b/src/test/java/io/spring/application/article/ArticleQueryServiceTest.java @@ -10,7 +10,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mybatis.spring.boot.test.autoconfigure.MybatisTest; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringRunner;