I'm just wondering what is the difference between @Inject and @Autowired when to use each of them? or are they doing the same thing?
and if I have spring bean that have scope:
@Service @Scope("singleton")
Can I do dependency injection for both without problems?
early.
, , . @Inject - javax.inject, API . Spring , , Spring @Inject, , @Autowired Spring.
: http://matthiaswessendorf.wordpress.com/2010/04/20/spring-3-0-and-jsr-330-part-2/
?
JSR 330 @ Spring@ . @Inject Spring @ , , . , JAR 330 JAR CLASSPATH.
, , @Autowired, Spring, @Inject , JSR 330.
@Autowired
@Inject
JSR 330
1) @Inject - javax.inject Java.
2) @Autowired. org.springframework.bean.factory Spring.
, @Autowired Spring Framework, @Inject "Injection Injection for Java" (JSR-330) "
, @Inject , , - bean, , @Autowired = false .
. @Inject , , , @Inject . Provider , , bean bean.