Hystrix监控服务整合完成
This commit is contained in:
		
							
								
								
									
										29
									
								
								hystrix-dashboard/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								hystrix-dashboard/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<?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">
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>com.example</groupId>
 | 
			
		||||
        <artifactId>SpringCloudStudy</artifactId>
 | 
			
		||||
        <version>0.0.1-SNAPSHOT</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <groupId>org.example</groupId>
 | 
			
		||||
    <artifactId>hystrix-dashboard</artifactId>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
        <maven.compiler.source>8</maven.compiler.source>
 | 
			
		||||
        <maven.compiler.target>8</maven.compiler.target>
 | 
			
		||||
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
			
		||||
    </properties>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
 | 
			
		||||
            <version>2.2.10.RELEASE</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,20 @@
 | 
			
		||||
package com.test;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * ClassName: HystrixApplication
 | 
			
		||||
 * Package: com.test
 | 
			
		||||
 *
 | 
			
		||||
 * @author yovinchen
 | 
			
		||||
 * @Create 2023/8/15 21:19
 | 
			
		||||
 */
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableHystrixDashboard
 | 
			
		||||
public class HystrixDashBoardApplication {
 | 
			
		||||
    public static void main(String[] args) {
 | 
			
		||||
        SpringApplication.run(HystrixDashBoardApplication.class, args);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								hystrix-dashboard/src/main/resources/application.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								hystrix-dashboard/src/main/resources/application.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
server:
 | 
			
		||||
  port: 8900
 | 
			
		||||
hystrix:
 | 
			
		||||
  dashboard:
 | 
			
		||||
    # 将localhost添加到白名单,默认是不允许的
 | 
			
		||||
    proxy-stream-allow-list: "localhost"
 | 
			
		||||
		Reference in New Issue
	
	Block a user