【SpringBoot源码】记一次SpringBoot源码问题

问题描述

搭建SpringBoot源码环境时,在spring-boot-test目录下启动一个子项目,Kotlin报错:

Warning:Kotlin: Language version 1.4 is experimental, there are no backwards compatibility guarantees for new language and library features
D:\springboot\spring-boot-2.2.x\spring-boot-project\spring-boot-autoconfigure\src\test\kotlin\org\springframework\boot\autoconfigure\diagnostics\analyzer\KotlinNoSuchBeanFailureAnalyzerNoKotlinReflectTests.kt
Error:(39, 41) Kotlin: 'use((T) -> R): R' is only available since Kotlin 1.3.50 and cannot be used in Kotlin 1.4

The compiler bundled to Kotlin plugin (1.3.21) is older than external compiler used for building modules:
spring-boot-autoconfigure (1.4.10)
This may cause different set of errors and warnings reported in IDE.
Update  Ignore (show balloon)

问题原因

Kotlin版本问题,IDEA自带的Kotlin版本为1.3.21,而SpringBoot源码使用的Kotlin版本为1.4+。

解决方案

Kotlin版本升级

你可能感兴趣的:(【SpringBoot源码】记一次SpringBoot源码问题)