Using @Resource annotation in @Component Class
HI,
I am working on spring 2.5.4 version.
I am have a JNDI look up in my context file and i am using it inside my class annotated with @Controller and i am able to get the value of the jndi key inside the controller class, now i am doing the same thing inside a class that is annotated with @Component tag and i am getting null for the jndi key used as @Resource with jndi look up id from context file.
I have context:component scan which points to be base package. The base package contains the controller class and component class in separate packages.
I am not knowing what is causing the problem, any help in solving this is highly appreciated.
Thankyou.