LiteFlow LiteFlow
💒Home
📚Documents
💖Donation
🚀Plugin
  • About LiteFlow
  • Update Record
Community
Users
Gitee (opens new window)
Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)
💒Home
📚Documents
💖Donation
🚀Plugin
  • About LiteFlow
  • Update Record
Community
Users
Gitee (opens new window)
Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)
  • 🍤Introduction
  • 🍓Features
  • 🍟Quick Start(Hello world)

    • 🍄Notice
    • 🌿Springboot environment

      • 🧬Dependency
      • ⚙️Config
      • 🛫Execute
    • 🌱Spring environment

      • 🧬Dependency
      • ⚙️Config
      • 🛫Execute
    • 🌵Other environment

      • 🍄Notice
      • 🧬Dependency
      • ⚙️Config
      • 🛫Execute
  • 🍢Configuration item

    • 🍄Notice
    • 🌿Springboot environment
    • 🌱Spring environment
    • 🌵Other environment
  • 🗂Rules file

    • 📔Rules file format
    • 📕Local rule file
    • 📗Zookeeper source
    • 📘SQL database source
    • 📋Nacos source
      • Dependency
      • Configuration
      • Auto Refresh
      • Example
    • 🗄Etcd source
    • 📙Custom source
  • 🔗General components

    • 📎Common component
    • ✂️Switch component
    • 📌If component
    • 🧬For component
    • ⛓While component
    • 🧿Break component
  • 🧩How to write EL rules

    • 🍄Notice
    • 🌴Serial mode
    • 🎋Parallel mode
    • 🌾Switch mode
    • 🌵If mode
    • 🌳Loop mode
    • 🍁Use sub chain
    • 🍂Use sub variables
    • 💐Complex example
    • 🌻About semicolons
    • 🌰About comments
    • 🐚Component Name Package
  • 🌮Data context

    • 🍄Notice
    • 🌯Definition and use
    • 🪶Pass initialized context
  • 🛩Flow executor

    • 🍄Notice
    • 🎡Executor method
    • 🎢Chain input parameter
    • 🎈LiteflowResponse object
  • 🍋Script component

    • 🍫Choose a script language
    • 🍕Define script component
    • 🌯Define file script
    • 🍣Interact with java
    • 🍘Dynamic refresh script
  • 🍇Declarative component

    • 🥭What is a declarative component
    • 🧅Class level declaration
    • 🥥Method level declaration
  • 🎲Dynamic rules

    • 🍄Notice
    • 🎯How to build
  • 🎨Advanced features

    • 🍒Pre & Finally components
    • 🥠Substitute component
    • 🍉Component Parameters
    • 🍑Component alias
    • 🍍Component tag
    • 🥝Component event
    • 🥑Implicit chain
    • 🍕Private delivery
    • 🍣Component retry
    • 🍖Smooth hot refresh
    • 🍪Component aspect
    • 🍡Step information
    • 🧊Exceptions
    • 🧇Printing details
    • 🧁Custom request id
    • 🌭Multiple type rules
    • 🥗Asynchronous thread pool
    • 🍿Custom component executor
    • 🍥Simple monitor
    • 🧉DTD in Xml
  • ⛱Test cases and demo

    • 🪁Test cases
    • 🪀Demo
  • 🪂Performance
  • v2.9.X文档
  • 🗂Rules file
铂赛东
2022-10-11
Contents

📋Nacos source

Starting from v2.9.0, LiteFlow supports Nacos' rule configuration source.

# Dependency

If using Nacos as the rule configuration source, you need to add the following additional plugin dependencies:

<dependency>
    <groupId>com.yomahub</groupId>
    <artifactId>liteflow-rule-nacos</artifactId>
    <version>2.9.3</version>
</dependency>

# Configuration

You don't need to configure the liteflow.ruleSource path anymore.

Just configure the extra parameters of the plugin:

    liteflow:
      rule-source-ext-data-map:
        serverAddr: 127.0.0.1:8848
        dataId: demo_rule
        group: DEFAULT_GROUP
        namespace: your namespace id
        username: nacos
        password: nacos
    
    liteflow.rule-source-ext-data={\
        "serverAddr":"127.0.0.1:8848",\
        "dataId":"demo_rule",\
        "group":"DEFAULT_GROUP",\
        "namespace":"your namespace id",\
        "username":"nacos",\
        "password":"nacos"\
    }
    
    // Make sure to add code blocks to your code group

    The above is just an example, you can replace the corresponding configuration with the Nacos of the actual scene.

    notice

    If you configure in yaml form, this json is a whole string, please enclose it in double quotes, do not configure it in yaml object format

    notice

    It should be noted that when using the Nacos configuration source, only the xml configuration is allowed to be stored in the Nacos.

    # Auto Refresh

    Using this Nacos configuration source plug-in, any rule changes in the Nacos node will be automatically pushed to the business system for real-time refresh. You don't need to do anything.

    # Example

    In order to make it easy for everyone to get started with the configuration of the Nacos rule, here is a small demo that you can pull to run locally, you need to replace the Nacos configuration information.

    Before running the project, read the readme.txt file in the project.

    https://github.com/bryan31/liteflow-ext-rule-demo

    Help us improve this document (opens new window)
    last update: 2022/11/30, 22:42:09
    📘SQL database source
    🗄Etcd source

    ← 📘SQL database source 🗄Etcd source→

    Theme by Vdoing | Copyright © 2020-2022 铂赛东 | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式