added URL logging

This commit is contained in:
Brian Long 2021-06-05 17:28:18 -04:00
parent 4fb9724d07
commit 8f1300b097
2 changed files with 11 additions and 1 deletions

View File

@ -37,6 +37,9 @@ public class ApsClientCxfImpl extends ApsClient implements InitializingBean {
this.logger.warn("Setting JAX-RS runtime delegate to the CXF library; was: " + RuntimeDelegate.getInstance().getClass().getName()); this.logger.warn("Setting JAX-RS runtime delegate to the CXF library; was: " + RuntimeDelegate.getInstance().getClass().getName());
RuntimeDelegate.setInstance(new RuntimeDelegateImpl()); RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
} }
if (this.logger.isInfoEnabled())
this.logger.info("APS API Base URL: " + this.getConfig().getBaseUrl());
} }
public WebClient getCxfClient() { public WebClient getCxfClient() {
@ -46,8 +49,12 @@ public class ApsClientCxfImpl extends ApsClient implements InitializingBean {
ClientRequestFilter authFilter = this.getConfig().getAuthorizationFilter(); ClientRequestFilter authFilter = this.getConfig().getAuthorizationFilter();
if (authFilter != null) if (authFilter != null)
providersAndFilters.add(authFilter); providersAndFilters.add(authFilter);
// we can't use JAXRSClientFactory with a JAXRS client (duh!)
// so we need to create a CXF client
WebClient client = WebClient.create(this.getConfig().getBaseUrl(), providersAndFilters);
return WebClient.create(this.getConfig().getBaseUrl(), providersAndFilters); return client;
} }
@Override @Override

View File

@ -30,6 +30,9 @@ public class ApsClientJerseyImpl extends ApsClient implements InitializingBean {
this.logger.warn("Setting JAX-RS runtime delegate to the Jersey library; was: " + RuntimeDelegate.getInstance().getClass().getName()); this.logger.warn("Setting JAX-RS runtime delegate to the Jersey library; was: " + RuntimeDelegate.getInstance().getClass().getName());
RuntimeDelegate.setInstance(new RuntimeDelegateImpl()); RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
} }
if (this.logger.isInfoEnabled())
this.logger.info("APS API Base URL: " + this.getConfig().getBaseUrl());
} }
@Override @Override