BaseClient service discovery
This commit is contained in:
parent
b3d7ef8c85
commit
5f81e7e664
|
@ -14,17 +14,12 @@ public abstract class BaseClient {
|
||||||
private String serviceEndpoint;
|
private String serviceEndpoint;
|
||||||
|
|
||||||
public BaseClient(String subPath) throws Exception {
|
public BaseClient(String subPath) throws Exception {
|
||||||
//ServiceDiscoverer discoverer = new ServiceDiscoverer();
|
ServiceDiscoverer discoverer = new ServiceDiscoverer();
|
||||||
//serviceEndpoint = discoverer.getEntryPoint();
|
serviceEndpoint = discoverer.getEntryPoint();
|
||||||
logger.debug("Discovering service...");
|
logger.debug("Discovering service...");
|
||||||
|
|
||||||
|
|
||||||
logger.debug(" \n\n\n *** I found " + serviceEndpoint);
|
logger.debug(" \n\n\n *** I found " + serviceEndpoint);
|
||||||
|
|
||||||
serviceEndpoint = "https://api.dev.d4science.org/rest";
|
|
||||||
|
|
||||||
logger.debug("\n replacing it with "+ serviceEndpoint);
|
|
||||||
|
|
||||||
serviceEndpoint = serviceEndpoint.endsWith("/") ? serviceEndpoint + subPath :
|
serviceEndpoint = serviceEndpoint.endsWith("/") ? serviceEndpoint + subPath :
|
||||||
serviceEndpoint + "/" + subPath;
|
serviceEndpoint + "/" + subPath;
|
||||||
logger.info("\n\n ABZ Discovered service " + serviceEndpoint);
|
logger.info("\n\n ABZ Discovered service " + serviceEndpoint);
|
||||||
|
|
Loading…
Reference in New Issue