BaseClient service discovery
This commit is contained in:
parent
b3d7ef8c85
commit
5f81e7e664
|
@ -14,17 +14,12 @@ public abstract class BaseClient {
|
|||
private String serviceEndpoint;
|
||||
|
||||
public BaseClient(String subPath) throws Exception {
|
||||
//ServiceDiscoverer discoverer = new ServiceDiscoverer();
|
||||
//serviceEndpoint = discoverer.getEntryPoint();
|
||||
ServiceDiscoverer discoverer = new ServiceDiscoverer();
|
||||
serviceEndpoint = discoverer.getEntryPoint();
|
||||
logger.debug("Discovering service...");
|
||||
|
||||
|
||||
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 + "/" + subPath;
|
||||
logger.info("\n\n ABZ Discovered service " + serviceEndpoint);
|
||||
|
|
Loading…
Reference in New Issue