Annotation Interface Service


@Target(TYPE) @Retention(RUNTIME) public @interface Service
Service annotation to replace Spring's @Service.
服务注解,用于替换Spring的@Service。
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Service priority.
    Service name.
  • Element Details

    • value

      String value
      Service name.
      服务名称。
      Returns:
      service name
      服务名称
      Default:
      ""
    • priority

      int priority
      Service priority. Higher value means higher priority. When multiple implementations of the same interface exist, the one with highest priority will be returned by getBean(Class).
      服务优先级。数值越大优先级越高。 当同一接口存在多个实现时,getBean(Class)会返回优先级最高的实现。
      Returns:
      priority value (default 0)
      优先级值(默认0)
      Default:
      0