##引入pom
net.unicon.cas cas-client-autoconfig-support 1.2.0-GA
##java config
@Configuration@EnableCasClientpublic class CasConfig extends CasClientConfigurerAdapter{ @Override public void configureAuthenticationFilter(FilterRegistrationBean authenticationFilter) { super.configureAuthenticationFilter(authenticationFilter); authenticationFilter.getInitParameters().put("authenticationRedirectStrategyClass", "com.codecraft.CustomAuthRedirectStrategy"); }}
其中authenticationRedirectStrategyClass可以用来指定自定义的redirect策略。 ##application.yaml
cas: server-url-prefix: http://192.168.99.100:9090/cas server-login-url: http://192.168.99.100:9090/cas/login client-host-url: http://localhost:8080 validation-type: CAS
##doc