I hereby claim:
- I am sedooe on github.
- I am sedooe (https://keybase.io/sedooe) on keybase.
- I have a public key ASBC4Zl5YoAnO3VvutMLHB9T_7ZeBA-M0ASjcTR4Pmautwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@Component | |
public class ReadinessHealthIndicator extends AbstractHealthIndicator { | |
@Autowired | |
@Qualifier("dbHealthIndicator") | |
HealthIndicator healthIndicator; | |
@Override | |
protected void doHealthCheck(Health.Builder builder) throws Exception { | |
builder.status(healthIndicator.health().getStatus()); |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Optional; | |
public class MapUtils { | |
public static void main(String[] args) { | |
Map<String, Integer> map3 = new HashMap<>(); | |
map3.put("third", 1881); |
Delete all CRDs:
kubectl delete crd $(kubectl get crd | awk '{print $1}')
Delete all CRDs of Istio:
kubectl delete crd $(kubectl get crd | grep istio.io | awk '{print $1}')
import kotlinx.coroutines.experimental.TimeoutCancellationException | |
import kotlinx.coroutines.experimental.async | |
import kotlinx.coroutines.experimental.delay | |
import kotlinx.coroutines.experimental.runBlocking | |
import kotlinx.coroutines.experimental.withTimeout | |
import kotlin.system.measureTimeMillis | |
// lightweight replacement for spring retry | |
suspend fun <T> retry(maxRetryCount: Int = 5, timeout: Long = 3000, block: suspend (retryCount: Int) -> T): T { | |
for (i in 1..maxRetryCount) { |
@Repository | |
public class CustomTraceRepository extends InMemoryTraceRepository { | |
private static final Logger log = LoggerFactory.getLogger(CustomTraceRepository.class); | |
public CustomTraceRepository() { | |
super.setCapacity(200); | |
} | |
@Override |
@Component | |
public class RequestTraceFilter extends WebRequestTraceFilter { | |
private final String[] excludedEndpoints = new String[]{"/css/**", "/js/**", "/trace"}; | |
RequestTraceFilter(TraceRepository repository, TraceProperties properties) { | |
super(repository, properties); | |
} | |
@Override |
[ | |
{ | |
"timestamp":1503137711145, | |
"info":{ | |
"method":"GET", | |
"path":"/actuator", | |
"headers":{ | |
"request":{ | |
"host":"localhost:8080", | |
"connection":"keep-alive", |
@EnableWebSecurity | |
public class SecurityConfig extends WebSecurityConfigurerAdapter { | |
@Bean | |
public HttpSessionStrategy httpSessionStrategy() { | |
return new HeaderHttpSessionStrategy(); | |
} | |
@Autowired | |
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { |
<configuration> | |
<turboFilter class="filters.LogInterceptor" /> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern> | |
%-4relative [%thread] %-5level %logger - %msg%n | |
</pattern> | |
</encoder> | |
</appender> |