配置文件及相关类放在共享文件中
链接: https://pan.baidu.com/s/1xFU3FNgl_l3r9aaj6cvA4w 密码: 3c5q
1.pom增加依赖

2.cas-server-webapp工程下的web.xml增加验证码配置

3.在cas-server-core工程org.jasig.cas.authentication包下新增两个类:
UsernamePasswordCredentialWithAuthCode 和 AuthenticationViaFormActionWithAuthCode
4.在cas-server-core-api工程org.jasig.cas.authentication包下新增两个异常类:
NullAuthcodeAuthenticationException 和 BadAuthcodeAuthenticationException
5.修改cas-server-webapp工程下login-webflow.xml

6.修改cas-server-webapp工程下cas-servlet.xml

7.修改cas-server-webapp工程下messages_zh_CN.properties

8.修改cas-server-webapp工程下casLoginView.jsp

9.修改cas-server-webapp工程下deployerConfigContext.xml


10.默认中文页面显示

效果图:

