diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.gitignore" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.gitignore"
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.gitignore"
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.name" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.name"
new file mode 100644
index 0000000..af06312
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/.name"
@@ -0,0 +1 @@
+workbook
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/compiler.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/compiler.xml"
new file mode 100644
index 0000000..0efb954
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/compiler.xml"
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/dataSources.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/dataSources.xml"
new file mode 100644
index 0000000..1cf0bde
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/dataSources.xml"
@@ -0,0 +1,17 @@
+
+
+
+
+ mysql.8
+ true
+ com.mysql.cj.jdbc.Driver
+ jdbc:mysql://localhost:3306
+
+
+
+
+
+ $ProjectFileDir$
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/gradle.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/gradle.xml"
new file mode 100644
index 0000000..446c193
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/gradle.xml"
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/jarRepositories.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/jarRepositories.xml"
new file mode 100644
index 0000000..fdc392f
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/jarRepositories.xml"
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/misc.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/misc.xml"
new file mode 100644
index 0000000..32e588a
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/misc.xml"
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/uiDesigner.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/uiDesigner.xml"
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/uiDesigner.xml"
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/vcs.xml" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/vcs.xml"
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/.idea/vcs.xml"
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/build.gradle" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/build.gradle"
index 1ec9f14..4e2b9dd 100644
--- "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/build.gradle"
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/build.gradle"
@@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.4.5'
id 'io.spring.dependency-management' version '1.1.7'
+ id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
}
group = 'org.umc'
@@ -24,16 +25,52 @@ repositories {
}
dependencies {
- implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
+ // default (web, mysql, jpa, devtool, lombok, junit)
implementation 'org.springframework.boot:spring-boot-starter-web'
- compileOnly 'org.projectlombok:lombok'
- developmentOnly 'org.springframework.boot:spring-boot-devtools'
+ implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.mysql:mysql-connector-j'
+ compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
+ developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
+ // queryDSL
+ implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
+ annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
+ annotationProcessor "jakarta.annotation:jakarta.annotation-api"
+ annotationProcessor "jakarta.persistence:jakarta.persistence-api"
+ // jackson
+// implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
+// implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.3'
+// implementation 'com.fasterxml.jackson.core:jackson-core:2.13.3'
+ // validation
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ // slack webhook
+ implementation("com.slack.api:slack-api-client:1.45.3")
}
tasks.named('test') {
useJUnitPlatform()
}
+
+// Querydsl 설정부
+def generated = 'src/main/generated'
+
+querydsl {
+ jpa = true
+ querydslSourcesDir = generated
+}
+sourceSets {
+ main.java.srcDir generated
+}
+
+compileQuerydsl{
+ options.annotationProcessorPath = configurations.querydsl
+}
+
+configurations {
+ compileOnly {
+ extendsFrom annotationProcessor
+ }
+ querydsl.extendsFrom compileClasspath
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QFoodCategory.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QFoodCategory.java"
new file mode 100644
index 0000000..5767b31
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QFoodCategory.java"
@@ -0,0 +1,52 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QFoodCategory is a Querydsl query type for FoodCategory
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QFoodCategory extends EntityPathBase {
+
+ private static final long serialVersionUID = -1550649825L;
+
+ public static final QFoodCategory foodCategory = new QFoodCategory("foodCategory");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final StringPath name = createString("name");
+
+ public final ListPath preferences = this.createList("preferences", org.umc.workbook.domain.mapping.MemberPrefer.class, org.umc.workbook.domain.mapping.QMemberPrefer.class, PathInits.DIRECT2);
+
+ public final ListPath storeTypes = this.createList("storeTypes", StoreType.class, QStoreType.class, PathInits.DIRECT2);
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QFoodCategory(String variable) {
+ super(FoodCategory.class, forVariable(variable));
+ }
+
+ public QFoodCategory(Path extends FoodCategory> path) {
+ super(path.getType(), path.getMetadata());
+ }
+
+ public QFoodCategory(PathMetadata metadata) {
+ super(FoodCategory.class, metadata);
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMember.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMember.java"
new file mode 100644
index 0000000..16da63b
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMember.java"
@@ -0,0 +1,74 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QMember is a Querydsl query type for Member
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QMember extends EntityPathBase {
+
+ private static final long serialVersionUID = 106563453L;
+
+ public static final QMember member = new QMember("member1");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final StringPath address = createString("address");
+
+ public final ListPath agreements = this.createList("agreements", org.umc.workbook.domain.mapping.MemberAgree.class, org.umc.workbook.domain.mapping.QMemberAgree.class, PathInits.DIRECT2);
+
+ public final DatePath birthDate = createDate("birthDate", java.time.LocalDate.class);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final StringPath email = createString("email");
+
+ public final EnumPath gender = createEnum("gender", org.umc.workbook.domain.enums.Gender.class);
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final DateTimePath inactiveDate = createDateTime("inactiveDate", java.time.LocalDateTime.class);
+
+ public final ListPath missions = this.createList("missions", org.umc.workbook.domain.mapping.MemberMission.class, org.umc.workbook.domain.mapping.QMemberMission.class, PathInits.DIRECT2);
+
+ public final StringPath name = createString("name");
+
+ public final NumberPath point = createNumber("point", Integer.class);
+
+ public final ListPath preferences = this.createList("preferences", org.umc.workbook.domain.mapping.MemberPrefer.class, org.umc.workbook.domain.mapping.QMemberPrefer.class, PathInits.DIRECT2);
+
+ public final ListPath reviews = this.createList("reviews", Review.class, QReview.class, PathInits.DIRECT2);
+
+ public final EnumPath socialType = createEnum("socialType", org.umc.workbook.domain.enums.SocialType.class);
+
+ public final StringPath specAddress = createString("specAddress");
+
+ public final EnumPath status = createEnum("status", org.umc.workbook.domain.enums.MemberStatus.class);
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QMember(String variable) {
+ super(Member.class, forVariable(variable));
+ }
+
+ public QMember(Path extends Member> path) {
+ super(path.getType(), path.getMetadata());
+ }
+
+ public QMember(PathMetadata metadata) {
+ super(Member.class, metadata);
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMission.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMission.java"
new file mode 100644
index 0000000..0c24211
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QMission.java"
@@ -0,0 +1,67 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QMission is a Querydsl query type for Mission
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QMission extends EntityPathBase {
+
+ private static final long serialVersionUID = -870932215L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QMission mission = new QMission("mission");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final DateTimePath deadline = createDateTime("deadline", java.time.LocalDateTime.class);
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final ListPath memberMissions = this.createList("memberMissions", org.umc.workbook.domain.mapping.MemberMission.class, org.umc.workbook.domain.mapping.QMemberMission.class, PathInits.DIRECT2);
+
+ public final StringPath missionSpec = createString("missionSpec");
+
+ public final NumberPath reward = createNumber("reward", Integer.class);
+
+ public final QStore store;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QMission(String variable) {
+ this(Mission.class, forVariable(variable), INITS);
+ }
+
+ public QMission(Path extends Mission> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QMission(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QMission(PathMetadata metadata, PathInits inits) {
+ this(Mission.class, metadata, inits);
+ }
+
+ public QMission(Class extends Mission> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.store = inits.isInitialized("store") ? new QStore(forProperty("store"), inits.get("store")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QRegion.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QRegion.java"
new file mode 100644
index 0000000..142d178
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QRegion.java"
@@ -0,0 +1,39 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+
+
+/**
+ * QRegion is a Querydsl query type for Region
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QRegion extends EntityPathBase {
+
+ private static final long serialVersionUID = 249537495L;
+
+ public static final QRegion region = new QRegion("region");
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final StringPath name = createString("name");
+
+ public QRegion(String variable) {
+ super(Region.class, forVariable(variable));
+ }
+
+ public QRegion(Path extends Region> path) {
+ super(path.getType(), path.getMetadata());
+ }
+
+ public QRegion(PathMetadata metadata) {
+ super(Region.class, metadata);
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReview.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReview.java"
new file mode 100644
index 0000000..dd96e88
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReview.java"
@@ -0,0 +1,68 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QReview is a Querydsl query type for Review
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QReview extends EntityPathBase {
+
+ private static final long serialVersionUID = 249984059L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QReview review = new QReview("review");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final StringPath body = createString("body");
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final ListPath images = this.createList("images", ReviewImage.class, QReviewImage.class, PathInits.DIRECT2);
+
+ public final QMember member;
+
+ public final NumberPath score = createNumber("score", Float.class);
+
+ public final QStore store;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QReview(String variable) {
+ this(Review.class, forVariable(variable), INITS);
+ }
+
+ public QReview(Path extends Review> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QReview(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QReview(PathMetadata metadata, PathInits inits) {
+ this(Review.class, metadata, inits);
+ }
+
+ public QReview(Class extends Review> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.member = inits.isInitialized("member") ? new QMember(forProperty("member")) : null;
+ this.store = inits.isInitialized("store") ? new QStore(forProperty("store"), inits.get("store")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReviewImage.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReviewImage.java"
new file mode 100644
index 0000000..5abf2a6
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QReviewImage.java"
@@ -0,0 +1,61 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QReviewImage is a Querydsl query type for ReviewImage
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QReviewImage extends EntityPathBase {
+
+ private static final long serialVersionUID = -1410879008L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QReviewImage reviewImage = new QReviewImage("reviewImage");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final StringPath imageUrl = createString("imageUrl");
+
+ public final QReview review;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QReviewImage(String variable) {
+ this(ReviewImage.class, forVariable(variable), INITS);
+ }
+
+ public QReviewImage(Path extends ReviewImage> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QReviewImage(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QReviewImage(PathMetadata metadata, PathInits inits) {
+ this(ReviewImage.class, metadata, inits);
+ }
+
+ public QReviewImage(Class extends ReviewImage> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.review = inits.isInitialized("review") ? new QReview(forProperty("review"), inits.get("review")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStore.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStore.java"
new file mode 100644
index 0000000..8da64be
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStore.java"
@@ -0,0 +1,78 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QStore is a Querydsl query type for Store
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QStore extends EntityPathBase {
+
+ private static final long serialVersionUID = 2087637918L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QStore store = new QStore("store");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final StringPath address = createString("address");
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath endTime = createNumber("endTime", Integer.class);
+
+ public final ListPath iamges = this.createList("iamges", Storeimage.class, QStoreimage.class, PathInits.DIRECT2);
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final ListPath missions = this.createList("missions", Mission.class, QMission.class, PathInits.DIRECT2);
+
+ public final StringPath name = createString("name");
+
+ public final QRegion region;
+
+ public final ListPath reviews = this.createList("reviews", Review.class, QReview.class, PathInits.DIRECT2);
+
+ public final NumberPath score = createNumber("score", Float.class);
+
+ public final NumberPath startTime = createNumber("startTime", Integer.class);
+
+ public final QStoreType type;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QStore(String variable) {
+ this(Store.class, forVariable(variable), INITS);
+ }
+
+ public QStore(Path extends Store> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QStore(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QStore(PathMetadata metadata, PathInits inits) {
+ this(Store.class, metadata, inits);
+ }
+
+ public QStore(Class extends Store> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.region = inits.isInitialized("region") ? new QRegion(forProperty("region")) : null;
+ this.type = inits.isInitialized("type") ? new QStoreType(forProperty("type"), inits.get("type")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreType.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreType.java"
new file mode 100644
index 0000000..95140ff
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreType.java"
@@ -0,0 +1,63 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QStoreType is a Querydsl query type for StoreType
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QStoreType extends EntityPathBase {
+
+ private static final long serialVersionUID = 1000855544L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QStoreType storeType = new QStoreType("storeType");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final QFoodCategory category;
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final ListPath stores = this.createList("stores", Store.class, QStore.class, PathInits.DIRECT2);
+
+ public final StringPath type = createString("type");
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QStoreType(String variable) {
+ this(StoreType.class, forVariable(variable), INITS);
+ }
+
+ public QStoreType(Path extends StoreType> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QStoreType(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QStoreType(PathMetadata metadata, PathInits inits) {
+ this(StoreType.class, metadata, inits);
+ }
+
+ public QStoreType(Class extends StoreType> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.category = inits.isInitialized("category") ? new QFoodCategory(forProperty("category")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreimage.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreimage.java"
new file mode 100644
index 0000000..f1e9560
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QStoreimage.java"
@@ -0,0 +1,61 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QStoreimage is a Querydsl query type for Storeimage
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QStoreimage extends EntityPathBase {
+
+ private static final long serialVersionUID = 980772989L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QStoreimage storeimage = new QStoreimage("storeimage");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final StringPath imageUrl = createString("imageUrl");
+
+ public final QStore store;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QStoreimage(String variable) {
+ this(Storeimage.class, forVariable(variable), INITS);
+ }
+
+ public QStoreimage(Path extends Storeimage> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QStoreimage(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QStoreimage(PathMetadata metadata, PathInits inits) {
+ this(Storeimage.class, metadata, inits);
+ }
+
+ public QStoreimage(Class extends Storeimage> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.store = inits.isInitialized("store") ? new QStore(forProperty("store"), inits.get("store")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QTerms.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QTerms.java"
new file mode 100644
index 0000000..9ccd815
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/QTerms.java"
@@ -0,0 +1,54 @@
+package org.umc.workbook.domain;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QTerms is a Querydsl query type for Terms
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QTerms extends EntityPathBase {
+
+ private static final long serialVersionUID = 2088117316L;
+
+ public static final QTerms terms = new QTerms("terms");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final ListPath agreements = this.createList("agreements", org.umc.workbook.domain.mapping.MemberAgree.class, org.umc.workbook.domain.mapping.QMemberAgree.class, PathInits.DIRECT2);
+
+ public final StringPath body = createString("body");
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final BooleanPath optional = createBoolean("optional");
+
+ public final StringPath title = createString("title");
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QTerms(String variable) {
+ super(Terms.class, forVariable(variable));
+ }
+
+ public QTerms(Path extends Terms> path) {
+ super(path.getType(), path.getMetadata());
+ }
+
+ public QTerms(PathMetadata metadata) {
+ super(Terms.class, metadata);
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/common/QBaseEntity.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/common/QBaseEntity.java"
new file mode 100644
index 0000000..9740fc8
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/common/QBaseEntity.java"
@@ -0,0 +1,39 @@
+package org.umc.workbook.domain.common;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+
+
+/**
+ * QBaseEntity is a Querydsl query type for BaseEntity
+ */
+@Generated("com.querydsl.codegen.DefaultSupertypeSerializer")
+public class QBaseEntity extends EntityPathBase {
+
+ private static final long serialVersionUID = -1899422348L;
+
+ public static final QBaseEntity baseEntity = new QBaseEntity("baseEntity");
+
+ public final DateTimePath createdAt = createDateTime("createdAt", java.time.LocalDateTime.class);
+
+ public final DateTimePath updatedAt = createDateTime("updatedAt", java.time.LocalDateTime.class);
+
+ public QBaseEntity(String variable) {
+ super(BaseEntity.class, forVariable(variable));
+ }
+
+ public QBaseEntity(Path extends BaseEntity> path) {
+ super(path.getType(), path.getMetadata());
+ }
+
+ public QBaseEntity(PathMetadata metadata) {
+ super(BaseEntity.class, metadata);
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberAgree.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberAgree.java"
new file mode 100644
index 0000000..78333d5
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberAgree.java"
@@ -0,0 +1,64 @@
+package org.umc.workbook.domain.mapping;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QMemberAgree is a Querydsl query type for MemberAgree
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QMemberAgree extends EntityPathBase {
+
+ private static final long serialVersionUID = -846774513L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QMemberAgree memberAgree = new QMemberAgree("memberAgree");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final org.umc.workbook.domain.QMember member;
+
+ public final EnumPath status = createEnum("status", org.umc.workbook.domain.enums.AgreeStatus.class);
+
+ public final org.umc.workbook.domain.QTerms terms;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QMemberAgree(String variable) {
+ this(MemberAgree.class, forVariable(variable), INITS);
+ }
+
+ public QMemberAgree(Path extends MemberAgree> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QMemberAgree(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QMemberAgree(PathMetadata metadata, PathInits inits) {
+ this(MemberAgree.class, metadata, inits);
+ }
+
+ public QMemberAgree(Class extends MemberAgree> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.member = inits.isInitialized("member") ? new org.umc.workbook.domain.QMember(forProperty("member")) : null;
+ this.terms = inits.isInitialized("terms") ? new org.umc.workbook.domain.QTerms(forProperty("terms")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberMission.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberMission.java"
new file mode 100644
index 0000000..f300ab1
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberMission.java"
@@ -0,0 +1,66 @@
+package org.umc.workbook.domain.mapping;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QMemberMission is a Querydsl query type for MemberMission
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QMemberMission extends EntityPathBase {
+
+ private static final long serialVersionUID = 117227823L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QMemberMission memberMission = new QMemberMission("memberMission");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final org.umc.workbook.domain.QMember member;
+
+ public final org.umc.workbook.domain.QMission mission;
+
+ public final StringPath missionKey = createString("missionKey");
+
+ public final EnumPath status = createEnum("status", org.umc.workbook.domain.enums.MissionStatus.class);
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QMemberMission(String variable) {
+ this(MemberMission.class, forVariable(variable), INITS);
+ }
+
+ public QMemberMission(Path extends MemberMission> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QMemberMission(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QMemberMission(PathMetadata metadata, PathInits inits) {
+ this(MemberMission.class, metadata, inits);
+ }
+
+ public QMemberMission(Class extends MemberMission> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.member = inits.isInitialized("member") ? new org.umc.workbook.domain.QMember(forProperty("member")) : null;
+ this.mission = inits.isInitialized("mission") ? new org.umc.workbook.domain.QMission(forProperty("mission"), inits.get("mission")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberPrefer.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberPrefer.java"
new file mode 100644
index 0000000..6500fc6
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/generated/org/umc/workbook/domain/mapping/QMemberPrefer.java"
@@ -0,0 +1,62 @@
+package org.umc.workbook.domain.mapping;
+
+import static com.querydsl.core.types.PathMetadataFactory.*;
+
+import com.querydsl.core.types.dsl.*;
+
+import com.querydsl.core.types.PathMetadata;
+import javax.annotation.processing.Generated;
+import com.querydsl.core.types.Path;
+import com.querydsl.core.types.dsl.PathInits;
+
+
+/**
+ * QMemberPrefer is a Querydsl query type for MemberPrefer
+ */
+@Generated("com.querydsl.codegen.DefaultEntitySerializer")
+public class QMemberPrefer extends EntityPathBase {
+
+ private static final long serialVersionUID = -40996339L;
+
+ private static final PathInits INITS = PathInits.DIRECT2;
+
+ public static final QMemberPrefer memberPrefer = new QMemberPrefer("memberPrefer");
+
+ public final org.umc.workbook.domain.common.QBaseEntity _super = new org.umc.workbook.domain.common.QBaseEntity(this);
+
+ public final org.umc.workbook.domain.QFoodCategory category;
+
+ //inherited
+ public final DateTimePath createdAt = _super.createdAt;
+
+ public final NumberPath id = createNumber("id", Long.class);
+
+ public final org.umc.workbook.domain.QMember member;
+
+ //inherited
+ public final DateTimePath updatedAt = _super.updatedAt;
+
+ public QMemberPrefer(String variable) {
+ this(MemberPrefer.class, forVariable(variable), INITS);
+ }
+
+ public QMemberPrefer(Path extends MemberPrefer> path) {
+ this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
+ }
+
+ public QMemberPrefer(PathMetadata metadata) {
+ this(metadata, PathInits.getFor(metadata, INITS));
+ }
+
+ public QMemberPrefer(PathMetadata metadata, PathInits inits) {
+ this(MemberPrefer.class, metadata, inits);
+ }
+
+ public QMemberPrefer(Class extends MemberPrefer> type, PathMetadata metadata, PathInits inits) {
+ super(type, metadata, inits);
+ this.category = inits.isInitialized("category") ? new org.umc.workbook.domain.QFoodCategory(forProperty("category")) : null;
+ this.member = inits.isInitialized("member") ? new org.umc.workbook.domain.QMember(forProperty("member")) : null;
+ }
+
+}
+
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/WorkbookApplication.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/WorkbookApplication.java"
index 106a4b7..f72ba61 100644
--- "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/WorkbookApplication.java"
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/WorkbookApplication.java"
@@ -1,8 +1,15 @@
package org.umc.workbook;
+import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+import org.umc.workbook.service.MemberService.MemberService;
+import org.umc.workbook.service.MissionService.MissionService;
+
+import java.time.LocalDateTime;
@EnableJpaAuditing
@SpringBootApplication
@@ -11,5 +18,47 @@ public class WorkbookApplication {
public static void main(String[] args) {
SpringApplication.run(WorkbookApplication.class, args);
}
-
+//
+// @Bean
+// public CommandLineRunner run(ApplicationContext context) {
+// return args -> {
+//// StoreQueryService storeService = context.getBean(StoreQueryService.class);
+////
+//// // 파라미터 값 설정
+//// String name = "요아정";
+//// Float score = 4.0f;
+////
+//// // 쿼리 메서드 호출 및 쿼리 문자열과 파라미터 출력
+//// System.out.println("Executing findStoresByNameAndScore with parameters:");
+//// System.out.println("Name: " + name);
+//// System.out.println("Score: " + score);
+////
+//// storeService.findStoresByNameAndScore(name, score)
+//// .forEach(System.out::println);
+//
+// // 진행중 미션 쿼리 테스트
+// System.out.println("진행 중 미션 쿼리 테스트");
+// MissionService missionService = context.getBean(MissionService.class);
+//
+// Long memberId = 1L;
+// Integer lastReward = 100;
+// LocalDateTime lastCreatedAt = LocalDateTime.now();
+// Long lastMissionId = 1L;
+//
+// missionService.findMissionByMember(memberId, lastReward, lastCreatedAt, lastMissionId);
+//
+// // 홈 화면
+// System.out.println("홈 화면 테스트");
+// Long lastMissionId2 = 1L;
+// Long memberId2 = 1L;
+// missionService.findHomeMission(lastMissionId2, memberId2);
+//
+// // 마이페이지
+// System.out.println("마이페이지 조회 테스트");
+// Long memberId3 = 1L;
+// MemberService memberService = context.getBean(MemberService.class);
+// memberService.findById(memberId3);
+// };
+// }
+//
}
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ApiResponse.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ApiResponse.java"
new file mode 100644
index 0000000..13e260c
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ApiResponse.java"
@@ -0,0 +1,38 @@
+package org.umc.workbook.apiPayload;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.umc.workbook.apiPayload.code.SuccessStatus;
+
+@Getter
+@AllArgsConstructor
+@JsonPropertyOrder({"isSuccess", "code", "message", "result"})
+public class ApiResponse {
+
+ @JsonProperty("isSuccess")
+ private final Boolean isSuccess;
+ private final String code;
+ private final String message;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ private T result;
+
+
+ // 성공한 경우 응답 생성
+
+ public static ApiResponse onSuccess(T result){
+ return new ApiResponse<>(true, SuccessStatus._OK.getCode() , SuccessStatus._OK.getMessage(), result);
+ }
+
+ public static ApiResponse of(BaseCode code, T result){
+ return new ApiResponse<>(true, code.getReasonHttpStatus().getCode() , code.getReasonHttpStatus().getMessage(), result);
+ }
+
+
+ // 실패한 경우 응답 생성
+ public static ApiResponse onFailure(String code, String message, T data){
+ return new ApiResponse<>(false, code, message, data);
+ }
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseCode.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseCode.java"
new file mode 100644
index 0000000..a6be556
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseCode.java"
@@ -0,0 +1,7 @@
+package org.umc.workbook.apiPayload;
+
+public interface BaseCode {
+ ReasonDto getReason();
+
+ ReasonDto getReasonHttpStatus();
+}
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseErrorCode.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseErrorCode.java"
new file mode 100644
index 0000000..a8600d4
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/BaseErrorCode.java"
@@ -0,0 +1,7 @@
+package org.umc.workbook.apiPayload;
+
+public interface BaseErrorCode {
+ ErrorReasonDto getReason();
+
+ ErrorReasonDto getReasonHttpStatus();
+}
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ErrorReasonDto.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ErrorReasonDto.java"
new file mode 100644
index 0000000..c8a8810
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ErrorReasonDto.java"
@@ -0,0 +1,18 @@
+package org.umc.workbook.apiPayload;
+
+import lombok.Builder;
+import lombok.Getter;
+import org.springframework.http.HttpStatus;
+
+@Getter
+@Builder
+public class ErrorReasonDto {
+
+ private HttpStatus httpStatus;
+
+ private final boolean isSuccess;
+ private final String code;
+ private final String message;
+
+ public boolean getIsSuccess(){return isSuccess;}
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ReasonDto.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ReasonDto.java"
new file mode 100644
index 0000000..5e62650
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/ReasonDto.java"
@@ -0,0 +1,18 @@
+package org.umc.workbook.apiPayload;
+
+import lombok.Builder;
+import lombok.Getter;
+import org.springframework.http.HttpStatus;
+
+@Getter
+@Builder
+public class ReasonDto {
+
+ private HttpStatus httpStatus;
+
+ private final boolean isSuccess;
+ private final String code;
+ private final String message;
+
+ public boolean getIsSuccess(){return isSuccess;}
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/ErrorStatus.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/ErrorStatus.java"
new file mode 100644
index 0000000..512bcf4
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/ErrorStatus.java"
@@ -0,0 +1,55 @@
+package org.umc.workbook.apiPayload.code;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.springframework.http.HttpStatus;
+import org.umc.workbook.apiPayload.BaseErrorCode;
+import org.umc.workbook.apiPayload.ErrorReasonDto;
+
+@Getter
+@AllArgsConstructor
+public enum ErrorStatus implements BaseErrorCode {
+
+ // 가장 일반적인 응답
+ _INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "COMMON500", "서버 에러, 관리자에게 문의 바랍니다."),
+ _BAD_REQUEST(HttpStatus.BAD_REQUEST,"COMMON400","잘못된 요청입니다."),
+ _UNAUTHORIZED(HttpStatus.UNAUTHORIZED,"COMMON401","인증이 필요합니다."),
+ _FORBIDDEN(HttpStatus.FORBIDDEN, "COMMON403", "금지된 요청입니다."),
+
+
+ // 멤버 관려 에러
+ MEMBER_NOT_FOUND(HttpStatus.BAD_REQUEST, "MEMBER4001", "사용자가 없습니다."),
+ NICKNAME_NOT_EXIST(HttpStatus.BAD_REQUEST, "MEMBER4002", "닉네임은 필수 입니다."),
+
+ // 예시,,,
+ ARTICLE_NOT_FOUND(HttpStatus.NOT_FOUND, "ARTICLE4001", "게시글이 없습니다."),
+
+ // TODO 워크북 test
+ // For test
+ TEMP_EXCEPTION(HttpStatus.BAD_REQUEST, "TEMP4001", "이거는 테스트");
+
+
+ private final HttpStatus httpStatus;
+ private final String code;
+ private final String message;
+
+ @Override
+ public ErrorReasonDto getReason() {
+ return ErrorReasonDto.builder()
+ .message(message)
+ .code(code)
+ .isSuccess(false)
+ .build();
+ }
+
+ @Override
+ public ErrorReasonDto getReasonHttpStatus() {
+ return ErrorReasonDto.builder()
+ .message(message)
+ .code(code)
+ .isSuccess(false)
+ .httpStatus(httpStatus)
+ .build()
+ ;
+ }
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/SuccessStatus.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/SuccessStatus.java"
new file mode 100644
index 0000000..f7d8488
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/code/SuccessStatus.java"
@@ -0,0 +1,39 @@
+package org.umc.workbook.apiPayload.code;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.springframework.http.HttpStatus;
+import org.umc.workbook.apiPayload.BaseCode;
+import org.umc.workbook.apiPayload.ReasonDto;
+
+@Getter
+@AllArgsConstructor
+public enum SuccessStatus implements BaseCode {
+
+ // 일반적인 응답
+ _OK(HttpStatus.OK, "COMMON200", "성공입니다.");
+
+ private final HttpStatus httpStatus;
+ private final String code;
+ private final String message;
+
+ @Override
+ public ReasonDto getReason() {
+ return ReasonDto.builder()
+ .message(message)
+ .code(code)
+ .isSuccess(true)
+ .build();
+ }
+
+ @Override
+ public ReasonDto getReasonHttpStatus() {
+ return ReasonDto.builder()
+ .message(message)
+ .code(code)
+ .isSuccess(true)
+ .httpStatus(httpStatus)
+ .build()
+ ;
+ }
+}
\ No newline at end of file
diff --git "a/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/exception/ExceptionAdvice.java" "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/exception/ExceptionAdvice.java"
new file mode 100644
index 0000000..f913dab
--- /dev/null
+++ "b/\355\214\250\355\212\270_\355\227\210\354\234\240\354\247\204/src/main/java/org/umc/workbook/apiPayload/exception/ExceptionAdvice.java"
@@ -0,0 +1,194 @@
+package org.umc.workbook.apiPayload.exception;
+
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.validation.ConstraintViolationException;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.hibernate.cfg.Environment;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.*;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.context.request.ServletWebRequest;
+import org.springframework.web.context.request.WebRequest;
+import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
+import org.umc.workbook.apiPayload.ApiResponse;
+import org.umc.workbook.apiPayload.ErrorReasonDto;
+import org.umc.workbook.apiPayload.code.ErrorStatus;
+
+import java.time.LocalDateTime;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Optional;
+
+@Slf4j
+@RequiredArgsConstructor
+@RestControllerAdvice(annotations = {RestController.class})
+public class ExceptionAdvice extends ResponseEntityExceptionHandler {
+
+ private final RestTemplate restTemplate = new RestTemplate();
+ @Value("${slack.webhook.url}")
+ private String slackWebhookUrl;
+ @Value("${spring.profiles.active}")
+ private String activeProfile;
+
+ @ExceptionHandler
+ public ResponseEntity