From 6e4fc1e79b7b4b91d6eb36f6b5638fa902665a50 Mon Sep 17 00:00:00 2001 From: xiaoxie <hotcoffie@163.com> Date: 星期六, 23 四月 2022 23:34:36 +0800 Subject: [PATCH] 1.修正了播放地址无法正常播放视频的问题,包含两个错误: 1.1修正播放器界面路由(此页面不需要layout边框,之前已经修复但在地图代码合并时又被错误覆盖) 1.2修正播放器id属性,此属性现在不需要父级组件传入(这是之前导致独立播放页面失效的主要原因) 2.调整滚动条美化样式到app.vue中,使其真正全局生效 --- src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java | 24 ++++++++++++++++++++---- 1 files changed, 20 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 aa642c6..47cfdab 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,9 @@ package com.genersoft.iot.vmp.conf.security; +import com.genersoft.iot.vmp.conf.UserSetting; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; 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; @@ -14,6 +16,8 @@ import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import java.util.List; + /** * 閰嶇疆Spring Security */ @@ -22,8 +26,10 @@ @EnableGlobalMethodSecurity(prePostEnabled = true) public class WebSecurityConfig extends WebSecurityConfigurerAdapter { - @Value("${userSettings.interfaceAuthentication}") - private boolean interfaceAuthentication; + private final static Logger logger = LoggerFactory.getLogger(WebSecurityConfig.class); + + @Autowired + private UserSetting userSetting; @Autowired private DefaultUserDetailsServiceImpl userDetailsService; @@ -71,12 +77,13 @@ @Override public void configure(WebSecurity web) { - if (!interfaceAuthentication) { + if (!userSetting.isInterfaceAuthentication()) { web.ignoring().antMatchers("**"); }else { // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹� web.ignoring() .antMatchers("/") + .antMatchers("/#/**") .antMatchers("/static/**") .antMatchers("/index.html") .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**" @@ -84,6 +91,15 @@ .antMatchers("/swagger-resources/**") .antMatchers("/v3/api-docs/**") .antMatchers("/js/**"); + List<String> interfaceAuthenticationExcludes = userSetting.getInterfaceAuthenticationExcludes(); + for (String interfaceAuthenticationExclude : interfaceAuthenticationExcludes) { + if (interfaceAuthenticationExclude.split("/").length < 4 ) { + logger.warn("{}涓嶆弧瓒充袱绾х洰褰曪紝宸插拷鐣�", interfaceAuthenticationExclude); + }else { + web.ignoring().antMatchers(interfaceAuthenticationExclude); + } + + } } } -- Gitblit v1.8.0