Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
SpringCloud-study
提交
e84c3b59
S
SpringCloud-study
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
SpringCloud-study
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringCloud-study
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e84c3b59
编写于
1月 14, 2023
作者:
Q
qinyingjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:加入dashboard
上级
52c11347
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
42 addition
and
8 deletion
+42
-8
springcloud-service-hystrix-dashboard/pom.xml
springcloud-service-hystrix-dashboard/pom.xml
+4
-0
springcloud-service-hystrix-dashboard/src/main/java/com/kwan/springcloud/HystrixDashboardApplication.java
...ava/com/kwan/springcloud/HystrixDashboardApplication.java
+6
-4
springcloud-service-hystrix-dashboard/src/main/resources/application.yaml
...ice-hystrix-dashboard/src/main/resources/application.yaml
+5
-1
springcloud-service-portal/pom.xml
springcloud-service-portal/pom.xml
+5
-2
springcloud-service-portal/src/main/java/com/kwan/springcloud/PortalApplication.java
...src/main/java/com/kwan/springcloud/PortalApplication.java
+14
-0
springcloud-service-portal/src/main/resources/application.yaml
...gcloud-service-portal/src/main/resources/application.yaml
+8
-1
未找到文件。
springcloud-service-hystrix-dashboard/pom.xml
浏览文件 @
e84c3b59
...
...
@@ -35,6 +35,10 @@
<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>
</dependencies>
...
...
springcloud-service-hystrix-dashboard/src/main/java/com/kwan/springcloud/HystrixDashboardApplication.java
浏览文件 @
e84c3b59
...
...
@@ -4,12 +4,13 @@ package com.kwan.springcloud;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard
;
/**
*
* http://localhost:9909/hystrix
*@version : 2.2.0
*@author : qinyingjie
*@date : 2023/1/14 15:33
*
* @author : qinyingjie
* @version : 2.2.0
* @date : 2023/1/14 15:33
*/
@EnableHystrixDashboard
@SpringBootApplication
...
...
@@ -19,4 +20,5 @@ public class HystrixDashboardApplication {
SpringApplication
.
run
(
HystrixDashboardApplication
.
class
,
args
);
}
}
springcloud-service-hystrix-dashboard/src/main/resources/application.yaml
浏览文件 @
e84c3b59
...
...
@@ -4,4 +4,8 @@ server:
spring
:
application
:
name
:
hystrix-dashboard-service
#服务名称
\ No newline at end of file
name
:
hystrix-dashboard-service
#服务名称
hystrix
:
dashboard
:
proxy-stream-allow-list
:
"
localhost"
\ No newline at end of file
springcloud-service-portal/pom.xml
浏览文件 @
e84c3b59
...
...
@@ -34,10 +34,13 @@
<artifactId>
spring-cloud-openfeign-core
</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-hystrix
</artifactId>
<version>
1.4.7.RELEASE
</version>
<artifactId>
spring-cloud-starter-netflix-hystrix
</artifactId>
</dependency>
</dependencies>
...
...
springcloud-service-portal/src/main/java/com/kwan/springcloud/PortalApplication.java
浏览文件 @
e84c3b59
package
com.kwan.springcloud
;
import
com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletRegistrationBean
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.hystrix.EnableHystrix
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.Bean
;
/**
*
* http://localhost:8080/portal/hystrix/1
...
...
@@ -23,4 +27,14 @@ public class PortalApplication {
SpringApplication
.
run
(
PortalApplication
.
class
,
args
);
}
@Bean
public
ServletRegistrationBean
getServlet
()
{
HystrixMetricsStreamServlet
streamServlet
=
new
HystrixMetricsStreamServlet
();
ServletRegistrationBean
registrationBean
=
new
ServletRegistrationBean
(
streamServlet
);
registrationBean
.
setLoadOnStartup
(
1
);
registrationBean
.
addUrlMappings
(
"/hystrix.stream"
);
registrationBean
.
setName
(
"HystrixMetricsStreamServlet"
);
return
registrationBean
;
}
}
springcloud-service-portal/src/main/resources/application.yaml
浏览文件 @
e84c3b59
...
...
@@ -31,4 +31,11 @@ ribbon:
http
:
client
:
enabled
:
true
#开启ribbon超时管理
ConnectTimeout
:
2000
#连接超时时间
\ No newline at end of file
ConnectTimeout
:
2000
#连接超时时间
management
:
endpoints
:
web
:
exposure
:
include
:
"
*"
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录