Skip to content

Instantly share code, notes, and snippets.

@hsg
hsg / gist:6152944726e46ababcf47398398b4140
Created December 7, 2018 14:55
Client certificate authentication with Spring WebClient
public MyService(WebClient.Builder builder){
this.client = buildCustomWebClient(builder, "https://example.com");
}
private SslContext createSSLContext() {
try {
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(getClass().getClassLoader().getResourceAsStream(KEYSTORE_FILE), KEYSTORE_PASSWORD.toCharArray());
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
$ cat .git/hooks/commit-msg
#!/bin/sh
#
# Automatically adds branch name and branch description to every commit message.
#
NAME=$(git branch | grep '*' | sed 's/* //')
echo "[$NAME]"': '$(cat "$1") > "$1"