Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Actual combat: building micro-services based on spring cloud + docker

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

This series records the practical process of learning spring-cloud-microservice-example and analyzes the technology of building an end-to-end micro-service architecture using spring cloud + docker.

0. In preparation before installation, the following software needs to be installed.

Maven 3

Java 8

Docker

Docker Compose

My environment

Ubuntu16.04Javaopenjdk 1.8.0Docker18.03.1-cedocker-compose1.8.0

1. Clone or copy the project

$docker clone https://github.com/kbastani/spring-cloud-microservice-example.git

two。 Construction project

Run in the project root directory

$mvn clean install

This step will take a period of time, depending on the network speed, so it is best to use domestic sources for maven repository and docker libraries.

This step downloads all dependencies and compiles the project. After all the services have been built, the Maven Docker plug-in will automatically build all the images and save them to your local docker regitsry.

If this step succeeds, you will finally see it in the command line window.

3. Start the cluster with Docker compose

Execute under the spring-cloud-microservice-example/docker directory

$docker-compose up

This step will take several minutes.

4. Check the experimental results

Open a browser and visit http://localhost:8761/ to see Eureka service's dashboard

Enter: http://localhost:10000/movie in the browser address bar to see the movie service REST API

It is not finished to be continued.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report