CAS5.2 修改登录页面

cas默认的页面肯定不能满足需求,需要进行修改;在CAS5以前使用jsp,之后便使用html了,想要修改登录页面html为jsp的话,下面是个参考:

覆盖webflow

这里写图片描述
修改webflow文件中的view属性为自己的页面名称

    <view-state id="viewLoginForm" view="casLoginMyView" model="credential">
        <binder>
            <binding property="username" required="true"/>
            <binding property="password" required="true"/>
        </binder>
        <transition on="submit" bind="true" validate="true" to="realSubmit" history="invalidate"/>
    </view-state>

修改application.properties文件中的suffix为自己的页面后缀名

##
# CAS Thymeleaf View Configuration
#
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.cache=true
spring.thymeleaf.mode=HTML
spring.thymeleaf.suffix=.jsp (默认是.html

添加页面文件在templates文件夹中

这里写图片描述

完成

猜你喜欢

转载自blog.csdn.net/qq_17348297/article/details/80735900