我们可以在登录拦截页面的源代码中看到几个参数lt
,execution
。
其中,
lt
全名是loginTicket
是用户认证登录界面中的登录票据。execution
的取值来源于flowExecutionKey
,那这个flowExecutionKey到底是何方神圣?顾名思义,
execution
一定和流程的执行有关。execution的作用
execution在CAS中的使用的位置在:org.springframework.webflow.mvc.servlet.FlowHandlerAdapter#handle。
1、execution参数的获取:
execution参数获取是在
CasDefaultFlowUrlHandler
中完成的。public final class CasDefaultFlowUrlHandler extends DefaultFlowUrlHandler {
/** Default flow execution key parameter name, {@value}. Same as that used by {@link DefaultFlowUrlHandler}. */
public static final String DEFAULT_FLOW_EXECUTION_KEY_PARAMETER = “execution”;
/** Flow execution parameter name. */
private String flowExecutionKeyParameter = DEFAULT_FLOW_EXECUTION_KEY_PARAMETER;
/**
-
Sets the parameter name used to carry flow execution key in request.
-
@param parameterName Request parameter name.
*/
public void setFlowExecutionKeyParameter(final String parameterName) {
this.flowExecutionKeyParameter = parameterName;
}
…
}
2、execution参数的作用
execution参数的使用是在
loginHandlerAdapter
适配器中完成的,我们看下源码:public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
FlowHandler flowHandler = (FlowHandler) handler;
checkAndPrepare(request, response, false);
//获取execution参数
String flowExecutionKey = flowUrlHandler.getFlowExecutionKey(request);
//execution用来标记流程编号
if (flowExecutionKey != null) {
try {
ServletExternalContext context = createServletExternalContext(request, response);
// 根据流程编号执行流程接下来的步骤
FlowExecutionResult result = flowExecutor.resumeExecution(flowExecutionKey, context);
handleFlowExecutionResult(result, context, request, response, flowHandler);
} catch (FlowException e) {
小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级Java工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Java开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注Java)
最后
终极手撕架构师的学习笔记:分布式+微服务+开源框架+性能优化
V无偿领取!(备注Java)**
[外链图片转存中…(img-igdLEzc3-1711384345390)]最后
终极手撕架构师的学习笔记:分布式+微服务+开源框架+性能优化
[外链图片转存中…(img-oH73M3KQ-1711384345390)]
-