diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8fce3e..43d6038 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,5 @@ jobs: distribution: 'temurin' cache: 'maven' - - name: Build with Maven - # im using -DskipTests for now the DB environment variables aren't on GitHub runner yet - run: mvn clean package -DskipTests \ No newline at end of file + - name: Build and test with Maven + run: mvn clean verify \ No newline at end of file diff --git a/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java b/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java index 3202c42..3a5eb4a 100644 --- a/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java +++ b/src/main/java/net/hackyourfuture/tickettrackingsystem/service/EmailService.java @@ -1,5 +1,6 @@ package net.hackyourfuture.tickettrackingsystem.service; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -14,12 +15,13 @@ public class EmailService { private static final Logger logger = LoggerFactory.getLogger(EmailService.class); - private final RestClient restClient; + private RestClient restClient; @Value("${resend.api.key}") private String apiKey; - public EmailService() { + @PostConstruct + public void init() { this.restClient = RestClient.builder() .baseUrl("https://api.resend.com") .build();