Skip to content

Commit

Permalink
release 1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
henryyan committed Nov 23, 2015
1 parent 5f08c26 commit 82efb4a
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 194 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ Demo提供Maven版本和no-maven版本,分别适用于会用mavne和不会用m
* **maven**分支:对应与git的`master`分支,便于安装和数据库初始化
* **no-maven**分支:直接是一个eclipse工程,包含eclipse的项目配置文件和WEB-INF/lib下面的所有的jar文件

## Maven方式运行

> mvn clean jetty:run
**pom.xml** 中配置了 **h2** 数据库与 **mysql** 数据库,默认启用 **h2** 数据库配置方式,如果使用 **mysql** 请启用mysql的配置(使用下面的命令)。

> mvn clean jetty:run -Pmysql
# 演示说明文档

* [配置说明](https://github.com/henryyan/kft-activiti-demo/wiki/%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E)
Expand All @@ -43,6 +51,13 @@ Demo提供Maven版本和no-maven版本,分别适用于会用mavne和不会用m

## Changelog

### 1.13.0(2015-11-23)
1. 集成基于5.17+的流程设计器(Activiti Modeler,很漂亮),demo依赖的版本支持5.17以上
2. 数据库配置属性转移到pom.xml里面,可以直接修改`pom.xml`文件的参数,也可以在运行时通过`-Djdbc.password=111111`参数覆盖

### 1.11~1.12(unknown)
1. 内部消耗掉了,不要问我...

### 1.10.1(2014-04-23)
1. 修复在最新版本Chrome(V34)不能运行Activiti Modeler问题

Expand Down
Binary file removed activiti-in-action.png
Binary file not shown.
198 changes: 44 additions & 154 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.kafeitu.demo</groupId>
<artifactId>kft-activiti-demo</artifactId>
<version>1.13-SNAPSHOT</version>
<version>1.13.0</version>
<packaging>war</packaging>
<name>Activiti demo</name>
<description>activiti demo for version 5.19</description>
<description>activiti demo for version 5.17+</description>

<developers>
<developer>
Expand Down Expand Up @@ -39,18 +39,7 @@
<junit.version>4.10</junit.version>
<mockito.version>1.9.0</mockito.version>
<powermock.version>1.4.12</powermock.version>
<activiti.version>5.19.0</activiti.version>
<activiti.engine.version>5.19.0</activiti.engine.version>

<!-- jdbc h2
<jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
<jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
<jdbc.driver.version>1.4.190</jdbc.driver.version>
-->
<!-- jdbc mysql -->
<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
<jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
<jdbc.driver.version>5.1.11</jdbc.driver.version>
<activiti.version>5.17.0</activiti.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand All @@ -68,7 +57,7 @@
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>${activiti.engine.version}</version>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
Expand Down Expand Up @@ -521,9 +510,24 @@
</build>

<profiles>
<!-- 开发环境 -->
<!-- h2 -->
<profile>
<id>kft-activiti-demo</id>
<id>h2</id>
<properties>
<db.type>h2</db.type>

<!-- driver -->
<jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
<jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
<jdbc.driver.version>1.4.190</jdbc.driver.version>

<!-- driver configs -->
<jdbc.driver>org.h2.Driver</jdbc.driver>
<jdbc.url>jdbc:h2:file:~/kft-activiti-demo;AUTO_SERVER=TRUE</jdbc.url>
<jdbc.username>sa</jdbc.username>
<jdbc.password></jdbc.password>
<hibernate.dialect>org.hibernate.dialect.H2Dialect</hibernate.dialect>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Expand All @@ -537,145 +541,31 @@
</build>
</profile>

<!-- 刷新开发环境数据库 -->
<!-- mysql -->
<profile>
<id>initdatas</id>
<id>mysql</id>
<properties>
<db.type>mysql</db.type>

<!-- driver -->
<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
<jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
<jdbc.driver.version>5.1.11</jdbc.driver.version>

<!-- driver configs -->
<jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
<jdbc.url>jdbc:mysql://localhost:3306/kad?useUnicode=true&amp;characterEncoding=utf-8</jdbc.url>
<jdbc.username>root</jdbc.username>
<jdbc.password>root</jdbc.password>
<hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</hibernate.dialect>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<property file="src/main/resources/application.local.properties"/>
<property file="src/main/resources/application.properties"/>

<property name="sql.type" value="${sql.type}"/>
<property name="dbunit.datatype" value="org.dbunit.ext.h2.H2DataTypeFactory"/>

<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"
classpathref="maven.test.classpath"/>

<!-- add init datas -->
<dbunit driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}">
<dbconfig>
<property name="datatypeFactory" value="${dbunit.datatype}"/>
</dbconfig>
<classpath refid="maven.test.classpath"/>
<operation type="CLEAN_INSERT" src="src/test/resources/data/sample-data.xml"
format="flat" transaction="true"/>
</dbunit>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- -->
<profile>
<id>refresh-db</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<configuration>
<target>
<property file="src/main/resources/application.local.properties"/>
<property file="src/main/resources/application.properties"/>

<property name="sql.type" value="${sql.type}"/>
<property name="dbunit.datatype" value="org.dbunit.ext.h2.H2DataTypeFactory"/>

<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"
classpathref="maven.test.classpath"/>

<!-- activit start -->
<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/drop/activiti.${sql.type}.drop.engine.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>

<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/drop/activiti.${sql.type}.drop.history.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>

<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/drop/activiti.${sql.type}.drop.identity.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>

<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/create/activiti.${sql.type}.create.engine.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>

<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/create/activiti.${sql.type}.create.history.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>

<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}"
src="src/main/resources/sql/${sql.type}/create/activiti.${sql.type}.create.identity.sql"
onerror="continue">
<classpath refid="maven.test.classpath"/>
</sql>
<!-- activit end -->

<!-- add init datas -->
<dbunit driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
password="${jdbc.password}">
<dbconfig>
<property name="datatypeFactory" value="${dbunit.datatype}"/>
</dbconfig>
<classpath refid="maven.test.classpath"/>
<operation type="CLEAN_INSERT" src="src/test/resources/data/sample-data.xml"
format="flat" transaction="true"/>
</dbunit>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- 在线Demo配置 -->
<profile>
<id>online</id>
<build>
<plugins>
<plugin>
<groupId>com.juvenxu.portable-config-maven-plugin</groupId>
<artifactId>portable-config-maven-plugin</artifactId>
<version>1.1.5</version>
<executions>
<execution>
<goals>
<goal>replace-package</goal>
</goals>
</execution>
</executions>
<configuration>
<portableConfig>src/main/portable/online.xml</portableConfig>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</profile>
</profiles>
Expand Down
18 changes: 1 addition & 17 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
sql.type=h2

#jdbc h2
jdbc.driver=org.h2.Driver
jdbc.url=jdbc:h2:file:~/kft-activiti-demo;AUTO_SERVER=TRUE
jdbc.username=sa
jdbc.password=
hibernate.dialect=org.hibernate.dialect.H2Dialect

#jdbc mysql \u786E\u4FDD\u6570\u636E\u5E93\u7F16\u7801\u4E3AUTF8\u5426\u5219\u4F1A\u6709\u4E71\u7801\u95EE\u9898
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://localhost:3306/kad?useUnicode=true&characterEncoding=utf-8
#jdbc.username=root
#jdbc.password=root
#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

#hibernate settings
hibernate.show_sql=false
hibernate.format_sql=false
Expand All @@ -28,7 +12,7 @@ system.version=${project.version}
spring.version=${spring.version}
hibernate.version=${hibernate.version}
activiti.version=${activiti.version}
activiti.engine.version=${activiti.engine.version}

This comment has been minimized.

Copy link
@xiaoxiaohai01

xiaoxiaohai01 Sep 24, 2020

什么意思

db.type=${db.type}

#\u7F13\u5B58\u56FE\u7247:http://www.kafeitu.me/activiti/2013/02/14/improve-performance-for-reading-diagram.html
export.diagram.path=/tmp/kft-activiti-demo
Expand Down
32 changes: 9 additions & 23 deletions src/main/webapp/WEB-INF/views/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@
</div>
<div style="float:right; width: 50%;">
<dl>
<dt>《Activiti实战》:</dt>
<dd><a target="_blank" href="http://www.kafeitu.me/activiti-in-action.html">http://www.kafeitu.me/activiti-in-action.html</a></dd>

<dt>Wiki:</dt>
<dd><a target="_blank" href="https://github.com/henryyan/kft-activiti-demo/wiki">https://github.com/henryyan/kft-activiti-demo/wiki</a></dd>

Expand All @@ -114,39 +117,18 @@

<dt>Activiti资料:</dt>
<dd><a target="_blank" href="http://www.kafeitu.me/categories.html#activiti-ref">http://www.kafeitu.me/categories.html#activiti-ref</a></dd>

</dl>
</div>
</div>
<hr />
<table>
<caption>如果登录失败,请初始化用户数据,在项目根目录执行:</caption>
<thead>
<tr>
<th style="text-align: center;">Maven结构</th>
<th style="text-align: center;">传统Web结构(no-maven)</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<b><code>mvn antrun:run -Pinitdatas</code></b>
</td>
<td>
<div>运行SQL脚本文件:</div>
<ul>
<li><code>resources/sql/h2/data.sql</code></li>
</ul>
</td>
</tr>
</tbody>
</table>
<hr />
<div>
<div style="float:left; width: 50%;">
<h5>组件版本信息</h5>
<ul>
<li>Activiti版本:${prop['activiti.version']}</li>
<li>Spring版本:${prop['spring.version']}</li>
<li>Database:${prop['db.type']}</li>
<li>使用<a href="http://maven.apache.org" target="_blank">Maven</a>管理依赖</li>
</ul>
</div>
Expand All @@ -160,6 +142,10 @@
</ul>
</div>
</div>
<hr />
<div>
<a href="http://www.kafeitu.me/activiti-in-action.html" target="_blank"><img src="images/activiti-in-action.jpg" alt=""></a>
</div>
</div>
</body>
</html>
Binary file added src/main/webapp/images/activiti-in-action.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82efb4a

Please sign in to comment.