에러해결

[에러해결] 클래스 [org.springframework.web.context.ContextLoaderListener]의 인스턴스인 리스너에게 contextDestroyed 이벤트를 전송하는 중 예외 발생java.lang.IllegalStateException: BeanFactory not initialized or already close..

intp프로그래머 2022. 12. 5. 16:21

[에러내용]

 

심각: 클래스 [org.springframework.web.context.ContextLoaderListener]의 인스턴스인 리스너에게 contextDestroyed 이벤트를 전송하는 중 예외 발생


java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

[에러해결] : 7번째 줄의 sqlSession를  sqlSessionFactory로 변경.


</bean id="sqlsession" class="org.mybatis.spring.sqlsessionfactorybean">   (수정전)

 

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">  (수정후)