美文网首页
【SpringBoot源码】记一次SpringBoot源码问题

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

作者: greedycr7 | 来源:发表于2020-10-14 17:23 被阅读0次

问题描述

搭建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源码问题

      本文链接:https://www.haomeiwen.com/subject/wzyvpktx.html