[![Maven Central](https://img.shields.io/maven-central/v/io.github.bonigarcia/selenium-jupiter.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.github.bonigarcia%20a%3Aselenium-jupiter)
[![Build Status](https://github.com/bonigarcia/selenium-jupiter/workflows/build/badge.svg)](https://github.com/bonigarcia/selenium-jupiter/actions)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=io.github.bonigarcia:selenium-jupiter&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=io.github.bonigarcia%3Aselenium-jupiter)
[![codecov](https://codecov.io/gh/bonigarcia/selenium-jupiter/branch/master/graph/badge.svg)](https://codecov.io/gh/bonigarcia/selenium-jupiter)
[![badge-jdk](https://img.shields.io/badge/jdk-17-green.svg)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
[![License badge](https://img.shields.io/badge/license-Apache2-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Backers on Open Collective](https://opencollective.com/selenium-jupiter/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/selenium-jupiter/sponsors/badge.svg)](#sponsors)
[![Support badge](https://img.shields.io/badge/stackoverflow-selenium_jupiter-green.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/selenium-jupiter?sort=newest)
[![Twitter Follow](https://img.shields.io/twitter/follow/boni_gg.svg?style=social)](https://twitter.com/boni_gg)

# [![][Logo]][Selenium-Jupiter]

[Selenium-Jupiter] is an open-source Java library that implements a [JUnit 5] extension for developing [Selenium WebDriver] tests. Selenium-Jupiter uses several features of the Jupiter extension (such as parameters resolution, test templates, or conditional test execution). Thanks to this, the resulting Selenium-Jupiter tests follow a minimalist approach (i.e., the required boilerplate code for WebDriver is reduced) while providing a wide range of advanced features for end-to-end testing.

## Documentation
You can find the complete documentation of Selenium-Jupiter [here][Selenium-Jupiter]. This site contains all the features, examples, and configuration capabilities of Selenium-Jupiter.

## Local browsers
Selenium-Jupiter can be used to control local browsers programmatically using Selenium WebDriver. To do that, we need to specify the flavor of the browser to be used by declaring `WebDriver` parameters in tests or constructors. For instance, we declare a `ChromeDriver` parameter to use Chrome, `FirefoxDriver` for Firefox, and so on. For instance:

```java
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;

import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class ChromeTest {

    @Test
    void test(ChromeDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}
```

Internally, Selenium-Jupiter uses [WebDriverManager] to manage the WebDriver binaries (i.e., chromedriver, geckodriver,  etc.) required to use local browsers.

### Browsers in Docker containers
Selenium-Jupiter allows using browsers in [Docker] containers very easily. The only requirement is to get installed [Docker Engine] in the machine running the tests. The following example shows a test using this feature. Internally, it pulls the image from [Docker Hub], starts the container, and instantiates the WebDriver object to use it. This example also enables the recording of the browser session and remote access using [noVNC]:

```java
import static io.github.bonigarcia.seljup.BrowserType.CHROME;
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;

import io.github.bonigarcia.seljup.DockerBrowser;
import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class DockerChromeTest {

    @Test
    void testChrome(@DockerBrowser(type = CHROME) WebDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}
```

### Conditional tests
Selenium-Jupiter provides the class-level annotation @EnabledIfBrowserAvailable to skip tests conditionally depending on the availability of local browsers. For example:

```java
import static io.github.bonigarcia.seljup.Browser.SAFARI;
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.safari.SafariDriver;

import io.github.bonigarcia.seljup.EnabledIfBrowserAvailable;
import io.github.bonigarcia.seljup.SeleniumJupiter;

@EnabledIfBrowserAvailable(SAFARI)
@ExtendWith(SeleniumJupiter.class)
class SafariTest {

    @Test
    void test(SafariDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}

```

### Test templates
Test templates are a special kind of test in which the same test logic is executed several times according to some custom data. In Selenium-Jupiter, the data to feed a test template is referred to as the _browser scenario_ (a JSON file by default).

```java
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.WebDriver;

import io.github.bonigarcia.seljup.SeleniumJupiter;

@ExtendWith(SeleniumJupiter.class)
class TemplateTest {

    @TestTemplate
    void templateTest(WebDriver driver) {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");
    }

}
```

... and the browser scenario is:

```yaml
{
   "browsers": [
      [
         {
            "type": "chrome-in-docker",
            "version": "latest"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "latest-1"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "beta"
         }
      ],
      [
         {
            "type": "chrome-in-docker",
            "version": "dev"
         }
      ]
   ]
}
```

## Support
Selenium-Jupiter is part of [OpenCollective], an online funding platform for open and transparent communities. You can support the project by contributing as a backer (i.e., a personal [donation] or [recurring contribution]) or as a [sponsor] (i.e., a recurring contribution by a company).

### Backers

### Sponsors

Alternatively, you can acknowledge my work by buying me a coffee:

## About
Selenium-Jupiter (Copyright © 2017-2024) is a project created and maintained by [Boni García] and licensed under the terms of the [Apache 2.0 License].

[Logo]: https://bonigarcia.dev/img/seljup.png
[Selenium-Jupiter]: https://bonigarcia.dev/selenium-jupiter/
[JUnit 5]: https://junit.org/junit5/docs/current/user-guide/
[Selenium WebDriver]: https://www.selenium.dev/documentation/webdriver/
[WebDriverManager]: https://github.com/bonigarcia/webdrivermanager
[Docker]: https://www.docker.com/
[Docker Engine]: https://www.docker.com/get-docker
[Docker Hub]: https://hub.docker.com/
[noVNC]: https://novnc.com/
[OpenCollective]: https://opencollective.com/selenium-jupiter
[donation]: https://opencollective.com/selenium-jupiter/donate
[recurring contribution]: https://opencollective.com/selenium-jupiter/contribute/backer-8132/checkout
[sponsor]: https://opencollective.com/selenium-jupiter/contribute/sponsor-8133/checkout
[Boni Garcia]: https://bonigarcia.dev/
[Apache 2.0 License]: https://www.apache.org/licenses/LICENSE-2.0


# Kill Bill platform
![Maven Central](https://img.shields.io/maven-central/v/org.kill-bill.billing/killbill-platform?color=blue&label=Maven%20Central)

Underlying platform powering Kill Bill. It features:

* JNDI management
* Lifecycle
* Services discovery
* OSGI and plugin layer, including the JRuby bridge
* Container integration glue

The platform is billing and payment agnostic, and can be used to create other services.

## Kill Bill compatibility

| Platform version | Kill Bill version |
| ---------------: | ----------------: |
| 0.26.y           | 0.16.z            |
| 0.36.y           | 0.18.z            |
| 0.37.y           | 0.19.z            |
| 0.38.y           | 0.20.z            |
| 0.39.y           | 0.22.z            |
| 0.40.y           | 0.22.z            |
| 0.41.y           | 0.24.z            |

We've upgraded numerous dependencies in 0.40.x (required for Java 11 support).

## Usage

Add the relevant submodule(s) to a project:

```xml
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-api</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-base</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-lifecycle</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-all-bundles</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-api</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-defaultbundles</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-eureka</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-graphite</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-influxdb</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-kpm</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-lib-killbill</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-lib-slf4j-osgi</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-logger</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-metrics</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-test-beatrix</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-bundles-test-payment</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-lib-bundles</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-osgi-test-bundles</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-server</artifactId>
    <version>... release version ...</version>
</dependency>
<dependency>
    <groupId>org.kill-bill.billing</groupId>
    <artifactId>killbill-platform-test</artifactId>
    <version>... release version ...</version>
</dependency>
```

## About

Kill Bill is the leading Open-Source Subscription Billing & Payments Platform. For more information about the project, go to https://killbill.io/.


Provided by Xiaomi Mione Team

  Mone is a one-stop enterprise collaborative Research and Development platform centered on microservices. It supports various deployment forms such as public cloud, private cloud, and hybrid cloud; it provides end-to-end R&D full-process services from "creation -> development -> deployment -> governance -> observation".
  Mone creates "dual agility", agile R&D and agile organization through new cloud-native technologies and new R&D models,  to ensure the agile R&D collaboration of Xiaomi's high-complexity business and large-scale teams in the China region, achieving multiple efficiency improvements.

## ✨ Architecture
### Product Architecture
![mone](readme/image/mione_architect.png)
### Improving Efficiency Across the Entire R&D Process
![mone](readme/image/mione_devflow.png)

## ✨ Features
- 🌈 Full Lifecycle Project Management
- 📦 Continuous Integration, Continuous Delivery
- 🛡 Dayu - Microservice Governance
- ⚙ Tesla Gateway
- 🌍 OzHera - Application Observability Platform
- 🎨 FaaS Platform
- ⚙ API Management Platform

## 🔗 Mone introduction

### [OzHera - Application Observability Platform]
![mone-hera](readme/image/en/hera_en01_new.jpeg)
![mone-hera](readme/image/en/hera_en02.jpeg)
![mone-hera](readme/image/en/hera_en03.jpeg)
![mone-hera](readme/image/en/hera_en04.jpeg)
![mone-hera](readme/image/en/hera_en05.jpeg)
![mone-hera](readme/image/en/hera_en06.jpeg)
![mone-hera](readme/image/en/hera_en07.jpeg)

## 📃 Document

To learn more or get started quickly [Quick Start](http://mone.xiaomiyoupin.com/#/doc/1)，please refer to the [Mone Official Website](http://mone.xiaomiyoupin.com/#/index)

## 🔨Contributing

**owners:**
- Xinyan Xing
- Jinliang Ou
- Zhiyong Zhang
- Wenbang Dan
- Qingfu Ren
- Pei Ding

**committers:**
- Ping Zhang
- Baoyu Cao
- Yibo Gao
- Zhenxing Dong
- Zhidong Wang
- Tao Ding
- Xiaowei Zhang
- Gaofeng Zhang
- Tao Wang
- Min Wang
- Xihui Gao
- Haoyang Wang
- Linlin Tan
- Chuankang Liu
- Yandong Wang
- Yulin Gao
- Ting Kang
- Yuchong Liu
- Xiuhua Zhang
- Zheng Xu
- Ming Zhi
- Lei Chen
- Hao Zheng

 ## 📞 Contact

 + 📮 Mailing list:
   + mione@xiaomi.com
 + 📮 Wechat official account
   + 天穹云原生
 + 📮 Forum
   + [Mone](https://m.one.mi.com/)

## *License*
Mone is released under the [Apache 2.0 license](LICENSE).

```
Copyright 2020 XiaoMi.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at the following link.

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
## User List

If you are using [XiaoMi/mone](https://github.com/w1zirn/mone) and think that it helps you or want to contribute code for mone, please add your company to the user list to let us know your needs.

|![xiao mi](https://s02.mifile.cn/assets/static/image/logo-mi2.png)|![auchosaur games](readme/image/auchosaur_games.png)|![lingdong](readme/image/lingdong.png)|![airstar](readme/image/airstar.png)|
| :---: | :---: | :---: | :---: |


# Liquibase Percona Extension

[![Build Status](https://github.com/liquibase/liquibase-percona/workflows/Build/badge.svg)](https://github.com/liquibase/liquibase-percona/actions)
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central#org.liquibase.ext:liquibase-percona)
[![Maven Central](https://img.shields.io/maven-central/v/org.liquibase.ext/liquibase-percona)](https://search.maven.org/artifact/org.liquibase.ext/liquibase-percona)
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/andreasdangel/liquibase-percona/latest?label=docker%20version)](https://hub.docker.com/r/andreasdangel/liquibase-percona)

Extension to support the tool `pt-online-schema-change` from [Percona Toolkit](https://www.percona.com/doc/percona-toolkit/LATEST/index.html).
This extension replaces a couple of the default changes to use `pt-online-schema-change` instead of SQL.
This allows to perform a non-locking database upgrade.

## Table Of Contents

*   [Supported Databases](#supported-databases)
*   [Supported Changeset Formats](#supported-changeset-formats)
*   [Liquibase version(s) tested against](#liquibase-versions-tested-against)
*   [Supported Changes and examples](#supported-changes-and-examples)
    *   [AddColumn](#addcolumn)
    *   [AddForeignKeyConstraint](#addforeignkeyconstraint)
    *   [AddUniqueConstraint](#adduniqueconstraint)
    *   [CreateIndex](#createindex)
    *   [DropColumn](#dropcolumn)
    *   [DropForeignKeyConstraint](#dropforeignkeyconstraint)
    *   [DropIndex](#dropindex)
    *   [DropUniqueConstraint](#dropuniqueconstraint)
    *   [ModifyDataType](#modifydatatype)
    *   [Sql](#sql)
*   [Configuration](#configuration)
    *   [UsePercona flag](#usepercona-flag)
    *   [PerconaOptions flag](#perconaoptions-flag)
    *   [Liquibase Percona extension XSD](#liquibase-percona-extension-xsd)
    *   [System Properties](#system-properties)
*   [Changelog](#changelog)
*   [Using / Installing the extension](#using--installing-the-extension)
    *   [Download](#download)
    *   [Command line liquibase](#command-line-liquibase)
    *   [Via Maven](#via-maven)
    *   [Docker](#docker)
    *   [Using snapshots](#using-snapshots)
*   [Notes](#notes)
*   [Building this extension](#building-this-extension)
    *   [Integration testing](#integration-testing)
*   [Common Problems](#common-problems)
    *   [NoSuchMethodError: PerconaDropColumnChange.getColumns()Ljava/util/List](#nosuchmethoderror-perconadropcolumnchangegetcolumnsljavautillist)
*   [Sponsors](#sponsors)
*   [References](#references)

## Supported Databases

MySQL and MariaDB (since 4.3.2) are the only supported databases.
The extension checks whether it is being run against a MySQL/MariaDB database. If not, it falls back to the default
changes provided by liquibase-core.

## Supported Changeset Formats

This liquibase extension supports the following changeset formats:

* [XML](https://docs.liquibase.com/concepts/changelogs/xml-format.html)
* [YAML](https://docs.liquibase.com/concepts/changelogs/yaml-format.html)
* [Formatted SQL](https://docs.liquibase.com/concepts/changelogs/sql-format.html) (since liquibase-percona 4.19.1)

## Liquibase version(s) tested against

* Liquibase 3.2.0 (liquibase-percona 1.0.0)
* Liquibase 3.3.0 (liquibase-percona 1.1.1)
* Liquibase 3.3.5 and 3.4.2 (liquibase-percona 1.2.1)
* Liquibase 3.3.5, 3.4.2, and 3.5.1 (liquibase-percona 1.2.2)
* Liquibase 3.3.5, 3.4.2, and 3.5.3 (liquibase-percona 1.3.1, 1.4.0)
* Liquibase 3.3.5, 3.4.2, and 3.5.4 (liquibase-percona 1.4.1)
* Liquibase 3.3.5, 3.4.2, 3.5.5, and 3.6.2 (liquibase-percona 1.5.2). Percona Toolkit 3.0.12.
* Liquibase 3.3.5, 3.4.2, 3.5.5, and 3.6.3 (liquibase-percona 1.6.0). Percona Toolkit 3.0.13.
* Liquibase 3.5.5, 3.6.3, 3.7.0, 3.8.9, 3.9.0, and 3.10.1 (liquibase-percona 1.7.0). Percona Toolkit 3.2.0.
* Liquibase 3.5.5, 3.6.3, 3.7.0, 3.8.9, 3.9.0, and 3.10.3 (liquibase-percona 1.7.1). Percona Toolkit 3.3.0.
* Liquibase 4.0.0, 4.1.1, 4.2.2 (liquibase-percona 2.0.0). Percona Toolkit 3.3.0.
* Liquibase 4.0.0, 4.1.1, 4.2.2, 4.3.5, 4.4.3, 4.5.0, 4.6.2, 4.7.1, 4.8.0, 4.9.1, 4.10.0, 4.11.0, 4.12.0 (liquibase-percona 4.12.0). Percona Toolkit 3.3.1.
* Liquibase 4.0.0, 4.1.1, 4.2.2, 4.3.5, 4.4.3, 4.5.0, 4.6.2, 4.7.1, 4.8.0, 4.9.1, 4.10.0, 4.11.0, 4.12.0, 4.13.0, 4.14.0, 4.15.0 (liquibase-percona 4.15.0). Percona Toolkit 3.4.0.
* Liquibase 4.16.0 (liquibase-percona 4.16.0). Percona Toolkit 3.4.0.
* Liquibase 4.17.1 (liquibase-percona 4.17.1). Percona Toolkit 3.4.0.
* Liquibase 4.18.0 (liquibase-percona 4.18.0). Percona Toolkit 3.5.0.
* Liquibase 4.19.0 (liquibase-percona 4.19.0). Percona Toolkit 3.5.0.
* Liquibase 4.19.1 (liquibase-percona 4.19.1). Percona Toolkit 3.5.1.
* Liquibase 4.20.0 (liquibase-percona 4.20.0). Percona Toolkit 3.5.1.
* Liquibase 4.22.0 (liquibase-percona 4.22.0). Percona Toolkit 3.5.2.
* Liquibase 4.23.0 (liquibase-percona 4.23.0). Percona Toolkit 3.5.3.
* Liquibase 4.23.1 (liquibase-percona 4.23.1). Percona Toolkit 3.5.4.
* Liquibase 4.23.2 (liquibase-percona 4.23.2). Percona Toolkit 3.5.4.
* Liquibase 4.24.0 (liquibase-percona 4.24.0). Percona Toolkit 3.5.5.
* Liquibase 4.25.0 (liquibase-percona 4.25.0). Percona Toolkit 3.5.5.
* Liquibase 4.26.0 (liquibase-percona 4.26.0). Percona Toolkit 3.5.5.
* Liquibase 4.27.0 (liquibase-percona 4.27.0). Percona Toolkit 3.5.7.
* Liquibase 4.28.0 (liquibase-percona 4.28.0). Percona Toolkit 3.5.7.

## Supported Changes and examples

The following changes are supported:

### AddColumn

Since: liquibase-percona 1.0.0

Automatic rollback supported? yes

Example:

```xml
<changeSet id="2" author="Alice">
    <addColumn tableName="person">
        <column name="address" type="varchar(255)"/>
    </addColumn>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="ADD COLUMN address VARCHAR(255)" ...

### AddForeignKeyConstraint

Since: liquibase-percona 1.3.0

Automatic rollback supported? yes

Example:

```xml
<changeSet id="3" author="Alice">
    <addForeignKeyConstraint constraintName="fk_person_address"
        referencedTableName="person" referencedColumnNames="id"
        baseTableName="address" baseColumnNames="person_id"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="ADD CONSTRAINT fk_person_address FOREIGN KEY (person_id) REFERENCES person (id)" ...

### AddPrimaryKey

Since: liquibase-percona 1.7.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="2" author="Alice">
    <addPrimaryKey tableName="person" columnNames="id, name"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="DROP PRIMARY KEY, ADD PRIMARY KEY (id, name)" ...

**Note:** When the table has already a primary key, a "DROP PRIMARY KEY" statement is added to the
alter command first. By default, the pt-online-schema-change will not execute this change,
you have to set the additional option `--no-check-alter` first
(see [check-alter](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#id1)).
Make sure to read this section completely.

In order to figure out, whether a primary key exists already (and therefore the DROP PRIMARY KEY statement is needed),
a database connection is required. This means, the generated migration SQL will be wrong (it only contains the
ADD PRIMARY KEY statement).

Automatic rollback is not supported by this percona change (as opposed to the plain liquibase addPrimaryKey change).
pt-osc usually needs a primary key or a unique key in order to operate properly. If the table has no such keys,
it most likely will refuse to operate.

### AddUniqueConstraint

Since: liquibase-percona 1.3.0

Automatic rollback supported? yes

Example:

```xml
<changeSet id="2" author="Alice">
    <addUniqueConstraint columnNames="id, name" tableName="person" constraintName="uq_id_name"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="ADD CONSTRAINT uq_id_name UNIQUE (id, name)" ...

**Note:** pt-online-schema-change is executed with the option `--nocheck-unique-key-change`. This enables to
add a unique index, but can cause data loss, since duplicated rows are ignored.
See [Percona Toolkit Documentation](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#id7)
for more information.

### CreateIndex

Since: liquibase-percona 1.2.0

Automatic rollback supported? yes

Example:

```xml
<changeSet id="2" author="Alice">
    <createIndex indexName="emailIdx" tableName="person" unique="true">
        <column name="email"/>
    </createIndex>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="ADD UNIQUE INDEX emailIdx (email)" ...

**Note:** pt-online-schema-change is executed with the option `--nocheck-unique-key-change`. This enables to
add a unique index, but can cause data loss, since duplicated rows are ignored.
See [Percona Toolkit Documentation](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#id7)
for more information.

### DropColumn

Since: liquibase-percona 1.0.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="2" author="Alice">
    <dropColumn tableName="person" columnName="age"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="DROP COLUMN age" ...

### DropForeignKeyConstraint

Since: liquibase-percona 1.3.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="4" author="Alice">
    <dropForeignKeyConstraint baseTableName="address" constraintName="fk_person_address" />
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="DROP FOREIGN KEY _fk_person_address" ...

### DropUniqueConstraint

Since: liquibase-percona 1.3.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="3" author="Alice">
    <dropUniqueConstraint tableName="person" constraintName="uq_id_name"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="DROP KEY uq_id_name" ...

### DropIndex

Since: liquibase-percona 1.2.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="3" author="Alice">
    <dropIndex indexName="emailIdx" tableName="person"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="DROP INDEX emailIdx" ...

### ModifyDataType

Since: liquibase-percona 1.2.0

Automatic rollback supported? no

Example:

```xml
<changeSet id="2" author="Alice">
    <modifyDataType tableName="person" columnName="email" newDataType="VARCHAR(400)"/>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="MODIFY email VARCHAR(400)" ...

### Sql

Since: liquibase-percona 4.19.1

Automatic rollback supported? no

Example:

```xml
<changeSet id="2" author="Alice">
    <sql>ALTER TABLE person ADD COLUMN address VARCHAR(255) NULL</sql>
</changeSet>
```

Corresponding command:

    pt-online-schema-change --alter="ADD COLUMN address VARCHAR(255) NULL" ...

Note that there are several limitations:

* Percona toolkit won't be used, when the sql statements consists of multiple statements (e.g. separated by `;`).
  In that case a warning will be logged and the sql change will be executed as usual
  without the percona toolkit.
* If the sql change is not an alter table statement, then a warning will be logged
  and the sql change will be executed as usual without the percona toolkit.
* Liquibase-percona tries to determine the table name. If that doesn't work, then a warning will be logged
  and the sql change will be executed as usual without the percona toolkit.
* This change type is active by default and percona toolkit will be used when possible.
  It can be disabled as usual via system property `liquibase.percona.skipChanges`.
* Be sure to test the changelog thoroughly.

## Configuration

### UsePercona flag

Each change allows to enable or disable the usage of percona toolkit via the property `usePercona`.
By default, the percona toolkit is used, see also the system property `liquibase.percona.defaultOn`.

Example:

```yaml
- changeSet:
    id: 2
    author: Alice
    changes:
      - addColumn:
          tableName: person
          usePercona: false
          columns:
            - column:
                name: address
                type: varchar(255)
```

This flag exists since liquibase-percona 1.3.0

It is supported by using the YAML format and since liquibase 3.6.0, you can use it in XML changesets, too:

```xml
<addColumn tableName="person"
        xmlns:liquibasePercona="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona"
        liquibasePercona:usePercona="false">
    <column name="address" type="varchar(255)"/>
</addColumn>
```

Since liquibase-percona 4.19.1, you can use it in SQL changeset as follows:

```sql
--changeset Alice:2
--liquibasePercona:usePercona="false"
ALTER TABLE person ADD address VARCHAR(255) NULL;
```

### PerconaOptions flag

Each change allows to specify options that are used when executing pt-osc. If specified, this option
overrides the system property [`liquibase.percona.options`](#system-properties). If not specified, then
the system property will be used.

Example:

```yaml
- changeSet:
    id: 2
    author: Alice
    changes:
      - addColumn:
          tableName: person
          perconaOptions: "--alter-foreign-keys-method=auto"
          columns:
            - column:
                name: address
                type: varchar(255)
```

This flag exists since liquibase-percona 2.0.0.

It is supported by using the YAML format and in XML changesets:

```xml
<addColumn tableName="person"
        xmlns:liquibasePercona="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona"
        liquibasePercona:perconaOptions="--alter-foreign-keys-method=auto">
    <column name="address" type="varchar(255)"/>
</addColumn>
```

Since liquibase-percona 4.19.1 this is also supported in SQL changesets:

```sql
--changeset Alice:2
--liquibasePercona:perconaOptions="--alter-foreign-keys-method=auto"
ALTER TABLE person ADD email VARCHAR(255) NULL;
```

### Liquibase Percona extension XSD

According to the Liquibase Documentation for [XML Changelogs](https://docs.liquibase.com/concepts/changelogs/xml-format.html)
an extra XSD for the extension is not mandatory as there an "allow all" default schema ([dbchangelog-ext.xsd](https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd)).
But having an explicit schema helps in IDE support (e.g. autocomplete, validation).
Therefore, this extension provides an official XSD for the attributes it supports on the changes (`usePercona` and `perconaFlags`).

Example usage:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:liquibasePercona="http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
        http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-percona https://raw.githubusercontent.com/liquibase/liquibase-percona/main/src/main/resources/dbchangelog-ext-liquibase-percona.xsd">

    <changeSet  id="1" author="alice">
        <addColumn tableName="person" liquibasePercona:usePercona="false">
            <column name="address" type="varchar(255)"/>
        </addColumn>
    </changeSet>
</databaseChangeLog>
```

If you use as the URL exactly `https://raw.githubusercontent.com/liquibase/liquibase-percona/main/src/main/resources/dbchangelog-ext-liquibase-percona.xsd`,
then liquibase doesn't retrieve the XSD file from the internet but uses the locally provided file inside
`liquibase-percona.jar` instead.

Otherwise, you need to set the system property `liquibase.secureParsing` to false, so that liquibase
downloads the extension schema from the internet in order to validate the XML changelog file.

The extension schema is available in the repository: [dbchangelog-ext-liquibase-percona.xsd](https://github.com/liquibase/liquibase-percona/blob/main/src/main/resources/dbchangelog-ext-liquibase-percona.xsd).

### System Properties

The extension supports the following java system properties:

*   `liquibase.percona.failIfNoPT`: true/false. **Default: false**.
    If set to true, the database update will fail, if the command `pt-online-schema-change` is not found.
    This can be used, to enforce, that percona toolkit is used.

*   `liquibase.percona.noAlterSqlDryMode`: true/false. **Default: false**.
    When running *updateSQL* or *rollbackSQL* in order to generate a migration SQL file, the command line, that would
    be executed, will be added as a comment.
    In addition, the SQL statements (as produced by liquibase-core) will also be generated and output into the migration
    file. This allows to simply execute the generated migration SQL to perform an update. However, the Percona toolkit
    won't be used.
    If this property is set to `true`, then no such SQL statements will be output into the migration file.

*   `liquibase.percona.skipChanges`: comma separated list of changes. **Default: <empty>**.
    This option can be used in order to selectively disable one or more changes. If a change is disabled, then
    the change will be executed by the default liquibase core implementation and *percona toolkit won't be used*.
    By default, this property is empty, so that all supported changes are executed using the percona toolkit.
    Example: Set this to `addColumn,dropColumn` in order to not use percona for adding/dropping a column.

*   `liquibase.percona.options`: String of options. **Default: --alter-foreign-keys-method=auto --nocheck-unique-key-change**.
    Since liquibase-percona 1.2.1. Default value changed with liquibase-percona 1.6.0.
    This option allows the user to pass additional command line options to pt-online-schema-change. This e.g. can
    be used in complicated replication setup to change the way slaves are detected and how their state is used.
    You can also specify a percona configuration file via `--config file.conf`,
    see [Configuration Files](https://www.percona.com/doc/percona-toolkit/2.2/configuration_files.html).
    Multiple options are separated by space. If argument itself contains a space, it must be quoted with
    double-quotes, e.g. `--config "filename with spaces.conf"`.

*   `liquibase.percona.defaultOn`: true/false. **Default: true**. Since liquibase-percona 1.3.0
    This options allows to change the default behavior for the [UsePercona flag](#usepercona-flag). By default,
    all changes, that do not explicitly specify this flag, use the value from this system property.
    Setting this property to `false` allows to control for each single change, whether to use Percona Toolkit
    or not.

*   `liquibase.password`: String with the password needed to connect to the database. **Default: <empty>**.
    Since liquibase-percona 1.4.0.
    With this property, you can shortcut the automatic detection of the password from the underlying
    `java.sql.Connection` (if that fails) or from the default `liquibase.properties` file. If this property is set,
    then it is used for the password when executing `pt-online-schema-change`.

*   `liquibase.percona.path`: Path to the percona toolkit directory, where the tool
    `pt-online-schema-change` is installed. **Default: <empty>**.
    Since liquibase-percona 1.4.1.
    With this property, you can select a specific toolkit installation. If this property is not set, then the
    toolkit will be searched on the `PATH`. You need to specify the `bin` subfolder of the Percona Toolkit
    distribution.

*   `liquibase.percona.ptdebug`: true/false. **Default: false**. Since liquibase-percona 1.5.0
    This option enables the debug output of pt-osc by setting the environment variable `PTDEBUG` before
    starting pt-osc.

*   `liquibase.percona.keepAlive`: true/false. **Default: true** Since liquibase-percona 4.4.0
    This option allows to disable the keepalive thread if there are any problems with it. The keepalive thread
    pings the database while pt-online-schema-change is executing. This avoids that the server closes
    liquibase's connection as it is idle during pt-osc. The server variable "wait_timeout" controls
    when the connection is considered stale and dropped by the server. This variable is used to
    determine how often the server will be pinged.

You can set these properties by using the standard java `-D` option:

    java -Dliquibase.percona.skipChanges=createIndex,dropColumn -jar liquibase.jar ...

Note: You'll have to call liquibase via "java -jar" as otherwise the system property cannot be set. You'll also
need to make sure, that the liquibase-percona.jar file is on the classpath via the "--classpath" option.

When executing liquibase through maven, you can use the
[Properties Maven Plugin](http://www.mojohaus.org/properties-maven-plugin/usage.html#set-system-properties)
to set the system property. An example can be found in the "createIndexSkipped"
integration test.

## Changelog

See [CHANGELOG.md](CHANGELOG.md)

## Using / Installing the extension

### Download

The jar files can be downloaded manually from maven:

<https://repo.maven.apache.org/maven2/org/liquibase/ext/liquibase-percona/>

### Command line liquibase

After extracting the zip file of liquibase, place `liquibase-percona-4.28.0.jar` file in the sub directory `lib`.
The shell script `liquibase` / `liquibase.bat` will automatically pick this up and the extension is available.

### Via Maven

Add the following dependency to the liquibase plugin:

```xml
<dependency>
    <groupId>org.liquibase.ext</groupId>
    <artifactId>liquibase-percona</artifactId>
    <version>4.28.0</version>
</dependency>
```

### Docker

You can also create a docker image which combines liquibase, liquibase-percona and percona toolkit.
See [Liquibase Percona Docker images](https://hub.docker.com/r/andreasdangel/liquibase-percona).

### Using snapshots

Snapshot builds contain the latest features which are not yet available in a release.

Download: <https://oss.sonatype.org/content/repositories/snapshots/org/liquibase/ext/liquibase-percona/>

Enable the snapshot repository via Maven:

```xml
<project>
    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>
```

See also <https://maven.apache.org/guides/development/guide-testing-development-plugins.html>.

And just use the latest SNAPSHOT version for liquibase-percona dependency, e.g. `4.28.1-SNAPSHOT`:

```xml
<dependency>
    <groupId>org.liquibase.ext</groupId>
    <artifactId>liquibase-percona</artifactId>
    <version>4.28.1-SNAPSHOT</version>
</dependency>
```

## Notes

The non-locking update is achieved using triggers. First a new temporary table is created, including the added or
dropped columns. Then the data is copied in chunks. While the copy is in progress, any newly created or deleted or
updated rows are copied, too. This is done by adding triggers to the original table. After the copy is finished, the
original table is dropped and the temporary table is renamed.

This means, that *pt-online-schema-change* **cannot be used**, if the table already uses triggers.

The command `pt-online-schema-change` is searched only on the `PATH`. Depending on the property
`liquibase.percona.failIfNoPT` the update will fail or will just run without using pt-online-schema-change and
potentially lock the table for the duration of the update.

## Building this extension

Simply run `./mvnw clean verify`.
You'll find the jar-file in the `target/` subdirectory.

### Integration testing

In order to execute the integration tests, run `./mvnw clean verify -Prun-its`.

Please note, that you'll need:

1.  [docker](https://www.docker.com/).
    During the pre-integration-test phase the [official mysql image](https://hub.docker.com/_/mysql/) and
    [maria db image](https://hub.docker.com/_/mariadb/) will be started.
    Under debian, execute `sudo apt-get install docker.io`.
2.  Internet access to download the docker images the first time. And to download
    [percona toolkit](https://www.percona.com/downloads/percona-toolkit/). The build system will add the downloaded
    toolkit automatically to the `PATH`.
3.  The percona toolkit requires perl with mysql dbi libraries.
    Under debian, execute `sudo apt-get install libdbd-mysql-perl`.

See the properties *config_...* in `pom.xml` for connection details for the mysql docker instance.

To run a single integration test, execute maven like this: `./mvnw verify -Prun-its -Dinvoker.test=sharedScripts,addColumn*,dropColumn`

## Common Problems

### NoSuchMethodError: PerconaDropColumnChange.getColumns()Ljava/util/List

The full error message:

    Unexpected error running Liquibase: liquibase.exception.UnexpectedLiquibaseException:
    java.lang.NoSuchMethodError: liquibase.ext.percona.PerconaDropColumnChange.getColumns()Ljava/util/List;

This means, you are trying to use version 1.1.1 of the extension with liquibase 3.2.x. This is an unsupported
combination. For Liquibase 3.2.x, you'll need to use liquibase-percona 1.0.0

## Sponsors

Some development has been sponsored by [billforward.net](http://www.billforward.net/),
a highly flexible & unified billing platform.

## References

* [Percona](http://www.percona.com/)
* [Percona Toolkit Latest Documentation](https://www.percona.com/doc/percona-toolkit/LATEST/index.html)
* [Percona Toolkit on GitHub](https://github.com/percona/percona-toolkit)
* [Percona Toolkit 3.0 Documentation: pt-online-schema-change](https://www.percona.com/doc/percona-toolkit/3.0/pt-online-schema-change.html)
* [Percona Toolkit 2.2 Documentation: pt-online-schema-change](http://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html)
* [Liquibase on GitHub](https://github.com/liquibase/liquibase)
* [Liquibase Percona Extension](https://liquibase.jira.com/wiki/display/CONTRIB/Percona+Online+Schema+Change)
* [DZone: Avoiding MySQL ALTER Table Downtime](http://java.dzone.com/articles/avoiding-mysql-alter-table)


![UI for Apache Kafka logo](documentation/images/kafka-ui-logo.png) UI for Apache Kafka
------------------
#### Versatile, fast and lightweight web UI for managing Apache Kafka® clusters. Built by developers, for developers.

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/provectus/kafka-ui/blob/master/LICENSE)
![UI for Apache Kafka Price Free](documentation/images/free-open-source.svg)
[![Release version](https://img.shields.io/github/v/release/provectus/kafka-ui)](https://github.com/provectus/kafka-ui/releases)
[![Chat with us](https://img.shields.io/discord/897805035122077716)](https://discord.gg/4DWzD7pGE5)
[![Docker pulls](https://img.shields.io/docker/pulls/provectuslabs/kafka-ui)](https://hub.docker.com/r/provectuslabs/kafka-ui)

    DOCS •
    QUICK START •
    COMMUNITY DISCORD

    AWS Marketplace  •
    ProductHunt

#### UI for Apache Kafka is a free, open-source web UI to monitor and manage Apache Kafka clusters.

UI for Apache Kafka is a simple tool that makes your data flows observable, helps find and troubleshoot issues faster and deliver optimal performance. Its lightweight dashboard makes it easy to track key metrics of your Kafka clusters - Brokers, Topics, Partitions, Production, and Consumption.

### DISCLAIMER
UI for Apache Kafka is a free tool built and supported by the open-source community. Curated by Provectus, it will remain free and open-source, without any paid features or subscription plans to be added in the future.
Looking for the help of Kafka experts? Provectus can help you design, build, deploy, and manage Apache Kafka clusters and streaming applications. Discover [Professional Services for Apache Kafka](https://provectus.com/professional-services-apache-kafka/), to unlock the full potential of Kafka in your enterprise!

Set up UI for Apache Kafka with just a couple of easy commands to visualize your Kafka data in a comprehensible way. You can run the tool locally or in
the cloud.

![Interface](documentation/images/Interface.gif)

# Features
* **Multi-Cluster Management** — monitor and manage all your clusters in one place
* **Performance Monitoring with Metrics Dashboard** —  track key Kafka metrics with a lightweight dashboard
* **View Kafka Brokers** — view topic and partition assignments, controller status
* **View Kafka Topics** — view partition count, replication status, and custom configuration
* **View Consumer Groups** — view per-partition parked offsets, combined and per-partition lag
* **Browse Messages** — browse messages with JSON, plain text, and Avro encoding
* **Dynamic Topic Configuration** — create and configure new topics with dynamic configuration
* **Configurable Authentification** — [secure](https://docs.kafka-ui.provectus.io/configuration/authentication) your installation with optional Github/Gitlab/Google OAuth 2.0
* **Custom serialization/deserialization plugins** - [use](https://docs.kafka-ui.provectus.io/configuration/serialization-serde) a ready-to-go serde for your data like AWS Glue or Smile, or code your own!
* **Role based access control** - [manage permissions](https://docs.kafka-ui.provectus.io/configuration/rbac-role-based-access-control) to access the UI with granular precision
* **Data masking** - [obfuscate](https://docs.kafka-ui.provectus.io/configuration/data-masking) sensitive data in topic messages

# The Interface
UI for Apache Kafka wraps major functions of Apache Kafka with an intuitive user interface.

![Interface](documentation/images/Interface.gif)

## Topics
UI for Apache Kafka makes it easy for you to create topics in your browser by several clicks,
pasting your own parameters, and viewing topics in the list.

![Create Topic](documentation/images/Create_topic_kafka-ui.gif)

It's possible to jump from connectors view to corresponding topics and from a topic to consumers (back and forth) for more convenient navigation.
connectors, overview topic settings.

![Connector_Topic_Consumer](documentation/images/Connector_Topic_Consumer.gif)

### Messages
Let's say we want to produce messages for our topic. With the UI for Apache Kafka we can send or write data/messages to the Kafka topics without effort by specifying parameters, and viewing messages in the list.

![Produce Message](documentation/images/Create_message_kafka-ui.gif)

## Schema registry
There are 3 supported types of schemas: Avro®, JSON Schema, and Protobuf schemas.

![Create Schema Registry](documentation/images/Create_schema.gif)

Before producing avro/protobuf encoded messages, you have to add a schema for the topic in Schema Registry. Now all these steps are easy to do
with a few clicks in a user-friendly interface.

![Avro Schema Topic](documentation/images/Schema_Topic.gif)

# Getting Started

To run UI for Apache Kafka, you can use either a pre-built Docker image or build it (or a jar file) yourself.

## Quick start (Demo run)

```
docker run -it -p 8080:8080 -e DYNAMIC_CONFIG_ENABLED=true provectuslabs/kafka-ui
```

Then access the web UI at [http://localhost:8080](http://localhost:8080)

The command is sufficient to try things out. When you're done trying things out, you can proceed with a [persistent installation](https://docs.kafka-ui.provectus.io/quick-start/persistent-start)

## Persistent installation

```
services:
  kafka-ui:
    container_name: kafka-ui
    image: provectuslabs/kafka-ui:latest
    ports:
      - 8080:8080
    environment:
      DYNAMIC_CONFIG_ENABLED: 'true'
    volumes:
      - ~/kui/config.yml:/etc/kafkaui/dynamic_config.yaml
```

Please refer to our [configuration](https://docs.kafka-ui.provectus.io/configuration/quick-start) page to proceed with further app configuration.

## Some useful configuration related links

[Web UI Cluster Configuration Wizard](https://docs.kafka-ui.provectus.io/configuration/configuration-wizard)

[Configuration file explanation](https://docs.kafka-ui.provectus.io/configuration/configuration-file)

[Docker Compose examples](https://docs.kafka-ui.provectus.io/configuration/compose-examples)

[Misc configuration properties](https://docs.kafka-ui.provectus.io/configuration/misc-configuration-properties)

## Helm charts

[Quick start](https://docs.kafka-ui.provectus.io/configuration/helm-charts/quick-start)

## Building from sources

[Quick start](https://docs.kafka-ui.provectus.io/development/building/prerequisites) with building

## Liveliness and readiness probes
Liveliness and readiness endpoint is at `/actuator/health`.

Info endpoint (build info) is located at `/actuator/info`.

# Configuration options

All of the environment variables/config properties could be found [here](https://docs.kafka-ui.provectus.io/configuration/misc-configuration-properties).

# Contributing

Please refer to [contributing guide](https://docs.kafka-ui.provectus.io/development/contributing), we'll guide you from there.


# Generated SDKs for the Ory Ecosystem

All SDKs provided in this repository are generated using openapi-generator.

## Ory Network SDKs

When developing against [Ory Network](https://www.ory.sh/docs/sdk), use the
latest `client` or `ory-client` SDK for your preferred language. It bundles the
individual SDKs (Identities, OAuth2, Permissions) and works with [Ory API
keys](https://www.ory.sh/docs/concepts/personal-access-token).

## Ory self-hosted SDKs

When developing against self-hosted Ory components (Kratos, Hydra, Keto), use
the corresponding individual SDKs for your language and match the SDK version to
the version of Kratos/Hydra/Keto you have deployed.

## Publish the Docker Image

To publish the SDK Builder Docker Image, create a new GitHub release with the
desired version.

You may also manually build and publish this image using:

```shell script
docker build --platform linux/amd64 -t oryd/sdk:latest .
docker tag oryd/sdk:latest oryd/sdk:v0.0.53
docker push oryd/sdk:v0.0.53
```

## Running the Image Locally

If you wish to debug some generators or build steps, you can run the image locally:

```shell script
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/project --name sdk --user "$(id -u):$(id -g)" -it oryd/sdk:v0.0.51 /bin/sh
```

### Debugging Failing Tests on CI

If a test fails in CI, you may run the following code snippet to reproduce the failure locally:

```shell script
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/project --name sdk -it oryd/sdk:v0.0.53 /bin/bash

export FORCE_PROJECT=client # or hydra or something else
export FORCE_VERSION=$(cat /project/spec/$FORCE_PROJECT/latest) # or a specific version, e.g. v1.2.17
cd /project

./scripts/generate.sh
./scripts/test.sh
```

## Commit a new spec

Place the spec in `spec/<project>/<version>.json` (e.g.
`spec/hydra/v0.0.0-alpha.1.json`) and create a commit that references both the
project and the version `git commit -a -m "Add spec for <project>:<version>"`
(e.g. `git commit -a -m "Add spec for hydra:v0.0.0-alpha.1"`).

**Do not create multiple commits adding several specs in one PR,** as only the
latest commit will be checked when it lands on master.

Because this is an automated process, it is highly recommended to add, commit,
and push the spec file directly to master in one go!

You can create a PR if you're making changes to the build chain.

## Upgrading OpenAPI Generator

Upgrading OpenAPI Generator versions requires careful upgrading of the Java
pom.xml. The file might contain new versions for dependencies, but if
overwritten, will not work with the release pipeline.

Therefore, the pom.xml file is being always overwritten from the contrib/poms
directory for each project. To update any dependencies, the changes must thus be
made there. We recommend running the openapi generator manually on the local
machine and diffing the changes with contents in contrib/poms.

## Publishing

## PHP - Packagist

Install PHP and [composer](https://packagist.org). Then, run the install command
to initialize everything:

```shell script
export PROJECT=hydra
cd clients/${PROJECT}/php
composer install
```

Then, push the directory to a git remote of your choosing and also publish the
tag you want to release the package as. You can take a look at
[./scripts/publish.sh](./scripts/publish.sh) to understand how to accomplish
that.

## Python - PyPi / pip

First, install all the necessary tools and python3:

```shell script
python3 -m pip install --user --upgrade setuptools wheel twine
```

Next, create a PyPi account and [API Token](https://pypi.org/manage/account/)
and set the env vars to:

```shell script
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=<token>
```

Then, publish the project (and set the project name):

```shell script
export PROJECT=hydra
cd clients/${PROJECT}/python
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
```

## Ruby

You need to set `GEM_HOST_API_KEY`

## Java - Maven Central

For keys read https://blackdoor.github.io/blog/maven-cd/

Due to a
[bug in openapi-generator](https://github.com/OpenAPITools/openapi-generator/issues/3272)
that appears in Java11+, please disable javadoc generation:

```shell
mvn <cmd> -Dmaven.javadoc.skip=true
```

To test the build for Java, run:

```
$ ./scripts/generate.sh
$ cd clients/<project>/java
$ mvn test-compile
```

You will also need a PGP keypair that is associated with one of the owners of
the `sh.ory` group and that is published on one of the public key servers. For
more details, see:
[https://dzone.com/articles/publish-your-artifacts-to-maven-central](https://dzone.com/articles/publish-your-artifacts-to-maven-central)

```shell script
mvn clean

# THESE VALUES ARE EXAMPLES - PLEASE PICK THE APPROPRIATE `tag`, etc
mvn -Dtag=client-0.0.1-alpha.1 release:update-version \
  -DreleaseVersion=0.0.1-alpha.1 -DdevelopmentVersion=0.0.1-alpha.1-SNAPSHOT \
  -Darguments="-Dmaven.javadoc.skip=true" -Dresume=false

mvn release:perform -Darguments="-Dmaven.javadoc.skip=true" -Dresume=false
```


![NeqSim Logo](https://github.com/equinor/neqsim/blob/master/docs/wiki/neqsimlogocircleflatsmall.png)

[![Build Status](https://neqsim.visualstudio.com/neqsim_cicd/_apis/build/status/neqsim_build?branchName=master)](https://neqsim.visualstudio.com/neqsim_cicd/_build/latest?definitionId=1&branchName=master)
![Build maven](https://github.com/equinor/neqsim/actions/workflows/verify_build.yml/badge.svg?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/equinor/neqsim/badge.svg)](https://snyk.io/test/github/equinor/neqsim)
[![codecov](https://codecov.io/gh/equinor/neqsim/branch/master/graph/badge.svg?token=IRnbAwRDtc)](https://codecov.io/gh/equinor/neqsim)
[![SCM Compliance](https://scm-compliance-api.radix.equinor.com/repos/equinor/neqsim/badge)](https://scm-compliance-api.radix.equinor.com/repos/equinor/neqsim/badge)

NeqSim is the main part of the [NeqSim project](https://equinor.github.io/neqsimhome/). NeqSim (Non-Equilibrium Simulator) is a Java library for estimating fluid properties and process design.
The basis for NeqSim is a library of fundamental mathematical models related to phase behavior and physical properties of fluids.  NeqSim is easilly extended with new models. NeqSim development was initiated at the [Norwegian University of Science and Technology (NTNU)](https://www.ntnu.edu/employees/even.solbraa).

## Releases

[NeqSim releases](https://github.com/equinor/neqsim/releases) are available as a packaged jar file and as source code. NeqSim can be used in a third party application by adding NeqSim jar to the classpath.

## Getting started as a NeqSim Java user

NeqSim can be used in a Java application by adding the neqsim-x.x.x.jar found in [NeqSim releases](https://github.com/equinor/neqsim/releases) to the classpath. A demonstration of downloading the library and running a TPflash  benchmark is illustrated in this [NeqSim Colab demo](https://colab.research.google.com/drive/1XkQ_CrVj2gLTtJvXhFQMWALzXii522CL). Learn and ask questions in [Discussions for use and development of NeqSim](https://github.com/equinor/neqsim/discussions). Also see the [NeqSim JavaDoc](https://htmlpreview.github.io/?https://github.com/equinor/neqsimhome/blob/master/javadoc/site/apidocs/index.html).

## Use of the NeqSim package
NeqSim can be set up as a dependency in a Java project via the [NeqSim GitHub package distribution](https://github.com/equinor/neqsim/packages/42822).

## Getting Started as a NeqSim Java developer

See the [NeqSim Java Wiki](https://github.com/equinor/neqsim/wiki) for how to use the NeqSim API.
NeqSim can be built using the Maven build system (https://maven.apache.org/). All NeqSim build dependencies are given in the pom.xml file. Learn and ask questions in [Discussions for use and development of NeqSim](https://github.com/equinor/neqsim/discussions).

### Initial setup

The NeqSim source code is downloaded by cloning the library to your local computer (alternatively fork it to your private reprository). The following commands are dependent on a local installation of [GIT](https://git-scm.com/) and [Maven](https://maven.apache.org/).

```bash
git clone https://github.com/equinor/neqsim.git
cd neqsim
./mvnw install
```
> **Note**
> The maven wrapper command is dependend on your OS, for Unix use: ```./mvnw```
> Windows:
> ```mvnw.cmd ```

An interactive demonstration of how to get started as a NeqSim developer is presented in this [NeqSim Colab demo](https://colab.research.google.com/drive/1JiszeCxfpcJZT2vejVWuNWGmd9SJdNC7).

## Running the tests

The test files are written in JUnit5 and placed in the [test directory](https://github.com/equinor/neqsim/tree/master/src/test). Test code shuld be written for all new code added to the project, and all tests have to pass before merging into the master branch.

Test coverage can be examined using [jacoco](https://www.eclemma.org/jacoco/) from maven.
Generate a coverage report using `./mvnw jacoco:prepare-agent test install jacoco:report` and see results in target/site/jacoco/index.html.
> **Note**
> The maven wrapper command is dependend on your OS, for Unix use: ```./mvnw```
> Windows:
> ```mvnw.cmd ```

## Deployment

The NeqSim source code is compiled and distributed as a Java library. [NeqSim releases](https://github.com/equinor/neqsim/releases) are available for download from the release pages.

## Built With

[Maven](https://maven.apache.org/) - Dependency Management

## Contributing

See the [getting started as a NeqSim developer](https://github.com/equinor/neqsim/wiki/Getting-started-as-a-NeqSim-developer) documentation. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests. An interactive demonstration of how to get started as a NeqSim developer is presented in this [NeqSim Colab demo](https://colab.research.google.com/drive/1JiszeCxfpcJZT2vejVWuNWGmd9SJdNC7).

## Discussion forum

Questions related to neqsim can be posted in the [github discussion pages](https://github.com/equinor/neqsim/discussions).

## Versioning

NeqSim use [SemVer](https://semver.org/) for versioning.

## Authors and contact persons

Even Solbraa (esolbraa@gmail.com),  Marlene Louise Lund

## Licence

NeqSim is distributed under the [Apache-2.0](https://github.com/equinor/neqsim/blob/master/LICENSE) licence.

## Acknowledgments

A number of master and PhD students at NTNU have contributed to development of NeqSim. We greatly acknowledge their contributions.

## NeqSim modules

NeqSim is built upon six base modules:

1. Thermodynamic Routines
2. Physical Properties Routines
3. Fluid Mechanic Routines
4. Unit Operations
5. Chemical Reactions Routines
6. Parameter Fitting Routines
7. Process simulation routines

## File System

>neqsim/: main library with all modules
>
>neqsim/thermo/: Main path for thermodynamic routines
>neqsim/thermo/util/examples/: examples of use of Thermodynamic Models and Routines
>
>neqsim/thermodynamicOperation: Main path for flash routines (TPflash, phase envelopes, etc.)
>neqsim/thermodynamicOperation/util/example/: examples of use of thermodynamic operations (eg. flash calculations etc.)
>
>neqsim/physicalProperties: Main path for Physical Property methods
>neqsim/physicalProperties/util/examples/: Examples of use of physical properties calculations
>
>neqsim/physicalProperties: Main path for Physical Property methods
>neqsim/physicalProperties/util/examples/: Examples of use of physical properties calculations
>
>neqsim/processSimulation: Main path for Process Simulation Calculations
>neqsim/processSimulation/util/examples/: Examples of use of Process Simulation calculations
>
>changelog.txt : History of what changed between each version.
>license.txt: license document

## Toolboxes

See [NeqSim homepage](https://equinor.github.io/neqsimhome/). NeqSim toolboxes are avalable via GitHub for alternative programming languages.

* [Matlab](https://github.com/equinor/neqsimmatlab)
* [Python](https://github.com/equinor/neqsimpython)
* [.NET (C#)](https://github.com/equinor/neqsimcapeopen)

## Related open source projects

[NeqSim Python/Colab](https://github.com/EvenSol/NeqSim-Colab)


# Nameless-Link

The "Nameless Link" Discord bot synchronizes user roles to and from a specific Discord Guild.

For documentation please consult the [wiki](https://github.com/NamelessMC/Nameless-Link/wiki).

## Translations

## Compiling

Requirements: Maven, JDK 11, JDK 17, git

`apt install maven openjdk-11-jdk openjdk-17-jdk git`

```sh
git clone https://github.com/NamelessMC/Nameless-Java-API
cd Nameless-Java-API
# You may need to manually set JAVA_HOME to your JDK 11 installation
mvn install
cd ..

git clone https://github.com/NamelessMC/Nameless-Link
cd Nameless-Link
# You may need to manually set JAVA_HOME to your JDK 17 installation
mvn package
cd target
# find jar file here
```


x-pipe
================

[![Build Status](https://travis-ci.com/ctripcorp/x-pipe.svg?branch=master)](https://travis-ci.com/ctripcorp/x-pipe)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/8884/badge.svg)](https://scan.coverity.com/projects/ctripcorp-x-pipe)
[![github CI](https://github.com/ctripcorp/x-pipe/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/ctripcorp/x-pipe/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/ctripcorp/x-pipe/branch/master/graph/badge.svg?token=wj3MUNTPcF)](https://codecov.io/gh/ctripcorp/x-pipe)

- [XPipe 解决什么问题](#xpipe-解决什么问题)
- [系统详述](#系统详述)
    - [整体架构](#整体架构)
    - [Redis 数据复制问题](#redis-数据复制问题)
    - [机房切换](#机房切换)
        - [切换流程](#切换流程)
    - [高可用](#高可用)
        - [XPipe 系统高可用](#xpipe-系统高可用)
        - [Redis 自身高可用](#redis-自身高可用)
    - [测试数据](#测试数据)
        - [延时测试](#延时测试)
    - [跨公网部署及架构](#跨公网部署及架构)
- [docker快速启动](#docker快速启动)
- [深入了解](#深入了解)
- [技术交流](#技术交流)
- [License](#license)

See the [English](https://github.com/ctripcorp/x-pipe/blob/master/README-en.md) readme here.

# XPipe 解决什么问题
Redis 在携程内部得到了广泛的使用，根据客户端数据统计，整个携程全部 Redis 的读写请求在每秒 2000W，其中写请求约 100W，很多业务甚至会将 Redis 当成持久化的内存数据库使用。这样，就对 Redis 多数据中心提出了很大的需求，一是为了提升可用性，解决数据中心 DR(Disaster Recovery) 问题，二是提升访问性能，每个数据中心可以读取当前数据中心的数据，无需跨机房读数据，在这样的需求下，XPipe 应运而生 。

为了方便描述，后面用 DC 代表数据中心 (Data Center)。

# 系统详述

## 整体架构
整体架构图如下所示：
![design](https://raw.github.com/ctripcorp/x-pipe/master/doc/image/total.jpg)

- Console 用来管理多机房的元信息数据，同时提供用户界面，供用户进行配置和 DR 切换等操作。
- Keeper 负责缓存 Redis 操作日志，并对跨机房传输进行压缩、加密等处理。
- Meta Server 管理单机房内的所有 keeper 状态，并对异常状态进行纠正。

## Redis 数据复制问题
多数据中心首先要解决的是数据复制问题，即数据如何从一个 DC 传输到另外一个 DC。我们决定采用伪 slave 的方案，即实现 Redis 协议，伪装成为 Redis slave，让 Redis master 推送数据至伪 slave。这个伪 slave，我们把它称为 keeper，如下图所示：
![keepers](https://raw.github.com/ctripcorp/x-pipe/master/doc/image/keepers.jpg)

使用 keeper 带来的优势

- 减少 master 全量同步
如果异地机房 slave 直接连向 master，多个 slave 会导致 master 多次全量同步，而 keeper 可以缓存 rdb 和 replication log，异地机房的 slave 直接从 keeper 获取数据，增强 master 的稳定性。
- 减少多数据中心网络流量
在两个数据中心之间，数据只需要通过 keeper 传输一次，且 keeper 之间传输协议可以自定义，方便支持压缩 (目前暂未支持)。
- 网络异常时减少全量同步
keeper 将 Redis 日志数据缓存到磁盘，这样，可以缓存大量的日志数据 (Redis 将数据缓存到内存 ring buffer，容量有限)，当数据中心之间的网络出现较长时间异常时仍然可以续传日志数据。
- 安全性提升
多个机房之间的数据传输往往需要通过公网进行，这样数据的安全性变得极为重要，keeper 之间的数据传输也可以加密 (暂未实现)，提升安全性。

## 机房切换

### 切换流程
-   检查是否可以进行 DR 切换
    类似于 2PC 协议，首先进行 prepare，保证流程能顺利进行。
-   原主机房 master 禁止写入
此步骤，保证在迁移的过程中，只有一个 master，解决在迁移过程中可能存在的数据丢失情况。
-   提升新主机房 master
-   其它机房向新主机房同步

同时提供回滚和重试功能。回滚功能可以回滚到初始的状态，重试功能可以在 DBA 人工介入的前提下，修复异常条件，继续进行切换。

## 高可用

### XPipe 系统高可用
如果 keeper 挂掉，多数据中心之间的数据传输可能会中断，为了解决这个问题，keeper 有主备两个节点，备节点实时从主节点复制数据，当主节点挂掉后，备节点会被提升为主节点，代替主节点进行服务。

提升的操作需要通过第三方节点进行，我们把它称之为 MetaServer，主要负责 keeper 状态的转化以及机房内部元信息的存储。同时 MetaServer 也要做到高可用：每个 MetaServer 负责特定的 Redis 集群，当有 MetaServer 节点挂掉时，其负责的 Redis 集群将由其它节点接替；如果整个集群中有新的节点接入，则会自动进行一次负载均衡，将部分集群移交到此新节点。

### Redis 自身高可用
Redis 也可能会挂，Redis 本身提供哨兵 (Sentinel) 机制保证集群的高可用。但是在 Redis4.0 版本之前，提升新的 master 后，其它节点连到此节点后都会进行全量同步，全量同步时，slave 会处于不可用状态；master 将会导出 rdb，降低 master 的可用性；同时由于集群中有大量数据 (RDB) 传输，将会导致整体系统的不稳定。

截止当前文章书写之时，4.0 仍然没有发布 release 版本，而且携程内部使用的 Redis 版本为 2.8.19，如果升到 4.0，版本跨度太大，基于此，我们在 Redis3.0.7 的版本基础上进行优化，实现了 psync2.0 协议，实现了增量同步。下面是 Redis 作者对协议的介绍：[psync2.0](https://gist.github.com/antirez/ae068f95c0d084891305)。

[携程内部 Redis 地址链接](https://github.com/ctripcorp/redis)

## 测试数据

### 延时测试
#### 测试方案
测试方式如下图所示。从 client 发送数据至 master，并且 slave 通过 keyspace notification 的方式通知到 client，整个测试延时时间为 t1+t2+t3。
![test](https://raw.github.com/ctripcorp/x-pipe/master/doc/image/delay.jpg)
#### 测试数据
首先我们测试 Redis master 直接复制到 slave 的延时，为 0.2ms。然后在 master 和 slave 之间增加一层 keeper，整体延时增加 0.1ms，到 0.3ms。

在携程生产环境进行了测试，生产环境两个机房之间的 ping RTT 约为 0.61ms，经过跨数据中心的两层 keeper 后，测试得到的平均延时约为 0.8ms，延时 99.9 线为 2ms。

## 跨公网部署及架构
[详情参考 -- 跨公网部署及架构](https://github.com/ctripcorp/x-pipe/blob/master/doc/proxy.md)

# docker快速启动
[详情参考 -- docker quick start](https://github.com/ctripcorp/x-pipe/wiki/QuickStart#docker-start)

# 深入了解
- 【有任何疑问，请阅读】[XPipe Wiki](https://github.com/ctripcorp/x-pipe/wiki)
- 【目前用户的问题整理】[XPipe Q&A](https://github.com/ctripcorp/x-pipe/wiki/XPipe-Q&A)
- 【文章】[携程Redis多数据中心解决方案-XPipe](https://mp.weixin.qq.com/s/Q3bt0-5nv8uNMdHuls-Exw?)
- 【文章】[携程Redis海外机房数据同步实践](https://mp.weixin.qq.com/s/LeSSdT6bOEFzZyN26PRVzg)
- 【PPT】[携程内XPipe使用介绍](https://docs.c-ctrip.com/files/6/portal/0AS2w12000947w1mw6A59.pptx)

# 技术交流
![tech-support-qq](https://raw.github.com/ctripcorp/x-pipe/master/doc/xpipe_qq.png)

# License
The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/x-pipe/blob/master/LICENSE).


**严肃声明：现在、未来都不会有商业版本，所有代码全部开源!！**

**「我喜欢写代码，乐此不疲」**
**「我喜欢做开源，以此为乐」**

我 🐶 在上海艰苦奋斗，早中晚在 top3 大厂认真搬砖，夜里为开源做贡献。

如果这个项目让你有所收获，记得 Star 关注哦，这对我是非常不错的鼓励与支持。

## 🐶 新手必读

* 演示地址【Vue3 + element-plus】：<http://dashboard-vue3.yudao.iocoder.cn>
* 演示地址【Vue3 + vben(ant-design-vue)】：<http://dashboard-vben.yudao.iocoder.cn>
* 演示地址【Vue2 + element-ui】：<http://dashboard.yudao.iocoder.cn>
* 启动文档：<https://doc.iocoder.cn/quick-start/>
* 视频教程：<https://doc.iocoder.cn/video/>

## 🐰 版本说明

| 版本                                                                  | JDK 8 + Spring Boot 2.7                                                   | JDK 17/21 + Spring Boot 3.2                                                           |
|---------------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| 【完整版】[ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [`master`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master-jdk17/) 分支 |
| 【精简版】[yudao-boot-mini](https://gitee.com/yudaocode/yudao-boot-mini) | [`master`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master/) 分支   | [`master-jdk17`](https://gitee.com/yudaocode/yudao-boot-mini/tree/master-jdk17/) 分支   |

* 【完整版】：包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
* 【精简版】：只包括系统功能、基础设施功能，不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能

可参考 [《迁移文档》](https://doc.iocoder.cn/migrate-module/) ，只需要 5-10 分钟，即可将【完整版】按需迁移到【精简版】

## 🐯 平台简介

**芋道**，以开发者为中心，打造中国第一流的快速开发平台，全部开源，个人与企业可 100% 免费使用。

> 有任何问题，或者想要的功能，可以在 _Issues_ 中提给艿艿。
>
> 😜 给项目点点 Star 吧，这对我们真的很重要！

![架构图](/.image/common/ruoyi-vue-pro-architecture.png)

* Java 后端：`master` 分支为 JDK 8 + Spring Boot 2.7，`master-jdk17` 分支为 JDK 17/21 + Spring Boot 3.2
* 管理后台的电脑端：Vue3 提供 `element-plus`、`vben(ant-design-vue)` 两个版本，Vue2 提供 `element-ui` 版本
* 管理后台的移动端：采用 `uni-app` 方案，一份代码多终端适配，同时支持 APP、小程序、H5！
* 后端采用 Spring Boot 多模块架构、MySQL + MyBatis Plus、Redis + Redisson
* 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等
* 消息队列可使用 Event、Redis、RabbitMQ、Kafka、RocketMQ 等
* 权限认证使用 Spring Security & Token & Redis，支持多终端、多种用户的认证系统，支持 SSO 单点登录
* 支持加载动态权限菜单，按钮级别权限控制，Redis 缓存提升性能
* 支持 SaaS 多租户，可自定义每个租户的权限，提供透明化的多租户底层封装
* 工作流使用 Flowable，支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式
* 高效率开发，使用代码生成器可以一键生成 Java、Vue 前后端代码、SQL 脚本、接口文档，支持单表、树表、主子表
* 实时通信，采用 Spring WebSocket 实现，内置 Token 身份校验，支持 WebSocket 集群
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆，集成支付宝、微信等支付与退款
* 集成阿里云、腾讯云等短信渠道，集成 MinIO、阿里云、腾讯云、七牛云等云存储服务
* 集成报表设计器、大屏设计器，通过拖拽即可生成酷炫的报表与大屏

##  🐳 项目关系

![架构演进](/.image/common/yudao-roadmap.png)

三个项目的功能对比，可见社区共同整理的 [国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) 表格。

### 后端项目

| 项目                                                              | Star                                                                                | 简介                          |
|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro)  | [![Gitee star](https://gitee.com/zhijiantianya/ruoyi-vue-pro/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/ruoyi-vue-pro) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/ruoyi-vue-pro.svg?style=social&label=Stars)](https://github.com/YunaiV/ruoyi-vue-pro)       | 基于 Spring Boot 多模块架构        |
| [yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud)      | [![Gitee star](https://gitee.com/zhijiantianya/yudao-cloud/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yudao-cloud) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/yudao-cloud.svg?style=social&label=Stars)](https://github.com/YunaiV/yudao-cloud)               | 基于 Spring Cloud 微服务架构       |
| [Spring-Boot-Labs](https://gitee.com/yudaocode/SpringBoot-Labs) | [![Gitee star](https://gitee.com/yudaocode/SpringBoot-Labs/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yudao-cloud) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/SpringBoot-Labs.svg?style=social&label=Stars)](https://github.com/yudaocode/SpringBoot-Labs) | 系统学习 Spring Boot & Cloud 专栏 |

### 前端项目

| 项目                                                                         | Star                                                                                | 简介                                     |
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [yudao-ui-admin-vue3](https://gitee.com/yudaocode/yudao-ui-admin-vue3)     | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vue3/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vue3) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vue3.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vue3)         | 基于 Vue3 + element-plus 实现的管理后台         |
| [yudao-ui-admin-vben](https://gitee.com/yudaocode/yudao-ui-admin-vben)     | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vben/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vben) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vben.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vben)         | 基于 Vue3 + vben(ant-design-vue) 实现的管理后台 |
| [yudao-mall-uniapp](https://gitee.com/yudaocode/yudao-mall-uniapp)         | [![Gitee star](https://gitee.com/yudaocode/yudao-mall-uniapp/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-mall-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-mall-uniapp.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-mall-uniapp)                 | 基于 uni-app 实现的商城小程序                    |
| [yudao-ui-admin-vue2](https://gitee.com/yudaocode/yudao-ui-admin-vue2)     | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vue2/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vue2) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vue2.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vue2)         | 基于 Vue2 + element-ui 实现的管理后台           |
| [yudao-ui-admin-uniapp](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-uniapp/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-uniapp.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-uniapp) | 基于 Vue2 + element-ui 实现的管理后台           |
| [yudao-ui-go-view](https://gitee.com/yudaocode/yudao-ui-go-view)           | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-go-view/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-go-view) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-go-view.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-go-view)                     | 基于 Vue3 + naive-ui 实现的大屏报表             |

## 😎 开源协议

**为什么推荐使用本项目？**

① 本项目采用比 Apache 2.0 更宽松的 [MIT License](https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE) 开源协议，个人与企业可 100% 免费使用，不用保留类作者、Copyright 信息。

② 代码全部开源，不会像其他项目一样，只开源部分代码，让你无法了解整个项目的架构设计。[国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn)

![开源项目对比](/.image/common/project-vs.png)

③ 代码整洁、架构整洁，遵循《阿里巴巴 Java 开发手册》规范，代码注释详细，113770 行 Java 代码，42462 行代码注释。

## 🤝 项目外包

我们也是接外包滴，如果你有项目想要外包，可以微信联系【**Aix9975**】。

团队包含专业的项目经理、架构师、前端工程师、后端工程师、测试工程师、运维工程师，可以提供全流程的外包服务。

项目可以是商城、SCRM 系统、OA 系统、物流系统、ERP 系统、CMS 系统、HIS 系统、支付系统、IM 聊天、微信公众号、微信小程序等等。

## 🐼 内置功能

系统内置多种多种业务功能，可以用于快速你的业务系统：

![功能分层](/.image/common/ruoyi-vue-pro-biz.png)

* 通用模块（必选）：系统功能、基础设施
* 通用模块（可选）：工作流程、支付系统、数据报表、会员中心
* 业务系统（按需）：ERP 系统、CRM 系统、商城系统、微信公众号

> 友情提示：本项目基于 RuoYi-Vue 修改，**重构优化**后端的代码，**美化**前端的界面。
>
> * 额外新增的功能，我们使用 🚀 标记。
> * 重新实现的功能，我们使用 ⭐ 标记。

🙂 所有功能，都通过 **单元测试** 保证高质量。

### 系统功能

|     | 功能    | 描述                              |
|-----|-------|---------------------------------|
|     | 用户管理  | 用户是系统操作者，该功能主要完成系统用户配置          |
| ⭐  | 在线用户  | 当前系统中活跃用户状态监控，支持手动踢下线           |
|     | 角色管理  | 角色菜单权限分配、设置角色按机构进行数据范围权限划分      |
|     | 菜单管理  | 配置系统菜单、操作权限、按钮权限标识等，本地缓存提供性能    |
|     | 部门管理  | 配置系统组织机构（公司、部门、小组），树结构展现支持数据权限  |
|     | 岗位管理  | 配置系统用户所属担任职务                    |
| 🚀  | 租户管理  | 配置系统租户，支持 SaaS 场景下的多租户功能        |
| 🚀  | 租户套餐  | 配置租户套餐，自定每个租户的菜单、操作、按钮的权限       |
|     | 字典管理  | 对系统中经常使用的一些较为固定的数据进行维护          |
| 🚀  | 短信管理  | 短信渠道、短息模板、短信日志，对接阿里云、腾讯云等主流短信平台 |
| 🚀  | 邮件管理  | 邮箱账号、邮件模版、邮件发送日志，支持所有邮件平台       |
| 🚀  | 站内信   | 系统内的消息通知，提供站内信模版、站内信消息          |
| 🚀  | 操作日志  | 系统正常操作日志记录和查询，集成 Swagger 生成日志内容 |
| ⭐  | 登录日志  | 系统登录日志记录查询，包含登录异常               |
| 🚀  | 错误码管理 | 系统所有错误码的管理，可在线修改错误提示，无需重启服务     |
|     | 通知公告  | 系统通知公告信息发布维护                    |
| 🚀  | 敏感词   | 配置系统敏感词，支持标签分组                  |
| 🚀  | 应用管理  | 管理 SSO 单点登录的应用，支持多种 OAuth2 授权方式 |
| 🚀  | 地区管理  | 展示省份、城市、区镇等城市信息，支持 IP 对应城市      |

![功能图](/.image/common/system-feature.png)

### 工作流程

|     | 功能    | 描述                                     |
|-----|-------|----------------------------------------|
| 🚀  | 流程模型  | 配置工作流的流程模型，支持文件导入与在线设计流程图，提供 7 种任务分配规则 |
| 🚀  | 流程表单  | 拖动表单元素生成相应的工作流表单，覆盖 Element UI 所有的表单组件 |
| 🚀  | 用户分组  | 自定义用户分组，可用于工作流的审批分组                    |
| 🚀  | 我的流程  | 查看我发起的工作流程，支持新建、取消流程等操作，高亮流程图、审批时间线    |
| 🚀  | 待办任务  | 查看自己【未】审批的工作任务，支持通过、不通过、转发、委派、退回等操作    |
| 🚀  | 已办任务  | 查看自己【已】审批的工作任务，未来会支持回退操作               |
| 🚀  | OA 请假 | 作为业务自定义接入工作流的使用示例，只需创建请求对应的工作流程，即可进行审批 |

![功能图](/.image/common/bpm-feature.png)

### 支付系统

|     | 功能   | 描述                        |
|-----|------|---------------------------|
| 🚀  | 应用信息 | 配置商户的应用信息，对接支付宝、微信等多个支付渠道 |
| 🚀  | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单     |
| 🚀  | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单     |
| 🚀  | 回调通知 | 查看支付回调业务的【支付】【退款】的通知结果    |
| 🚀  | 接入示例 | 提供接入支付系统的【支付】【退款】的功能实战    |

### 基础设施

|     | 功能        | 描述                                           |
|-----|-----------|----------------------------------------------|
| 🚀  | 代码生成      | 前后端代码的生成（Java、Vue、SQL、单元测试），支持 CRUD 下载       |
| 🚀  | 系统接口      | 基于 Swagger 自动生成相关的 RESTful API 接口文档          |
| 🚀  | 数据库文档     | 基于 Screw 自动生成数据库文档，支持导出 Word、HTML、MD 格式      |
|     | 表单构建      | 拖动表单元素生成相应的 HTML 代码，支持导出 JSON、Vue 文件         |
| 🚀  | 配置管理      | 对系统动态配置常用参数，支持 SpringBoot 加载                 |
| ⭐  | 定时任务      | 在线（添加、修改、删除)任务调度包含执行结果日志                     |
| 🚀  | 文件服务      | 支持将文件存储到 S3（MinIO、阿里云、腾讯云、七牛云）、本地、FTP、数据库等   |
| 🚀  | WebSocket | 提供 WebSocket 接入示例，支持一对一、一对多发送方式              |
| 🚀  | API 日志    | 包括 RESTful API 访问日志、异常日志两部分，方便排查 API 相关的问题   |
|     | MySQL 监控  | 监视当前系统数据库连接池状态，可进行分析SQL找出系统性能瓶颈              |
|     | Redis 监控  | 监控 Redis 数据库的使用情况，使用的 Redis Key 管理           |
| 🚀  | 消息队列      | 基于 Redis 实现消息队列，Stream 提供集群消费，Pub/Sub 提供广播消费 |
| 🚀  | Java 监控   | 基于 Spring Boot Admin 实现 Java 应用的监控           |
| 🚀  | 链路追踪      | 接入 SkyWalking 组件，实现链路追踪                      |
| 🚀  | 日志中心      | 接入 SkyWalking 组件，实现日志中心                      |
| 🚀  | 服务保障      | 基于 Redis 实现分布式锁、幂等、限流功能，满足高并发场景              |
| 🚀  | 日志服务      | 轻量级日志中心，查看远程服务器的日志                           |
| 🚀  | 单元测试      | 基于 JUnit + Mockito 实现单元测试，保证功能的正确性、代码的质量等    |

![功能图](/.image/common/infra-feature.png)

### 数据报表

|     | 功能    | 描述                 |
|-----|-------|--------------------|
| 🚀  | 报表设计器 | 支持数据报表、图形报表、打印设计等  |
| 🚀  | 大屏设计器 | 拖拽生成数据大屏，内置几十种图表组件 |

### 微信公众号

|     | 功能     | 描述                            |
|-----|--------|-------------------------------|
| 🚀  | 账号管理   | 配置接入的微信公众号，可支持多个公众号           |
| 🚀  | 数据统计   | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据  |
| 🚀  | 粉丝管理   | 查看已关注、取关的粉丝列表，可对粉丝进行同步、打标签等操作 |
| 🚀  | 消息管理   | 查看粉丝发送的消息列表，可主动回复粉丝消息         |
| 🚀  | 自动回复   | 自动回复粉丝发送的消息，支持关注回复、消息回复、关键字回复 |
| 🚀  | 标签管理   | 对公众号的标签进行创建、查询、修改、删除等操作       |
| 🚀  | 菜单管理   | 自定义公众号的菜单，也可以从公众号同步菜单         |
| 🚀  | 素材管理   | 管理公众号的图片、语音、视频等素材，支持在线播放语音、视频 |
| 🚀  | 图文草稿箱  | 新增常用的图文素材到草稿箱，可发布到公众号         |
| 🚀  | 图文发表记录 | 查看已发布成功的图文素材，支持删除操作           |

### 商城系统

![功能图](/.image/common/mall-feature.png)

![功能图](/.image/common/mall-preview.png)

演示地址：<https://doc.iocoder.cn/mall-preview/>

### 会员中心

|     | 功能   | 描述                               |
|-----|------|----------------------------------|
| 🚀  | 会员管理 | 会员是 C 端的消费者，该功能用于会员的搜索与管理        |
| 🚀  | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作           |
| 🚀  | 会员等级 | 对会员的等级、成长值进行管理，可用于订单折扣等会员权益      |
| 🚀  | 会员分组 | 对会员进行分组，用于用户画像、内容推送等运营手段         |
| 🚀  | 积分签到 | 回馈给签到、消费等行为的积分，会员可订单抵现、积分兑换等途径消耗 |

### ERP 系统

![功能图](/.image/common/erp-feature.png)

演示地址：<https://doc.iocoder.cn/erp-preview/>

### CRM 系统

![功能图](/.image/common/crm-feature.png)

演示地址：<https://doc.iocoder.cn/crm-preview/>

## 🐨 技术栈

### 模块

| 项目                    | 说明                 |
|-----------------------|--------------------|
| `yudao-dependencies`  | Maven 依赖版本管理       |
| `yudao-framework`     | Java 框架拓展          |
| `yudao-server`        | 管理后台 + 用户 APP 的服务端 |
| `yudao-module-system` | 系统功能的 Module 模块    |
| `yudao-module-member` | 会员中心的 Module 模块    |
| `yudao-module-infra`  | 基础设施的 Module 模块    |
| `yudao-module-bpm`    | 工作流程的 Module 模块    |
| `yudao-module-pay`    | 支付系统的 Module 模块    |
| `yudao-module-mall`   | 商城系统的 Module 模块    |
| `yudao-module-erp`    | ERP 系统的 Module 模块  |
| `yudao-module-crm`    | CRM 系统的 Module 模块  |
| `yudao-module-mp`     | 微信公众号的 Module 模块   |
| `yudao-module-report` | 大屏报表 Module 模块     |

### 框架

| 框架                                                                                | 说明               | 版本             | 学习指南                                                           |
|---------------------------------------------------------------------------------------------|------------------|----------------|----------------------------------------------------------------|
| [Spring Boot](https://spring.io/projects/spring-boot)                                       | 应用开发框架           | 2.7.18         | [文档](https://github.com/YunaiV/SpringBoot-Labs)                |
| [MySQL](https://www.mysql.com/cn/)                                                          | 数据库服务器           | 5.7 / 8.0+     |                                                                |
| [Druid](https://github.com/alibaba/druid)                                                   | JDBC 连接池、监控组件    | 1.2.19         | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [MyBatis Plus](https://mp.baomidou.com/)                                                    | MyBatis 增强工具包    | 3.5.3.2        | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao)         |
| [Dynamic Datasource](https://dynamic-datasource.com/)                                       | 动态数据源            | 3.6.1          | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [Redis](https://redis.io/)                                                                  | key-value 数据库    | 5.0 / 6.0 /7.0 |                                                                |
| [Redisson](https://github.com/redisson/redisson)                                            | Redis 客户端        | 3.18.0         | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao)           |
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架           | 5.3.24         | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao)               |
| [Spring Security](https://github.com/spring-projects/spring-security)                       | Spring 安全框架      | 5.7.11         | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator)                     | 参数校验组件           | 6.2.5          | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao)      |
| [Flowable](https://github.com/flowable/flowable-engine)                                     | 工作流引擎            | 6.8.0          | [文档](https://doc.iocoder.cn/bpm/)                              |
| [Quartz](https://github.com/quartz-scheduler)                                               | 任务调度组件           | 2.3.2          | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao)             |
| [Springdoc](https://springdoc.org/)                                                         | Swagger 文档       | 1.6.15         | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao)         |
| [SkyWalking](https://skywalking.apache.org/)                                                | 分布式应用追踪系统        | 8.12.0         | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao)      |
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin)                       | Spring Boot 监控平台 | 2.7.10         | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao)           |
| [Jackson](https://github.com/FasterXML/jackson)                                             | JSON 工具库         | 2.13.3         |                                                                |
| [MapStruct](https://mapstruct.org/)                                                         | Java Bean 转换     | 1.5.5.Final    | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao)       |
| [Lombok](https://projectlombok.org/)                                                        | 消除冗长的 Java 代码    | 1.18.30        | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao)          |
| [JUnit](https://junit.org/junit5/)                                                          | Java 单元测试框架      | 5.8.2          | -                                                              |
| [Mockito](https://github.com/mockito/mockito)                                               | Java Mock 框架     | 4.8.0          | -                                                              |

## 🐷 演示图

### 系统功能

| 模块       | biu                         | biu                       | biu                      |
|----------|-----------------------------|---------------------------|--------------------------|
| 登录 & 首页  | ![登录](/.image/登录.jpg)       | ![首页](/.image/首页.jpg)     | ![个人中心](/.image/个人中心.jpg) |
| 用户 & 应用  | ![用户管理](/.image/用户管理.jpg)   | ![令牌管理](/.image/令牌管理.jpg) | ![应用管理](/.image/应用管理.jpg) |
| 租户 & 套餐  | ![租户管理](/.image/租户管理.jpg)   | ![租户套餐](/.image/租户套餐.png) | -                        |
| 部门 & 岗位  | ![部门管理](/.image/部门管理.jpg)   | ![岗位管理](/.image/岗位管理.jpg) | -                        |
| 菜单 & 角色  | ![菜单管理](/.image/菜单管理.jpg)   | ![角色管理](/.image/角色管理.jpg) | -                        |
| 审计日志     | ![操作日志](/.image/操作日志.jpg)   | ![登录日志](/.image/登录日志.jpg) | -                        |
| 短信       | ![短信渠道](/.image/短信渠道.jpg)   | ![短信模板](/.image/短信模板.jpg) | ![短信日志](/.image/短信日志.jpg) |
| 字典 & 敏感词 | ![字典类型](/.image/字典类型.jpg)   | ![字典数据](/.image/字典数据.jpg) | ![敏感词](/.image/敏感词.jpg)  |
| 错误码 & 通知 | ![错误码管理](/.image/错误码管理.jpg) | ![通知公告](/.image/通知公告.jpg) | -                        |

### 工作流程

| 模块      | biu                             | biu                             | biu                             |
|---------|---------------------------------|---------------------------------|---------------------------------|
| 流程模型    | ![流程模型-列表](/.image/流程模型-列表.jpg) | ![流程模型-设计](/.image/流程模型-设计.jpg) | ![流程模型-定义](/.image/流程模型-定义.jpg) |
| 表单 & 分组 | ![流程表单](/.image/流程表单.jpg)       | ![用户分组](/.image/用户分组.jpg)       | -                               |
| 我的流程    | ![我的流程-列表](/.image/我的流程-列表.jpg) | ![我的流程-发起](/.image/我的流程-发起.jpg) | ![我的流程-详情](/.image/我的流程-详情.jpg) |
| 待办 & 已办 | ![任务列表-审批](/.image/任务列表-审批.jpg) | ![任务列表-待办](/.image/任务列表-待办.jpg) | ![任务列表-已办](/.image/任务列表-已办.jpg) |
| OA 请假   | ![OA请假-列表](/.image/OA请假-列表.jpg) | ![OA请假-发起](/.image/OA请假-发起.jpg) | ![OA请假-详情](/.image/OA请假-详情.jpg) |

### 基础设施

| 模块            | biu                           | biu                         | biu                       |
|---------------|-------------------------------|-----------------------------|---------------------------|
| 代码生成          | ![代码生成](/.image/代码生成.jpg)     | ![生成效果](/.image/生成效果.jpg)   | -                         |
| 文档            | ![系统接口](/.image/系统接口.jpg)     | ![数据库文档](/.image/数据库文档.jpg) | -                         |
| 文件 & 配置       | ![文件配置](/.image/文件配置.jpg)     | ![文件管理](/.image/文件管理2.jpg)  | ![配置管理](/.image/配置管理.jpg) |
| 定时任务          | ![定时任务](/.image/定时任务.jpg)     | ![任务日志](/.image/任务日志.jpg)   | -                         |
| API 日志        | ![访问日志](/.image/访问日志.jpg)     | ![错误日志](/.image/错误日志.jpg)   | -                         |
| MySQL & Redis | ![MySQL](/.image/MySQL.jpg)   | ![Redis](/.image/Redis.jpg) | -                         |
| 监控平台          | ![Java监控](/.image/Java监控.jpg) | ![链路追踪](/.image/链路追踪.jpg)   | ![日志中心](/.image/日志中心.jpg) |

### 支付系统

| 模块      | biu                       | biu                             | biu                             |
|---------|---------------------------|---------------------------------|---------------------------------|
| 商家 & 应用 | ![商户信息](/.image/商户信息.jpg) | ![应用信息-列表](/.image/应用信息-列表.jpg) | ![应用信息-编辑](/.image/应用信息-编辑.jpg) |
| 支付 & 退款 | ![支付订单](/.image/支付订单.jpg) | ![退款订单](/.image/退款订单.jpg)       | ---                             |
### 数据报表

| 模块    | biu                             | biu                             | biu                                   |
|-------|---------------------------------|---------------------------------|---------------------------------------|
| 报表设计器 | ![数据报表](/.image/报表设计器-数据报表.jpg) | ![图形报表](/.image/报表设计器-图形报表.jpg) | ![报表设计器-打印设计](/.image/报表设计器-打印设计.jpg) |
| 大屏设计器 | ![大屏列表](/.image/大屏设计器-列表.jpg)   | ![大屏预览](/.image/大屏设计器-预览.jpg)   | ![大屏编辑](/.image/大屏设计器-编辑.jpg)         |

### 移动端（管理后台）

| biu                              | biu                              | biu                              |
|----------------------------------|----------------------------------|----------------------------------|
| ![](/.image/admin-uniapp/01.png) | ![](/.image/admin-uniapp/02.png) | ![](/.image/admin-uniapp/03.png) |
| ![](/.image/admin-uniapp/04.png) | ![](/.image/admin-uniapp/05.png) | ![](/.image/admin-uniapp/06.png) |
| ![](/.image/admin-uniapp/07.png) | ![](/.image/admin-uniapp/08.png) | ![](/.image/admin-uniapp/09.png) |

目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。


= Neo4j-Migrations
Michael Simons <michael.simons@neo4j.com>
:doctype: article
:lang: en
:listing-caption: Listing
:source-highlighter: coderay
:icons: font
// tag::properties[]
:fullVersion: 2.10.3
:groupId: eu.michael-simons.neo4j
:artifactIdMavenPlugin: neo4j-migrations-maven-plugin
:artifactIdSpringBoot: neo4j-migrations-spring-boot-starter
:artifactIdQuarkus: neo4j-migrations-quarkus
:artifactIdCore: neo4j-migrations
:artifactIdFormatAdoc: neo4j-migrations-formats-adoc
:artifactIdFormatMarkdown: neo4j-migrations-formats-markdown
:branch: main
:url-apidocs: https://michael-simons.github.io/neo4j-migrations/main/site
:url-projectinfo: https://michael-simons.github.io/neo4j-migrations/main/site
:url-gh-releases: https://github.com/michael-simons/neo4j-migrations/releases
// end::properties[]

[abstract]
--
Neo4j-Migrations is a database migration and refactoring tool that allows running Cypher scripts and programmatic refactorings
in a controlled and repeatable fashion against one or more Neo4j database.

Neo4j-Migrations is a proud member of the https://neo4j.com/labs/[Neo4j-Labs] and maintained by authors of the Neo4j-Drivers- and SDN/OGM team.
--

image:https://github.com/michael-simons/neo4j-migrations/workflows/build/badge.svg[link=https://github.com/michael-simons/neo4j-migrations/actions]
image:https://sonarcloud.io/api/project_badges/measure?project=eu.michael-simons.neo4j%3Aneo4j-migrations-parent&metric=coverage[link=https://sonarcloud.io/summary/new_code?id=eu.michael-simons.neo4j%3Aneo4j-migrations-parent]
image:https://sonarcloud.io/api/project_badges/measure?project=eu.michael-simons.neo4j%3Aneo4j-migrations-parent&metric=alert_status[link=https://sonarcloud.io/dashboard?id=eu.michael-simons.neo4j%3Aneo4j-migrations-parent]
image:https://maven-badges.herokuapp.com/maven-central/eu.michael-simons.neo4j/neo4j-migrations/badge.svg[link=https://maven-badges.herokuapp.com/maven-central/eu.michael-simons.neo4j/neo4j-migrations]

== Introduction

// tag::introduction[]
Neo4j-Migrations are a set of tools to make your schema migrations as easy as possible.
They provide a uniform way for applications, the command line and build tools alike to track, manage and apply changes to your database, in short: to refactor your database.
The project is inspired to a large extent by https://flywaydb.org[FlywayDB], which is an awesome tool for migration of relational databases.
Most things evolve around Cypher scripts, however the Core API of Neo4j-Migrations allows defining Java classes as migrations as well.

Neo4j-Migrations builds directly on top of the official https://github.com/neo4j/neo4j-java-driver[Neo4j Java driver], supports Neo4j 3.5, Neo4j 4.1 to 4.4 and Neo4j 5, including enterprise features such as multidatabase support and impersonation.

The only dependencies are said driver and https://github.com/classgraph/classgraph[ClassGraph], the latter being used to find migrations on the classpath.

The history of migrations applied is stored as a subgraph in your database.
// end::introduction[]

The graph will look like this:

image::docs/modules/ROOT/images/chain-of-migrations.png[]

== Downloads

Binary downloads for the CLI are available on our https://github.com/michael-simons/neo4j-migrations/releases[release page]
for each version. Maven artifacts are available on https://search.maven.org/artifact/eu.michael-simons.neo4j/neo4j-migrations[central] under
the following coordinates:

* Core API: `{groupId}:{artifactIdCore}:{fullVersion}`
* Spring-Boot-Starter: `{groupId}:{artifactIdSpringBoot}:{fullVersion}`
* Quarkus extension: `{groupId}:{artifactIdQuarkus}:{fullVersion}`
* Maven-Plugin: `{groupId}:{artifactIdMavenPlugin}:{fullVersion}`

The quickest way to use the CLI is https://www.jbang.dev[JBang]. With JBang installed, just enter `jbang neo4j-migrations@neo4j --help` to get started.
Other options include Homebrew and Zip bundles. Please checkout the full list of https://michael-simons.github.io/neo4j-migrations/current/#download[download options].

== Compatibility

Neo4j-Migrations can be used against Neo4j 3.5, all Neo4j 4 versions from 4.1 up to 4.4 and Neo4j 5, including all current Neo4j-Aura versions.

NOTE: Neo4j 4.0 is only partially supported since version 2.0 due to the fact that Neo4j Java Driver does not support it fully anymore since 5.x. If you need to use this library with Neo4j 4.0 (which you shouldn't, because 4.0 is out of support anyway), look at the latest 1.x version of Neo4j-Migrations. *This does not affect new versions of the 4.x series, such as Neo4j 4.4, which is fully supported by this project!*

// tag::compatibility[]
The Core API and the JVM based version of the CLI module of Neo4j-Migrations requires at least Java 17 or higher since version 2.0.
Neo4j-Migrations can safely be used on both the class- and module-path.
Native binaries are provided for 64bit versions of macOS, Linux and Windows. The native binaries don't require a JVM to be installed.

For a version compatible with JDK 8, check the 1.x releases. We still do maintain the latest minor, including support for older versions of Spring Boot (prio to Spring Boot 3). These are also the versions you should be using against Neo4j 4.0.

The older releases of Neo4j-Migrations are compiled with JDK 17 while targeting JDK 8.
The Core API is provided as a Multi-Release-Jar in the older releases, providing a `module-info.java` for JDK 11 and higher, making it a good citizen on the Java module path as well.
// end::compatibility[]

While the CLI module actually does not require a JVM installed (it is a native binary, available for a Linux, macOS and Windows alike), some people might prefer a solution native to their ecosystem. The following projects serve the same purpose as Neo4j-Migrations and use the same graph, check-summing and versioning scheme as this project:

* https://github.com/marianozunino/morpheus[Morpheus], written in TypeScript and published as NPM package, by https://github.com/marianozunino[@marianozunino]

If you want to be listed here too, please reach out, and we can collaborate to ensure compatibility.

== Manual

The complete manual is available here: https://michael-simons.github.io/neo4j-migrations[michael-simons.github.io/neo4j-migrations].
The API documentation for the core module is available here: https://michael-simons.github.io/neo4j-migrations/main/site/neo4j-migrations/apidocs/index.html[Neo4j Migrations (Core) {fullVersion} API]. The comprehensive set of system diagrams including https://sourcespy.com/github/michaelsimonsneo4jmigrations/[build, module and class diagrams] is automatically generated weekly.

== Presentations and features

We try to promote this project as good as we can internally and externally while trying not to be too obtrusive. If you think it's a good idea to talk about it at your conference, just ask. Happy to answer CfPs. We are grateful about the coverage, presentations and features so far:

* https://www.infoq.com/news/2021/12/neo4j-migrations/[InfoQ: Migrating Neo4j Graph Schemas with Neo4j Migrations (2021-12-28)] by https://www.infoq.com/profile/Johan-Janssen/[Johan Janssen]
* https://jreleaser.org/guide/latest/index.html#_who_is_using_it[JReleaser: Who is using it] by https://twitter.com/aalmiray[Andres Almiray]
* https://speakerdeck.com/michaelsimons/neo4j-migrations-the-lean-way-of-applying-database-refactorings-to-neo4j-efa52ac1-85e1-4688-97f3-566fc78de6cd[Nodes 22: Neo4j-Migrations - The lean way of refactoring Neo4j content] by https://twitter.com/rotnroll666[Michael Simons] (https://github.com/michael-simons/nodes2022[Demo repository] and the https://www.youtube.com/watch?v=5-j0xiVAeoM[recording of the presentation])
* The first major upgrade, Neo4j-Migrations 2.0.0 was included in the https://github.blog/2023-02-08-release-radar-dec-2022-jan-2023/[GitHub Release Radar, Festive Edition · December 2022 – January 2023]

== CLI in a nutshell

image::docs/modules/ROOT/images/cli-demo.gif[]

== Contributors

++++

Adam Cowley
🚇

Ali Ince
🐛 📓

Amit Kumar Yadav
📓 🤔

Andres Almiray
💻 🔌 🤔 🧑🏫

Corneil du Plessis
🐛

Florent Biville
🤔

Frederik Hahne
🤔

Gerrit Meier
💻 📖

Guillaume Grossetie
💻 📖

Hosch250
📓 🐛

Israel Bethencourt
🤔

Kateryna Dovhalets
💻

Mariano Zunino
🤔

Maurizio Casciano
🤔 🐛

Michael Simons
💻 📖 🚧 📢

Peter Vavra
🐛

Raf23
🐛

Robsdedude
🔬 👀

SALES
🤔

Sascha Peukert
📓

Sean Killeen
📖

Sergei Egorov
👀

Sergey
🤔

alexanoid
🐛

dana canzano
📓 🐛

injectives
💻 📓

shanon84
💻 🐛

szabopeter
📖

ttemple06
🤔

++++