Tabnine Logo
ServiceConfigurationResolver
Code IndexAdd Tabnine to your IDE (free)

How to use
ServiceConfigurationResolver
in
com.ofg.infrastructure.discovery

Best Java code snippets using com.ofg.infrastructure.discovery.ServiceConfigurationResolver (Showing top 3 results out of 315)

origin: com.ofg/micro-infra-spring-config

@Deprecated
public static AppCoordinates defaults(Resource microserviceConfigResource) {
  requireNonNull(microserviceConfigResource, " Microservice configuration cannot be null");
  try {
    final String configJson = IOUtils.toString(microserviceConfigResource.getURL());
    final ServiceConfigurationResolver configurationResolver = new ServiceConfigurationResolver(configJson);
    final String path = configurationResolver.getMicroservicePath().getPath();
    final String countryName = configurationResolver.getBasePath();
    return new AppCoordinates(findEnvironment(), path, countryName);
  } catch (IOException e) {
    throw new IllegalStateException("Can't read " + microserviceConfigResource, e);
  }
}
origin: com.ofg/micro-infra-spring-base

@Bean
@Profile(PRODUCTION)
public MetricsBasePath metricsBasePath(@Value("${metrics.path.root:apps}") String rootName,
                    @Value("${metrics.path.environment:#{systemProperties['APP_ENV'] ?: 'test'}}") String environment,
                    @Value("spring.application.name") String springAppName,
                    @Value("${metrics.path.node:#{T(com.ofg.infrastructure.metrics.config.MetricsConfiguration).resolveLocalHostName()}}") String node) {
  String basePath = zookeeperDiscoveryProperties != null ? zookeeperDiscoveryProperties.getRoot() : serviceConfigurationResolver.getBasePath();
  String applicationName = zookeeperDiscoveryProperties != null ? getLastName(springAppName) : serviceConfigurationResolver.getMicroservicePath().getLastName();
  String country = env.getProperty("metrics.path.country", basePath);
  String appName = env.getProperty("metrics.path.app", applicationName);
  return new EnvironmentAwareMetricsBasePath(rootName, environment, country, appName, node);
}
origin: com.ofg/micro-infra-spring-base

@Deprecated
private HttpMethodBuilder getMethodBuilderUsingConfigurationResolver(ServiceAlias serviceAlias) {
  final MicroserviceConfiguration.Dependency dependency = configurationResolver.getDependency(serviceAlias);
  final PredefinedHttpHeaders predefinedHeaders = new PredefinedHttpHeaders(dependency);
  return new HttpMethodBuilder(getServiceUri(serviceAlias), restOperations, predefinedHeaders, tracingInfo);
}
com.ofg.infrastructure.discoveryServiceConfigurationResolver

Most used methods

  • getBasePath
  • getMicroservicePath
  • <init>
  • getDependency

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now