위 링크를 토대로 프로젝트를 생성하고 실행하니 아래와 같은 에러가 떳다.
A problem occurred configuring root project 'spring'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.4. Required by: root project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.4 > Dependency requires at least JVM runtime version 17. This build uses a Java 8 JVM. * Try: > Run this build using a Java 17 or newer JVM. > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 104ms |
프로젝트 버전과 실제 사용 버전이 달라서 발생한 문제였다.
Files > Settings > Build, Execution, Deployment > Gradle > Gradle JVM 을 17로 바꿔주면 된다.
다음은 내가 참고한 글이다.
https://soheepark.tistory.com/179