首页 > 解决方案 > 使用 Gradle 导入项目 Spring Boot 时出现错误:无法应用插件“org.springframework.boot”

问题描述

使用 gradle 导入 Spring Boot 项目时出现此错误:

The supplied phased action failed with an exception.
A problem occurred configuring root project 'tcvoffice'.
A problem occurred evaluating root project 'tcvoffice'.
Failed to apply plugin 'org.springframework.boot'.
Configuration with name 'runtime' not found.

我正在使用 Java 11.0.12,gradleVersion:'4.3',springBootVersion:'1.5.3.RELEASE'

你们能给我一个解决方案,以便我解决吗?

非常感谢

标签: javaspringspring-bootgradle

解决方案


从工具的角度来看,您的设置存在多个问题。根据 Gradle 的Java Compatibility Matrix,Gradle 4.3 与 Java 11 不兼容。Gradle 4.3 仅支持 Java 9。根据系统要求,版本中的 Spring Boot 插件1.5.3.RELEASE需要 Gradle 3.x。

如果必须使用 Spring Boot 1.5.3.RELEASE,我建议降级到Gradle 3.5和 Java 8。


推荐阅读