Spring Boot 프로젝트를 인텔리제이에서 실행하려고 시도했으나, 아래 문제들이 발생했다.
문제상황과 해결과정을 적어보려고 한다.
1. Gradle 빌드 오류 및 Classpath 문제
Gradle 빌드와 IntelliJ 의 설정 불일치로 인해 애플리케이션이 실행되지 않았다.
// 오류 메시지
Main class name has not been configured and it could not be resolved from classpath.
2. Main Class 탐지 실패
Edit Configuration > Spring Boot > JmErpApplication 설정에서 Main Class를 찾지 못하는 오류 발생.
// 오류메시지
Error: Could not find or load main class com.example.demo.JmErpApplication
Caused by: java.lang.ClassNotFoundException: com.example.demo.JmErpApplication
1. Gradle 빌드 오류 해결 방법 :
➡️ 빌드 성공
2. Classpath에서 Main Class 탐지 실패 문제 해결 방법 :
| TestSuiteExecutionException: Could not execute test class 해결방법 (0) | 2024.12.12 |
|---|---|
| Bean 수동 등록, Bean 주입 우선순위 - @Qualifier와 @Primary (0) | 2024.12.10 |
| ✍🏻IoC(제어의 역전), DI(의존성 주입) (0) | 2024.12.04 |
| Spring Bean (0) | 2024.12.01 |
| Spring 웹 개발 기본 원리 (0) | 2024.11.30 |