From 11e8fad2e981b3dca22dad4048246d012ce326b7 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 22 六月 2021 13:13:31 +0800
Subject: [PATCH] Merge pull request #113 from lawrencehj/wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 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 ee6a30e..fd7383b 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.UserSetup;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.security.authentication.AuthenticationManager;
@@ -22,8 +22,8 @@
 @EnableGlobalMethodSecurity(prePostEnabled = true)
 public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
 
-    @Value("${userSettings.interfaceAuthentication}")
-    private boolean interfaceAuthentication;
+    @Autowired
+    private UserSetup userSetup;
 
     @Autowired
     private DefaultUserDetailsServiceImpl userDetailsService;
@@ -71,7 +71,7 @@
     @Override
     public void configure(WebSecurity web) {
 
-        if (!interfaceAuthentication) {
+        if (!userSetup.isInterfaceAuthentication()) {
             web.ignoring().antMatchers("**");
         }else {
             // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹�

--
Gitblit v1.8.0