error

[error /spring]org/springframework/core/NestedIOExceptionat

멋진놈 2024. 1. 29. 16:07
728x90

문제 :

NestedIOException이라면서  스프링 프레임워크 코어에 NestedIOException이 존재하지 않습니다. 라는 뜻

이런 문제는 보통 springboot와 mybatis의 버전이 맞지 않아 생기는 문제

 

해결 :  

springboot와 mybatis 버전 맞추기 springboot 3.0이면 => mybatis 3.0 이렇게

 

에러 내용 :

Failed to instantiate [org.mybatis.spring.SqlSessionFactoryBean]: Factory method 'sqlSessionFactory' threw exception with message: org/springframework/core/NestedIOException org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:712) ~[spring-beans-6.0.4.jar:6.0.4]

Unsatisfied dependency expressed through bean property 'sqlSessionFactory': Error creating bean with name 'sqlSessionFactory' defined in class path resource [MyBatisConfig.class]: Failed to instantiate [org.mybatis.spring.SqlSessionFactoryBean]: Factory method 'sqlSessionFactory' threw exception with message: org/springframework/core/NestedIOException