|
@@ -33,12 +33,8 @@ include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/
|
|
[[scratch]]
|
|
[[scratch]]
|
|
== Starting with Spring Initializr
|
|
== Starting with Spring Initializr
|
|
|
|
|
|
-For all Spring applications, you should start with the https://start.spring.io[Spring
|
|
|
|
-Initializr]. The Initializr offers a fast way to pull in all the dependencies you need for
|
|
|
|
-an application and does a lot of the set up for you. This example needs only the Websocket
|
|
|
|
-dependency.
|
|
|
|
|
|
+If you use Maven, visit the https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.4.3.RELEASE&packaging=jar&jvmVersion=1.8&groupId=com.example&artifactId=messaging-stomp-websocket&name=messaging-stomp-websocket&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.messaging-stomp-websocket&dependencies=websocket[Spring Initializr] to generate a new project with the required dependency (Websocket).
|
|
|
|
|
|
-You can get a Maven build file with the necessary dependencies directly from the https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.4.2.RELEASE&packaging=jar&jvmVersion=11&groupId=com.example&artifactId=messaging-stomp-websocket&name=messaging-stomp-websocket&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.messaging-stomp-websocket&dependencies=websocket[Spring Initializr].
|
|
|
|
The following listing shows the `pom.xml` file that is created when you choose Maven:
|
|
The following listing shows the `pom.xml` file that is created when you choose Maven:
|
|
|
|
|
|
====
|
|
====
|
|
@@ -48,7 +44,8 @@ include::initial/pom.xml[]
|
|
----
|
|
----
|
|
====
|
|
====
|
|
|
|
|
|
-You can get a Gradle build file with the necessary dependencies directly from the https://start.spring.io/#!type=gradle-project&language=java&platformVersion=2.4.2.RELEASE&packaging=jar&jvmVersion=11&groupId=com.example&artifactId=messaging-stomp-websocket&name=messaging-stomp-websocket&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.messaging-stomp-websocket&dependencies=websocket[Spring Initializr].
|
|
|
|
|
|
+If you use Gradle, visit the https://start.spring.io/#!type=gradle-project&language=java&platformVersion=2.4.3.RELEASE&packaging=jar&jvmVersion=1.8&groupId=com.example&artifactId=messaging-stomp-websocket&name=messaging-stomp-websocket&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.messaging-stomp-websocket&dependencies=websocket[Spring Initializr] to generate a new project with the required dependency (Websocket).
|
|
|
|
+
|
|
The following listing shows the `build.gradle` file that is created when you choose Gradle:
|
|
The following listing shows the `build.gradle` file that is created when you choose Gradle:
|
|
|
|
|
|
====
|
|
====
|
|
@@ -58,6 +55,19 @@ include::initial/build.gradle[]
|
|
----
|
|
----
|
|
====
|
|
====
|
|
|
|
|
|
|
|
+=== Manual Initialization (optional)
|
|
|
|
+
|
|
|
|
+If you want to initialize the project manually rather than use the links shown earlier, follow the steps given below:
|
|
|
|
+
|
|
|
|
+. Navigate to https://start.spring.io.
|
|
|
|
+This service pulls in all the dependencies you need for an application and does most of the setup for you.
|
|
|
|
+. Choose either Gradle or Maven and the language you want to use. This guide assumes that you chose Java.
|
|
|
|
+. Click *Dependencies* and select *Websocket*.
|
|
|
|
+. Click *Generate*.
|
|
|
|
+. Download the resulting ZIP file, which is an archive of a web application that is configured with your choices.
|
|
|
|
+
|
|
|
|
+NOTE: If your IDE has the Spring Initializr integration, you can complete this process from your IDE.
|
|
|
|
+
|
|
== Adding Dependencies
|
|
== Adding Dependencies
|
|
|
|
|
|
The Spring Initializr does not provide everything you need in this case. For Maven, you
|
|
The Spring Initializr does not provide everything you need in this case. For Maven, you
|