最后
小编在这里分享些我自己平时的学习资料,由于篇幅限制,pdf文档的详解资料太全面,细节内容实在太多啦,所以只把部分知识点截图出来粗略的介绍,每个小节点里面都有更细化的内容!
开源分享:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】
程序员代码面试指南 IT名企算法与数据结构题目最优解
这是” 本程序员面试宝典!书中对IT名企代码面试各类题目的最优解进行了总结,并提供了相关代码实现。针对当前程序员面试缺乏权威题目汇总这一-痛点, 本书选取将近200道真实出现过的经典代码面试题,帮助广“大程序员的面试准备做到万无一失。 “刷”完本书后,你就是“题王”!
《TCP-IP协议组(第4版)》
本书是介绍TCP/IP协议族的经典图书的最新版本。本书自第1版出版以来,就广受读者欢迎。
本书最新版进行」护元,以体境计算机网络技不的最新发展,全书古有七大部分共30草和7个附录:第一部分介绍一些基本概念和基础底层技术:第二部分介绍网络层协议:第三部分介绍运输层协议;第四部分介绍应用层协议:第五部分介绍下一代协议,即IPv6协议:第六部分介绍网络安全问题:第七部分给出了7个附录。
Java开发手册(嵩山版)
这个不用多说了,阿里的开发手册,每次更新我都会看,这是8月初最新更新的**(嵩山版)**
MySQL 8从入门到精通
本书主要内容包括MySQL的安装与配置、数据库的创建、数据表的创建、数据类型和运算符、MySQL 函数、查询数据、数据表的操作(插入、更新与删除数据)、索引、存储过程和函数、视图、触发器、用户管理、数据备份与还原、MySQL 日志、性能优化、MySQL Repl ication、MySQL Workbench、 MySQL Utilities、 MySQL Proxy、PHP操作MySQL数据库和PDO数据库抽象类库等。最后通过3个综合案例的数据库设计,进步讲述 MySQL在实际工作中的应用。
Spring5高级编程(第5版)
本书涵盖Spring 5的所有内容,如果想要充分利用这一领先的企业级 Java应用程序开发框架的强大功能,本书是最全面的Spring参考和实用指南。
本书第5版涵盖核心的Spring及其与其他领先的Java技术(比如Hibemate JPA 2.Tls、Thymeleaf和WebSocket)的集成。本书的重点是介绍如何使用Java配置类、lambda 表达式、Spring Boot以及反应式编程。同时,将与企业级应用程序开发人员分享一些见解和实际经验,包括远程处理、事务、Web 和表示层,等等。
JAVA核心知识点+1000道 互联网Java工程师面试题
企业IT架构转型之道 阿里巴巴中台战略思想与架构实战
本书讲述了阿里巴巴的技术发展史,同时也是-部互联网技 术架构的实践与发展史。
List list = taskService()//与正在执行的任务管理相关的Service
.createTaskQuery()//创建任务查询对象
.taskAssignee(assignee)//指定个人任务查询,指定办理人
.orderByTaskCreateTime().asc()//使用创建时间的升序排列
/*返回结果集/
.list();//返回列表
if (list != null && list.size() > 0) {
for (Task task : list) {
System.out.println(“任务ID:” + task.getId());
System.out.println(“任务名称:” + task.getName());
System.out.println(“任务的创建时间:” + task.getCreateTime());
System.out.println(“任务的办理人:” + task.getAssignee());
System.out.println(“流程实例ID:” + task.getProcessInstanceId());
System.out.println(“执行对象ID:” + task.getExecutionId());
System.out.println(“流程定义ID:” + task.getProcessDefinitionId());
System.out.println(task.toString());
System.out.println(“########################################################”);
}
}
【任务】我的已办任务
List list = historyService.createHistoricTaskInstanceQuery()
.taskAssignee(“zs”)
.finished()// 已完成
.list();
【任务】修改任务审核人
taskEntity.setAssignee(assignee);
historyManager.recordTaskAssigneeChange(delegateTask.getId(), assignee);
【批注】添加批注
try {
Authentication.setAuthenticatedUserId(“zs”);//批注人的名称 一定要写,不然查看的时候不知道人物信息
String taskId = “21”; // 任务id;
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String processInstanceId = task.getProcessInstanceId(); // 实例id
String type = “comment”; // 批注类型,这个参数如果不写默认就是"comment",用于扩展 用的。
String message = “同意起飞同意”; // 批注内容
// 给当前任务添加批注信息
taskService.addComment(taskId, processInstanceId, type, message);
} finally {
Authentication.setAuthenticatedUserId(null);
}
INSERT INTO
ACT_HI_COMMENT ( ID_, TYPE_, TIME_, USER_ID_,
TASK_ID_, PROC_INST_ID_, ACTION_, MESSAGE_, FULL_MSG_ )
VALUES
( ‘7503’, ‘comment’, ‘2020-11-26 11:42:39.908’, ‘zs’,
‘21’, ‘8’, ‘AddComment’, ‘同意起飞同意’, ‘java.io.ByteArrayInputStream@6b2042de’
)
【批注】获取批注
- 1.根据实例id获取批注
List processInstanceComments = taskService.getProcessInstanceComments(processInstanceId);
实际sql
select * from ACT_HI_COMMENT where PROC_INST_ID_ = ‘8’ order by TIME_ desc
- 2、根据任务id获取批注
List taskComments = taskService.getTaskComments(taskId);
select * from ACT_HI_COMMENT where TASK_ID_ = ‘21’ and TYPE_ = ‘comment’ order by TIME_ desc
【附件】创建附件
try {
Authentication.setAuthenticatedUserId(“zs”);//批注人的名称 一定要写,不然查看的时候不知道人物信息
String attachmentType = “”;
String taskId = “21”; // 任务id
String processInstanceId = “8”; // 任务实例id
String attachmentName = “test.png”; // 附件名称
String attachmentDescription = “描述描述”; // 附件描述
String url = “www.baidu.com/a.png”;
taskService.createAttachment(attachmentType, taskId, processInstanceId, attachmentName, attachmentDescription, url);
} finally {
Authentication.setAuthenticatedUserId(null);
}
INSERT INTO
ACT_HI_COMMENT ( ID_, TYPE_, TIME_, USER_ID_, TASK_ID_, PROC_INST_ID_,
ACTION_, MESSAGE_, FULL_MSG_ )
VALUES
( ‘10002’, ‘event’, ‘2020-11-26 11:57:30.691’, ‘zs’, ‘21’, ‘8’,
‘AddAttachment’, ‘test.png’, ‘null’ )
INSERT INTO
ACT_HI_ATTACHMENT ( ID_, REV_, USER_ID_, NAME_,
DESCRIPTION_, TYPE_, TASK_ID_, PROC_INST_ID_, URL_, CONTENT_ID_, TIME_ )
VALUES
( ‘10001’, 1, ‘zs’, ‘test.png’,
‘描述描述’, ‘’, ‘21’, ‘8’, ‘www.baidu.com/a.png’, ‘null’, ‘2020-11-26 11:57:30.668’
)
【附件】获取附件
- 1.根据流程实例ID查询附件
// 根据流程实例ID查询附件
List processInstanceAttachments = taskService.getProcessInstanceAttachments(“8”);
// 实际sql
select * from ACT_HI_ATTACHMENT where PROC_INST_ID_ = ‘8’ order by TIME_ desc
- 2.根据任务ID查询附件
// 根据任务ID查询附件
List attachments= taskService.getTaskAttachments(“21”);
// 实际sql
select * from ACT_HI_ATTACHMENT where TASK_ID_ = ‘21’ order by TIME_ desc
【常用方法】
尽量都是没什么限制的全局可用方法。
获取CommandContext(全局任意地方使用)
这个很方便可以在任意地方使用,service,自定义事件,自定义命令中等等
//import org.activiti.engine.impl.context.Context;
CommandContext commandContext = Context.getCommandContext();
HistoryManager historyManager = commandContext.getHistoryManager();
获取当前任务节点
//import org.activiti.engine.impl.context.Context;
CommandContext commandContext = Context.getCommandContext();
获取任务实例管理类
TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager();
获取当前任务实例
TaskEntity currentTask = taskEntityManager.findById(taskId);
ExecutionEntity execution = currentTask.getExecution();
String executionId = execution.getId();
获取流程定义
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
根据节点id获取FlowElement节点对象
FlowElement flowElement = process.getFlowElement(targetNodeId);
设置执行实例的当前活动节点为目标节点
execution.setCurrentFlowElement(flowElement);
向operations中压入继续流程的操作类
commandContext.getAgenda().planContinueProcessOperation(execution);
删除任务
可用用内置的删除命令
org.activiti.engine.impl.cmd。DeleteTaskCmd
public DeleteTaskCmd(String taskId, String deleteReason, boolean cascade) {
this.taskId = taskId;
this.cascade = cascade;
this.deleteReason = deleteReason;
}
public DeleteTaskCmd(Collection taskIds, String deleteReason, boolean cascade) {
this.taskIds = taskIds;
this.cascade = cascade;
this.deleteReason = deleteReason;
}
// 执行方式1
new DeleteTaskCmd(delegateTask.getId(), null).execute(Context.getCommandContext());// 执行完成命令
// 执行方式2
processEngine.getManagementService().executeCommand(cmd)
完成任务
内置的CompleteTaskCmd命令,还有很多类似的,待挖掘
new CompleteTaskCmd(delegateTask.getId(), null).execute(Context.getCommandContext());// 执行完成命令
// 执行方式2
processEngine.getManagementService().executeCommand(cmd)
获取流程定义的start节点
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement flowElement = process.getInitialFlowElement();
FlowNode startActivity = (FlowNode) flowElement;
获取流程定义的第一个节点
/**
- 获得第一个节点.
*/
public FlowNode findFirstActivity(String processDefinitionId) {
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement flowElement = process.getInitialFlowElement();
FlowNode startActivity = (FlowNode) flowElement;
if (startActivity.getOutgoingFlows().size() != 1) {
throw new IllegalStateException(
"start activity outgoing transitions cannot more than 1, now is : "
- startActivity.getOutgoingFlows().size());
}
SequenceFlow sequenceFlow = startActivity.getOutgoingFlows()
.get(0);
FlowNode targetActivity = (FlowNode) sequenceFlow.getTargetFlowElement();
if (!(targetActivity instanceof UserTask)) {
logger.info(“first activity is not userTask, just skip”);
return null;
}
return targetActivity;
}
驳回到起始节点
processEngine.getManagementService().executeCommand(cmd)
public class RollbackFirstTaskCmd extends NeedsActiveTaskCmd {
private static Logger logger = LoggerFactory.getLogger(RollbackFirstTaskCmd.class);
public RollbackFirstTaskCmd(String taskId){
super(taskId);
}
public String deletereason;
public Void execute(CommandContext commandContext, TaskEntity currentTask) {
String processDefinitionId = currentTask.getProcessDefinitionId();
String executionId = currentTask.getExecutionId();
TaskEntityManager taskEntityManager = commandContext.getTaskEntityManager();
taskEntityManager.deleteTask(currentTask, deletereason, false, false);
FlowNode firstUserTask = this.findFirstActivity(processDefinitionId);
ExecutionEntity executionEntity = commandContext.getExecutionEntityManager().findById(executionId);
// 获取目标节点的来源连线
List flows = firstUserTask.getIncomingFlows();
if (flows == null || flows.isEmpty()) {
throw new ActivitiException(“回退错误,目标节点没有来源连线”);
}
// 随便选一条连线来执行,时当前执行计划为,从连线流转到目标节点,实现跳转
executionEntity.setCurrentFlowElement(flows.get(0));
commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation(executionEntity, true);
// executionEntity.setCurrentFlowElement(flowElement);
// commandContext.getAgenda().planContinueProcessOperation(executionEntity);
return null;
}
public String getSuspendedTaskException() {
return “挂起的任务不能跳转”;
}
/**
- 获得第一个节点.
*/
public FlowNode findFirstActivity(String processDefinitionId) {
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement flowElement = process.getInitialFlowElement();
FlowNode startActivity = (FlowNode) flowElement;
if (startActivity.getOutgoingFlows().size() != 1) {
throw new IllegalStateException(
"start activity outgoing transitions cannot more than 1, now is : "
- startActivity.getOutgoingFlows().size());
}
SequenceFlow sequenceFlow = startActivity.getOutgoingFlows()
.get(0);
FlowNode targetActivity = (FlowNode) sequenceFlow.getTargetFlowElement();
if (!(targetActivity instanceof UserTask)) {
logger.info(“first activity is not userTask, just skip”);
return null;
}
return targetActivity;
}
}
流程任意节点跳转、驳回、退回、拒绝等
// 删除当前运行任务,自带的删除命令即可
managementService.executeCommand(new DeleteTaskCmd(currentTask.getId()));
// 流程执行到指定节点
FlowNode targetNode = (FlowNode) process.getFlowElement(taskDefKey);“lakertask”
managementService.executeCommand(new SetFLowNodeAndGoCmd(targetNode, executionEntityId));
//根据提供节点和执行对象id,进行跳转命令
public class SetFLowNodeAndGoCmd implements Command {
private FlowNode flowElement;
private String executionId;
public SetFLowNodeAndGoCmd(FlowNode flowElement, String executionId) {
this.flowElement = flowElement;
this.executionId = executionId;
}
public Void execute(CommandContext commandContext) {
// 获取目标节点的来源连线
List flows = flowElement.getIncomingFlows();
if (flows == null || flows.size() < 1) {
throw new ActivitiException(“回退错误,目标节点没有来源连线”);
}
// 随便选一条连线来执行,当前执行计划为,从连线流转到目标节点,实现跳转
ExecutionEntity executionEntity = commandContext
.getExecutionEntityManager().findById(executionId);
executionEntity.setCurrentFlowElement(flows.get(0));
commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation(
executionEntity, true);
return null;
}
}
历史活动查询
历史活动包括所有节点(上图的圆圈)和任务(上图的矩形),而历史任务只包含任务。所以一般开发中查询历史活动比较常用。
public void historyActInstanceList(){
List list=processEngine.getHistoryService() // 历史相关Service
.createHistoricActivityInstanceQuery() // 创建历史活动实例查询
.processInstanceId(“2501”) // 执行流程实例id
.finished()
.list();
for(HistoricActivityInstance hai:list){
System.out.println(“活动ID:”+hai.getId());
System.out.println(“流程实例ID:”+hai.getProcessInstanceId());
System.out.println(“活动名称:”+hai.getActivityName());
System.out.println(“办理人:”+hai.getAssignee());
System.out.println(“开始时间:”+hai.getStartTime());
System.out.println(“结束时间:”+hai.getEndTime());
System.out.println(“=================================”);
}
}
最后
分享一套我整理的面试干货,这份文档结合了我多年的面试官经验,站在面试官的角度来告诉你,面试官提的那些问题他最想听到你给他的回答是什么,分享出来帮助那些对前途感到迷茫的朋友。
面试经验技巧篇
- 经验技巧1 如何巧妙地回答面试官的问题
- 经验技巧2 如何回答技术性的问题
- 经验技巧3 如何回答非技术性问题
- 经验技巧4 如何回答快速估算类问题
- 经验技巧5 如何回答算法设计问题
- 经验技巧6 如何回答系统设计题
- 经验技巧7 如何解决求职中的时间冲突问题
- 经验技巧8 如果面试问题曾经遇见过,是否要告知面试官
- 经验技巧9 在被企业拒绝后是否可以再申请
- 经验技巧10 如何应对自己不会回答的问题
- 经验技巧11 如何应对面试官的“激将法”语言
- 经验技巧12 如何处理与面试官持不同观点这个问题
- 经验技巧13 什么是职场暗语
面试真题篇
- 真题详解1 某知名互联网下载服务提供商软件工程师笔试题
- 真题详解2 某知名社交平台软件工程师笔试题
- 真题详解3 某知名安全软件服务提供商软件工程师笔试题
- 真题详解4 某知名互联网金融企业软件工程师笔试题
- 真题详解5 某知名搜索引擎提供商软件工程师笔试题
- 真题详解6 某初创公司软件工程师笔试题
- 真题详解7 某知名游戏软件开发公司软件工程师笔试题
- 真题详解8 某知名电子商务公司软件工程师笔试题
- 真题详解9 某顶级生活消费类网站软件工程师笔试题
- 真题详解10 某知名门户网站软件工程师笔试题
- 真题详解11 某知名互联网金融企业软件工程师笔试题
- 真题详解12 国内某知名网络设备提供商软件工程师笔试题
- 真题详解13 国内某顶级手机制造商软件工程师笔试题
- 真题详解14 某顶级大数据综合服务提供商软件工程师笔试题
- 真题详解15 某著名社交类上市公司软件工程师笔试题
- 真题详解16 某知名互联网公司软件工程师笔试题
- 真题详解17 某知名网络安全公司校园招聘技术类笔试题
- 真题详解18 某知名互联网游戏公司校园招聘运维开发岗笔试题
资料整理不易,点个关注再走吧
遇见过,是否要告知面试官
- 经验技巧9 在被企业拒绝后是否可以再申请
- 经验技巧10 如何应对自己不会回答的问题
- 经验技巧11 如何应对面试官的“激将法”语言
- 经验技巧12 如何处理与面试官持不同观点这个问题
- 经验技巧13 什么是职场暗语
[外链图片转存中…(img-4A62y7In-1715805294530)]
面试真题篇
- 真题详解1 某知名互联网下载服务提供商软件工程师笔试题
- 真题详解2 某知名社交平台软件工程师笔试题
- 真题详解3 某知名安全软件服务提供商软件工程师笔试题
- 真题详解4 某知名互联网金融企业软件工程师笔试题
- 真题详解5 某知名搜索引擎提供商软件工程师笔试题
- 真题详解6 某初创公司软件工程师笔试题
- 真题详解7 某知名游戏软件开发公司软件工程师笔试题
- 真题详解8 某知名电子商务公司软件工程师笔试题
- 真题详解9 某顶级生活消费类网站软件工程师笔试题
- 真题详解10 某知名门户网站软件工程师笔试题
- 真题详解11 某知名互联网金融企业软件工程师笔试题
- 真题详解12 国内某知名网络设备提供商软件工程师笔试题
- 真题详解13 国内某顶级手机制造商软件工程师笔试题
- 真题详解14 某顶级大数据综合服务提供商软件工程师笔试题
- 真题详解15 某著名社交类上市公司软件工程师笔试题
- 真题详解16 某知名互联网公司软件工程师笔试题
- 真题详解17 某知名网络安全公司校园招聘技术类笔试题
- 真题详解18 某知名互联网游戏公司校园招聘运维开发岗笔试题
[外链图片转存中…(img-Si9jeMan-1715805294530)]
资料整理不易,点个关注再走吧