Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Build a micro-service framework and test environment-9-router

Shulou Source: shulou.com Published: 2022-06-03 02:36:31 11月14日 Update

1 instance

(1) create a micro-service for the sample business

First, rely on spring-boot-starter-web.

Then, modify the Application:

Finally, modify the Application.properties:

(2) create a gateway

First, rely on spring-boot-starter-web, spring-cloud-starter-netflix-zuul.

Then, modify the Application class:

Add filter:

Finally, modify the application.properties:

(3) testing

Start the microservice with port 8090.

Start the gateway, port 8080.

In the browser Chrome, access:

At this point, the gateway command line displays:

Tags: Gateways services ports tests services commands instances browsers examples filters browsing do-it-yourself frameworks environments routing routers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS vpn Shulou Tech Info Huawei