From 158e42b053a0ad3206f1d5d017020976a0c3273c Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Wed, 18 Sep 2024 23:52:36 -0400 Subject: [PATCH] debugs --- src/main/java/cc/pulseapp/api/config/AppConfig.java | 11 ++++++++++- .../cc/pulseapp/api/config/WebSecurityConfig.java | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/pulseapp/api/config/AppConfig.java b/src/main/java/cc/pulseapp/api/config/AppConfig.java index 48f0c0b..9d9f3e7 100644 --- a/src/main/java/cc/pulseapp/api/config/AppConfig.java +++ b/src/main/java/cc/pulseapp/api/config/AppConfig.java @@ -1,6 +1,8 @@ package cc.pulseapp.api.config; +import jakarta.annotation.PostConstruct; import lombok.NonNull; +import lombok.extern.log4j.Log4j2; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -9,13 +11,20 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * @author Braydon */ -@Configuration +@Configuration @Log4j2(topic = "App Config") public class AppConfig { + @PostConstruct + public void init() { + log.info("App Config initialized"); + } + @Bean public WebMvcConfigurer configureCors() { return new WebMvcConfigurer() { @Override public void addCorsMappings(@NonNull CorsRegistry registry) { + log.info("Configuring CORS..."); + // Allow all origins to access the API registry.addMapping("*") .allowedOrigins("*") // Allow all origins diff --git a/src/main/java/cc/pulseapp/api/config/WebSecurityConfig.java b/src/main/java/cc/pulseapp/api/config/WebSecurityConfig.java index b3a1159..836f534 100644 --- a/src/main/java/cc/pulseapp/api/config/WebSecurityConfig.java +++ b/src/main/java/cc/pulseapp/api/config/WebSecurityConfig.java @@ -25,8 +25,7 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher; /** * @author Braydon */ -@Configuration -@EnableWebSecurity +@Configuration @EnableWebSecurity @Order(Ordered.HIGHEST_PRECEDENCE) public class WebSecurityConfig { /**