Skip to content

Commit 37117e1

Browse files
committed
在TransactionAutoConfiguration后初始化
1 parent 5cb2220 commit 37117e1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

common/src/main/java/org/bekit/common/boot/CommonAutoConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
*/
99
package org.bekit.common.boot;
1010

11+
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
12+
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
1113
import org.springframework.context.annotation.Configuration;
1214
import org.springframework.context.annotation.Import;
1315

1416
/**
1517
* 公共自动配置
1618
*/
1719
@Configuration
20+
@AutoConfigureAfter(TransactionAutoConfiguration.class)
1821
@Import(CommonConfiguration.class)
1922
public class CommonAutoConfiguration {
2023
}

flow/src/main/java/org/bekit/flow/flow/FlowParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private static FlowExecutor.NodeExecutor.NodeDeciderExecutor parseNodeDecider(Me
159159
// 入参类型:(T, FlowContext)
160160
Assert.isTrue(processorExecutor != null, String.format("节点决策器[%s]不能有非FlowContext入参,因为这个节点没有处理器", nodeDeciderMethod));
161161
Assert.isAssignable(parameterTypes[0], processorExecutor.getReturnType(), String.format("节点决策器[%s]的第一个入参类型必须能被其处理器返回类型赋值", nodeDeciderMethod));
162-
Assert.isTrue(parameterTypes[1] == FlowContext.class, String.format("节点决策器[%s]的第二个入参类型必须是FlowContext"));
162+
Assert.isTrue(parameterTypes[1] == FlowContext.class, String.format("节点决策器[%s]的第二个入参类型必须是FlowContext", nodeDeciderMethod));
163163
parameterType = FlowExecutor.NodeExecutor.NodeDeciderExecutor.ParameterType.PROCESS_RESULT_AND_TARGET_CONTEXT;
164164
} else {
165165
throw new IllegalArgumentException(String.format("节点决策器[%s]的入参类型必须为:()、(FlowContext)、(T)、(T, FlowContext)————T表示能被处理器返回结果赋值的类型", nodeDeciderMethod));

0 commit comments

Comments
 (0)