请问JSR-330哪个注解的功能和Spring的@Component、@Repository、@Service、@Controller相同?即用于装配Bean

解决方案 »

  1.   

    不知道你是不是真心的要问这个问题呢?不过根据LZ的等级不会是一人新手了啊!参考这个博客吧,说得很详细:http://blog.csdn.net/DL88250/archive/2009/11/19/4838803.aspx
      

  2.   


    被1楼将了一军,还居然把那么烂的文章贴出来。来自一个老外的回答:Dear howsun,guznik has just replied to a thread you have subscribed to entitled - about JSR-330 - in the Container forum of Spring Community Forums.This thread is located at:
    http://forum.springsource.org/showthread.php?t=98112&goto=newpostHere is the message that has just been posted:
    ***************
    @Named is equivalent to @Component (and therefore all the stereotypes that "inherit" from @Component), and @Inject is equivalent to @Autowired.
    Here is a relevant post: <a href="http://matthiaswessendorf.wordpress.com/2010/04/17/spring-3-0-and-jsr-330-part/" target="_blank" rel="nofollow">http://matthiaswessendorf.wordpress....-jsr-330-part/</a>
    ***************There may also be other replies, but you will not receive any more notifications until you visit the forum again.
    ......
    说得很清楚:
    @Named  -> @Component
    @Inject -> @Autowired