반응형
🌿 기본 환경: IDE: STS4, Language: Java
발생 Error
🚨 SpringBoot에서 Project import 후, application.java 파일 import 구문에 다음과 같은 Error 발생
1
2
|
import org.springframework.boot.SpringApplication;
|
cs |
발생 원인
Gradle Project로 인식되지 않음
해결 방법
configure → add gradle nature 실행
cf. Maven Project
1. C:\Users\사용자이름\.m2 파일 제거
2. 프로젝트 우클릭 - Maven - update project
(* 프로젝트 우클릭 - Maven이 없을 경우: 프로젝트 우클릭 - Configure - Convert to maven project)
참고 자료
JAVA SPRING 환경 구축 설치 하자마자 에러( import org.springframework cannot be resolved )
구글링을 해보니 gradle이 안 가져와져서 뜨는 문제이고 해당 프로젝트 우클릭후 configure -> add gradle nature 실행 또는 maven일 경우 - C:\Users\사용자이름\.m2 파일 제거 프로젝트 우클릭 - Maven - update proj
xorms0707.tistory.com
반응형
'Java > Spring with Error' 카테고리의 다른 글
[해결 방법] Package name does not correspond to the file path (0) | 2023.06.06 |
---|---|
[해결 방법] No projects are found to import (0) | 2023.05.30 |
[해결 방법] Whitelabel Error Page (0) | 2023.05.30 |
[해결 방법] No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.0 was found (0) | 2023.05.29 |
[해결 방법] Request method 'POST' not supported (0) | 2023.05.28 |