From 098886fdc3776b4cfaaea31919f9c2c2b276b3ef Mon Sep 17 00:00:00 2001 From: Vladik Date: Fri, 25 Oct 2024 14:40:17 +0300 Subject: [PATCH] Added annotation for method SecurityFilterConfig.filterChain --- .../chat/yourway/config/security/SecurityFilterConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chat/yourway/config/security/SecurityFilterConfig.java b/src/main/java/com/chat/yourway/config/security/SecurityFilterConfig.java index 4948ad9..2d00f47 100644 --- a/src/main/java/com/chat/yourway/config/security/SecurityFilterConfig.java +++ b/src/main/java/com/chat/yourway/config/security/SecurityFilterConfig.java @@ -2,6 +2,7 @@ import com.chat.yourway.security.JwtAuthFilter; import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationProvider; @@ -27,7 +28,8 @@ public class SecurityFilterConfig { private final SecurityCorsConfig securityCorsConfig; @Bean - public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { + @SneakyThrows + public SecurityFilterChain filterChain(HttpSecurity httpSecurity) { return httpSecurity .cors(cors -> securityCorsConfig.corsConfigurationSource()) .csrf(AbstractHttpConfigurer::disable)