注释与xml之间的对应关系

来源:互联网 发布:什么是网络安全管理 编辑:程序博客网 时间:2024/04/28 23:25

<beanid="u1"class="com.*.dao.impl.UserDAOImpl">

    <!--collaborators and configuration for this bean go here -->

</bean>

 

<beanid="userService"class="com.*.service.UserService">

   

  </bean>

 

等价于:

<context:annotation-config/>

    <context:component-scanbase-package="*.*"></context:component-scan>

@Component("name")

@Resource(name=" name ")namekey

@Component("name ")

原创粉丝点击