Skip to content

Instantly share code, notes, and snippets.

View johnou's full-sized avatar

Johno Crawford johnou

View GitHub Profile
@johnou
johnou / gist:4dcb0e3a836a12d2ca5121942a6979dd
Created April 26, 2016 18:55
PGP Signatures with Git on Windows
https://www.gpg4win.org/
Keywords
windows no tty intellij
pgp secret key not available
Environment variables
GNUPGHOME=C:\Users\Username\AppData\Roaming\gnupg
public class InterceptorDataSource implements InvocationHandler {
private final DataSource delegate;
private InterceptorDataSource(final DataSource delegate) {
this.delegate = delegate;
}
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return (method.getName().equals("getConnection")) ? getConnection() : method.invoke(delegate, args);
}