Jelajahi Sumber

优化对spring boot支持的配置

bryan.zhang 6 tahun lalu
induk
melakukan
3a17abff5c

+ 1 - 2
liteflow-core/pom.xml

@@ -5,12 +5,11 @@
     <artifactId>liteflow-core</artifactId>
     <packaging>jar</packaging>
     <modelVersion>4.0.0</modelVersion>
-    <version>2.1.0</version>
 
     <parent>
 		<groupId>com.thebeastshop</groupId>
 		<artifactId>liteflow</artifactId>
-		<version>2.1.0</version>
+		<version>2.1.1</version>
 	</parent>
 
 	<dependencies>

+ 1 - 1
liteflow-spring-boot-starter/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>liteflow</artifactId>
         <groupId>com.thebeastshop</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 8 - 7
liteflow-spring-boot-starter/src/main/java/com/thebeastshop/liteflow/springboot/LiteflowExecutorInit.java

@@ -1,15 +1,16 @@
 package com.thebeastshop.liteflow.springboot;
 
 import com.thebeastshop.liteflow.core.FlowExecutor;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.beans.factory.InitializingBean;
+import javax.annotation.Resource;
 
-@Configuration
-public class LiteflowExecutorInit {
+public class LiteflowExecutorInit implements InitializingBean {
 
-    @Bean
-    public String initExecutor(FlowExecutor flowExecutor){
+    @Resource
+    private FlowExecutor flowExecutor;
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
         flowExecutor.init();
-        return "init";
     }
 }

+ 1 - 1
liteflow-test/pom.xml

@@ -26,7 +26,7 @@
         <dependency>
             <groupId>com.thebeastshop</groupId>
             <artifactId>liteflow-spring-boot-starter</artifactId>
-            <version>2.1.0</version>
+            <version>2.1.1</version>
         </dependency>
 
         <dependency>

+ 1 - 1
pom.xml

@@ -5,7 +5,7 @@
     <artifactId>liteflow</artifactId>
     <packaging>pom</packaging>
     <modelVersion>4.0.0</modelVersion>
-    <version>2.1.0</version>
+    <version>2.1.1</version>
 
     <properties>
     	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>