Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spring-cloud-learn
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
spring-cloud-learn
Commits
2f84c508
Commit
2f84c508
authored
Sep 05, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🍱
Adding or updating assets.
parent
9aee62c7
Pipeline
#115
failed
Changes
15
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
168 additions
and
3 deletions
+168
-3
README.md
README.md
+7
-2
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/SpringWebApplication.class
...ledexian/spring/cloud/producer/SpringWebApplication.class
+0
-0
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/config/AppConfig.class
...duanledexian/spring/cloud/producer/config/AppConfig.class
+0
-0
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/controller/HomeController.class
...ian/spring/cloud/producer/controller/HomeController.class
+0
-0
spring-cloud-hello-world/hystrix-dashboard/pom.xml
spring-cloud-hello-world/hystrix-dashboard/pom.xml
+32
-0
spring-cloud-hello-world/hystrix-dashboard/src/main/java/om/duanledexian/spring/cloud/hystrix/HystrixDashboardApplication.java
...ian/spring/cloud/hystrix/HystrixDashboardApplication.java
+19
-0
spring-cloud-hello-world/hystrix-dashboard/src/main/resources/application.yml
...orld/hystrix-dashboard/src/main/resources/application.yml
+13
-0
spring-cloud-hello-world/order-service/pom.xml
spring-cloud-hello-world/order-service/pom.xml
+4
-0
spring-cloud-hello-world/order-service/src/main/java/com/duanledexian/spring/cloud/order/SpringOrderServiceApplication.java
...ian/spring/cloud/order/SpringOrderServiceApplication.java
+2
-0
spring-cloud-hello-world/order-service/src/main/resources/application.yml
...lo-world/order-service/src/main/resources/application.yml
+1
-1
spring-cloud-hello-world/pom.xml
spring-cloud-hello-world/pom.xml
+2
-0
spring-cloud-hello-world/turbine/pom.xml
spring-cloud-hello-world/turbine/pom.xml
+33
-0
spring-cloud-hello-world/turbine/src/main/java/com/duanledexian/spring/cloud/turbine/TurbineApplication.java
...duanledexian/spring/cloud/turbine/TurbineApplication.java
+19
-0
spring-cloud-hello-world/turbine/src/main/resources/application.yml
...ud-hello-world/turbine/src/main/resources/application.yml
+10
-0
spring-cloud-hello-world/turbine/src/main/resources/bootstrap.yml
...loud-hello-world/turbine/src/main/resources/bootstrap.yml
+26
-0
No files found.
README.md
View file @
2f84c508
...
@@ -18,7 +18,6 @@ springboot与spring cloud兼容版本
...
@@ -18,7 +18,6 @@ springboot与spring cloud兼容版本
-
Eureka:服务治理组件,包含服务注册与发现
-
Eureka:服务治理组件,包含服务注册与发现
-
Hystrix(豪猪):容错管理组件,实现了熔断器
-
Hystrix(豪猪):容错管理组件,实现了熔断器
-
Ribbon:客户端负载均衡的服务调用组件
-
Ribbon:客户端负载均衡的服务调用组件
-
Feign:基于Ribbon和Hystrix的声明式服务调用组件
-
Feign:基于Ribbon和Hystrix的声明式服务调用组件
-
Zuul:网关组件,提供智能路由、访问过滤等功能
-
Zuul:网关组件,提供智能路由、访问过滤等功能
...
@@ -27,6 +26,10 @@ springboot与spring cloud兼容版本
...
@@ -27,6 +26,10 @@ springboot与spring cloud兼容版本
-
Spring Cloud Security:基于spring security的安全工具包,为我们的应用程序添加安全控制
-
Spring Cloud Security:基于spring security的安全工具包,为我们的应用程序添加安全控制
-
Spring Cloud Consul : 封装了Consul操作,Consul是一个服务发现与配置工具(与Eureka作用类似),与Docker容器可以无缝集成
-
Spring Cloud Consul : 封装了Consul操作,Consul是一个服务发现与配置工具(与Eureka作用类似),与Docker容器可以无缝集成
### 其他
-
Turbine 来对服务的 Hystrix 数据进行聚合展示
### 应用端口配置
### 应用端口配置
9000-9099: 服务注册中心端口
9000-9099: 服务注册中心端口
...
@@ -39,13 +42,15 @@ springboot与spring cloud兼容版本
...
@@ -39,13 +42,15 @@ springboot与spring cloud兼容版本
9400-9499:服务网关
9400-9499:服务网关
9500-9599:监控相关端口
user-service:9204
user-service:9204
order-service:9203
order-service:9203
hystrix-dashboard:9501
### 性能指标
### 性能指标
...
...
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/SpringWebApplication.class
View file @
2f84c508
No preview for this file type
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/config/AppConfig.class
View file @
2f84c508
No preview for this file type
spring-cloud-hello-world/hello-consumer-ribbon/target/classes/com/duanledexian/spring/cloud/producer/controller/HomeController.class
View file @
2f84c508
No preview for this file type
spring-cloud-hello-world/hystrix-dashboard/pom.xml
0 → 100644
View file @
2f84c508
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
spring-cloud-hello-world
</artifactId>
<groupId>
com.duanledexian.spring.cloud
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
hystrix-dashboard
</artifactId>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-hystrix
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-hystrix-dashboard
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
spring-cloud-hello-world/hystrix-dashboard/src/main/java/om/duanledexian/spring/cloud/hystrix/HystrixDashboardApplication.java
0 → 100644
View file @
2f84c508
package
om.duanledexian.spring.cloud.hystrix
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard
;
/**
* @author duanledexianxianxian
* @date 2019/9/5 0:36
* @since 1.0.0
*/
@EnableHystrixDashboard
@SpringBootApplication
public
class
HystrixDashboardApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
HystrixDashboardApplication
.
class
,
args
);
}
}
spring-cloud-hello-world/hystrix-dashboard/src/main/resources/application.yml
0 → 100644
View file @
2f84c508
server
:
# 服务器端口
port
:
9501
#eureka:
# client:
# serviceUrl:
# defaultZone: http://localhost:9000/eureka/
spring
:
application
:
name
:
hystrix-dashboard
spring-cloud-hello-world/order-service/pom.xml
View file @
2f84c508
...
@@ -40,5 +40,9 @@
...
@@ -40,5 +40,9 @@
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-hystrix
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
spring-cloud-hello-world/order-service/src/main/java/com/duanledexian/spring/cloud/order/SpringOrderServiceApplication.java
View file @
2f84c508
...
@@ -2,6 +2,7 @@ package com.duanledexian.spring.cloud.order;
...
@@ -2,6 +2,7 @@ package com.duanledexian.spring.cloud.order;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
...
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@SpringBootApplication
@EnableDiscoveryClient
@EnableDiscoveryClient
@EnableFeignClients
@EnableFeignClients
@EnableCircuitBreaker
public
class
SpringOrderServiceApplication
{
public
class
SpringOrderServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
spring-cloud-hello-world/order-service/src/main/resources/application.yml
View file @
2f84c508
...
@@ -12,4 +12,4 @@ management:
...
@@ -12,4 +12,4 @@ management:
endpoints
:
endpoints
:
web
:
web
:
exposure
:
exposure
:
include
:
refresh,bus-refresh,info,health
include
:
"
*"
spring-cloud-hello-world/pom.xml
View file @
2f84c508
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
<module>
user-service
</module>
<module>
user-service
</module>
<module>
order-service
</module>
<module>
order-service
</module>
<module>
zuul-api-gateway
</module>
<module>
zuul-api-gateway
</module>
<module>
turbine
</module>
<module>
hystrix-dashboard
</module>
</modules>
</modules>
<dependencies>
<dependencies>
...
...
spring-cloud-hello-world/turbine/pom.xml
0 → 100644
View file @
2f84c508
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
spring-cloud-hello-world
</artifactId>
<groupId>
com.duanledexian.spring.cloud
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
turbine
</artifactId>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-turbine
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-bus-amqp
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
spring-cloud-hello-world/turbine/src/main/java/com/duanledexian/spring/cloud/turbine/TurbineApplication.java
0 → 100644
View file @
2f84c508
package
com.duanledexian.spring.cloud.turbine
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.turbine.EnableTurbine
;
/**
* @author duanledexianxianxian
* @date 2019/9/4 23:28
* @since 1.0.0
*/
@SpringBootApplication
@EnableTurbine
public
class
TurbineApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
TurbineApplication
.
class
,
args
);
}
}
spring-cloud-hello-world/turbine/src/main/resources/application.yml
0 → 100644
View file @
2f84c508
server
:
# 服务器端口
port
:
9500
spring
:
application
:
name
:
turbine
turbine
:
s
spring-cloud-hello-world/turbine/src/main/resources/bootstrap.yml
0 → 100644
View file @
2f84c508
spring
:
cloud
:
config
:
# 配置中心的具体地址,即 config-server
# uri: http://localhost:9300
# 对应 {application} 部分
name
:
turbine
# 对应 {profile} 部分
profile
:
dev
# 对应 {label} 部分,即 Git 的分支。如果配置中心使用的是本地存储,则该参数无用
label
:
master
discovery
:
enabled
:
true
service-id
:
config-server
rabbitmq
:
port
:
9005
username
:
admin
password
:
"
!admin!"
host
:
113.105.144.9
eureka
:
client
:
service-url
:
defaultZone
:
http://localhost:9000/eureka/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment