@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingBean(name = "springBootAdminEndpointConfigurer")
        public CasWebSecurityConfigurer<HttpSecurity> springBootAdminEndpointConfigurer(final AdminServerProperties properties) {
            return new CasWebSecurityConfigurer<>() {
                @Override
                public int getOrder() {
                    return Ordered.LOWEST_PRECEDENCE;
                }

                @Override
                public CasWebSecurityConfigurer<HttpSecurity> finish(final HttpSecurity http) throws Exception {
                    val adminContextPath = StringUtils.prependIfMissing(properties.getContextPath(), "/");
                    val successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
                    successHandler.setTargetUrlParameter("redirectTo");
                    successHandler.setDefaultTargetUrl(adminContextPath);
                    http.authorizeHttpRequests(customizer -> customizer
                            .requestMatchers(
                                PathPatternRequestMatcher.withDefaults().matcher(adminContextPath + "/assets/**"),
                                PathPatternRequestMatcher.withDefaults().matcher(adminContextPath + "/login")).permitAll()
                            .requestMatchers(
                                PathPatternRequestMatcher.withDefaults().matcher(adminContextPath + "/**")).authenticated()
                        )
                        .formLogin(customizer -> customizer.loginPage(adminContextPath + "/login").successHandler(successHandler))
                        .logout(customizer -> customizer.logoutUrl(adminContextPath + "/logout"));
                    return this;
                }
            };
        }
This is {@link CasSpringBootAdminAutoConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-bootadmin/src/main/java/org/apereo/cas/config/CasSpringBootAdminAutoConfiguration.java