Skip to content

Instantly share code, notes, and snippets.

@anjia0532
anjia0532 / Demo.java
Last active April 19, 2023 10:36
@HystrixCommand support dynamic command key
@Component
public class Demo {
@HystrixCommand(commandKey = "#key",groupKey = "#key",fallbackMethod = "fail")
public String exec(String key){
if (RandomUtils.nextBoolean()) {
System.out.println(1 / 0);
}
return key;
}
public String fail(String key){
@anjia0532
anjia0532 / nginx.conf
Created December 14, 2017 04:08
nginx proxy_pass add a static parameter
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;