update springboot 3.4.7 => 3.5.4

update springcloud 2024.0.0 => 2025.0.0
update springboot-admin 3.4.7 => 3.5.1
update springdoc 2.8.8 => 2.8.9
update lombok 1.18.36 => 1.18.38
This commit is contained in:
疯狂的狮子Li
2025-07-30 16:16:10 +08:00
parent c73d3cdf89
commit 4557bc30b6
10 changed files with 102 additions and 150 deletions

View File

@@ -12,6 +12,7 @@ import org.springframework.security.config.annotation.web.configurers.HeadersCon
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
import org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher;
import org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher;
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
/**
@@ -30,7 +31,7 @@ public class WebSecurityConfigurer {
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity httpSecurity, MvcRequestMatcher.Builder mvc) throws Exception {
public SecurityFilterChain filterChain(HttpSecurity httpSecurity, PathPatternRequestMatcher.Builder mvc) throws Exception {
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
@@ -40,8 +41,8 @@ public class WebSecurityConfigurer {
header.frameOptions(HeadersConfigurer.FrameOptionsConfig::disable))
.authorizeHttpRequests((authorize) ->
authorize.requestMatchers(
mvc.pattern(adminContextPath + "/assets/**"),
mvc.pattern(adminContextPath + "/login")
mvc.matcher(adminContextPath + "/assets/**"),
mvc.matcher(adminContextPath + "/login")
).permitAll()
.anyRequest().authenticated())
.formLogin((formLogin) ->