title: java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
body: <p>I am getting below error for the <strong>Spring Cloud</strong> project. In this project I am not doing anything special other than reading the .properties files from the GIT.</p>
  
  <p>Please guide on what else need to be corrected out here ?</p>
  
  <pre><code>java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:535) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:462) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$4(ConfigFileApplicationListener.java:444) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at java.lang.Iterable.forEach(Unknown Source) ~[na:1.8.0_151]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$5(ConfigFileApplicationListener.java:443) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at java.lang.Iterable.forEach(Unknown Source) ~[na:1.8.0_151]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:440) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:331) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:213) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:196) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:183) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:169) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:358) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:317) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
      at pluralsight.demo.PluralsightSpringcloudM2ConfigserverGitApplication.main(PluralsightSpringcloudM2ConfigserverGitApplication.java:12) [classes/:na]
  Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block collection
   in 'reader', line 17, column 17:
                      - "*/perf"
                      ^
  expected &lt;block end&gt;, but found Key
   in 'reader', line 18, column 17:
                      uri: https://github.com/rseroter ... 
                      ^
  </code></pre>
  
  <p>How we can solved the below error ?
  <strong>application.yml</strong></p>
  
  <pre><code>---
  server:
    port: 8888
  
  spring:
    cloud:
      config:
        server:
          git:
            uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls
  
            search-paths:
            - 'station*'
            repos:
              perf:
                pattern: 
                  - "*/perf"
                  uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf
  
                  search-paths:
                  - 'station*'
  </code></pre>