This is the repository for the Beginner's Guide to Spring Cloud talk. You can find the slides here.
There are four importand directories in this repository.
beginners-guide-to-spring-cloud-config
- This directory contains the configuration used by the Spring Cloud Config Server.start
- This directory contains basic Boot apps that are modified to use Spring Cloudcomplete
- This directory contains the finalized Boot apps that use Spring Cloudconfig
- This is configuration from Eureka, Config Server, and Zipkin used by the Spring Cloud CLI
Before you run the applications in this repository you should install the Spring Cloud CLI.
There are three apps in the start
and four apps in the complete
directories.
The name
app will return the value of the name
property when making an HTTP GET
request to /
.
The greeting
app returns a greeting. You can make a GET request to /
and it will return Hello
. You can also make an HTTP GET
and pass a language code to return a greeting for that language. For example a GET
to /es
would return Hola
.
The web
app makes a request to both the greeting
and name
app to construct the proper greeting when you make a GET
to /
.
By changing the Accept-Language
header you can change the language of the greeting returned. For example if you set the Accept-Language
header to de
the greeting returned will be Hallo Ryan
.
This app has the same functionality as the web
app but leverages the new Spring Cloud Gateway project and uses Spring Boot 2.0.0.
It is only present in the complete
directory.
From the root of the repo run
$ spring cloud eureka configserver zipkin
This will start a Eureka Server, Config Server, and Zipkin.
Then from the complete
directory you can run each of the apps.
NOTE: You do not need to run the Eureka Server, Config Server, and Zipkin when running the app from the start
directory because
they do not use Spring Cloud.