Erik Aaron Hansen
10/26/2021, 10:53 AMClasses annotated with '@Configuration' could be implicitly subclassed and must not be finalI've looked at the docs here: https://kotlinlang.org/docs/all-open-plugin.html, but the dependency
id("org.jetbrains.kotlin.plugin.allopen") version "1.3.72"
is already inside build.gradle.kts. are there other steps necessary after creating a new project? I'm using 11.0.11.hs-adpt as sdk.Joffrey
10/26/2021, 10:56 AMopen
.
However, since Spring is so common, there is another plugin that is a superset of all-open, but with preconfigured annotations for Spring specifically:
plugins {
id "org.jetbrains.kotlin.plugin.spring" version "1.5.31"
}
It's described a bit lower on the same doc page: https://kotlinlang.org/docs/all-open-plugin.html#spring-supportJoffrey
10/26/2021, 10:57 AM@Configuration
-annotated components should be marked open
out of the box with this Spring pluginErik Aaron Hansen
10/26/2021, 11:03 AMErik Aaron Hansen
10/26/2021, 11:03 AMhfhbd
10/26/2021, 11:09 AMplugins {
id("org.springframework.boot") version "2.5.6"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("jvm") version "1.5.31"
kotlin("plugin.spring") version "1.5.31"
}
Joffrey
10/26/2021, 11:11 AMkotlin("plugin.spring")
is completely equivalent to id("org.jetbrains.kotlin.plugin.spring")
, so you're declaring it twice.
(Side note, I just mentioned the latest Kotlin version in my snippet, but you should use the same one for all Kotlin plugins - but 1.3.72 is pretty old, and Spring 1.0.11.RELEASE
actually uses 1.5.31
I believe)Erik Aaron Hansen
10/26/2021, 11:15 AMJoffrey
10/26/2021, 11:16 AMErik Aaron Hansen
10/26/2021, 11:16 AMErik Aaron Hansen
10/26/2021, 11:16 AMJoffrey
10/26/2021, 11:16 AMErik Aaron Hansen
10/26/2021, 11:19 AMErik Aaron Hansen
10/26/2021, 11:22 AMJoffrey
10/26/2021, 11:26 AMErik Aaron Hansen
10/26/2021, 11:28 AMJoffrey
10/26/2021, 11:29 AMErik Aaron Hansen
10/26/2021, 11:38 AMErik Aaron Hansen
10/26/2021, 11:39 AMJoffrey
10/26/2021, 11:46 AM.gradle
directory in your project folder that you can try to remove. But I still find this strange. I'm sorry I'm running out of ideas hereErik Aaron Hansen
10/26/2021, 12:03 PMAlexey Belkov [JB]
10/29/2021, 8:09 AMErik Aaron Hansen
10/29/2021, 8:10 AMJoffrey
10/29/2021, 8:12 AMErik Aaron Hansen
10/29/2021, 8:12 AM