Shekhar Jagadale
Shekhar Jagadale

Reputation: 29

Bean Injection without @Autowire Annotation in spring

How to inject a class without using auto-wire annotation in spring?

Upvotes: 1

Views: 1832

Answers (1)

dunni
dunni

Reputation: 44555

There are 3 ways to do injection with Spring:

  • Use @Autowired (which you don't want)
  • Use @Inject (has most of the features as Autowired)
  • Use XML configuration. This doesn't require any annotations on the classes.

Upvotes: 1

Related Questions