package scorekeep; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Bean; import javax.servlet.Filter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Configuration public class WebConfig { private static final Logger logger = LoggerFactory.getLogger(WebConfig.class); @Bean public Filter SimpleCORSFilter() { return new SimpleCORSFilter(); } static { if ( System.getenv("NOTIFICATION_EMAIL") != null ){ Sns.createSubscription(); } } }