依赖:
<dependency>
<groupId>net.unicon.cas</groupId>
<artifactId>cas-client-autoconfig-support</artifactId>
<version>1.4.0-GA</version>
</dependency>
增加配置文件:
cas.server-url-prefix=http://127.0.0.1 地址前缀
cas.server-login-url=http://127.0.0.1/login 认证地址
cas.client-host-url=http://192.26.4.28:8080 认证成功跳转地址
cas.validation-type=CAS
-----cas.validation-type目前支持3中方式:1、CAS;2、CAS3;3、SAML
开启CAS Client支持
@SpringBootApplication
@ComponentScan
(basePackages={
"com.chhliu.emailservice"
})
@EnableCasClient
// 开启CAS支持
public
class
Application
extends
SpringBootServletInitializer{
public
static
void
main(String[] args) {
SpringApplication.run(Application.
class
, args);
}
}