the detail exception:

> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.0-M1
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.3.3' but:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-M1 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0-M1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')
          - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0-M1 declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.3.3')


Comment From: wang-xiaowu

my jdk is 17.0.2,gradle is 7.3.3

------------------------------------------------------------
Gradle 7.3.3
------------------------------------------------------------

Build time:   2021-12-22 12:37:54 UTC
Revision:     6f556c80f945dc54b50e0be633da6c62dbe8dc71

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.2 (Oracle Corporation 17.0.2+8-LTS-86)
OS:           Windows 10 10.0 amd64

Comment From: wilkinsona

While your build may be running on Java 17, it has been configured to require Java 8. This is shown in Gradle's error message above:

The consumer was configured to find a runtime of a library compatible with Java 8

Perhaps you have misconfigured sourceCompatibility in your Gradle script? Setting to 1.8 will produce the error you are seeing. It should be set to 17 as shown in a project generated on https://start.spring.io.

If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

Comment From: wang-xiaowu

虽然您的构建可能在 Java 17 上运行,但它已被配置为需要 Java 8。这在 Gradle 上面的错误消息中显示:

The consumer was configured to find a runtime of a library compatible with Java 8

也许您sourceCompatibility在 Gradle 脚本中配置错误?设置为1.8将产生您所看到的错误。它应该设置为在https://start.spring.io17上生成的项目中所示。

如果您还有其他问题,请关注 Stack Overflow 或Gitter正如贡献指南中提到的,我们更喜欢仅将 GitHub 问题用于错误和增强功能。

i did configure sourceCompatibility 17,and i did downloaded from start.spring.io;2.6.3 is ok

id 'org.springframework.boot' version '2.6.3'

this is my configuration:

plugins {
    id 'org.springframework.boot' version '3.0.0-M1'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
    maven { url 'https://repo.spring.io/milestone' }
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

Comment From: bclozel

Could you share the output of ./gradlew --version as well as the content of the settings.gradle file? A complete, sample project that we could check out on GitHub would also help.

Comment From: snicoll

Also make sure that ./gradlew --version shows that you're using Java 17.

Comment From: wang-xiaowu

PS C:\Users\94391> gradle --version

------------------------------------------------------------
Gradle 7.3.3
------------------------------------------------------------

Build time:   2021-12-22 12:37:54 UTC
Revision:     6f556c80f945dc54b50e0be633da6c62dbe8dc71

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.2 (Oracle Corporation 17.0.2+8-LTS-86)
OS:           Windows 10 10.0 amd64

PS C:\Users\94391>

Comment From: wang-xiaowu

``` PS C:\Users\94391> gradle --version


Gradle 7.3.3

Build time: 2021-12-22 12:37:54 UTC Revision: 6f556c80f945dc54b50e0be633da6c62dbe8dc71

Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.2 (Oracle Corporation 17.0.2+8-LTS-86) OS: Windows 10 10.0 amd64

PS C:\Users\94391> ```

and the repository url: https://github.com/wang-xiaowu/demo-for-springboot3-m1.git

Comment From: wang-xiaowu

i found something showed up on my idea

SpringBoot when i run a demo application, used gradle:7.3.3 + springboot 3.0.0M1 ,there is the mis take

Comment From: wilkinsona

Thanks for the sample. It works for me with both Oracle JDK 17 and OpenJDK 17. This is the first time that you've mentioned IDEA. It may be that you need to upgrade so that your IDE is aware of JDK 17. See https://youtrack.jetbrains.com/issue/IDEA-282531 and the issues to which it links. This is all out of Spring Boot's control so I'm afraid there's nothing more that we can do to help you here.

Comment From: wang-xiaowu

Thanks for the sample. It works for me with both Oracle JDK 17 and OpenJDK 17. This is the first time that you've mentioned IDEA. It may be that you need to upgrade so that your IDE is aware of JDK 17. See https://youtrack.jetbrains.com/issue/IDEA-282531 and the issues to which it links. This is all out of Spring Boot's control so I'm afraid there's nothing more that we can do to help you here.

ok,thank u so much,i will try it again on idea2021.3

Comment From: wang-xiaowu

alright, idea 2021.3.1 is not working neither and i changed the jdk version:17 and gradle version:7 no matter which do not work. but i build my project with gradle on cmd, it's ok so i think it's determined that the error caused by idea

Comment From: wang-xiaowu

SpringBoot when i run a demo application, used gradle:7.3.3 + springboot 3.0.0M1 ,there is the mis take

Comment From: snicoll

@wang-xiaowu we've already indicated that all of this is out of Spring Boot's control so there's not much we can do to help you here.