git地址:https://github.com/apereo/cas-overlay-template.git切换到5.3版本。最新版本,下载后无法编译。运行build.cmd包创建src/main/resources目录,如下,将target/cas/META-INF文件、target/cas/services、target/cas/application.properties这三个文件复制到resources.修改文件HTTPSandIMAPS-10000001.json以支持http{"@class":"org.apereo.cas.services.RegexRegisteredService","serviceId":"^(https|http|imaps)://.*","name":"HTTPSandIMAPS","id":10000001,"description":"此服务定义授权所有支持HTTPS和IMAPS协议的应用程序url。","evaluationOrder":10000}同时,你需要enablerecordjson配置文件打开文件cas\WEB-INF\classes\application.properties添加如下配置cas.tgc.secure=falsecas.serviceRegistry.initFromJson=truecasserverconfigurationmysqlorg.apereo.cascas-server-support-jdbc${cas.version}org.apereo.cascas-server-support-jdbc-drivers${cas.version}mysqlmysql连接器-java8.0.29application.properties配置文件,添加mysqlcas.authn链接。jdbc.query[0].driverClass=com.mysql.cj.jdbc.Drivercas.authn.jdbc.query[0].url=jdbc:mysql://127.0.0.1:3306/ry?useUnicode=true&characterEncoding=utf-8cas.authn.jdbc.query[0].user=rootcas.authn.jdbc.query[0].password=123456cas.authn.jdbc.query[0].sql=从sys_user中选择密码,其中user_name=?cas.authn.jdbc.query[0].fieldPassword=password#开启自定义密码验证cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULTcas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8cas.Authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5注释掉默认的cas账号密码,否则这个账号密码也可以登陆#cas.authn.accept.users=casuser::Mellonmysqltakemd5:selectMD5('123456')重新运行:build.cmdpackageputtarget/cas.war到tomcat容器中,启动tomcat我的tomcat端口是8888访问:http://localhost:8888/cas