Reference: http://blog.csdn.net/ityouknow/article/details/72625646
Full Pom
<?XML version= "1.0" encoding= "UTF-8"?><Projectxmlns= "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> <groupId>Com.lzw</groupId> <Artifactid>Turbineserver</Artifactid> <version>0.0.1-snapshot</version> <Packaging>Jar</Packaging> <name>Turbineserver</name> <Description>Turbine Server</Description> <Parent> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-starter-parent</Artifactid> <version>1.5.7.RELEASE</version> <RelativePath/> <!--Lookup parent from repository - </Parent> <Properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <spring-cloud.version>Dalston.release</spring-cloud.version> </Properties> <Dependencies> <Dependency> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-starter-actuator</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-starter-eureka</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-starter-hystrix-dashboard</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-starter-security</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-starter</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-starter-turbine</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-netflix-turbine</Artifactid> </Dependency> <Dependency> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-starter-test</Artifactid> <Scope>Test</Scope> </Dependency> </Dependencies> <dependencymanagement> <Dependencies> <Dependency> <groupId>Org.springframework.cloud</groupId> <Artifactid>Spring-cloud-dependencies</Artifactid> <version>${spring-cloud.version}</version> <type>Pom</type> <Scope>Import</Scope> </Dependency> </Dependencies> </dependencymanagement> <Build> <Plugins> <plugin> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-maven-plugin</Artifactid> <Configuration> <Skip>True</Skip> </Configuration> </plugin> </Plugins> </Build></Project>
Application.java
PackageCom.lzw.turbineserver;Importorg.springframework.boot.SpringApplication;Importorg.springframework.boot.autoconfigure.SpringBootApplication;Importorg.springframework.cloud.client.discovery.EnableDiscoveryClient;ImportOrg.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;Importorg.springframework.cloud.netflix.turbine.enableturbine;@ Springbootapplication@enablehystrixdashboard@enableturbine@enablediscoveryclient Public classturbineserverapplication { Public Static voidMain (string[] args) {Springapplication.run (turbineserverapplication.class, args); }}
Bootstrap.yml
Spring: application: name:turbine-server Profiles: active:devturbine: App-config:myapp cluster-name-expression:new String (' default ') Logging: config:classpath:logback-${ Spring.profiles.active}.xml
Spring Cloud fuse Monitoring Hystrix dashboard and turbine