DI « Annotation « Spring Q&A





1. Understanding Spring annotation DI    stackoverflow.com

@Repository @Service @Controller @Component
-->only use for spring managed bean (no need weaving)
-->@repository, @Service @controller is actually a @Component , just naming easier for programmer to understand
@Configurable
--->used ...

2. Using Spring annotations, how can we use DI with a superclass via annotations?    stackoverflow.com

I have the following class defined as a bean:

@Repository("userDao")
public class UserDao extends JdoDaoSupport implements IUserDao {...}
The class JdoDaoSupport requires a persistenceManagerFactory injected into it. I've declared the persistenceManagerFactory bean in XML, how ...

3. Why does DI work on my class annotated with @Configurable, but not @Component    forum.springsource.org

Why does DI work on my class annotated with @Configurable, but not @Component Hopefully I'll explain this clearly. I have a unit test in which I'm injecting a bean on a ...

4. Spring 3: DI with annotations passing a parameter to a static factory method    forum.springsource.org

Spring 3: DI with annotations passing a parameter to a static factory method We would like like to inject a bean that is derived from a static factory method which requires ...

5. DI using Annotation !!    forum.springsource.org

Hi Techies, I am create a spring app using annotation, i am struggling to use DI using the @Autowired annotation. If any one knows , can you help me out? --------- ...

6. Annotation based DI.    forum.springsource.org

Can anyone tell me how you can use annotation to achieve the following Spring XML configuration? Code: public interface LogService { public void log(String result); } public class FileLogService implements LogService{ ...