Annotation Type Secondary


Identify a bean as being the least preferred bean to inject when multiple beans implement the intended interface.

This can use be used when we have a 'default' implementation that would only be used when no other implementation is available in the scope to inject.


@Secondary
@Singleton
class DefaultEmailSender implements EmailSender {

  ...
}