Class MissingSmsGatewayConfiguration

java.lang.Object
com.irurueta.authserver.authorization.infrastructure.sms.MissingSmsGatewayConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

@Configuration(proxyBeanMethods=false) @Profile("!dev & !test & !twilio & !sns") public class MissingSmsGatewayConfiguration extends Object implements org.springframework.beans.factory.InitializingBean
Stops the startup when no SMS gateway is configured: none of the profiles that provide an SmsSender (twilio, sns, or dev / test for the logging one) is active. Without it the startup would still fail, on the missing bean, but with a message that does not say what to do; and the logging sender is deliberately never the default, so that a deployment cannot silently keep its messages in memory.
  • Field Details

  • Constructor Details

    • MissingSmsGatewayConfiguration

      public MissingSmsGatewayConfiguration()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Refuses to start.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      IllegalStateException - always, naming the profiles that provide a sender.