Class EvercatchAutoConfiguration

java.lang.Object
dev.evercatch.spring.EvercatchAutoConfiguration

@AutoConfiguration @ConditionalOnClass(EvercatchClient.class) @ConditionalOnProperty(prefix="evercatch", name="api-key") @EnableConfigurationProperties(EvercatchProperties.class) public class EvercatchAutoConfiguration extends Object
Spring Boot auto-configuration for the Evercatch SDK.

A fully configured EvercatchClient bean is registered automatically when evercatch.api-key is present in the application's environment. Override the bean by declaring your own @Bean of type EvercatchClient.

Example application.properties:

 evercatch.api-key=ec_live_abc123
 

Then inject the client normally:


 @Service
 public class WebhookService {

     private final EvercatchClient evercatch;

     public WebhookService(EvercatchClient evercatch) {
         this.evercatch = evercatch;
     }

     public void handleEvent(String eventId) throws EvercatchException {
         Event event = evercatch.getEvent(eventId);
         // ...
     }
 }
 
  • Constructor Details

    • EvercatchAutoConfiguration

      public EvercatchAutoConfiguration()
  • Method Details