Class MultipleResourcesProjectContributor

java.lang.Object
io.spring.initializr.generator.project.contributor.MultipleResourcesProjectContributor
All Implemented Interfaces:
ProjectContributor, org.springframework.core.Ordered

public class MultipleResourcesProjectContributor extends Object implements ProjectContributor
A ProjectContributor that contributes all of the resources found beneath a root location to a generated project.
Author:
Andy Wilkinson
See Also:
  • PathMatchingResourcePatternResolver
  • Constructor Details

    • MultipleResourcesProjectContributor

      public MultipleResourcesProjectContributor(String rootResource)
      Create a new instance with the rootResource to use to locate resources to copy to the project structure.
      Parameters:
      rootResource - the root resource path
      See Also:
      • PathMatchingResourcePatternResolver.getResources(String)
    • MultipleResourcesProjectContributor

      public MultipleResourcesProjectContributor(String rootResource, Predicate<String> executable)
  • Method Details

    • contribute

      public void contribute(Path projectRoot) throws IOException
      Description copied from interface: ProjectContributor
      Contribute additional resources to the project in the specified root directory.
      Specified by:
      contribute in interface ProjectContributor
      Parameters:
      projectRoot - the root directory of the project
      Throws:
      IOException - if contributing a resource failed