본문 바로가기

Spring_SpringBoot/Error

InvocationTargetException

Mybatis를 설정하면서 에러가 나타났다.

 

InvocationTargetException 

- InvocationTargetException은 method 호출시 호출한 메소드 내에서 Exception이 발생했을 때 해당 Exception을 Wrapping해주는 Exception 클래스이다.

 

InvocationTargetException 자체의 stack trace만으로는 에러를 해결하기가 어렵다.→ 예외 try catch를 통해서 e.printstacktrace()하는 이유를 여기서 알았다. 결과적으로는 나의 DB가 연결이 안된 것이었다.

 

※ try catch를 보면서 try resource의 차이점이 궁금해졌다. 다음 글에 이어서 얘기해야겠다.

'Spring_SpringBoot > Error' 카테고리의 다른 글

java version 불일치  (0) 2024.06.19
HTTP 서버 응답 코드(Response Code) 정리  (0) 2024.06.10
@Service  (0) 2024.06.10
에러별 색상( 세팅 - 중요 )  (0) 2024.06.08
Failed to configure a DataSource  (0) 2024.06.04