Annotation Interface InjectService


@Target(METHOD) @Retention(RUNTIME) public @interface InjectService
Annotation to allow services to request injection of other services.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Is the service to be injected required (not optional)?
    Class<? extends Service>
    The service role to inject, the default is to use the type of the parameter to which this method is attached.
  • Element Details

    • serviceRole

      Class<? extends Service> serviceRole
      The service role to inject, the default is to use the type of the parameter to which this method is attached.
      Returns:
      The service role.
      Default:
      org.hibernate.service.Service.class
    • required

      boolean required
      Is the service to be injected required (not optional)?
      Returns:
      True if the service is required.
      Default:
      true