注释类型 Autowired


  • @Target(FIELD)
    @Retention(RUNTIME)
    @Documented
    public @interface Autowired
    用来标记bean的属性,标记了该注解之后,系统在初始化阶段会对该字段自动赋值 After the annotation is marked with the attributes used to mark the bean, the system is automatically assigned to the field during the initialization phase.
    作者:
    Eva Wang
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      String value
      依赖的bean名称,可以为空,默认为空 Depending on the bean name, it can be empty and the default is empty.
    • 元素详细资料

      • value

        String value
        依赖的bean名称,可以为空,默认为空 Depending on the bean name, it can be empty and the default is empty.
        返回:
        对象名称/bean name
        默认值:
        ""