项目源码gitee地址

1. 添加pom.xml配置

`pom.xml文件详细配置

2. 添加jbpm.cfg.xml配置

在resources资源文件目录下添加jbpm.cfg.xml,配置内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration><process-engine-context><string name="spring.cfg" value="spring-jbpm4.xml" /></process-engine-context><import resource="jbpm.default.cfg.xml" /><import resource="jbpm.tx.spring.cfg.xml" /><import resource="jbpm.jpdl.cfg.xml" /><import resource="jbpm.bpmn.cfg.xml" /><import resource="jbpm.identity.cfg.xml" /><import resource="jbpm.businesscalendar.cfg.xml" /><import resource="jbpm.console.cfg.xml" /><!-- <import resource="jbpm.jobexecutor.cfg.xml" />-->
</jbpm-configuration>

3. 添加spring-jbpm.xml配置

在resources资源文件目录下添加spring-jbpm.xml,配置内容:

spring-jbpm.xml

4. 添加logback-spring.xml配置

在resources资源文件目录下添加logback-spring.xml,配置内容:
logback-spring.xml

5. 添加application.properties配置

编码格式
spring.http.encoding.force=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.tomcat.uri-encoding=UTF-8
sysCode=S002
server.port=8088
server.servlet.context-path=/jbpm-demo
# swagger文档开关
swagger.enable=true
# 默认数据源
spring.datasource.dynamic.primary=master
spring.autoconfigure.exclude[0]=org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/jbpmdb?useUnicode=true&useSSL=false&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
spring.datasource.username=jbpm
spring.datasource.password=jbpm
# druid配置
spring.datasource.druid.stat-view-servlet.enabled=true
spring.datasource.druid.stat-view-servlet.login-username=admin
spring.datasource.druid.stat-view-servlet.login-password=Cs654321
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.stat-view-servlet.allow=
#mysql pagehelper 分页插件配置
pagehelper.helperDialect=mysql
pagehelper.reasonable=true
pagehelper.supportMethodsArguments=true
pagehelper.params=count=countSql
# mybatis plus 设置
mybatis-plus.mapper-locations=classpath*:/mappers/**/*.xml
mybatis-plus.type-aliases-package=com.chenxbook.modules.**.dao
#关闭MP3.0自带的banner
mybatis-plus.global-config.banner=false
#默认数据库表下划线命名
mybatis-plus.global-config.db-config.table-underline=true
# 返回类型为Map,显示null对应的字段
mybatis-plus.configuration.call-setters-on-nulls=true
#引用logback.xml
logging.config=classpath:logback-spring.xml

6. 创建项目启动类

package com.chenxbook;import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;import java.net.InetAddress;
import java.net.UnknownHostException;/*** Description* <br>  定义项目启动类** @author chenxbook* @date 2020-02-28**/
@Slf4j
@EnableTransactionManagement
@MapperScan(value = {"com.chenxbook.modules.**.dao"})
@ComponentScan(basePackages = {"com.chenxbook.modules"})
@SpringBootApplication
@ImportResource("classpath:spring-jbpm.xml")
public class JbpmDemoApplication {public static void main(String[] args) throws UnknownHostException {log.info("============spring boot start=================");ConfigurableApplicationContext application = SpringApplication.run(JbpmDemoApplication.class, args);Environment env = application.getEnvironment();String ip = InetAddress.getLocalHost().getHostAddress();String port = env.getProperty("server.port");String path = env.getProperty("server.servlet.context-path");log.info("\n----------------------------------------------------------\n\t" +"Application jbpm-demo is running! Access URLs:\n\t" +"Local: \t\thttp://localhost:" + port + path + "\n\t" +"External: \thttp://" + ip + ":" + port + path + "\n\t" +"swagger-ui: \thttp://" + ip + ":" + port + path + "/swagger-ui.html\n\t" +"Doc: \t\thttp://" + ip + ":" + port + path + "/doc.html\n" +"----------------------------------------------------------");log.info("============spring boot end=================");}
}

7. 执行数据库脚本

建表语句

SpringBoot整合Jbpm4(一)相关推荐

  1. SpringBoot第九篇: springboot整合Redis

    这篇文章主要介绍springboot整合redis,至于没有接触过redis的同学可以看下这篇文章:5分钟带你入门Redis. 引入依赖: 在pom文件中添加redis依赖: <dependen ...

  2. es springboot 不设置id_原创 | 一篇解决Springboot 整合 Elasticsearch

    ElasticSearch 结合业务的场景,在目前的商品体系需要构建搜索服务,主要是为了提供用户更丰富的检索场景以及高速,实时及性能稳定的搜索服务. ElasticSearch是一个基于Lucene的 ...

  3. springboot整合shiro使用shiro-spring-boot-web-starter

    此文章仅仅说明在springboot整合shiro时的一些坑,并不是教程 增加依赖 <!-- 集成shiro依赖 --> <dependency><groupId> ...

  4. db2 springboot 整合_springboot的yml配置文件通过db2的方式整合mysql的教程

    springboot整合MySQL很简单,多数据源就master,slave就行了,但是在整合DB2就需要另起一行,以下是同一个yml文件 先配置MySQL,代码如下 spring: datasour ...

  5. 九、springboot整合rabbitMQ

    springboot整合rabbitMQ 简介 rabbitMQ是部署最广泛的开源消息代理. rabbitMQ轻量级,易于在内部和云中部署. 它支持多种消息传递协议. RabbitMQ可以部署在分布式 ...

  6. 八、springboot整合Spring Security

    springboot整合Spring Security 简介 Spring Security是一个功能强大且可高度自定义的身份验证和访问控制框架.它是保护基于Spring的应用程序的事实标准. Spr ...

  7. 六、springboot整合swagger

    六.springboot整合swagger 简介 swagger 提供最强大,最易用的工具,以充分利用OpenAPI规范. 官网 : https://swagger.io/ 准备工作 pom.xml ...

  8. SpringBoot整合mybatis、shiro、redis实现基于数据库的细粒度动态权限管理系统实例(转)...

    SpringBoot整合mybatis.shiro.redis实现基于数据库的细粒度动态权限管理系统实例 shiro 目录(?)[+] 前言 表结构 maven配置 配置Druid 配置mybatis ...

  9. SpringBoot整合RabbitMQ-整合演示

    本系列是学习SpringBoot整合RabbitMQ的练手,包含服务安装,RabbitMQ整合SpringBoot2.x,消息可靠性投递实现等三篇博客. 学习路径:https://www.imooc. ...

最新文章

  1. 【运维】使用FC命令辅助查杀DLL木马
  2. python九:元祖(tuple)
  3. ubuntu16.04禁用触摸板
  4. python 函数可以作为容器对象的元素_python第十二天, 三元表达式, 函数对象,名称空间与作用域,函数的嵌套定义...
  5. 根据location地址,在导航栏高亮显示当前页面
  6. HTML+CSS+JS实现 ❤️svg图片透明层文本显示❤️
  7. wordpress绿色小清新运营笔记博客主题模板
  8. python 抓取电脑界面_学会了Python,我的人生跟开挂一样
  9. mysql havequerycache_如何开启MySQL的中的Query Cache缓存
  10. Oracle 列转行函数 Listagg()
  11. LeetCode 一题多解
  12. mybatis注解的使用
  13. 技术储备(一):CGI介绍
  14. 2017年全国大学生电子竞赛电源A题
  15. 拼多多玩出花的社交电商 你知道多少?四川海昇智深度解析来啦
  16. php省略后缀,隐藏php后缀的方法是什么
  17. OpenCV这么简单为啥不学——1.5、解决putText中文乱码问题
  18. 把照片唱给你听 | 腾讯AI Lab国际领先技术邀你「趣」体验
  19. 深度学习中的 BN (BatchNormalization)理解
  20. 看着窗户外行走的路人,始终看不见你

热门文章

  1. 论文阅读笔记:《Neural3D: Light-weight Neural Portrait Scanning via Context-aware Correspondence Learning》
  2. [体感游戏]关于体感游戏的一些思考(六)--- 飞行
  3. java web 开发
  4. 学计算机的人常备哪些护眼的东西,常用电脑的人如何保护视力?
  5. 台式计算机的辐射程度,台式台式电脑辐射污染标准是多少
  6. Ubuntu软件安装与卸载
  7. 【WEB】前端系统配色方案(全览)
  8. 幼儿使用计算机亮度,选儿童护眼灯小心被广告忽悠,亮度值并非越高越好!
  9. BUUCTF 2021-10-4 Pwn
  10. 深度学习专业术语之英文介绍——附含历届ILSVRC冠亚军结果