MCPcopy Create free account
hub / github.com/aws-samples/eb-java-scorekeep / WebConfig

Class WebConfig

src/main/java/scorekeep/WebConfig.java:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7import org.slf4j.LoggerFactory;
8
9@Configuration
10public class WebConfig {
11 private static final Logger logger = LoggerFactory.getLogger(WebConfig.class);
12
13 @Bean
14 public Filter SimpleCORSFilter() {
15 return new SimpleCORSFilter();
16 }
17
18 static {
19 if ( System.getenv("NOTIFICATION_EMAIL") != null ){
20 try { Sns.createSubscription(); }
21 catch (Exception e ) {
22 logger.warn("Failed to create subscription for email "+ System.getenv("NOTIFICATION_EMAIL"));
23 }
24 }
25 }
26}

Callers

nothing calls this directly

Calls 1

createSubscriptionMethod · 0.95

Tested by

no test coverage detected