This commit is contained in:
Phillip Webb
2021-05-04 13:37:04 -07:00
parent 711a0c19e6
commit 65c00f373a
22 changed files with 100 additions and 93 deletions

View File

@@ -15,7 +15,7 @@ Check the https://github.com/spring-io/start.spring.io/blob/main/USING.adoc[star
Before we begin, open a terminal and run the following commands to ensure that you have valid versions of Java and Maven installed:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ java -version
java version "1.8.0_102"
@@ -23,7 +23,7 @@ Before we begin, open a terminal and run the following commands to ensure that y
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
----
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ mvn -v
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T14:33:14-04:00)
@@ -119,7 +119,7 @@ Other "`Starters`" provide dependencies that you are likely to need when develop
Since we are developing a web application, we add a `spring-boot-starter-web` dependency.
Before that, we can look at what we currently have by running the following command:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ mvn dependency:tree
@@ -208,7 +208,7 @@ Since you used the `spring-boot-starter-parent` POM, you have a useful `run` goa
Type `mvn spring-boot:run` from the root project directory to start the application.
You should see output similar to the following:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ mvn spring-boot:run
@@ -275,7 +275,7 @@ See the {spring-boot-maven-plugin-docs}#getting-started[plugin documentation] fo
Save your `pom.xml` and run `mvn package` from the command line, as follows:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ mvn package
@@ -298,7 +298,7 @@ If you look in the `target` directory, you should see `myproject-0.0.1-SNAPSHOT.
The file should be around 10 MB in size.
If you want to peek inside, you can use `jar tvf`, as follows:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ jar tvf target/myproject-0.0.1-SNAPSHOT.jar
----
@@ -308,7 +308,7 @@ This is the original jar file that Maven created before it was repackaged by Spr
To run that application, use the `java -jar` command, as follows:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ java -jar target/myproject-0.0.1-SNAPSHOT.jar

View File

@@ -4,7 +4,7 @@ Spring Boot can be used with "`classic`" Java development tools or installed as
Either way, you need https://www.java.com[Java SDK v1.8] or higher.
Before you begin, you should check your current Java installation by using the following command:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ java -version
----
@@ -93,7 +93,7 @@ Alternatively, you can use `java -jar` with the `.jar` file (the script helps yo
SDKMAN! (The Software Development Kit Manager) can be used for managing multiple versions of various binary SDKs, including Groovy and the Spring Boot CLI.
Get SDKMAN! from https://sdkman.io and install Spring Boot by using the following commands:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ sdk install springboot
$ spring --version
@@ -102,7 +102,7 @@ Get SDKMAN! from https://sdkman.io and install Spring Boot by using the followin
If you develop features for the CLI and want access to the version you built, use the following commands:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ sdk install springboot dev /path/to/spring-boot/spring-boot-cli/target/spring-boot-cli-{spring-boot-version}-bin/spring-{spring-boot-version}/
$ sdk default springboot dev
@@ -115,7 +115,7 @@ It points at your target build location, so every time you rebuild Spring Boot,
You can see it by running the following command:
[indent=0,subs="verbatim,attributes"]
[source,shell,indent=0,subs="verbatim,attributes"]
----
$ sdk ls springboot
@@ -138,7 +138,7 @@ You can see it by running the following command:
==== OSX Homebrew Installation
If you are on a Mac and use https://brew.sh/[Homebrew], you can install the Spring Boot CLI by using the following commands:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ brew tap spring-io/tap
$ brew install spring-boot
@@ -155,7 +155,7 @@ In that case, run `brew update` and try again.
==== MacPorts Installation
If you are on a Mac and use https://www.macports.org/[MacPorts], you can install the Spring Boot CLI by using the following command:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ sudo port install spring-boot-cli
----
@@ -169,7 +169,7 @@ You can `source` the script (also named `spring`) in any shell or put it in your
On a Debian system, the system-wide scripts are in `/shell-completion/bash` and all scripts in that directory are executed when a new shell starts.
For example, to run the script manually if you have installed by using SDKMAN!, use the following commands:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ . ~/.sdkman/candidates/springboot/current/shell-completion/bash/spring
$ spring <HIT TAB HERE>
@@ -217,7 +217,7 @@ To start, create a file called `app.groovy`, as follows:
Then run it from a shell, as follows:
[indent=0]
[source,shell,indent=0,subs="verbatim"]
----
$ spring run app.groovy
----