Framework2015. 1. 27. 11:57
[Spring] Error creating bean with name 'sampleBean': Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sampleBean' is defined

@resource 어노테이션 sampleBean 이 생성되지 않아서 오류가 났다.

---- 소스 일부 --
@Resource(name = "sampleBean")
private SampleBean sampleBean;
---- 소스 일부 --

삽질 끝에 설정을 추가 하여 해결은 하였으나 좀 더 찾아봐야 한다.

spring 설정 ( servlet-context ) 에 Bean 설정 확인.
없다면 정의해서 해결 ( 이렇게 하면 되는건지 확신이 없다! ㅠ.ㅠ)

<bean id="sampleBean" class="sample.model.SampleBean" />

-- 여기서 --
@resurce 어노테이션 구체적 학습필요

Posted by 비니미니파