GithubHelp home page GithubHelp logo

blog-ms's Introduction

Build Status

BlobMS

Description

There is a sample application here. It is a Spring Boot application so you can run it using the usual mechanisms (for instance "mvn spring-boot:run"). When it runs it will look for the config server on http://localhost:8888 by default, so you could run the server as well to see it all working together.

The sample has a test case where the config server is also started in the same JVM (with a different port), and the test asserts that an environment property from the git configuration repo is present. To change the location of the config server just set "spring.cloud.config.uri" in "bootstrap.yml" (or via System properties etc.).

The test case has a main() method that runs the server in the same way (watch the logs for its port), so you can run the whole system in one process and play with it (e.g. right click on the main in your IDE and run it). The main() method uses target/config for the working directory of the git repository, so you can make local changes there and see them reflected in the running app.

On local machine

Simple method to start the service:

$ cd 'spring-service'
$ mvn spring-boot:run

For start all the service you can execute start_all.sh.

The server is a Spring Boot application so you can run it from your IDE instead if you prefer (the main class is ConfigServerApplication).

On docker

Running using Docker is even simpler, assuming that docker-compose and docker are installed on your box, just run the following:

Build the docker images for the microservices

mvn clean package docker:build

Start up Docker containers

docker-compose up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.