springboot编译报错,帮忙看下,idea版本:2022203

A problem occurred configuring root project ‘demo2’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.0

springboot3.0.0需要java17,你看是不是,不然就吧springboot版本降下来,比如2.7.6

把原先的buildscript 以及 apply plugin换成这个试试

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

谢谢大家,我选择maven去创建spring boot就可以,之前选的grant

woc 解决了问题的根源

赶紧转gradle吧,maven慢不说,还各种缓存代码不即时更新,很痛苦,每次改完代码要clean,然后全部模块重新编译一遍