mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 12:12:08 +08:00
初步完成 liteflow-solon-plugin 适配
This commit is contained in:
@@ -21,10 +21,10 @@ import org.noear.solon.core.AopContext;
|
||||
@Configuration
|
||||
public class LiteflowMainAutoConfiguration {
|
||||
|
||||
@Inject(value = "${liteflow.parse-on-start}",required = false)
|
||||
@Inject(value = "${liteflow.parseOnStart}",required = false)
|
||||
boolean parseOnStart;
|
||||
|
||||
@Inject(value = "${liteflow.monitor.enable-log}", required = false)
|
||||
@Inject(value = "${liteflow.monitor.enableLog}", required = false)
|
||||
boolean enableLog;
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
import com.yomahub.liteflow.flow.FlowBus;
|
||||
import com.yomahub.liteflow.solon.LiteflowProperty;
|
||||
import org.noear.solon.Solon;
|
||||
import org.noear.solon.Utils;
|
||||
import org.noear.solon.core.AopContext;
|
||||
import org.noear.solon.core.Plugin;
|
||||
@@ -22,12 +21,12 @@ public class XPluginImpl implements Plugin {
|
||||
Properties defProps = Utils.loadProperties("META-INF/liteflow-default.properties");
|
||||
if (defProps != null && defProps.size() > 0) {
|
||||
defProps.forEach((k, v) -> {
|
||||
Solon.cfg().putIfAbsent(k, v);
|
||||
context.getProps().putIfAbsent(k, v);
|
||||
});
|
||||
}
|
||||
|
||||
//是否启用
|
||||
boolean enable = Solon.cfg().getBool("liteflow.enable", false);
|
||||
boolean enable = context.getProps().getBool("liteflow.enable", false);
|
||||
|
||||
if (!enable) {
|
||||
return;
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
|
||||
* @since 2.6.4
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/absoluteConfigPath/application.properties")
|
||||
@TestPropertySource("classpath:/absoluteConfigPath/application.properties")
|
||||
public class AbsoluteConfigPathELSpringbootTest extends BaseTest {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Set;
|
||||
* @since 2.7.0
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/cmpStep/application.properties")
|
||||
@TestPropertySource("classpath:/cmpStep/application.properties")
|
||||
public class CmpStepELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.noear.solon.test.SolonJUnit4ClassRunner;
|
||||
import org.noear.solon.test.annotation.TestPropertySource;
|
||||
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/comments/application.properties")
|
||||
@TestPropertySource("classpath:/comments/application.properties")
|
||||
public class LiteflowNodeELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
|
||||
* @since 2.6.4
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/customWhenThreadPool/application.properties")
|
||||
@TestPropertySource("classpath:/customWhenThreadPool/application.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.customWhenThreadPool.cmp"})
|
||||
public class CustomWhenThreadPoolELSpringbootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @author zendwang
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/exception/application.properties")
|
||||
@TestPropertySource("classpath:/exception/application.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.exception.cmp"})
|
||||
public class Exception2ELSpringBootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.10
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/multipleType/application.properties")
|
||||
@TestPropertySource("classpath:/multipleType/application.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.multipleType.cmp"})
|
||||
public class LiteflowMultipleTypeELSpringbootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.yomahub.liteflow.test.BaseTest;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.noear.solon.annotation.Import;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
import org.noear.solon.test.SolonJUnit4ClassRunner;
|
||||
import org.noear.solon.test.annotation.TestPropertySource;
|
||||
@@ -20,8 +19,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.10
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/nodeExecutor/application.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.nodeExecutor.cmp"})
|
||||
@TestPropertySource("classpath:/nodeExecutor/application.properties")
|
||||
public class LiteflowNodeExecutorELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parsecustom/application-custom-json.properties")
|
||||
@TestPropertySource("classpath:/parsecustom/application-custom-json.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.parsecustom.cmp"})
|
||||
public class CustomParserJsonELSpringbootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.7
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parsecustom/application-custom-xml.properties")
|
||||
@TestPropertySource("classpath:/parsecustom/application-custom-xml.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.parsecustom.cmp","com.yomahub.liteflow.test.parsecustom.bean"})
|
||||
public class CustomParserXmlELSpringbootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @author junjun
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parsecustom/application-custom-yml.properties")
|
||||
@TestPropertySource("classpath:/parsecustom/application-custom-yml.properties")
|
||||
@Import(scanPackages = {"com.yomahub.liteflow.test.parsecustom.cmp","com.yomahub.liteflow.test.parsecustom.bean"})
|
||||
public class CustomParserYmlELSpringbootTest extends BaseTest {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parser/application-json.properties")
|
||||
@TestPropertySource("classpath:/parser/application-json.properties")
|
||||
public class JsonParserELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.noear.solon.test.SolonJUnit4ClassRunner;
|
||||
import org.noear.solon.test.annotation.TestPropertySource;
|
||||
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parser/application-springEL.properties")
|
||||
@TestPropertySource("classpath:/parser/application-springEL.properties")
|
||||
public class SpringELSupportELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parser/application-xml.properties")
|
||||
@TestPropertySource("classpath:/parser/application-xml.properties")
|
||||
public class XmlParserELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.noear.solon.test.annotation.TestPropertySource;
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@RunWith(SolonJUnit4ClassRunner.class)
|
||||
@TestPropertySource(value = "classpath:/parser/application-yml.properties")
|
||||
@TestPropertySource("classpath:/parser/application-yml.properties")
|
||||
public class YmlParserELSpringbootTest extends BaseTest {
|
||||
|
||||
@Inject
|
||||
|
||||
32
pom.xml
32
pom.xml
@@ -65,7 +65,7 @@
|
||||
<aspectjweaver.version>1.8.13</aspectjweaver.version>
|
||||
<logback-classic.version>1.2.3</logback-classic.version>
|
||||
|
||||
<solon.version>1.11.5</solon.version>
|
||||
<solon.version>1.11.7</solon.version>
|
||||
|
||||
<netty.version>4.1.84.Final</netty.version>
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
@@ -326,35 +326,7 @@
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</plugin>
|
||||
<!-- Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Gpg Signature -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- version number -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
|
||||
Reference in New Issue
Block a user