diff --git a/DockerfileDev b/DockerfileDev index 8a9b877d..b8e149c9 100644 --- a/DockerfileDev +++ b/DockerfileDev @@ -3,5 +3,4 @@ FROM openjdk:11 ARG JAR_FILE=build/libs/V2-0.0.1-SNAPSHOT.jar COPY ${JAR_FILE} app.jar - ENTRYPOINT ["java","-jar","app.jar","--spring.profiles.active=dev"] diff --git a/build.gradle.kts b/build.gradle.kts index d2fdbcd8..508d6801 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,15 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("org.springframework.boot") version "2.7.5" - id("io.spring.dependency-management") version "1.0.15.RELEASE" - kotlin("jvm") version "1.6.21" - kotlin("plugin.spring") version "1.6.21" - kotlin("plugin.jpa") version "1.6.21" + id("org.springframework.boot") version PluginVersions.SPRING_BOOT_VERSION + id("io.spring.dependency-management") version PluginVersions.SPRING_MANAGE_VERSION + id("com.ewerk.gradle.plugins.querydsl") version PluginVersions.QUERY_DSL_PLUGIN_VERSION + + kotlin("jvm") version PluginVersions.JVM_VERSION + kotlin("plugin.spring") version PluginVersions.SPRING_PLUG_IN_VERSION + kotlin("plugin.jpa") version PluginVersions.JPA_VERSION + kotlin("kapt") version PluginVersions.KAPT_VERSION + idea } group = "com.dotori" @@ -17,30 +21,32 @@ repositories { } dependencies { - implementation("org.springframework.boot:spring-boot-starter-data-jpa") - implementation("org.springframework.boot:spring-boot-starter-data-redis") - implementation("org.springframework.boot:spring-boot-starter-mail") - implementation("org.springframework.boot:spring-boot-starter-security") - implementation("org.springframework.boot:spring-boot-starter-validation") - implementation("org.springframework.boot:spring-boot-starter-web") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("org.jetbrains.kotlin:kotlin-reflect") - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - runtimeOnly("com.h2database:h2") - runtimeOnly("org.mariadb.jdbc:mariadb-java-client") - testImplementation("org.springframework.boot:spring-boot-starter-test") - testImplementation("org.springframework.security:spring-security-test") - testImplementation("io.kotest:kotest-runner-junit5:5.5.5") - testImplementation("io.kotest.extensions:kotest-extensions-spring:1.1.2") - testImplementation("io.kotest:kotest-assertions-core:5.5.5") - testImplementation("io.kotest:kotest-framework-engine-jvm:5.5.5") - testImplementation("io.mockk:mockk:1.13.4") - implementation("io.jsonwebtoken:jjwt-api:0.11.5") - runtimeOnly("io.jsonwebtoken:jjwt-impl:0.11.5") - runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.11.5") - implementation("com.amazonaws:aws-java-sdk-ses:1.12.347") - implementation("aws.sdk.kotlin:ses:0.16.0") - implementation("org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE") + implementation(Dependencies.SPRING_JPA) + implementation(Dependencies.SPRING_REDIS) + implementation(Dependencies.MAIL) + implementation(Dependencies.SECURITY) + implementation(Dependencies.VALIDATION) + implementation(Dependencies.WEB) + implementation(Dependencies.KOTLIN_JACKSON) + implementation(Dependencies.KOTLIN_REFLECT) + implementation(Dependencies.KOTLIN_STDLIB) + runtimeOnly(Dependencies.H2_DATABASE) + runtimeOnly(Dependencies.MARIA_DATABASE) + testImplementation(Dependencies.SPRING_TEST) + testImplementation(Dependencies.SECURITY_TEST) + testImplementation(Dependencies.KOTEST_RUNNER) + testImplementation(Dependencies.KOTEST_EXTENSION) + testImplementation(Dependencies.KOTEST_ASSERTIONS) + testImplementation(Dependencies.KOTEST_JVM) + testImplementation(Dependencies.MOCKK) + implementation(Dependencies.JWT_API) + runtimeOnly(Dependencies.JWT_IMPL) + runtimeOnly(Dependencies.JWT_JACKSON) + implementation(Dependencies.AWS_SES) + implementation(Dependencies.KOTLIN_SES) + implementation(Dependencies.SPRING_CLOUD) + implementation(Dependencies.QUERY_DSL) + implementation(Dependencies.QUERY_DSL_APT) } tasks.withType { @@ -54,6 +60,14 @@ tasks.withType { useJUnitPlatform() } +idea { + module { + val kaptMain = file("build/generated/source/kapt/main") + sourceDirs.add(kaptMain) + generatedSourceDirs.add(kaptMain) + } +} + buildscript { repositories { maven { @@ -61,7 +75,10 @@ buildscript { } } dependencies { - classpath("io.kotest:kotest-gradle-plugin:0.4.10") + classpath(Dependencies.KOTEST_PLUG_IN) } } + + + apply(plugin = "io.kotest") \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..b22ed732 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + `kotlin-dsl` +} + +repositories { + mavenCentral() +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt new file mode 100644 index 00000000..72ee6c77 --- /dev/null +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -0,0 +1,49 @@ +object Dependencies { + + // spring + const val SPRING_JPA = "org.springframework.boot:spring-boot-starter-data-jpa" + const val SPRING_REDIS = "org.springframework.boot:spring-boot-starter-data-redis" + const val MAIL = "org.springframework.boot:spring-boot-starter-mail" + const val SECURITY = "org.springframework.boot:spring-boot-starter-security" + const val VALIDATION = "org.springframework.boot:spring-boot-starter-validation" + const val WEB = "org.springframework.boot:spring-boot-starter-web" + const val SPRING_CLOUD = "org.springframework.cloud:spring-cloud-starter-aws:${DependencyVersions.SPRING_CLOUD_VERSION}" + + + // kotlin + const val KOTLIN_JACKSON = "com.fasterxml.jackson.module:jackson-module-kotlin" + const val KOTLIN_REFLECT = "org.jetbrains.kotlin:kotlin-reflect" + const val KOTLIN_STDLIB = "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + + // h2 + const val H2_DATABASE = "com.h2database:h2" + const val MARIA_DATABASE = "org.mariadb.jdbc:mariadb-java-client" + + // test + const val SPRING_TEST = "org.springframework.boot:spring-boot-starter-test" + const val SECURITY_TEST = "org.springframework.security:spring-security-test" + + // kotest + const val KOTEST_PLUG_IN = "io.kotest:kotest-gradle-plugin:${PluginVersions.KOTEST_PLUG_IN_VERSION}" + const val KOTEST_RUNNER = "io.kotest:kotest-runner-junit5:${DependencyVersions.KOTEST_RUNNER_VERSION}" + const val KOTEST_EXTENSION = "io.kotest.extensions:kotest-extensions-spring:${DependencyVersions.KOTEST_EXTENSION_VERSION}" + const val KOTEST_ASSERTIONS = "io.kotest:kotest-assertions-core:${DependencyVersions.KOTEST_ASSERTIONS_VERSION}" + const val KOTEST_JVM = "io.kotest:kotest-framework-engine-jvm:${DependencyVersions.KOTEST_JVM_VERSION}" + + // mockk + const val MOCKK = "io.mockk:mockk:${DependencyVersions.MOCKK_VERSION}" + + // jwt + const val JWT_API = "io.jsonwebtoken:jjwt-api:${DependencyVersions.JWT_API_VERSION}" + const val JWT_IMPL = "io.jsonwebtoken:jjwt-api:${DependencyVersions.JWT_IMPL_VERSION}" + const val JWT_JACKSON = "io.jsonwebtoken:jjwt-api:${DependencyVersions.JWT_JACKSON_VERSION}" + + // aws + const val AWS_SES = "com.amazonaws:aws-java-sdk-ses:${DependencyVersions.AWS_SES_VERSION}" + const val KOTLIN_SES = "org.springframework.cloud:spring-cloud-starter-aws:${DependencyVersions.KOTLIN_SES_VERSION}" + + // querydsl + const val QUERY_DSL = "com.querydsl:querydsl-jpa:${DependencyVersions.QUERY_DSL_VERSION}" + const val QUERY_DSL_APT = "com.querydsl:querydsl-apt:${DependencyVersions.QUERY_DSL_APT_VERSION}:jpa" + +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/DependencyVersions.kt b/buildSrc/src/main/kotlin/DependencyVersions.kt new file mode 100644 index 00000000..7b7af93e --- /dev/null +++ b/buildSrc/src/main/kotlin/DependencyVersions.kt @@ -0,0 +1,27 @@ +object DependencyVersions { + + // spring + const val SPRING_CLOUD_VERSION = "2.2.6.RELEASE" + + // kotest + const val KOTEST_RUNNER_VERSION = "5.5.5" + const val KOTEST_EXTENSION_VERSION = "1.1.2" + const val KOTEST_ASSERTIONS_VERSION = "5.5.5" + const val KOTEST_JVM_VERSION = "5.5.5" + + // mockk + const val MOCKK_VERSION = "1.13.4" + + // jwt + const val JWT_API_VERSION = "0.11.5" + const val JWT_IMPL_VERSION = "0.11.5" + const val JWT_JACKSON_VERSION= "0.11.5" + + // aws + const val AWS_SES_VERSION = "1.12.347" + const val KOTLIN_SES_VERSION = "0.16.0" + + // querydsl + const val QUERY_DSL_VERSION = "5.0.0" + const val QUERY_DSL_APT_VERSION = "5.0.0" +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/PluginVersions.kt b/buildSrc/src/main/kotlin/PluginVersions.kt new file mode 100644 index 00000000..bfafd9d1 --- /dev/null +++ b/buildSrc/src/main/kotlin/PluginVersions.kt @@ -0,0 +1,10 @@ +object PluginVersions { + const val SPRING_BOOT_VERSION = "2.7.5" + const val SPRING_MANAGE_VERSION = "1.0.15.RELEASE" + const val JVM_VERSION = "1.6.21" + const val SPRING_PLUG_IN_VERSION = "1.6.21" + const val JPA_VERSION = "1.6.21" + const val KOTEST_PLUG_IN_VERSION = "0.4.10" + const val KAPT_VERSION = "1.7.10" + const val QUERY_DSL_PLUGIN_VERSION = "1.0.10" +} \ No newline at end of file diff --git a/src/main/kotlin/com/dotori/v2/domain/self_study/domain/repository/SelfStudyRepository.kt b/src/main/kotlin/com/dotori/v2/domain/self_study/domain/repository/SelfStudyRepository.kt index 356d1fbb..c6370983 100644 --- a/src/main/kotlin/com/dotori/v2/domain/self_study/domain/repository/SelfStudyRepository.kt +++ b/src/main/kotlin/com/dotori/v2/domain/self_study/domain/repository/SelfStudyRepository.kt @@ -2,7 +2,6 @@ package com.dotori.v2.domain.self_study.domain.repository import com.dotori.v2.domain.member.domain.entity.Member import com.dotori.v2.domain.self_study.domain.entity.SelfStudy -import kotlinx.coroutines.selects.select import org.springframework.data.jpa.repository.JpaRepository import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param diff --git a/src/main/kotlin/com/dotori/v2/domain/stu_info/service/impl/SearchStudentServiceImpl.kt b/src/main/kotlin/com/dotori/v2/domain/stu_info/service/impl/SearchStudentServiceImpl.kt index baa366f9..e6ff19b1 100644 --- a/src/main/kotlin/com/dotori/v2/domain/stu_info/service/impl/SearchStudentServiceImpl.kt +++ b/src/main/kotlin/com/dotori/v2/domain/stu_info/service/impl/SearchStudentServiceImpl.kt @@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional class SearchStudentServiceImpl( private val memberRepository: MemberRepository ) : SearchStudentService { + override fun execute( searchRequestDto: SearchRequestDto ): List =