Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
eb4c1426
Commit
eb4c1426
authored
Nov 17, 2014
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document init CLI command
Closes gh-1799
parent
fba69821
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
spring-boot-cli.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc
+52
-1
No files found.
spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc
View file @
eb4c1426
...
...
@@ -5,7 +5,8 @@
--
The Spring Boot CLI is a command line tool that can be used if you want to quickly
prototype with Spring. It allows you to run Groovy scripts, which means that you have a
familiar Java-like syntax, without so much boilerplate code.
familiar Java-like syntax, without so much boilerplate code. You can also bootstrap
a new project or write your own command for it.
--
...
...
@@ -351,6 +352,56 @@ and the default excludes are
See the output of `spring help jar` for more information.
[[cli-init]]
=== Initialize a new project
The `init` command allows you to create a new project using https://start.spring.io
without leaving the shell. For example:
[indent=0]
----
$ spring init --dependencies=web,data-jpa my-project/
Using service at https://start.spring.io
Project extracted to '/Users/developer/example/my-project'
----
This creates a `my-project` directory with a Maven-based project using `spring-boot-starter-web`
and `spring-boot-starter-data-jpa`. You can list the capabilities of the service
using the `--list` flag
[indent=0]
----
$ spring init --list
=======================================
Capabilities of https://start.spring.io
=======================================
Available dependencies:
-----------------------
actuator - Actuator: Production ready features to help you monitor and manage your application
...
web - Web: Support for full-stack web development, including Tomcat and spring-webmvc
websocket - Websocket: Support for websocket development with Tomcat
ws - WS: Support for Spring Web Services
Available project types:
------------------------
gradle-build - Gradle Config [format:build, build:gradle]
gradle-project - Gradle Project [format:project, build:gradle]
maven-build - Maven POM [format:build, build:maven]
maven-project - Maven Project [format:project, build:maven] (default)
...
----
The `init` command supports many options, check the `help` output for more details. For
instance, the following command creates a gradle project using Java 8 and `war` packaging:
[indent=0]
----
$ spring init --build=gradle --java-version=1.8 --dependencies=websocket --packaging=war sample-app.zip
Using service at https://start.spring.io
Content saved to 'sample-app.zip'
----
[[cli-shell]]
=== Using the embedded shell
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment