class SecuritySecureConfig {
    private final String adminContextPath;

    public SecuritySecureConfig(AdminServerProperties adminServerProperties) {
        this.adminContextPath = adminServerProperties.getContextPath();
    }

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {<FILL_FUNCTION_BODY>}
}

        SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
        successHandler.setTargetUrlParameter("redirectTo");
        successHandler.setDefaultTargetUrl(adminContextPath + "/");

        http.authorizeHttpRequests(authorizeRequests -> {
            // 授权服务器关闭basic认证
            authorizeRequests
                    .requestMatchers(adminContextPath + "/assets/**").permitAll()
                    .requestMatchers(adminContextPath + "/login").permitAll()
                    .anyRequest().authenticated();
        })
        .formLogin(formLogin -> formLogin.loginPage(adminContextPath + "/login").successHandler(successHandler))
        .logout(logout -> logout.logoutUrl(adminContextPath + "/logout"))
        .httpBasic(Customizer.withDefaults())
        .headers(header -> header.frameOptions(HeadersConfigurer.FrameOptionsConfig::sameOrigin))
        .csrf(AbstractHttpConfigurer::disable);

        return http.build();
    
<no_super_class>