From be4f43515b7239e4b8d9f973faf4166dcaae99fb Mon Sep 17 00:00:00 2001 From: yerimkoko Date: Fri, 5 Jan 2024 16:03:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[TDC-31]=20=EC=9D=B4=EC=83=81=ED=95=9C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=EA=B0=80=20=EB=B0=9C=EC=83=9D=ED=96=88?= =?UTF-8?q?=EC=96=B4=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 10 +++++----- threedollar-application/build.gradle | 2 ++ .../controller/poll/PollController.java | 8 ++++---- .../controller/sticker/StickerController.java | 3 +-- .../service/poll/{service => }/PollService.java | 2 +- .../poll/{service => }/PollServiceHelper.java | 2 +- .../poll/dto/request/PollCreateRequest.java | 4 ++-- .../service/sticker/StickerReactionService.java | 3 +-- .../sticker/request/AddReactionRequest.java | 4 ++-- .../threedollar/service/poll/PollServiceTest.java | 2 -- ...ceTest.java => StickerReactionServiceTest.java} | 2 +- .../common/exception/dto/response/ApiResponse.java | 2 +- threedollar-core/threedollar-domain/build.gradle | 6 +++--- .../java/com/threedollar/StringArrayConverter.java | 5 +++-- .../config/querydsl/QueryDslConfig.java | 7 ++++--- .../java/com/threedollar/domain/BaseEntity.java | 12 ++++++------ .../com/threedollar/domain/options/PollOption.java | 14 +++++++------- .../java/com/threedollar/domain/poll/Poll.java | 12 ++++++------ .../com/threedollar/domain/reaction/Reaction.java | 11 ++++++----- .../com/threedollar/domain/sticker/Sticker.java | 8 ++++---- .../repository/StickerRepositoryCustom.java | 2 +- 21 files changed, 61 insertions(+), 60 deletions(-) rename threedollar-application/src/main/java/com/threedollar/service/poll/{service => }/PollService.java (97%) rename threedollar-application/src/main/java/com/threedollar/service/poll/{service => }/PollServiceHelper.java (94%) rename threedollar-application/src/test/java/com/threedollar/service/sticker/{StickerRetrieveServiceTest.java => StickerReactionServiceTest.java} (98%) diff --git a/build.gradle b/build.gradle index 91edecb..8c6582b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ buildscript { ext { // Spring - springBootVersion = "2.7.12" - springDependencyManagementVersion = "1.1.0" + springBootVersion = "3.1.4" + springDependencyManagementVersion = "1.1.3" // QueryDsl queryDslVersion = "5.0.0" @@ -12,7 +12,7 @@ buildscript { embeddedRedisVersion = "0.7.2" // Swagger - springDocVersion = "1.7.0" + springDocVersion = "2.2.0" } } @@ -40,8 +40,8 @@ subprojects { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } configurations { diff --git a/threedollar-application/build.gradle b/threedollar-application/build.gradle index ceedaaa..14eb198 100644 --- a/threedollar-application/build.gradle +++ b/threedollar-application/build.gradle @@ -29,6 +29,8 @@ dependencies { implementation 'io.springfox:springfox-swagger-ui:3.0.0' implementation("io.springfox:springfox-swagger2:3.0.0") + implementation 'com.google.code.findbugs:jsr305:3.0.2' + tasks.named('test') { useJUnitPlatform() } diff --git a/threedollar-application/src/main/java/com/threedollar/controller/poll/PollController.java b/threedollar-application/src/main/java/com/threedollar/controller/poll/PollController.java index e065901..83fd530 100644 --- a/threedollar-application/src/main/java/com/threedollar/controller/poll/PollController.java +++ b/threedollar-application/src/main/java/com/threedollar/controller/poll/PollController.java @@ -4,8 +4,11 @@ import com.threedollar.common.exception.dto.response.ApiResponse; import com.threedollar.domain.AccountType; import com.threedollar.service.poll.dto.request.PollCreateRequest; -import com.threedollar.service.poll.service.PollService; +import com.threedollar.service.poll.PollService; import io.swagger.v3.oas.annotations.Operation; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -14,9 +17,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; @RestController @RequiredArgsConstructor diff --git a/threedollar-application/src/main/java/com/threedollar/controller/sticker/StickerController.java b/threedollar-application/src/main/java/com/threedollar/controller/sticker/StickerController.java index b1c76f5..87be67c 100644 --- a/threedollar-application/src/main/java/com/threedollar/controller/sticker/StickerController.java +++ b/threedollar-application/src/main/java/com/threedollar/controller/sticker/StickerController.java @@ -7,6 +7,7 @@ import com.threedollar.service.sticker.StickerRetrieveService; import com.threedollar.service.sticker.dto.response.StickerInfoResponse; import io.swagger.v3.oas.annotations.Operation; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -14,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; -import javax.validation.Valid; import java.util.List; @RequiredArgsConstructor @@ -26,7 +26,6 @@ public class StickerController { private final StickerReactionService stickerReactionService; - @Operation(summary = "[스티커] 스티커를 조회합니다", description = "그룹에 해당하는 스티커를 조회합니다") @GetMapping("/v1/sticker-group/{stickerGroup}/stickers") public ApiResponse> getSticker(@PathVariable StickerGroup stickerGroup) { diff --git a/threedollar-application/src/main/java/com/threedollar/service/poll/service/PollService.java b/threedollar-application/src/main/java/com/threedollar/service/poll/PollService.java similarity index 97% rename from threedollar-application/src/main/java/com/threedollar/service/poll/service/PollService.java rename to threedollar-application/src/main/java/com/threedollar/service/poll/PollService.java index be26fa5..444693d 100644 --- a/threedollar-application/src/main/java/com/threedollar/service/poll/service/PollService.java +++ b/threedollar-application/src/main/java/com/threedollar/service/poll/PollService.java @@ -1,4 +1,4 @@ -package com.threedollar.service.poll.service; +package com.threedollar.service.poll; import com.threedollar.domain.AccountType; import com.threedollar.domain.poll.Poll; diff --git a/threedollar-application/src/main/java/com/threedollar/service/poll/service/PollServiceHelper.java b/threedollar-application/src/main/java/com/threedollar/service/poll/PollServiceHelper.java similarity index 94% rename from threedollar-application/src/main/java/com/threedollar/service/poll/service/PollServiceHelper.java rename to threedollar-application/src/main/java/com/threedollar/service/poll/PollServiceHelper.java index 4e09d62..6394af1 100644 --- a/threedollar-application/src/main/java/com/threedollar/service/poll/service/PollServiceHelper.java +++ b/threedollar-application/src/main/java/com/threedollar/service/poll/PollServiceHelper.java @@ -1,4 +1,4 @@ -package com.threedollar.service.poll.service; +package com.threedollar.service.poll; import com.threedollar.common.exception.exception.NotFoundException; import com.threedollar.domain.AccountType; diff --git a/threedollar-application/src/main/java/com/threedollar/service/poll/dto/request/PollCreateRequest.java b/threedollar-application/src/main/java/com/threedollar/service/poll/dto/request/PollCreateRequest.java index 5fc0a45..d0b8373 100644 --- a/threedollar-application/src/main/java/com/threedollar/service/poll/dto/request/PollCreateRequest.java +++ b/threedollar-application/src/main/java/com/threedollar/service/poll/dto/request/PollCreateRequest.java @@ -5,13 +5,13 @@ import com.threedollar.domain.poll.Poll; import com.threedollar.domain.poll.PollCategory; import com.threedollar.service.options.dto.request.PollOptionCreateRequest; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import org.springframework.lang.Nullable; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; diff --git a/threedollar-application/src/main/java/com/threedollar/service/sticker/StickerReactionService.java b/threedollar-application/src/main/java/com/threedollar/service/sticker/StickerReactionService.java index 25dd232..925c19b 100644 --- a/threedollar-application/src/main/java/com/threedollar/service/sticker/StickerReactionService.java +++ b/threedollar-application/src/main/java/com/threedollar/service/sticker/StickerReactionService.java @@ -26,7 +26,6 @@ public void upsertSticker(AddReactionRequest request, StickerGroup stickerGroup) - - } + } diff --git a/threedollar-application/src/main/java/com/threedollar/service/sticker/request/AddReactionRequest.java b/threedollar-application/src/main/java/com/threedollar/service/sticker/request/AddReactionRequest.java index 3208143..7a4dc90 100644 --- a/threedollar-application/src/main/java/com/threedollar/service/sticker/request/AddReactionRequest.java +++ b/threedollar-application/src/main/java/com/threedollar/service/sticker/request/AddReactionRequest.java @@ -2,12 +2,12 @@ import com.threedollar.domain.reaction.Reaction; import com.threedollar.domain.sticker.StickerGroup; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.util.List; @NoArgsConstructor diff --git a/threedollar-application/src/test/java/com/threedollar/service/poll/PollServiceTest.java b/threedollar-application/src/test/java/com/threedollar/service/poll/PollServiceTest.java index 9f25d35..d472afd 100644 --- a/threedollar-application/src/test/java/com/threedollar/service/poll/PollServiceTest.java +++ b/threedollar-application/src/test/java/com/threedollar/service/poll/PollServiceTest.java @@ -6,7 +6,6 @@ import com.threedollar.domain.poll.PollStatus; import com.threedollar.domain.poll.repository.PollRepository; import com.threedollar.service.poll.dto.request.PollCreateRequest; -import com.threedollar.service.poll.service.PollService; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -82,7 +81,6 @@ void clean_up() { assertThat(polls).hasSize(1); assertThat(polls.get(0).getPollStatus()).isEqualTo(PollStatus.DELETED); - } diff --git a/threedollar-application/src/test/java/com/threedollar/service/sticker/StickerRetrieveServiceTest.java b/threedollar-application/src/test/java/com/threedollar/service/sticker/StickerReactionServiceTest.java similarity index 98% rename from threedollar-application/src/test/java/com/threedollar/service/sticker/StickerRetrieveServiceTest.java rename to threedollar-application/src/test/java/com/threedollar/service/sticker/StickerReactionServiceTest.java index 9c622ac..55994c2 100644 --- a/threedollar-application/src/test/java/com/threedollar/service/sticker/StickerRetrieveServiceTest.java +++ b/threedollar-application/src/test/java/com/threedollar/service/sticker/StickerReactionServiceTest.java @@ -15,7 +15,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest -public class StickerRetrieveServiceTest { +public class StickerReactionServiceTest { @Autowired private ReactionRepository reactionRepository; diff --git a/threedollar-core/threedollar-common/src/main/java/com/threedollar/common/exception/dto/response/ApiResponse.java b/threedollar-core/threedollar-common/src/main/java/com/threedollar/common/exception/dto/response/ApiResponse.java index 6e66712..7d5b50a 100644 --- a/threedollar-core/threedollar-common/src/main/java/com/threedollar/common/exception/dto/response/ApiResponse.java +++ b/threedollar-core/threedollar-common/src/main/java/com/threedollar/common/exception/dto/response/ApiResponse.java @@ -1,13 +1,13 @@ package com.threedollar.common.exception.dto.response; import com.threedollar.common.exception.ErrorCode; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; -import javax.validation.constraints.NotNull; @EqualsAndHashCode @ToString diff --git a/threedollar-core/threedollar-domain/build.gradle b/threedollar-core/threedollar-domain/build.gradle index 789a812..6c83c0c 100644 --- a/threedollar-core/threedollar-domain/build.gradle +++ b/threedollar-core/threedollar-domain/build.gradle @@ -20,11 +20,11 @@ dependencies { // QueryDsl - implementation("com.querydsl:querydsl-jpa") - implementation("com.querydsl:querydsl-core") - annotationProcessor("com.querydsl:querydsl-apt:${queryDslVersion}:jpa") + implementation("com.querydsl:querydsl-jpa::jakarta") + annotationProcessor("com.querydsl:querydsl-apt::jakarta") annotationProcessor("jakarta.persistence:jakarta.persistence-api") annotationProcessor("jakarta.annotation:jakarta.annotation-api") + testImplementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' } diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/StringArrayConverter.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/StringArrayConverter.java index c38a488..d7d07a3 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/StringArrayConverter.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/StringArrayConverter.java @@ -1,7 +1,8 @@ package com.threedollar; -import javax.persistence.AttributeConverter; -import javax.persistence.Converter; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Converter; + import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/config/querydsl/QueryDslConfig.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/config/querydsl/QueryDslConfig.java index 2b661d0..54bba83 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/config/querydsl/QueryDslConfig.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/config/querydsl/QueryDslConfig.java @@ -1,11 +1,12 @@ package com.threedollar.config.querydsl; +import com.querydsl.jpa.JPQLTemplates; import com.querydsl.jpa.impl.JPAQueryFactory; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; @Configuration public class QueryDslConfig { @@ -15,7 +16,7 @@ public class QueryDslConfig { @Bean public JPAQueryFactory queryFactory() { - return new JPAQueryFactory(entityManager); + return new JPAQueryFactory(JPQLTemplates.DEFAULT, entityManager); } } diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java index f0022bb..492aa00 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java @@ -1,16 +1,16 @@ package com.threedollar.domain; +import jakarta.persistence.Column; +import jakarta.persistence.EntityListeners; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.MappedSuperclass; import lombok.Getter; import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import javax.persistence.Column; -import javax.persistence.EntityListeners; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; import java.time.LocalDateTime; diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/options/PollOption.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/options/PollOption.java index c29dcc3..9ac7dd8 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/options/PollOption.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/options/PollOption.java @@ -2,17 +2,17 @@ import com.threedollar.domain.BaseEntity; import com.threedollar.domain.poll.Poll; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; @Entity @Getter diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/poll/Poll.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/poll/Poll.java index b51ccad..85e74fb 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/poll/Poll.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/poll/Poll.java @@ -3,16 +3,16 @@ import com.threedollar.domain.AccountType; import com.threedollar.domain.options.PollOption; import com.threedollar.domain.BaseEntity; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.OneToMany; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.OneToMany; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/reaction/Reaction.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/reaction/Reaction.java index dd8548a..dcfca60 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/reaction/Reaction.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/reaction/Reaction.java @@ -3,15 +3,15 @@ import com.threedollar.StringArrayConverter; import com.threedollar.domain.BaseEntity; import com.threedollar.domain.sticker.StickerGroup; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Entity; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Entity; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.util.List; @Entity @@ -51,4 +51,5 @@ public static Reaction newInstance(StickerGroup stickerGroup, List sticker .targetId(targetId) .build(); } + } diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/Sticker.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/Sticker.java index 7dd4720..0316b4c 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/Sticker.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/Sticker.java @@ -2,14 +2,14 @@ import com.threedollar.domain.BaseEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; @Entity @Getter diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/repository/StickerRepositoryCustom.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/repository/StickerRepositoryCustom.java index 3c77c32..b91e321 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/repository/StickerRepositoryCustom.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/sticker/repository/StickerRepositoryCustom.java @@ -2,8 +2,8 @@ import com.threedollar.domain.sticker.Sticker; import com.threedollar.domain.sticker.StickerGroup; +import jakarta.validation.constraints.NotNull; -import javax.validation.constraints.NotNull; import java.util.List; public interface StickerRepositoryCustom { From f7a51a99d605e18d8e26137084c78226aca57f7d Mon Sep 17 00:00:00 2001 From: yerimkoko Date: Fri, 5 Jan 2024 16:20:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[TDC-31]=20swagger=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- threedollar-application/build.gradle | 4 +- .../swagger/SwaggerConfiguration.java | 38 ------------------- .../threedollar-common/build.gradle | 2 +- .../com/threedollar/domain/BaseEntity.java | 2 +- 4 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 threedollar-application/src/main/java/com/threedollar/controller/swagger/SwaggerConfiguration.java diff --git a/threedollar-application/build.gradle b/threedollar-application/build.gradle index 14eb198..50374c7 100644 --- a/threedollar-application/build.gradle +++ b/threedollar-application/build.gradle @@ -25,9 +25,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' // Swagger - implementation 'io.springfox:springfox-boot-starter:3.0.0' - implementation 'io.springfox:springfox-swagger-ui:3.0.0' - implementation("io.springfox:springfox-swagger2:3.0.0") + api("org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}") implementation 'com.google.code.findbugs:jsr305:3.0.2' diff --git a/threedollar-application/src/main/java/com/threedollar/controller/swagger/SwaggerConfiguration.java b/threedollar-application/src/main/java/com/threedollar/controller/swagger/SwaggerConfiguration.java deleted file mode 100644 index cab0ca8..0000000 --- a/threedollar-application/src/main/java/com/threedollar/controller/swagger/SwaggerConfiguration.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.threedollar.controller.swagger; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -@Configuration -@EnableSwagger2 -public class SwaggerConfiguration { - - @Bean - public Docket swaggerAPI() { - - return new Docket(DocumentationType.SWAGGER_2) - .apiInfo(swaggerInfo()) - .select() - .apis(RequestHandlerSelectors.any()) - .paths(PathSelectors.any()) - .build() - .useDefaultResponseMessages(true); - } - - private ApiInfo swaggerInfo() { - return new ApiInfoBuilder() - .title("three-dollars-community") - .version("1.0.0") - .build(); - } - - -} diff --git a/threedollar-core/threedollar-common/build.gradle b/threedollar-core/threedollar-common/build.gradle index 256fe01..1ce7881 100644 --- a/threedollar-core/threedollar-common/build.gradle +++ b/threedollar-core/threedollar-common/build.gradle @@ -8,7 +8,7 @@ jar { dependencies { - // Swagger + } diff --git a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java index 492aa00..9883c11 100644 --- a/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java +++ b/threedollar-core/threedollar-domain/src/main/java/com/threedollar/domain/BaseEntity.java @@ -4,10 +4,10 @@ import jakarta.persistence.EntityListeners; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; import jakarta.persistence.MappedSuperclass; import lombok.Getter; import org.springframework.data.annotation.CreatedDate; -import org.springframework.data.annotation.Id; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener;