diff --git a/src/main/java/soma/edupi/gateway/EdupiGatewayApplication.java b/src/main/java/soma/edupigateway/EdupiGatewayApplication.java similarity index 91% rename from src/main/java/soma/edupi/gateway/EdupiGatewayApplication.java rename to src/main/java/soma/edupigateway/EdupiGatewayApplication.java index bb4a0d4..06491dc 100644 --- a/src/main/java/soma/edupi/gateway/EdupiGatewayApplication.java +++ b/src/main/java/soma/edupigateway/EdupiGatewayApplication.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway; +package soma.edupigateway; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/soma/edupi/gateway/auth/TokenProvider.java b/src/main/java/soma/edupigateway/auth/TokenProvider.java similarity index 93% rename from src/main/java/soma/edupi/gateway/auth/TokenProvider.java rename to src/main/java/soma/edupigateway/auth/TokenProvider.java index 05734f7..86eb5d3 100644 --- a/src/main/java/soma/edupi/gateway/auth/TokenProvider.java +++ b/src/main/java/soma/edupigateway/auth/TokenProvider.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.auth; +package soma.edupigateway.auth; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtException; @@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Component; -import soma.edupi.gateway.exception.UnAuthorizedException; +import soma.edupigateway.exception.UnAuthorizedException; @Component public class TokenProvider { diff --git a/src/main/java/soma/edupi/gateway/config/CorsConfig.java b/src/main/java/soma/edupigateway/config/CorsConfig.java similarity index 93% rename from src/main/java/soma/edupi/gateway/config/CorsConfig.java rename to src/main/java/soma/edupigateway/config/CorsConfig.java index c865db0..85c4ee4 100644 --- a/src/main/java/soma/edupi/gateway/config/CorsConfig.java +++ b/src/main/java/soma/edupigateway/config/CorsConfig.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.config; +package soma.edupigateway.config; import java.util.List; import org.springframework.context.annotation.Bean; @@ -28,6 +28,7 @@ public CorsConfigurationSource corsConfigurationSource() { configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS")); configuration.setAllowedHeaders( List.of("Content-Type", "Authorization", "Accept", "Access-Control-Allow-Origin")); + configuration.setExposedHeaders(List.of("Content-Type")); configuration.setAllowCredentials(true); configuration.setMaxAge(3600L); diff --git a/src/main/java/soma/edupi/gateway/config/RoutingConfig.java b/src/main/java/soma/edupigateway/config/RoutingConfig.java similarity index 95% rename from src/main/java/soma/edupi/gateway/config/RoutingConfig.java rename to src/main/java/soma/edupigateway/config/RoutingConfig.java index 3833bca..e76775f 100644 --- a/src/main/java/soma/edupi/gateway/config/RoutingConfig.java +++ b/src/main/java/soma/edupigateway/config/RoutingConfig.java @@ -1,11 +1,11 @@ -package soma.edupi.gateway.config; +package soma.edupigateway.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.gateway.route.RouteLocator; import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import soma.edupi.gateway.filter.AuthenticationFilter; +import soma.edupigateway.filter.AuthenticationFilter; @Configuration public class RoutingConfig { diff --git a/src/main/java/soma/edupi/gateway/exception/GlobalExceptionHandler.java b/src/main/java/soma/edupigateway/exception/GlobalExceptionHandler.java similarity index 86% rename from src/main/java/soma/edupi/gateway/exception/GlobalExceptionHandler.java rename to src/main/java/soma/edupigateway/exception/GlobalExceptionHandler.java index 1301c93..4f613e0 100644 --- a/src/main/java/soma/edupi/gateway/exception/GlobalExceptionHandler.java +++ b/src/main/java/soma/edupigateway/exception/GlobalExceptionHandler.java @@ -1,10 +1,10 @@ -package soma.edupi.gateway.exception; +package soma.edupigateway.exception; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; -import soma.edupi.gateway.models.ErrorResponse; +import soma.edupigateway.models.ErrorResponse; @Slf4j @RestControllerAdvice diff --git a/src/main/java/soma/edupi/gateway/exception/UnAuthorizedException.java b/src/main/java/soma/edupigateway/exception/UnAuthorizedException.java similarity index 89% rename from src/main/java/soma/edupi/gateway/exception/UnAuthorizedException.java rename to src/main/java/soma/edupigateway/exception/UnAuthorizedException.java index 0660ee1..da41d28 100644 --- a/src/main/java/soma/edupi/gateway/exception/UnAuthorizedException.java +++ b/src/main/java/soma/edupigateway/exception/UnAuthorizedException.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.exception; +package soma.edupigateway.exception; import lombok.Getter; import org.springframework.http.HttpStatus; diff --git a/src/main/java/soma/edupi/gateway/filter/AuthenticationFilter.java b/src/main/java/soma/edupigateway/filter/AuthenticationFilter.java similarity index 93% rename from src/main/java/soma/edupi/gateway/filter/AuthenticationFilter.java rename to src/main/java/soma/edupigateway/filter/AuthenticationFilter.java index 444967b..9724696 100644 --- a/src/main/java/soma/edupi/gateway/filter/AuthenticationFilter.java +++ b/src/main/java/soma/edupigateway/filter/AuthenticationFilter.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.filter; +package soma.edupigateway.filter; import io.jsonwebtoken.Claims; import java.util.Optional; @@ -12,8 +12,8 @@ import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.stereotype.Component; import org.springframework.util.MultiValueMap; -import soma.edupi.gateway.auth.TokenProvider; -import soma.edupi.gateway.exception.UnAuthorizedException; +import soma.edupigateway.auth.TokenProvider; +import soma.edupigateway.exception.UnAuthorizedException; @Slf4j @Component diff --git a/src/main/java/soma/edupi/gateway/filter/RequestLoggingFilter.java b/src/main/java/soma/edupigateway/filter/RequestLoggingFilter.java similarity index 98% rename from src/main/java/soma/edupi/gateway/filter/RequestLoggingFilter.java rename to src/main/java/soma/edupigateway/filter/RequestLoggingFilter.java index 6dbba76..e6ef6f8 100644 --- a/src/main/java/soma/edupi/gateway/filter/RequestLoggingFilter.java +++ b/src/main/java/soma/edupigateway/filter/RequestLoggingFilter.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.filter; +package soma.edupigateway.filter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/soma/edupi/gateway/models/ErrorResponse.java b/src/main/java/soma/edupigateway/models/ErrorResponse.java similarity index 82% rename from src/main/java/soma/edupi/gateway/models/ErrorResponse.java rename to src/main/java/soma/edupigateway/models/ErrorResponse.java index 022efd4..a485d1d 100644 --- a/src/main/java/soma/edupi/gateway/models/ErrorResponse.java +++ b/src/main/java/soma/edupigateway/models/ErrorResponse.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway.models; +package soma.edupigateway.models; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/test/java/soma/edupi/gateway/EdupiGatewayApplicationTests.java b/src/test/java/soma/edupigateway/EdupiGatewayApplicationTests.java similarity index 87% rename from src/test/java/soma/edupi/gateway/EdupiGatewayApplicationTests.java rename to src/test/java/soma/edupigateway/EdupiGatewayApplicationTests.java index 5f4e287..96fbaa8 100644 --- a/src/test/java/soma/edupi/gateway/EdupiGatewayApplicationTests.java +++ b/src/test/java/soma/edupigateway/EdupiGatewayApplicationTests.java @@ -1,4 +1,4 @@ -package soma.edupi.gateway; +package soma.edupigateway; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest;