From b5ccb1636fc0efb0ea9d87c38995fee14cfd45d3 Mon Sep 17 00:00:00 2001
From: AlphaWu <wp@zafu.edu.cn>
Date: 星期日, 20 八月 2023 15:50:24 +0800
Subject: [PATCH] 修正Database拼写错误。

---
 src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java |   21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
index be2850f..6a24735 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
@@ -1,7 +1,7 @@
 package com.genersoft.iot.vmp.conf.security;
 
 import com.genersoft.iot.vmp.conf.UserSetting;
-import org.junit.jupiter.api.Order;
+import org.springframework.core.annotation.Order;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -47,16 +47,6 @@
      * 鐧诲嚭鎴愬姛鐨勫鐞�
      */
     @Autowired
-    private LoginFailureHandler loginFailureHandler;
-    /**
-     * 鐧诲綍鎴愬姛鐨勫鐞�
-     */
-    @Autowired
-    private LoginSuccessHandler loginSuccessHandler;
-    /**
-     * 鐧诲嚭鎴愬姛鐨勫鐞�
-     */
-    @Autowired
     private LogoutHandler logoutHandler;
     /**
      * 鏈櫥褰曠殑澶勭悊
@@ -72,10 +62,7 @@
      **/
     @Override
     public void configure(WebSecurity web) {
-
-        if (!userSetting.isInterfaceAuthentication()) {
-            web.ignoring().antMatchers("**");
-        }else {
+        if (userSetting.isInterfaceAuthentication()) {
             ArrayList<String> matchers = new ArrayList<>();
             matchers.add("/");
             matchers.add("/#/**");
@@ -86,6 +73,8 @@
             matchers.add("/swagger-resources/**");
             matchers.add("/v3/api-docs/**");
             matchers.add("/js/**");
+            matchers.add("/api/device/query/snap/**");
+            matchers.add("/record_proxy/*/**");
             matchers.addAll(userSetting.getInterfaceAuthenticationExcludes());
             // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�
             web.ignoring().antMatchers(matchers.toArray(new String[0]));
@@ -122,7 +111,7 @@
                 .authorizeRequests()
                 .requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
                 .antMatchers(userSetting.getInterfaceAuthenticationExcludes().toArray(new String[0])).permitAll()
-                .antMatchers("/api/user/login","/index/hook/**").permitAll()
+                .antMatchers("/api/user/login","/index/hook/**","/zlm_Proxy/FhTuMYqB2HeCuNOb/record/t/1/2023-03-25/16:35:07-16:35:16-9353.mp4").permitAll()
                 .anyRequest().authenticated()
                 // 寮傚父澶勭悊鍣�
                 .and()

--
Gitblit v1.8.0