使用gradle和Java 9的STS中出现错误

使用gradle和Java 9的STS中出现错误,java,gradle,spring-tool-suite,java-9,Java,Gradle,Spring Tool Suite,Java 9,我使用STS 3.9.1和扩展Buildship Gradle Integration 2.0,我的build.Gradle看起来: buildscript { ext { springBootVersion = '1.5.4.RELEASE' } repositories { jcenter() } dependencies { classpath("org.springframework.boot:spr

我使用STS 3.9.1和扩展Buildship Gradle Integration 2.0,我的build.Gradle看起来:

buildscript {
    ext {
        springBootVersion = '1.5.4.RELEASE'
    }
    repositories {
        jcenter()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'

version = '0.0.1-SNAPSHOT'
sourceCompatibility = 9
targetCompatibility = 9

repositories {
    jcenter()
}

configurations {
    providedRuntime
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-actuator')
    compile('org.springframework.boot:spring-boot-starter-data-elasticsearch')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-freemarker')
    compile('org.springframework.boot:spring-boot-starter-mail')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-devtools')
    runtime('mysql:mysql-connector-java')
    compileOnly('org.projectlombok:lombok')
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}
并出现以下错误:

说明资源路径位置类型 Java编译器级别与已安装Java项目方面的版本不匹配。核心未知方面的项目问题(Java版本不匹配)

说明资源路径位置类型 该项目未生成,因为它依赖于核心,而核心存在构建路径错误和核心未知Java问题

说明资源路径位置类型 未绑定的类路径容器:“JRE系统库[JavaSE-1.9]”在项目“核心”核心生成路径生成路径问题中


当我用java 9创建maven项目时,一切都正常工作,有人知道为什么它不能与gradle一起工作吗?

我不认为Spring Boot早于2.0.0 M?支持JDK9。另外,请确保您拥有最新的Gradle版本。即使我使用Java9创建clear项目,它仍然不起作用。我使用gradle 4.2.1在这方面有什么进展吗?我在STS3.9.4GradleBuildShip2.1和Java10中也有同样的错误,我不认为SpringBoot的版本早于2.0.0M?支持JDK9。另外,请确保您拥有最新的Gradle版本。即使我使用Java9创建clear项目,它仍然不起作用。我使用gradle 4.2.1在这方面有什么进展吗?我在STS3.9.4中的GradleBuildShip2.1和Java10中也有同样的错误