# Quick Start

Below is a simple demo that guides new users to use Sermant in just 4 steps.

# Preparation

# Compile demo application

Execute the following command in the ${path}/Sermant-examples/flowcontrol-demo/spring-cloud-demo/spring-provider/ directory:

# windows linux mac
mvn clean package

After successful packaging,GET spring-provider.jar in ${path}/Sermant-examples/flowcontrol-demo/spring-cloud-demo/spring-provider/target

Note: path is the path where the demo application is downloaded

# Modify the Sermant configuration

Modify the agent.service.heartbeat.enable and agent.service.gateway.enable configuration in the ${path}/sermant-agent-x.x.x/agent/config/config.properties file to be true, which is to open the heartbeat service and the gateway service of Sermant, as shown below:

agent.service.heartbeat.enable=true
agent.service.gateway.enable=true

Note: path is the path where the Sermant package is downloaded

# Start Backend

Execute the following command in the ${path}/sermant-agent-x.x.x/server/sermant directory:

java -jar sermant-backend-x.x.x.jar

Note: path is the path where the Sermant package is downloaded

# Start demo application

Execute the following command in the ${path}/Sermant-examples/flowcontrol-demo/spring-cloud-demo/spring-provider/targetdirectory:

# linux mac
java -javaagent:${path}/sermant-agent-x.x.x/agent/sermant-agent.jar -jar spring-provider.jar

# windows
java -javaagent:${path}\sermant-agent-x.x.x\agent\sermant-agent.jar -jar spring-provider.jar

Note: path is the path where the Sermant package is downloaded

# Verification

Check running status of Sermant. In this example, open the browser and navigate to the URL http://localhost:8900.

Last Updated: 5/7/2024, 3:32:17 AM