Allow Spring Vault usage with Spring Framework 4.2.
PrefixAwareUriTemplateHandler now overrides expand(…) methods of DefaultUriTemplateHandler instead of expandInternal(…). expandInternal was added with Spring 4.3. Usage of Spring Framework 4.2 does not process the URI template which leaves the basepath and relative path untouched. This code path also does not add missing slashes which resulted in invalid context paths. See gh-265.
This commit is contained in:
@@ -152,13 +152,13 @@ public class VaultClients {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI expandInternal(String uriTemplate, Map<String, ?> uriVariables) {
|
||||
return super.expandInternal(prepareUriTemplate(uriTemplate), uriVariables);
|
||||
public URI expand(String uriTemplate, Map<String, ?> uriVariables) {
|
||||
return super.expand(prepareUriTemplate(uriTemplate), uriVariables);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected URI expandInternal(String uriTemplate, Object... uriVariables) {
|
||||
return super.expandInternal(prepareUriTemplate(uriTemplate), uriVariables);
|
||||
public URI expand(String uriTemplate, Object... uriVariableValues) {
|
||||
return super.expand(prepareUriTemplate(uriTemplate), uriVariableValues);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user