Get the code

Git clone (github) : github.com/dromara/sou

2, keep your own fork and master branch code synchronized command

git remote -v
#Add upstream
git remote add upstream https://github.com/dromara/soul.git
#Pull up upstream code
git fetch upstream
#Update the ORIGN/Master code
git checkout master
git merge upstream/master
git push origin master
Copy the code

Some extra commands

#Remove the warehouse
git remote rm 
#addGit remote add ${git remote add ${git remote add $}Copy the code

Use git remote -v to view origin and upstream information.

Two, run the code

Soul is a responsive API gateway based on WebFlux implementation, with asynchronous, high performance, and cross-language features. So Soul is a Spring-based project that starts with two modules.

Packaging orders

mvn clean package install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Drat.skip=true -Dcheckstyle.skip=true
Copy the code
  • Soul-admin: indicates the gateway management background

  • Soul-bootstrap: indicates the gateway startup entry

The position of the two modules in the official website architecture diagram

1. Start soul-admin

SQL > select * from soul-admin; SQL > select * from soul-admin; SQL > select * from soul-admin; SQL > select * from soul-admin; Start the project.

When you first start up, you create library tables and data based on SQL statements in your project. You can browse which tables are created.

Only the rule table has a unique index for name. Presumably, the data volume of these tables is not very large.

Open the background management system, address: http://localhost:9095/, default account and password: admin 123456, casually click a look.

  • Plug-in list: The traffic connected to the gateway is chain processed and logically plug-in on the chain. These plug-ins also basically represent what traffic protocols the Soul Gateway can access and what processing capabilities it provides.

  • System configuration: only understand plug-in control (control plug-in open), follow up after learning.

2. Start soul-bootstrap

Launched the Soul Gateway service, a Spring Cloud project.

The soul-bootstrap configuration file of the soul-bootstrap module provides four time synchronization modes for data. The soul-bootstrap configuration file of the soul-bootstrap module provides four time synchronization modes for data. Websocket is used by default, the other three are commented out.

There are three main types of data synchronization:

  • Websocket: long link
  • HTTP: training in rotation
  • Registries: Zookeeper, NACOS