springCloud是基于springboot搭建的微服務(wù)。它利用Spring Boot的開發(fā)便利性巧妙地簡化了分布式系統(tǒng)基礎(chǔ)設(shè)施的開發(fā),如服務(wù)發(fā)現(xiàn)注冊、配置中心、消息總線、負(fù)載均衡、斷路器、數(shù)據(jù)監(jiān)控等,都可以用Spring Boot的開發(fā)風(fēng)格做到一鍵啟動和部署。
spring cloud官方文檔:http://projects.spring.io/spring-cloud/
spring cloud 中文網(wǎng) : https://springcloud.cc/
最終搭建后的工程源代碼:https://github.com/onpwerb/SpringCloud
一、新建maven工程
根據(jù)spring cloud官方文檔,在pom.xml導(dǎo)入如下代碼
org.springframework.boot spring-boot-starter-parent 1.4.5.RELEASE org.springframework.cloud spring-cloud-dependencies Camden.SR6 pom import org.springframework.cloud spring-cloud-starter-config org.springframework.cloud spring-cloud-starter-eureka