-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor spring-boot-kotlin-redis example to be more Kotlin idiomatic (…
…#7185) Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
- Loading branch information
1 parent
9220816
commit d106d3f
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
15 changes: 10 additions & 5 deletions
15
...les/spring-boot-kotlin-redis/build.gradle → ...spring-boot-kotlin-redis/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("org.springframework.boot") version "2.7.10" | ||
id("org.jetbrains.kotlin.jvm") version "1.8.10" | ||
id("org.jetbrains.kotlin.plugin.spring") version "1.8.20" | ||
kotlin("jvm") version "1.8.10" | ||
kotlin("plugin.spring") version "1.8.20" | ||
} | ||
|
||
apply plugin: 'io.spring.dependency-management' | ||
java.sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
apply(plugin = "io.spring.dependency-management") | ||
implementation("org.springframework.boot:spring-boot-starter") | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
implementation("org.springframework.boot:spring-boot-starter-data-redis") | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
|
||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
testImplementation("org.testcontainers:testcontainers") | ||
|
||
|
||
} | ||
|
||
compileKotlin { | ||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
freeCompilerArgs = listOf("-Xjsr305=strict") | ||
jvmTarget = "1.8" | ||
freeCompilerArgs = ["-Xjsr305=strict"] | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
examples/spring-boot-kotlin-redis/src/main/kotlin/com/example/redis/ExampleController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters