flowable6.6.0集成springboot mybatis报Invalid bound statement (not found)

时间: 2024-04-27 08:18:14 浏览: 16
在Flowable 6.6.0版本中,集成Spring Boot和MyBatis时出现"Invalid bound statement (not found)"错误通常是由于以下原因之一引起的: 1. SQL映射文件未正确配置:请确保在MyBatis的配置文件中正确指定了SQL映射文件的位置,并且映射文件中定义的SQL语句与实际的数据库表和字段对应。 2. SQL语句命名错误:请检查SQL映射文件中定义的SQL语句的命名是否与代码中调用的方法名一致。MyBatis会根据方法名去查找对应的SQL语句,如果找不到匹配的SQL语句,就会报错。 3. Mapper接口未正确注解:请确保Mapper接口上使用了`@Mapper`注解,以告诉MyBatis该接口是一个Mapper接口,并且能够被Spring Boot正确扫描到。 4. MyBatis配置错误:请检查MyBatis的配置文件是否正确,包括数据库连接配置、Mapper扫描路径等。 如果以上步骤都没有解决问题,请提供更多的具体信息,例如相关的代码片段或错误日志,以便更好地帮助您解决问题。
相关问题

flowable如何集成springboot

1. 添加依赖 在`pom.xml`文件中添加以下依赖: ```xml <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> <version>${flowable.version}</version> </dependency> ``` 2. 配置数据库 在`application.yml`文件中添加以下配置: ```yaml spring: datasource: url: jdbc:mysql://localhost:3306/flowable?useUnicode=true&characterEncoding=utf-8&useSSL=false username: root password: root driver-class-name: com.mysql.jdbc.Driver ``` 3. 配置流程引擎 在`application.yml`文件中添加以下配置: ```yaml flowable: database-schema-update: true history-level: full ``` 4. 自定义流程引擎配置 可以通过继承`ProcessEngineConfigurationConfigurer`接口来自定义流程引擎配置,例如: ```java @Configuration public class FlowableConfig { @Bean public ProcessEngineConfigurationConfigurer processEngineConfigurationConfigurer() { return processEngineConfiguration -> { processEngineConfiguration.setAsyncExecutorActivate(false); processEngineConfiguration.setActivityFontName("宋体"); processEngineConfiguration.setLabelFontName("宋体"); }; } } ``` 5. 编写流程定义 在`src/main/resources/processes`目录下创建流程定义文件,例如`leave.bpmn20.xml`: ```xml <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.flowable.org/processdef"> <process id="leave" name="请假流程" isExecutable="true"> <startEvent id="start" name="开始"/> <userTask id="apply" name="申请请假"> <extensionElements> <flowable:formProperty id="reason" name="请假原因" type="string" required="true"/> <flowable:formProperty id="days" name="请假天数" type="long" required="true"/> </extensionElements> <documentation>请假申请节点,需要填写请假原因和请假天数</documentation> <incoming>startToApply</incoming> <outgoing>applyToApprove</outgoing> <potentialOwner> <resourceAssignmentExpression> <formalExpression>applyer</formalExpression> </resourceAssignmentExpression> </potentialOwner> </userTask> <userTask id="approve" name="审批"> <extensionElements> <flowable:formProperty id="result" name="审批结果" type="enum" required="true"> <flowable:value id="pass" name="通过"/> <flowable:value id="reject" name="驳回"/> </flowable:formProperty> <flowable:formProperty id="comment" name="审批意见" type="string" required="false"/> </extensionElements> <documentation>审批节点,需要填写审批结果和审批意见</documentation> <incoming>applyToApprove</incoming> <outgoing>approveToEnd</outgoing> <potentialOwner> <resourceAssignmentExpression> <formalExpression>approver</formalExpression> </resourceAssignmentExpression> </potentialOwner> </userTask> <endEvent id="end" name="结束"> <incoming>approveToEnd</incoming> </endEvent> <sequenceFlow id="startToApply" sourceRef="start" targetRef="apply"/> <sequenceFlow id="applyToApprove" sourceRef="apply" targetRef="approve"/> <sequenceFlow id="approveToEnd" sourceRef="approve" targetRef="end"/> </process> <bpmndi:BPMNDiagram> <bpmndi:BPMNPlane bpmnElement="leave"> <bpmndi:BPMNShape id="start_shape" bpmnElement="start"> <omgdc:Bounds x="180" y="80" width="50" height="50"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="apply_shape" bpmnElement="apply"> <omgdc:Bounds x="250" y="60" width="100" height="80"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="approve_shape" bpmnElement="approve"> <omgdc:Bounds x="400" y="60" width="100" height="80"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="end_shape" bpmnElement="end"> <omgdc:Bounds x="550" y="80" width="50" height="50"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="startToApply_edge" bpmnElement="startToApply"> <omgdi:waypoint x="205" y="105"/> <omgdi:waypoint x="250" y="100"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="applyToApprove_edge" bpmnElement="applyToApprove"> <omgdi:waypoint x="350" y="100"/> <omgdi:waypoint x="400" y="100"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="approveToEnd_edge" bpmnElement="approveToEnd"> <omgdi:waypoint x="500" y="100"/> <omgdi:waypoint x="550" y="105"/> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> ``` 6. 编写流程服务 编写流程服务,例如: ```java @Service public class LeaveService { @Autowired private RuntimeService runtimeService; @Autowired private TaskService taskService; public void startProcess(String applyer, String reason, long days) { Map<String, Object> variables = new HashMap<>(); variables.put("applyer", applyer); variables.put("reason", reason); variables.put("days", days); runtimeService.startProcessInstanceByKey("leave", variables); } public void approveTask(String taskId, String result, String comment) { Map<String, Object> variables = new HashMap<>(); variables.put("result", result); variables.put("comment", comment); taskService.complete(taskId, variables); } public List<Task> getTasks(String assignee) { return taskService.createTaskQuery().taskAssignee(assignee).list(); } } ``` 7. 测试流程服务 编写测试类,例如: ```java @SpringBootTest @RunWith(SpringRunner.class) public class LeaveServiceTest { @Autowired private LeaveService leaveService; @Test public void testLeaveProcess() { String applyer = "张三"; String reason = "生病了"; long days = 3; leaveService.startProcess(applyer, reason, days); List<Task> tasks = leaveService.getTasks("approver"); Assert.assertNotNull(tasks); Assert.assertEquals(1, tasks.size()); Task task = tasks.get(0); Assert.assertEquals(reason, task.getFormProperty("reason").getValue()); Assert.assertEquals(days, task.getFormProperty("days").getValue()); leaveService.approveTask(task.getId(), "pass", "同意"); tasks = leaveService.getTasks("approver"); Assert.assertEquals(0, tasks.size()); } } ``` 8. 运行应用程序 运行应用程序,访问http://localhost:8080/actuator/flowable,可以查看流程引擎的状态信息。 以上是集成Flowable和SpringBoot的基本步骤。具体实现可能因应用场景和需求而异,需要根据实际情况进行调整和优化。

flowable6.6.0用户指南

flowable6.6.0是一种开源的商业流程管理和工作流引擎,它为企业提供了在不同业务场景下创建、执行和监控流程的能力。flowable6.6.0用户指南是使用该引擎的用户参考资料,在该指南中,用户可以了解如何安装和配置flowable6.6.0,以及如何使用其各种功能和特性。 用户指南首先介绍了flowable6.6.0的基本概念和架构,包括流程定义、任务管理、流程实例和运行时数据等。接下来,指南详细解释了如何安装和配置flowable6。.6.0,以及如何集成它到现有的应用程序中。 用户指南还说明了如何使用flowable6.6.0的各种功能,比如如何创建和编辑流程定义、如何创建和分配任务、如何使用表单和网格等。此外,指南还介绍了如何在流程执行期间处理异常情况、如何使用流程变量和表达式等高级功能。 用户指南还提供了一些用例和示例,帮助用户更好地理解和应用flowable6.6.0。此外,它还包含一些常见问题和解决方案,以帮助用户在使用过程中遇到问题时快速解决。 总之,flowable6.6.0用户指南是使用flowable6.6.0的用户必备的参考资料,它提供了使用该引擎所需的基本知识、配置和功能的详细说明,帮助用户充分利用flowable6.6.0来优化业务流程并提高工作效率。

相关推荐

最新推荐

recommend-type

Flowable中文文档(v 6.4.2)

工作流程设计平台 Flowable 的 Word 版中文文档(v 6.4.2),本人自己从英语原版翻译而来,收获很多!
recommend-type

野狗优化算法DOA MATLAB源码, 应用案例为函数极值求解以及优化svm进行分类,代码注释详细,可结合自身需求进行应用

野狗优化算法DOA MATLAB源码, 应用案例为函数极值求解以及优化svm进行分类,代码注释详细,可结合自身需求进行应用
recommend-type

2107381120 王孟丽 实验2 (1).docx

2107381120 王孟丽 实验2 (1).docx
recommend-type

JavaScript_其他Meta JS项目使用的工具库集合.zip

JavaScript
recommend-type

asm-4.2.jar

asm.jar的作用: 提到asm.jar的作用,那么最显著的莫过于计算机显示Android手机屏幕了;其次可以调整计算机上显示Android手机屏幕的大小。ASM 是一个Java字节码操纵框架。它可以直接以二进制形式动态地生成 stub 类或其他代理类,或者在装载时动态地修改类。ASM 提供类似于 BCEL 和 SERP 之类的工具包
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

实现实时数据湖架构:Kafka与Hive集成

![实现实时数据湖架构:Kafka与Hive集成](https://img-blog.csdnimg.cn/img_convert/10eb2e6972b3b6086286fc64c0b3ee41.jpeg) # 1. 实时数据湖架构概述** 实时数据湖是一种现代数据管理架构,它允许企业以低延迟的方式收集、存储和处理大量数据。与传统数据仓库不同,实时数据湖不依赖于预先定义的模式,而是采用灵活的架构,可以处理各种数据类型和格式。这种架构为企业提供了以下优势: - **实时洞察:**实时数据湖允许企业访问最新的数据,从而做出更明智的决策。 - **数据民主化:**实时数据湖使各种利益相关者都可
recommend-type

可见光定位LED及其供电硬件具体型号,广角镜头和探测器,实验设计具体流程步骤,

1. 可见光定位LED型号:一般可使用5mm或3mm的普通白色LED,也可以选择专门用于定位的LED,例如OSRAM公司的SFH 4715AS或Vishay公司的VLMU3500-385-120。 2. 供电硬件型号:可以使用常见的直流电源供电,也可以选择专门的LED驱动器,例如Meanwell公司的ELG-75-C或ELG-150-C系列。 3. 广角镜头和探测器型号:一般可采用广角透镜和CMOS摄像头或光电二极管探测器,例如Omron公司的B5W-LA或Murata公司的IRS-B210ST01。 4. 实验设计流程步骤: 1)确定实验目的和研究对象,例如车辆或机器人的定位和导航。
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。