# Spring-Cloud-Learning
[![Build Status](https://travis-ci.org/coderqianlq/spring-cloud-learning.svg?branch=master)](https://travis-ci.org/coderqianlq/spring-cloud-learning)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/coderqianlq/spring-cloud-learning/badge.svg?branch=master)](https://coveralls.io/github/coderqianlq/spring-cloud-learning?branch=master)
README: [English](README.md) | [中文](README-zh.md)
spring-cloud-learning can be used as a project to learn microservices, and it's mainly contain service discovery, service gateway, configuration management, circuit breakers, application monitor.
## Table of Contents
* [Components](#components)
* [Getting Started](#getting-started)
* [Use directly (recommend)](#use-directly-recommend)
* [Use docker](#use-docker)
* [Preview](#preview)
* [Modules](#modules)
* [Dependency Chart](#dependency-chart)
* [Todo List](#todo-list)
* [Collaborators](#collaborators)
* [License](#license)
## Components
- [x] Eureka
- [x] Consul
- [ ] Ribbon
- [x] Feign
- [x] Hystrix
- [x] Turbine
- [x] Zuul
- [x] Spring Cloud Config
- [x] Spring Cloud Stream
- [x] Spring Cloud Bus
- [ ] Spring Cloud Sleuth
- [ ] Spring Cloud Security
- [ ] Spring Cloud Task
- [x] Spring Cloud Gateway
To be supplemented...
## Getting Started
Two methods will mainly introduced, but no matter what you need to clone the code.
```
$ git clone https://github.com/coderqianlq/spring-cloud-learning.git
```
### Use directly (recommend)
You can use ide to import the project with maven, and use ide or use command line to start project.
```
$ mvn spring-boot:run
```
You can also package the code and run it.
```
$ java -jar xxx.jar
```
### Use docker
First, you have to make sure you have installed docker and start docker server.
```
$ docker --version
Docker version 18.06.1-ce, build e68fc7a
```
Then, you need to enter each submodule and execute the docker building command.
```
$ cd eureka-server
$ mvn clean package -Pdocker docker:build
```
Next, return to the parent module and execute docker-compose command.
```
$ docker-compose up -d
```
Finally, you can open the registration center(default url: http://localhost:8761) to see if the service is registered successfully.
## Preview
![Spring boot admin wallboard](screenshots/Spring%20boot%20admin%20wallboard.png)
![Spring Boot admin detail](screenshots/Spring%20boot%20admin%20detail.png)
![Service customer hystrix stream](screenshots/Service%20customer%20hystrix%20stream.png)
![Hystrix monitor](screenshots/Hystrix%20monitor.png)
## Modules
| - | port | remarks |
| :------------- | :----------: | :-------------: |
| admin-dashboard | 8040 | Spring boot Admin Dashboard for monitor spring cloud services |
| api-gateway | 9090 | Service gateway(Zuul) |
| config-server | 8504 | if you change the port, you need also modify bootstrap.yml of service-customer. |
| consul-server | 8502 | Service discovery(Consul) |
| eureka-server | 8761 | Service discovery(Eureka) |
| gateway-server | 8080 | Service gateway(Gateway) |
| hystrix-dashboard | 8050 | |
| service-customer | 8200 | Integrated multiple components, including Feign, Spring Cloud Config, Spring Cloud Stream, Spring Cloud Bus |
| service-producer | 8100 | |
| turbine-server | 8060 | |
| zipkin-server | 9411 | if you change the port, you need also modify bootstrap.yml of service-customer. |
## Dependency Chart
| Spring Boot | Spring Cloud | Spring Boot Admin | Swagger2 |
| :---------: | :----------: | :---------------: | :------: |
| 2.1.5 | Greenwich | 2.1.6 | 2.7.0 |
## Todo List
- [ ] Split the module of service-customer.
- [x] Add the detailed usage of hystrix with turbine.
- [x] Update Spring Boot to 2.x and both Spring Cloud to Greenwich.
- [x] Add Spring Boot admin dashboard.
- [x] Use Spring Cloud Gateway replaces zuul as service gateway.
## Collaborators
<!-- https://github.com/all-contributors/all-contributors -->
<table>
<tr>
<td align="center">
<a href="https://github.com/Marveliu">
<img src="https://avatars3.githubusercontent.com/u/15508722?v=4" width="100" alt=""/>
<br />
<sub><b>Marveliu</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Joby1230">
<img src="https://avatars3.githubusercontent.com/u/23372369?v=4" width="100" alt=""/>
<br />
<sub><b>Joby1230</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/wxaaaa">
<img src="https://avatars3.githubusercontent.com/u/19554712?&v=4" width="100" alt=""/>
<br />
<sub><b>wxaaaa</b></sub>
</a>
</td>
</tr>
</table>
## License
[MIT](LICENSE) © CoderQian免责声明:
1.本资源仅供学习和交流使用,不保证其准确性、完整性、及时性或适用性。
2.本资源仅包含一般信息,不构成专业建议。在使用本资源时,请务必自行研究并谨慎决策。
3.我已尽力确保本资源的正确性和合法性,但不对其准确性、完整性和及时性做出保证。
4.本资源不应用于商业用途。
5.在使用本资源的过程中,用户应自行承担所有风险和责任,并遵守相关法律法规。
6.对于因使用本资源而产生的任何损失或损害,我概不负责。
请确保在使用本资源时仔细阅读并遵守以上免责声明。如果您有任何疑问或需要进一步帮助,请联系我。
没有合适的资源?快使用搜索试试~ 我知道了~
️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、-spring-cloud-learning.zip
共118个文件
java:46个
yml:35个
xml:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 5 浏览量
2024-01-30
21:26:29
上传
评论
收藏 1.78MB ZIP 举报
温馨提示
️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、-spring-cloud-learning
资源推荐
资源详情
资源评论
收起资源包目录
️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、-spring-cloud-learning.zip (118个子文件)
Dockerfile 600B
Dockerfile 252B
Dockerfile 219B
Dockerfile 205B
Dockerfile 199B
.gitignore 333B
TestController.java 4KB
TestServiceImpl.java 2KB
Swagger2Config.java 2KB
WebAppConfigurer.java 2KB
SecuritySecureConfig.java 2KB
CustomerFallback.java 2KB
Swagger2Config.java 2KB
ServiceLogAOP.java 2KB
MonitorInterceptor.java 1KB
ServiceCustomerApplication.java 1KB
FeignBeanFactoryPostProcessor.java 1KB
TestService.java 980B
TestController.java 915B
Code.java 852B
HystrixConfig.java 811B
GlobalExceptionHandlerAdvice.java 766B
TestServiceTest.java 746B
User2UserDtoMapper.java 716B
TestClient.java 696B
UserEntity.java 696B
BaseException.java 672B
Channel.java 667B
BaseResult.java 649B
Producer.java 642B
ConfigTest.java 600B
BaseResultFactory.java 564B
HystrixDashboardApplication.java 545B
Consumer.java 530B
UserDto.java 526B
AdminDashboardApplication.java 517B
ConfigServerApplication.java 516B
TurbineServerApplication.java 511B
ApiGatewayApplication.java 509B
ZipkinServerApplication.java 494B
ConsulController.java 441B
ServiceProducerApplication.java 433B
ConsulServerApplication.java 425B
GatewayApplication.java 420B
EurekaServerApplication.java 416B
FallbackController.java 406B
BusinessException.java 392B
SpringCustomerApplicationTests.java 344B
HystrixClientFallBack.java 316B
TestServiceImpl.java 276B
TestService.java 195B
BaseEntity.java 81B
LICENSE 1KB
README.md 6KB
README-zh.md 5KB
Service customer hystrix stream.png 1.01MB
Spring boot admin wallboard.png 396KB
Spring boot admin detail.png 361KB
Hystrix monitor.png 276KB
application.properties 298B
banner.txt 2KB
banner.txt 1KB
banner.txt 1KB
banner.txt 1KB
banner.txt 1KB
banner.txt 1KB
banner.txt 1KB
banner.txt 1KB
pom.xml 7KB
pom.xml 5KB
log4j2.xml 4KB
pom.xml 3KB
pom.xml 3KB
pom.xml 3KB
pom.xml 3KB
pom.xml 2KB
pom.xml 2KB
pom.xml 2KB
pom.xml 2KB
pom.xml 2KB
pom.xml 1KB
pom.xml 1KB
pom.xml 872B
application.yml 2KB
application.yml 1KB
bootstrap.yml 1KB
docker-compose.yml 944B
application.yml 550B
application.yml 532B
application.yml 384B
application.yml 297B
.travis.yml 286B
bootstrap-docker.yml 249B
bootstrap-native.yml 241B
application.yml 236B
application-docker.yml 127B
application-docker.yml 127B
application-docker.yml 126B
application-native.yml 118B
application-native.yml 118B
共 118 条
- 1
- 2
资源评论
武昌库里写JAVA
- 粉丝: 3137
- 资源: 1872
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功