Requirements

Spring 框架支持 Kotlin 1.7+,并要求类路径中存在 kotlin-stdlibkotlin-reflect。如果您在 start.spring.io上启动 Kotlin 项目,它们会默认提供。

Spring Framework supports Kotlin 1.7+ and requires kotlin-stdlib and kotlin-reflect to be present on the classpath. They are provided by default if you bootstrap a Kotlin project on start.spring.io.

Jackson Kotlin 模块 对于使用 Jackson 序列化或反序列化 Kotlin 类的 JSON 数据是必需的,所以如果你有此类需求,请务必向你的项目添加 com.fasterxml.jackson.module:jackson-module-kotlin 依赖项。当在类路径中发现时,会自动注册它。

The Jackson Kotlin module is required for serializing or deserializing JSON data for Kotlin classes with Jackson, so make sure to add the com.fasterxml.jackson.module:jackson-module-kotlin dependency to your project if you have such need. It is automatically registered when found in the classpath.