From 1854cbbf66b2b6fec75cec198d2e86624053bb38 Mon Sep 17 00:00:00 2001 From: jhonatapers Date: Thu, 28 Aug 2025 09:05:38 -0300 Subject: [PATCH 1/2] fix: ensure JPA open-in-view is set to false for better performance --- infrastructure/src/main/resources/application.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/infrastructure/src/main/resources/application.yml b/infrastructure/src/main/resources/application.yml index 7bc79f30..7354c848 100644 --- a/infrastructure/src/main/resources/application.yml +++ b/infrastructure/src/main/resources/application.yml @@ -31,6 +31,7 @@ spring: password: ${postgres.password} url: jdbc:postgresql://${postgres.host}:${postgres.port}/${postgres.database} jpa: + open-in-view: false hibernate: ddl-auto: none show-sql: false From d2c9e0593d3743a808d5b5e3f15c00654df13b64 Mon Sep 17 00:00:00 2001 From: jhonatapers Date: Thu, 28 Aug 2025 09:07:13 -0300 Subject: [PATCH 2/2] fix: correct admin request matcher path in security configuration --- .../infrastructure/configuration/security/SecurityConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infrastructure/src/main/java/com/callv2/drive/infrastructure/configuration/security/SecurityConfig.java b/infrastructure/src/main/java/com/callv2/drive/infrastructure/configuration/security/SecurityConfig.java index 77ffa143..933ab53c 100644 --- a/infrastructure/src/main/java/com/callv2/drive/infrastructure/configuration/security/SecurityConfig.java +++ b/infrastructure/src/main/java/com/callv2/drive/infrastructure/configuration/security/SecurityConfig.java @@ -38,11 +38,10 @@ SecurityFilterChain securityFilterChain( .requestMatchers(HttpMethod.OPTIONS, "/**") .permitAll() - .requestMatchers("admin/**") + .requestMatchers("/admin/**") .hasAnyRole(ROLE_ADMIN) .requestMatchers(HttpMethod.GET, - "swagger-ui.html", "/v3/api-docs/**", "/swagger-ui/**", "/swagger-ui.html")