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

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

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

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-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);
  }
}
com.ofg.infrastructure.discoveryServicePath

Most used methods

  • getLastName
  • getPath

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JCheckBox (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for WebStorm
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