- Install JDK1.8+ locally
- Install Git locally
- Install Maven locally
- Choose a development tool, such as IDEA
Use Git to clone code
git clone https://github.com/apache/incubator-shenyu.git
Compile with Maven
cd incubator-shenyumvn clean install -Dmaven.javadoc.skip=true -B -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests
Use development tools, take IDEA as an example.
shenyu-admin (use H2 database by default)
At this point, shenyu gateway has been activated.
We can open the browser and access the admin console: http://localhost:9095/
Apache ShenYu provides examples for Http, Dubbo, SpringCloud and other applications to access the shenyu gateway, located in the
shenyu-example module. Here we take the Http service as an example.
shenyu-example is not marked as a Maven project by IDEA, you can right-click the
pom.xml file in the
shenyu-example directory to add it as a Maven project.
At this time,
shenyu-examples-http will automatically register the interface method annotated with
@ShenyuSpringMvcClient and the related configuration in application.yml to the gateway. When we open the admin console, you can see the relevant configuration in divide and context-path.
postman to simulate
http to request your
We can refer to Official Document to use other plugins.
Here is an example of using the param-mapping plugin.
Edit the param-mapping plugin in
BasicConfig -> Plugin and set
Configure selectors and rules in
PluginList -> http process.
postman to make an http request to