Welcome to Spring Microservices in Action, Chapter 5. Chapter 5 does not introduce any new services. Instead it focuses on how to use Spring Cloud and Netflix's Hystrix project to help protect service clients from failing or poorly behaving services. This chapter will introduce you to the concepts of fail-fast service calls, bulkheads and fallbacks for when a client call fails.
By the time you are done reading this chapter you will have built and/or deployed:
To build the code examples for Chapter 5 as a docker image, open a command-line window change to the directory where you have downloaded the chapter 5 source code.
Run the following maven command. This command will execute the Spotify docker plugin defined in the pom.xml file.
mvn clean package docker:build
Running the above command at the root of the project directory will build all of the projects. If everything builds successfully you should see a message indicating that the build was successful.
Now we are going to use docker-compose to start the actual image. To start the docker image, change to the directory containing your chapter 5 source code. Issue the following docker-compose command:
docker-compose -f docker/common/docker-compose.yml up
If everything starts correctly you should see a bunch of Spring Boot information fly by on standard out. At this point all of the services needed for the chapter code examples will be running.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。