For the latest stable version, please use Spring Cli 0.9.0!

Adding To Existing Projects

You can use two methods to add code to existing projects:

Using the Boot Add Command

The boot add` command allows for intelligent merging of an existing project into the current project. The code of the existing project, located in a source code repository, is checked out into a temporary directory. The package structure of the existing project is then refactored to match the current project. Finally, all code and configuration are copied from the temporary location, creating new files or updating existing ones as necessary.

Using User-Defined commands

You can register commands that you define with the shell. Adding code or configuration to an existing project is accomplished through action files that contain instructions on what code or configuration needs to be generated and how it should be incorporated into the current project. The template engine uses Handlebars, which models the content of the code or configuration to be added to a new file or injected into an existing file. In addition, actions can execute shell actions, modify the Maven pom.xml file, and perform other tasks as needed.