Spring & Spring Boot
[스프링 입문] 프로젝트 생성
sj.cath
2024. 8. 16. 17:08
1) 오류
A problem occurred configuring root project 'practice'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but:
프로젝트 생성 시 build가 되지 않는 문제가 발생했다.
내 pc에 설치된 자바 버전과 동일하게 build.gradle 파일에 java version을 맞춰주고
File > project structure > project settings > project 에서 sdk와 language level도 일치시켜준 후 gradle을 build를 해주니
Tomcat started ... 도 잘 보이고
localhost도 잘 실행이 되었다-!
spring boot application이 잘 실행된 것이다.
예전에 java version 관련 에러를 많이 겪었는데 다시는 이런 오류가 뜨지 않길 🙏🏻