forked from didi/turbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request didi#38 from lthaoshao/feature_v1.0.2_opt
optimize maven dependency and code
- Loading branch information
Showing
43 changed files
with
537 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
demo/src/main/java/com/didiglobal/turbo/demo/DemoApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
demo/src/main/java/com/didiglobal/turbo/demo/service/HookServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.didiglobal.turbo.demo.service; | ||
|
||
import com.didiglobal.turbo.engine.model.InstanceData; | ||
import com.didiglobal.turbo.engine.spi.HookService; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Service | ||
public class HookServiceImpl implements HookService { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(HookServiceImpl.class); | ||
|
||
@Override | ||
public List<InstanceData> invoke(String flowInstanceId, String nodeInstanceId, String nodeKey, String hookInfoParam) { | ||
LOGGER.info("flowInstance={}||nodeInstanceId={}||nodeKey={}||hookInfoParam={}", | ||
flowInstanceId, nodeInstanceId, nodeKey, hookInfoParam); | ||
// do sth , eg: refresh info | ||
return new ArrayList<>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...a/com/didiglobal/turbo/demo/DemoTest.java → ...a/com/didiglobal/turbo/demo/DemoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ????? | ||
spring.datasource.url=jdbc:h2:mem:test | ||
spring.datasource.driver-class-name=org.h2.Driver | ||
spring.datasource.username=root | ||
spring.datasource.password= | ||
|
||
spring.datasource.dynamic.primary=engine | ||
spring.datasource.dynamic.datasource.engine.type=com.alibaba.druid.pool.DruidDataSource | ||
spring.datasource.dynamic.datasource.engine.username=username | ||
spring.datasource.dynamic.datasource.engine.password=password | ||
spring.datasource.dynamic.datasource.engine.driver-class-name=org.h2.Driver | ||
spring.datasource.dynamic.datasource.engine.url=jdbc:h2:mem:t_engine;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=TRUE | ||
|
||
|
||
# DDL?? | ||
spring.datasource.schema=classpath:script/turbo-mysql-h2-ddl.sql | ||
|
||
# DML?? | ||
spring.datasource.data=classpath:script/turbo-mysql-h2-dml.sql | ||
|
||
logging.config=classpath:logback-spring.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration debug="false"> | ||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> | ||
<property name="LOG_HOME" value="./logs"/> | ||
<!-- 控制台输出 --> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> | ||
<pattern> | ||
[%level][%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}][%logger:%L][%thread]||traceid=%X{X-B3-TraceId:-}||%msg%n | ||
</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!--日志文件输出的文件名--> | ||
<FileNamePattern>${LOG_HOME}/turbo.demo.log.%d{yyyyMMddHH}</FileNamePattern> | ||
<!--日志文件保留数量--> | ||
<MaxHistory>240</MaxHistory> | ||
</rollingPolicy> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> | ||
<pattern> | ||
[%level][%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ}][%logger:%L][%thread]||traceid=%X{X-B3-TraceId:-}||%msg%n | ||
</pattern> | ||
<charset>UTF-8</charset> | ||
</encoder> | ||
</appender> | ||
<logger name="org.springframework" level="INFO"/> | ||
<!-- 日志输出级别 --> | ||
<root level="INFO"> | ||
<appender-ref ref="STDOUT"/> | ||
<appender-ref ref="FILE"/> | ||
</root> | ||
</configuration> |
Oops, something went wrong.