Skip to content

rashjz/app-bwi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

app-bwi

management.security.enabled=false
management.context-path=/actuator

By default hystrix dashboard url will be ../actuator/hystrix.stream after enter url you can specify app name and delay interval

spring boot hystrix implementation example

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
			<version>1.4.4.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
			<version>1.4.4.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
			<version>${spring-boot-starter.version}</version>
		</dependency>

Java code example

    @HystrixCommand(fallbackMethod = "defaultGreeting")
    public Long someMethod(String data){
        return service.getExternalData(data);
    }
    
    private Long defaultGreeting(String data) {
        return 1L;
    }

And Finally you have to add hystrix annotation to main class

@EnableHystrixDashboard
@EnableCircuitBreaker
@SpringBootApplication
public class MyApplication {

    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}

Releases

No releases published

Packages

No packages published

Languages