Documentation indicates that the keystore and truststore arguments can be resource patterns (file:..., classpath:..., etc) but the code always used a ClasspathResource. Use a PathMatchingResourcePatternResolver to interpret the pattern correctly. Add tests.