Codota Logo
PropertiesFileResolver.findCloudPropertiesFileFromSystem
Code IndexAdd Codota to your IDE (free)

How to use
findCloudPropertiesFileFromSystem
method
in
org.springframework.cloud.localconfig.PropertiesFileResolver

Best Java code snippets using org.springframework.cloud.localconfig.PropertiesFileResolver.findCloudPropertiesFileFromSystem (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: spring-cloud/spring-cloud-connectors

File findCloudPropertiesFile() {
  File file = findCloudPropertiesFileFromSystem();
  if (file != null) {
    logger.info("using configuration file from system properties");
    return file;
  }
  file = findCloudPropertiesFileFromClasspath();
  if (file != null)
    logger.info("using configuration file derived from " + classpathPropertiesFilename);
  else
    logger.info("did not find any Spring Cloud configuration file");
  return file;
}
origin: org.springframework.cloud/spring-cloud-localconfig-connector

File findCloudPropertiesFile() {
  File file = findCloudPropertiesFileFromSystem();
  if (file != null) {
    logger.info("using configuration file from system properties");
    return file;
  }
  file = findCloudPropertiesFileFromClasspath();
  if (file != null)
    logger.info("using configuration file derived from " + classpathPropertiesFilename);
  else
    logger.info("did not find any Spring Cloud configuration file");
  return file;
}
origin: spring-cloud/spring-cloud-connectors

@Test
public void testSecurityExceptionHandling() {
  env = mock(PassthroughEnvironmentAccessor.class);
  resolver = new PropertiesFileResolver(env);
  when(env.getSystemProperty(LocalConfigConnector.PROPERTIES_FILE_PROPERTY)).thenThrow(new SecurityException());
  assertNull(resolver.findCloudPropertiesFileFromSystem());
  verify(env).getSystemProperty(LocalConfigConnector.PROPERTIES_FILE_PROPERTY);
}
origin: spring-cloud/spring-cloud-connectors

@Test
public void testMissingSystemProperty() {
  assertNull(resolver.findCloudPropertiesFileFromSystem());
}
origin: spring-cloud/spring-cloud-connectors

@Test
public void testSystemProperty() {
  env.setSystemProperty(LocalConfigConnector.PROPERTIES_FILE_PROPERTY, PROPERTIES_FILE_NAME);
  assertEquals(PROPERTIES_FILE_NAME, resolver.findCloudPropertiesFileFromSystem().getPath());
}
org.springframework.cloud.localconfigPropertiesFileResolverfindCloudPropertiesFileFromSystem

Javadoc

Inspects the system properties for an entry named LocalConfigConnector#PROPERTIES_FILE_PROPERTY directing it to an external properties file.

Popular methods of PropertiesFileResolver

  • <init>
  • findCloudPropertiesFile
  • findCloudPropertiesFileFromClasspath
    Looks for a resource named filename (usually #BOOTSTRAP_PROPERTIES_FILENAME) on the classpath. If pr
  • systemPropertiesLookup
    Adapter from the EnvironmentAccessor's system-property resolution to the StrLookup interface.

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • startActivity (Activity)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Notification (javax.management)
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now