Primary constructor

const Primary()

Primary annotation for marking a primary pod

This annotation marks a pod as primary when multiple pods of the same type exist.

Example Usage:

@Configuration()
class PaymentConfig {
  @Pod()
  @Primary()
  PaymentProcessor primaryPaymentProcessor() {
    return StripePaymentProcessor();
  }
  
  @Pod('paypalProcessor')
  PaymentProcessor paypalPaymentProcessor() {
    return PayPalPaymentProcessor();
  }
}

Implementation

const Primary();