에러 모음

BeanCreationException, BeanInstantiationException

junani0v0 2024. 4. 19. 22:06

 

< 에러 메시지 >

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginController' defined in file [C:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\110_Join_01\WEB-INF\classes\com\join01\www\controller\LoginController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.join01.www.controller.LoginController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problem:

Syntax error, insert ";" to complete BlockStatements

 

< 원인 >

BeanCreationException와 BeanInstantiationException은 Spring Framework에서 발생할 수 있는 예외 중 하나로 Spring이 빈(Bean)을 생성하는 동안 LoginController 클래스의 인스턴스화에 실패로 인한 문제를 나타냅니다

 

원인은 친절하게 아래 써있네요

com.join01.www.controller.LoginController에 java.lang.Error: Unresolved compilation problem 

즉, 컴파일러가 발견한 구문 오류로, 코드에 세미콜론(;)을 삽입해야 한다는 것을 알려줍니다.

 

< 해결 >

LoginController 세미콜론(;) 삽입으로 해결