title: Not finding resources with Spring PathMatchingResourcePatternResolver
body: <pre><code>   @Bean
      @StepScope
      public MultiResourceItemReader&lt;PosRow&gt; multiResourceItemReader() {
          MultiResourceItemReader&lt;PosRow&gt; resourceItemReader = new MultiResourceItemReader&lt;&gt;();
          Resource[] resources = new Resource[0];
          String path = "file:" + filePath + File.separator + filePattern + "*";
          log.info("Looking for resource files matching {}", path);
          try {
              PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
              resources = resolver.getResources(path);
          } catch (IOException e) {
              log.error("Problem with getting resource files ", e);
          }
          resourceItemReader.setResources(resources);
          resourceItemReader.setDelegate(posRowReader());
          return resourceItemReader;
      }
  </code></pre>
  
  <p>I am unable to get resources even though there are files in the location. In previous steps, the files get copied over and then I try to look for the files using <code>PathMatchingResourcePatternResolver</code>. I get the following printed on my console:</p>
  
  <pre><code> c.s.p.p.batch.config.BatchConfiguration  : Looking for resource files matching file:C:\Dev\workspace\batch\src\main\resources\localPath\PositionFile*
  o.s.b.item.file.MultiResourceItemReader  : No resources to read. Set strict=true if this should be an error condition.
  </code></pre>
  
  <p>I can see the locationPattern is correctly constructed. </p>
  
  <p>The <code>filePath</code> and <code>filePattern</code> look like this in <code>application.properties</code> file:</p>
  
  <pre><code>positionFile.local-path=C:\\Dev\\workspace\\batch\\src\\main\\resources\\localPath
  
  positionFile.patternName=PositionFile
  </code></pre>