mirror of
https://gitee.com/dcren/initializr.git
synced 2026-06-25 14:54:04 +08:00
Polish
This commit is contained in:
@@ -31,8 +31,9 @@ according to the chosen generation.
|
|||||||
Convenient implementations for those concepts are available:
|
Convenient implementations for those concepts are available:
|
||||||
|
|
||||||
* A `Build` abstraction model with dedicated models for Apache Maven and Gradle. A writer
|
* A `Build` abstraction model with dedicated models for Apache Maven and Gradle. A writer
|
||||||
abstraction to generate `pom.xml`, `build.gradle` and `settings.gradle` files is also
|
abstraction that can generate build files for Maven (`pom.xml`) and Gradle
|
||||||
available
|
(`build.gradle` and `settings.gradle` or `build.gradle.kts` and `settings.gradle.kts`)
|
||||||
|
is also available
|
||||||
* Out-of-the-box support for `jar` and `war` packaging
|
* Out-of-the-box support for `jar` and `war` packaging
|
||||||
* Source code model and writers for Java, Kotlin and Apache Groovy
|
* Source code model and writers for Java, Kotlin and Apache Groovy
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
[partintro]
|
[partintro]
|
||||||
--
|
--
|
||||||
If you're wondering how to use https://start.spring.io or what features are available,
|
If you're wondering how to use https://start.spring.io or what features are available,
|
||||||
this section is for you! You'll find the various way you can interact with the service and
|
this section is for you! You'll find the various ways you can interact with the service and
|
||||||
get a better insight at what you can do with it.
|
get a better insight at what you can do with it.
|
||||||
--
|
--
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ get a better insight at what you can do with it.
|
|||||||
|
|
||||||
[[getting-started]]
|
[[getting-started]]
|
||||||
== Getting Started
|
== Getting Started
|
||||||
Let's create a first project and discover the various options that you can use to tune it.
|
Let's create a project and discover the various options that you can use to tune it.
|
||||||
Go to https://start.spring.io, change the `Group` field from "com.example" to "org.acme"
|
Go to https://start.spring.io, change the `Group` field from "com.example" to "org.acme"
|
||||||
and put the focus in the `Dependencies` field below. If you type "web", you will see a
|
and put the focus in the `Dependencies` field below. If you type "web", you will see a
|
||||||
list of matching choices with that simple criteria. Use the mouse or the arrow keys and
|
list of matching choices with that simple criteria. Use the mouse or the arrow keys and
|
||||||
@@ -54,20 +54,20 @@ A typical project generated by Spring Initializr contains a Spring Boot applicat
|
|||||||
(`DemoApplication`), a test and an empty configuration. If you run the `main` method
|
(`DemoApplication`), a test and an empty configuration. If you run the `main` method
|
||||||
of `DemoApplication`, you'll see an "empty" spring boot app starting on localhost:8080.
|
of `DemoApplication`, you'll see an "empty" spring boot app starting on localhost:8080.
|
||||||
|
|
||||||
Because Spring Initializr has detected it is a web application, a `static` and `templates`
|
Because Spring Initializr has detected it is a web application, the `static` and `templates`
|
||||||
directories have been created to hold your static resources and ui templates.
|
directories have been created to hold your static resources and UI templates.
|
||||||
|
|
||||||
Also, a Maven wrapper is automatically included so that you don't have to install Maven to
|
Also, a Maven wrapper is automatically included so that you don't have to install Maven to
|
||||||
run this project (you can build it with `./mvnw install`). If you prefer, you can select
|
run this project (you can build it with `./mvnw install`). If you prefer, you can select
|
||||||
Gradle instead in the first option at the top of the screen. This will generate a
|
Gradle instead in the first option at the top of the screen. This will generate a
|
||||||
Gradle-based project instead that also contains a wrapper if you don't have Gradle
|
Gradle-based project that also contains a wrapper which can be used if you don't have Gradle
|
||||||
installed (build it with `./gradlew build`).
|
installed (build it with `./gradlew build`).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[getting-started-advanced-options]]
|
[[getting-started-advanced-options]]
|
||||||
=== Advanced options
|
=== Advanced options
|
||||||
Next to the `Artifact` you'll find a "More options" link. If you click on that, you'll see
|
Below the `Artifact` form field, you'll find an "Options" link. If you click on that, you'll see
|
||||||
all the available options. Let's browse through them quickly:
|
all the available options. Let's browse through them quickly:
|
||||||
|
|
||||||
* *Group*: project coordinates (id of the project's group, as referred by the `groupId`
|
* *Group*: project coordinates (id of the project's group, as referred by the `groupId`
|
||||||
@@ -90,16 +90,16 @@ Maven). start.spring.io can generate jar or war projects
|
|||||||
=== Dependencies
|
=== Dependencies
|
||||||
The UI allows you to select the Spring Boot version you want to use. You may want to be
|
The UI allows you to select the Spring Boot version you want to use. You may want to be
|
||||||
conservative and keep the default which corresponds at all times to the latest stable
|
conservative and keep the default which corresponds at all times to the latest stable
|
||||||
release. Or you may want to chose a milestone or snapshot of the next major
|
release. Or you may want to choose a milestone or snapshot of the next major
|
||||||
version. Either way, you'll notice that certain dependencies become available and others
|
version. Either way, you'll notice that certain dependencies become available and others
|
||||||
aren't anymore when you change the version.
|
aren't anymore when you change the version.
|
||||||
|
|
||||||
If you are searching for a dependency that you know to be available and you get a red
|
If you search for a dependency that you know to be available and you get a disabled
|
||||||
panel, it will indicate that you cannot use it with the currently selected Spring Boot
|
panel, it indicates that you cannot use it with the currently selected Spring Boot
|
||||||
version;
|
version;
|
||||||
|
|
||||||
```
|
```
|
||||||
requires Spring Boot >=1.5.0.RELEASE and <2.0.0.RELEASE
|
Requires Spring Boot >=1.5.0.RELEASE and <2.0.0.RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
Concretely, this defines a "version range" that states the dependency is deprecated and is
|
Concretely, this defines a "version range" that states the dependency is deprecated and is
|
||||||
@@ -108,11 +108,11 @@ related project to understand what your migration path can be. Alternatively, th
|
|||||||
could be:
|
could be:
|
||||||
|
|
||||||
```
|
```
|
||||||
requires Spring Boot >=2.1.0.RELEASE
|
Requires Spring Boot >=2.1.0.RELEASE
|
||||||
```
|
```
|
||||||
|
|
||||||
That version range means the dependency is not available with the current Spring Boot
|
That version range means the dependency is not available with the selected Spring Boot
|
||||||
generation. Obviously, if you select Spring Boot 2.1 (or later if available), you'll be
|
generation. If you select Spring Boot 2.1 (or later if available), you'll be
|
||||||
able to select that dependency.
|
able to select that dependency.
|
||||||
|
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ https://start.spring.io/#!language=kotlin&type=gradle-project
|
|||||||
The following attributes are supported:
|
The following attributes are supported:
|
||||||
|
|
||||||
* Programming language: `language` (`java`, `groovy` or `kotlin`)
|
* Programming language: `language` (`java`, `groovy` or `kotlin`)
|
||||||
* Java version: `javaVersion` (`1.8`, `11`)
|
* Java version: `javaVersion` (`1.8`, `11`, `12`)
|
||||||
* Project type: `type` (`maven-project`, `gradle-project`)
|
* Project type: `type` (`maven-project`, `gradle-project`)
|
||||||
* Packaging: `packaging` (`jar`, `war`)
|
* Packaging: `packaging` (`jar`, `war`)
|
||||||
* Group: `groupId`
|
* Group: `groupId`
|
||||||
@@ -159,7 +159,7 @@ installed invoke `curl https://start.spring.io` on the command-line (or alternat
|
|||||||
The result is a textual representation of the capabilities of the service that are split
|
The result is a textual representation of the capabilities of the service that are split
|
||||||
in three sections:
|
in three sections:
|
||||||
|
|
||||||
First, a table that describes the available project's types. On the default instance,
|
First, a table that describes the available project types. On the default instance,
|
||||||
you'll find the `maven-project` and `gradle-project` we've discussed above but you'll
|
you'll find the `maven-project` and `gradle-project` we've discussed above but you'll
|
||||||
also be able to generate only a build script rather than an entire project.
|
also be able to generate only a build script rather than an entire project.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user