Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhouhao
2017-09-04 17:00:40 +08:00
6 changed files with 54 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
package org.hswebframework.web.workflow;
import org.hswebframework.web.dao.Dao;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/**
* @author zhouhao
*/
@SpringBootApplication
@ComponentScan("org.hswebframework.web.workflow")
@MapperScan(value = "org.hswebframework.web.workflow", markerInterface = Dao.class) //扫描mybatis dao
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class);
}
}

View File

@@ -30,7 +30,7 @@ public class FlowableAutoConfiguration {
return configuration -> {
configuration
.setAsyncExecutorActivate(false)
// .setDatabaseSchemaUpdate("false")
.setDatabaseSchemaUpdate("false")
.setJobExecutorActivate(false)
.setActivityFontName("宋体")
.setLabelFontName("宋体")

View File

@@ -51,7 +51,7 @@ import java.util.zip.ZipInputStream;
* @Date 2017/8/10.
*/
@RestController
@RequestMapping("/workflow/process/definition")
@RequestMapping("/workflow/process/definition/")
public class FlowableDeploymentController extends FlowableAbstract {
private final static String MODEL_ID = "modelId";
@@ -70,7 +70,7 @@ public class FlowableDeploymentController extends FlowableAbstract {
/**
* 流程定义列表
*/
@GetMapping
@GetMapping("/processList")
public ResponseMessage<PagerResult<ProcessDefinition>> processList(QueryParamEntity param) {
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
param.getTerms().forEach((term) -> {

View File

@@ -29,7 +29,7 @@ import java.net.URLEncoder;
import java.util.List;
@RestController
@RequestMapping("/workflow/model")
@RequestMapping("/workflow/model/")
public class FlowableModelManagerController {
@Autowired
@@ -41,7 +41,7 @@ public class FlowableModelManagerController {
private final static String MODEL_DESCRIPTION = "description";
private final static String MODEL_KEY = "key";
@GetMapping
@GetMapping("getModelList")
public ResponseMessage<PagerResult<Model>> getModelList(QueryParamEntity param) {
ModelQuery modelQuery = repositoryService.createModelQuery();
param.getTerms().forEach((term) -> {
@@ -87,7 +87,7 @@ public class FlowableModelManagerController {
.exclude(Model.class, "metaInfo", "persistentState");
}
@PostMapping
@PostMapping("createModel")
@ResponseStatus(value = HttpStatus.CREATED)
public ResponseMessage createModel(@RequestBody JSONObject model) throws Exception {
JSONObject stencilset = new JSONObject();
@@ -112,7 +112,7 @@ public class FlowableModelManagerController {
return ResponseMessage.ok(modelData);
}
@PutMapping("/{modelId}/deploy")
@PutMapping("{modelId}/deploy")
public ResponseMessage deployModel(@PathVariable String modelId) throws Exception {
Model modelData = repositoryService.getModel(modelId);
if (modelData == null) throw new NotFoundException("模型不存在!");

View File

@@ -0,0 +1,27 @@
spring:
aop:
auto: true
proxy-target-class: true
# datasource:
# url : jdbc:h2:file:target/workflow-test
# username : sa
# password :
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name : org.h2.Driver
datasource:
url : jdbc:mysql://localhost:3306/hsweb?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false
username : root
password : root
driver-class-name : com.mysql.jdbc.Driver
cache:
type: simple
logging:
level:
org.flowable: debug
# org.activiti: debug
mybatis:
dynamic-datasource: false
mapper-locations: classpath*:org/hswebframework/web/workflow/**/*Mapper.xml
server:
port: 8080