用いたい技術
spring boot : 2.1.7
Java : 11.0.2
kotlin : 1.2.71
今回intelliJを用いて開発を行おうとしたのですが、以上の設定で行うとメインクラスに以下のようなエラーが出てきます
kt
1Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 2
また設定ファイルについては以下のようになっています
kts
1import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 2 3plugins { 4 id("org.springframework.boot") version "2.1.7.RELEASE" 5 id("io.spring.dependency-management") version "1.0.8.RELEASE" 6 kotlin("jvm") version "1.2.71" 7 kotlin("plugin.spring") version "1.2.71" 8} 9 10 11 12group = "com.example" 13version = "0.0.1-SNAPSHOT" 14java.sourceCompatibility = JavaVersion.VERSION_1_8 15 16configurations { 17 compileOnly { 18 extendsFrom(configurations.annotationProcessor.get()) 19 } 20} 21 22repositories { 23 mavenCentral() 24} 25 26dependencies { 27 implementation("org.springframework.boot:spring-boot-starter-thymeleaf") 28 implementation("org.jetbrains.kotlin:kotlin-reflect") 29 implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") 30 compileOnly("org.projectlombok:lombok") 31 runtimeOnly("mysql:mysql-connector-java") 32 annotationProcessor("org.projectlombok:lombok") 33 testImplementation("org.springframework.boot:spring-boot-starter-test") 34} 35 36tasks.withType<KotlinCompile> { 37 kotlinOptions { 38 freeCompilerArgs = listOf("-Xjsr305=strict") 39 jvmTarget = "1.8" 40 } 41} 42
ご助力をよろしくお願いします。。。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。