Skip to content

Commit dea7e45

Browse files
committed
[FIX] #26 SpringBootAsync
1 parent c8ce5bd commit dea7e45

File tree

4 files changed

+40
-19
lines changed

4 files changed

+40
-19
lines changed

SpringBootAsync/build.gradle

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
buildscript {
2-
ext {
3-
springBootVersion = '2.1.3.RELEASE'
4-
}
5-
repositories {
6-
mavenCentral()
7-
}
8-
dependencies {
9-
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
10-
}
1+
plugins {
2+
id 'org.springframework.boot' version '2.1.3.RELEASE'
3+
id 'org.jetbrains.kotlin.jvm' version '1.2.71'
4+
id 'org.jetbrains.kotlin.plugin.spring' version '1.2.71'
115
}
126

13-
apply plugin: 'java'
14-
apply plugin: 'eclipse'
15-
apply plugin: 'org.springframework.boot'
167
apply plugin: 'io.spring.dependency-management'
178

189
group = 'com.example'
1910
version = '0.0.1-SNAPSHOT'
20-
sourceCompatibility = 1.8
11+
sourceCompatibility = '1.8'
2112

2213
repositories {
2314
mavenCentral()
2415
}
2516

2617
dependencies {
27-
compile("org.springframework.boot:spring-boot-starter-webflux")
28-
testCompile("org.springframework.boot:spring-boot-starter-test")
29-
}
18+
implementation 'org.springframework.boot:spring-boot-starter-webflux'
19+
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
20+
implementation 'org.jetbrains.kotlin:kotlin-reflect'
21+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
22+
23+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
24+
}
25+
26+
compileKotlin {
27+
kotlinOptions {
28+
freeCompilerArgs = ['-Xjsr305=strict']
29+
jvmTarget = '1.8'
30+
}
31+
}
32+
33+
compileTestKotlin {
34+
kotlinOptions {
35+
freeCompilerArgs = ['-Xjsr305=strict']
36+
jvmTarget = '1.8'
37+
}
38+
}

SpringBootAsync/src/main/java/com/example/SpringBootAsyncApplication.java renamed to SpringBootAsync/src/main/java/com/example/java/SpringBootAsyncApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example;
1+
package com.example.java;
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.example.kotlin
2+
3+
import org.springframework.boot.autoconfigure.SpringBootApplication
4+
import org.springframework.boot.runApplication
5+
6+
@SpringBootApplication
7+
class SpringBootAsyncApplication
8+
9+
fun main(args: Array<String>) {
10+
runApplication<SpringBootAsyncApplication>(*args)
11+
}
12+

SpringBootAsync/src/test/java/com/example/SpringBootAsyncApplicationTests.java renamed to SpringBootAsync/src/test/java/com/example/java/SpringBootAsyncApplicationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example;
1+
package com.example.java;
22

33
import com.example.java.service.BasicService;
44
import org.junit.Test;

0 commit comments

Comments
 (0)