Annotation Interface Component


@Target(TYPE) @Retention(RUNTIME) public @interface Component
Indicates that an annotated class is a Bring component. This annotation serves as a marker for Bring to automatically detect and register the annotated class as a bean during component scanning.

By default, the name of the bean will be the simple name of the annotated class. You can customize the bean name by providing a value to the value attribute. If no value is provided, the bean name will be generated based on the class name with the initial letter in lowercase.

This annotation is part of the Bring Framework's component scanning mechanism, which allows for automatic discovery and registration of Bring beans.

Usage Example:

 
  \@Component
  public class MyComponent {
      // Class definition
  }

  // Custom bean name
  \@Component("customBeanName")
  public class AnotherComponent {
      // Class definition
  }
 
 
Since:
1.0
Author:
Blyzhnytsia Team
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the Bring bean.
  • Element Details

    • value

      String value
      The name of the Bring bean. If not specified, the bean name will be generated based on the class name.
      Returns:
      the name of the Bring bean
      Default:
      ""