Interface ProjectContributor
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
ApplicationNameContributor,ArtifactIdContributor,CodeRemoverContributor,FolderRenamerContributor,GroupIdRenamerContributor,JavaPackageRenamerContributor,ParameterReplacementContributor,PropertyFilesContributor,TemplateFileRemovalContributor,TemplateModuleContributor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Inspired by io.spring.initializr.generator.project.contributor.ProjectContributor
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionvoidcontribute(Path projectRoot, ProjectRequest projectRequest, ProjectTemplate template) This method will be called after the initial code has been checked out from Git.default intgetOrder()
-
Method Details
-
contribute
void contribute(Path projectRoot, ProjectRequest projectRequest, ProjectTemplate template) throws IOException This method will be called after the initial code has been checked out from Git. Your custom logic has to be implemented here and should do the required changes to files and folders under 'projectRoot'The ordering of execution can be set by overriding the getOrder() method.
- Parameters:
projectRoot- a Path containing the root project folderprojectRequest- the project request containing the input datatemplate- the project template- Throws:
IOException
-
getOrder
default int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-