因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。
1、项目中途不知道什么原因,就出现下面情况
具体如下:
2024-07-15 15:08:15.767 [main] [34mINFO [0;39m [36mliquibase.changelog:30[0;39m - Reading from `jeecg-test`.FLW_EV_DATABASECHANGELOG
2024-07-15 15:08:15.838 [main] [34mINFO [0;39m [36mliquibase.lockservice:30[0;39m - Successfully released change log lock
2024-07-15 15:08:15.840 [main] [34mINFO [0;39m [36mo.f.eventregistry.impl.EventRegistryEngineImpl:53[0;39m - EventRegistryEngine default created
2024-07-15 15:08:15.842 [main] [34mINFO [0;39m [36mo.flowable.spring.SpringProcessEngineConfiguration:1119[0;39m - Executing configure() of class org.flowable.idm.engine.configurator.IdmEngineConfigurator (priority:150000)
2024-07-15 15:08:15.889 [main] [34mINFO [0;39m [36morg.flowable.idm.engine.impl.IdmEngineImpl:52[0;39m - IdmEngine default created
2024-07-15 15:08:16.158 [main] [34mINFO [0;39m [36morg.flowable.engine.impl.ProcessEngineImpl:89[0;39m - ProcessEngine default created
2024-07-15 15:08:16.254 [main] [34mINFO [0;39m [36morg.flowable.engine.impl.cmd.ValidateV5EntitiesCmd:43[0;39m - Total of v5 deployments found: 0
2024-07-15 15:08:19.490 [main] [34mINFO [0;39m [36mo.j.modules.jmreport.config.JmReportExecutorConfig:42[0;39m - Init JimuReport Config [ 线程池 ]
2024-07-15 15:08:23.355 [main] [34mINFO [0;39m [36mo.s.b.actuate.endpoint.web.EndpointLinksResolver:58[0;39m - Exposing 2 endpoint(s) beneath base path '/actuator'
2024-07-15 15:08:23.580 [main] [34mINFO [0;39m [36morg.jeecg.config.init.CodeGenerateDbConfig:46[0;39m - Init CodeGenerate Config [ Get Db Config From application.yml ]
2024-07-15 15:08:27.139 [main] [34mINFO [0;39m [36morg.apache.coyote.http11.Http11NioProtocol:173[0;39m - Starting ProtocolHandler ["http-nio-8080"]
2024-07-15 15:08:27.216 [main] [34mINFO [0;39m [36mo.s.boot.web.embedded.tomcat.TomcatWebServer:220[0;39m - Tomcat started on port(s): 8080 (http) with context path '/jeecg-boot'
2、3、到上面就停顿了,过上10多分钟再继续下去了,看下面的图片
3、应该是下面这个接口有问题,看来看去就是ProcessModel processModel这个有问题了,其它应该也没有什么了,但没有任何报错,比较奇怪
@ApiOperation(value = "保存钉钉流程设计器内的xml文件和json")@PostMapping("/saveDd")public Result saveDd(@RequestBody ProcessModel processModel) {return Result.OK("OK");//return flowDefinitionService.saveDdModel(processModel);}
4、ProcessModel processModel换掉就正常了,那说明这个类初始化还是有点问题啊,但看着下面的代码也没有什么问题啊
@Data
public class ProcessModel{@JsonSerialize(using = ToStringSerializer.class)private String id;private String code;private String name;private Node process;@JsonSerialize(using = ToStringSerializer.class)private String flowJson;private String category;private String appType;private Integer version;private Integer sort;@JsonSerialize(using = ToStringSerializer.class)private String groupId;private String remark;public BpmnModel toBpmnModel() {BpmnModel bpmnModel = new BpmnModel();// 命名空间bpmnModel.setTargetNamespace(ProcessConstants.NAMASPASE);// 创建一个流程Process process = new Process();// 设置流程的idprocess.setId(this.getCode());// 设置流程的nameprocess.setName(this.getName());// 设置流程的文档process.setDocumentation(this.getRemark());// 递归构建所有节点Node node = this.getProcess();List<FlowElement> flowElementList = node.convert();for (FlowElement flowElement : flowElementList) {process.addFlowElement(flowElement);}// 设置流程bpmnModel.addProcess(process);// 自动布局new BpmnAutoLayout(bpmnModel).execute();return bpmnModel;}}
5、但后来发现跟这个可能跟@ApiOperation之间有冲突了
发现去掉@ApiOperation(value = "保存钉钉流程设计器内的xml文件和json") 后就正常了,晕倒。
6、另外有时候还会出现这样情况,下面这种情况一般重新全编译就可以了。
[2m2024-07-15 15:03:28.156[0;39m [32m INFO[0;39m [35m22100[0;39m [2m---[0;39m [2m[ main][0;39m [36mConditionEvaluationReportLoggingListener[0;39m [2m:[0;39m Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2m2024-07-15 15:03:28.194[0;39m [31mERROR[0;39m [35m22100[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.boot.SpringApplication [0;39m [2m:[0;39m Application run failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is com.baomidou.dynamic.datasource.exception.CannotFindDataSourceException: dynamic-datasource can not find primary datasourceat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.31.jar:5.3.31]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.31.jar:5.3.31]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.31.jar:5.3.31]at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.31.jar:5.3.31]