注释类型 Component


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Documented
    public @interface Component
    该注解用来标识类型,当类型上标记了本注解,系统会在初始化阶段实例化该对象,并且对需要自动装载的属性进行赋值 该注解标识的类型生成的对象不使用动态代理的方式实例化,不会被默认拦截器拦截 This annotation is used to identify the type, and when the annotation is marked on the type, the system instantiates the object in the initialization phase and assigns the attributes that need to be automatically loaded. The type generated by the annotation identifier is not instantiated using a dynamic proxy and is not intercepted by the default interceptor.
    • 可选元素概要

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

      • value

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