Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #1

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -12,7 +12,7 @@ buildscript {
embeddedRedisVersion = "0.7.2"

// Swagger
springDocVersion = "1.7.0"
springDocVersion = "2.2.0"
}
}

Expand Down Expand Up @@ -40,8 +40,8 @@ subprojects {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

configurations {
Expand Down
6 changes: 3 additions & 3 deletions threedollar-application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ 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'

tasks.named('test') {
useJUnitPlatform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
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;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

@RequiredArgsConstructor
Expand All @@ -26,7 +26,6 @@ public class StickerController {
private final StickerReactionService stickerReactionService;



@Operation(summary = "[스티커] 스티커를 조회합니다", description = "그룹에 해당하는 스티커를 조회합니다")
@GetMapping("/v1/sticker-group/{stickerGroup}/stickers")
public ApiResponse<List<StickerInfoResponse>> getSticker(@PathVariable StickerGroup stickerGroup) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public void upsertSticker(AddReactionRequest request, StickerGroup stickerGroup)





}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -82,7 +81,6 @@ void clean_up() {
assertThat(polls).hasSize(1);
assertThat(polls.get(0).getPollStatus()).isEqualTo(PollStatus.DELETED);


}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import static org.assertj.core.api.Assertions.assertThat;

@SpringBootTest
public class StickerRetrieveServiceTest {
public class StickerReactionServiceTest {

@Autowired
private ReactionRepository reactionRepository;
Expand Down
2 changes: 1 addition & 1 deletion threedollar-core/threedollar-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jar {

dependencies {

// Swagger



}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions threedollar-core/threedollar-domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'


}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -15,7 +16,7 @@ public class QueryDslConfig {

@Bean
public JPAQueryFactory queryFactory() {
return new JPAQueryFactory(entityManager);
return new JPAQueryFactory(JPQLTemplates.DEFAULT, entityManager);
}

}
Original file line number Diff line number Diff line change
@@ -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.Id;
import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import org.springframework.data.annotation.CreatedDate;
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;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -51,4 +51,5 @@ public static Reaction newInstance(StickerGroup stickerGroup, List<Long> sticker
.targetId(targetId)
.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading