본문 바로가기
Project/Trouble Shooting

[Swagger] Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 에러 해결 방법

by ryuneng 2025. 1. 22.
반응형

⚠️ 오류

Swagger 설정 후, 아무리 봐도 에러가 발생할 만한 코드가 없는데 서버 실행 시 오류가 발생했다.


👀 해결 방법

1. Edit Configurations 클릭

2. Modify options 클릭

3. Enable debug output 클릭 후 OK

하면 분명 된댔는데.. 안된다...

😂



⚠️ 2차 오류 발생

  • 콘솔창에서 CONDITIONS EVALUATION REPORT 밑에 Negative matches, java.lang.TypeNotPresentException: Type javax.servlet.http.HttpServletRequest not present 등의 긴 오류 메시지가 나타났다.


❓ 문제점

Spring Boot의 버전이 3 이상일 경우 Swagger가 정상적으로 작동하지 않을 수 있다고 한다.
Springfox에서 아직 Jakarta 패키지를 지원하지 않는다고 한다.
Swagger의 버전을 낮춰봐야겠다.


💡 해결 방법

Spring Boot 3.x 이상의 버전을 사용중이라면 다음 포스팅으로..

🔗 https://velog.io/@ryuneng2/Swagger-Spring-Boot-3.x.x-이상-버전-SpringFox-호환-불가



References

 


< 해당 글은 velog에서 이전하며 옮겨온 글로, 가독성이 좋지 않을 수 있는 점 양해 부탁드립니다. >

🔗 velog 버전 보기 : https://velog.io/@ryuneng2/Swagger-Error-starting-ApplicationContext.-To-display-the-condition-evaluation-report-re-run-your-application-with-debug-enabled.-에러-해결-방법