From fc98a260d6b7d7cb6198a4cb0906492ebc3ffa08 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 24 八月 2021 16:00:33 +0800
Subject: [PATCH] update 优化spy配置文件为 UTF8编码 解决中文注释乱码问题
---
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 385439e..bd6ee8f 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -1,5 +1,8 @@
package com.ruoyi.framework.config;
+import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
+import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
+import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod;
@@ -14,13 +17,10 @@
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.logout.LogoutFilter;
import org.springframework.web.filter.CorsFilter;
-import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter;
-import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl;
-import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
/**
* spring security閰嶇疆
- *
+ *
* @author ruoyi
*/
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@@ -31,7 +31,7 @@
*/
@Autowired
private UserDetailsService userDetailsService;
-
+
/**
* 璁よ瘉澶辫触澶勭悊绫�
*/
@@ -55,7 +55,7 @@
*/
@Autowired
private CorsFilter corsFilter;
-
+
/**
* 瑙e喅 鏃犳硶鐩存帴娉ㄥ叆 AuthenticationManager
*
@@ -96,23 +96,24 @@
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// 杩囨护璇锋眰
.authorizeRequests()
- // 瀵逛簬鐧诲綍login 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
- .antMatchers("/login", "/captchaImage").anonymous()
+ // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
+ .antMatchers("/login", "/register", "/captchaImage").anonymous()
.antMatchers(
HttpMethod.GET,
+ "/",
"/*.html",
"/**/*.html",
"/**/*.css",
"/**/*.js"
).permitAll()
- .antMatchers("/profile/**").anonymous()
- .antMatchers("/common/download**").anonymous()
- .antMatchers("/common/download/resource**").anonymous()
- .antMatchers("/swagger-ui.html").anonymous()
+ .antMatchers("/doc.html").anonymous()
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous()
+ // Spring Boot Actuator 鐨勫畨鍏ㄩ厤缃�
+ .antMatchers("/actuator").anonymous()
+ .antMatchers("/actuator/**").anonymous()
// 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
.anyRequest().authenticated()
.and()
@@ -125,7 +126,6 @@
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
}
-
/**
* 寮烘暎鍒楀搱甯屽姞瀵嗗疄鐜�
*/
--
Gitblit v1.9.3