1.4 为什么这本书适合你
If you’ve gotten this far into reading chapter 1, I suspect that
You’re a Java developer.
You have a background in Spring.
You’re interested in learning how to build microservice-based applications.
You’re interested in how to use microservices to build cloud-based applications.
You want to know if Java and Spring are relevant technologies for building microservice-based applications.
You’re interested in seeing what goes into deploying a microservice-based application to the cloud.
如果你读到了这里,那么我认为
- 你是个Java开发者。
- 你有使用Spring的背景。
- 你对学习如何构建基于微服务的应用感兴趣。
- 你对如何用微服务来构建基于云的应用感兴趣。
- 你想知道对于构建基于微服务的应用,Java和Spring是否是相关的技术。
- 你有兴趣了解如何将基于微服务的应用部署到云端。
I chose to write this book for two reasons. First, while I’ve seen many good books on the conceptual aspects of microservices, I couldn’t a find a good Java-based book on implementing microservices. While I’ve always considered myself a programming language polyglot (someone who knows and speaks several languages), Java is my core development language and Spring has been the development framework I “reach” for whenever I build a new application. When I first came across Spring Boot and Spring Cloud, I was blown away. Spring Boot and Spring Cloud greatly simplified my development life when it came to building microservice-based applications running in the cloud.
我选择写这本书是出于两个原因。第一点,虽然我已经看到了很多关于微服务概念方面的好书,但是我没有找到一本基于Java的关于实现微服务的好书。虽然我总是认为自己会多种编程语言,但Java是我的核心开发语言,而且每当我要构建一个新的应用时,Spring是我会用到的开发框架。在我第一次遇到Spring Boot和Spring Cloud时,我就感到难以置信。对于构建在云上运行并且基于微服务的应用,Spring Boot和Spring Cloud极大地简化了我的开发周期。
Second, as I’ve worked throughout my career as both an architect and engineer, I’ve found that many times the technology books that I purchase have tended to go to one of two extremes. They are either conceptual without concrete code examples, or are mechanical overviews of a particular framework or programming language. I wanted a book that would be a good bridge and middle ground between the architecture and engineering disciplines. As you read this book, I want to give you a solid introduction to the microservice patterns development and how they’re used in realworld application development, and then back these patterns up with practical and easy-to-understand code examples using Spring Boot and Spring Cloud.
第二点,在我作为架构师和工程师的整个工作生涯中,我常常发现我买的技术书籍走向了两个极端。他们要么只是讲了概念而没有具体的代码例子,要么就是对特定的框架或者编程语言做了个机械的概览。我想要这么一本书,它是架构和工程原则之间的桥梁和中间平台。在你读这本书时,我想为你介绍微服务模式开发,以及它们是如何用在实际应用开发过程中的,然后在微服务模式的基础上用Spring Boot和Spring Cloud写一些实用的易于理解的代码例子。
Let’s shift gears for a moment and walk through building a simple microservice using Spring Boot.
让我们换个方式,看看如何用Spring Boot构建一个简单的微服务。