Build your first Java app
Create your App
Download the Spring Boot app
The following steps will walk you through the steps that are required to create a simple Spring Boot web application.
-
Clone the Spring Boot Getting Started sample project to your local machine:
git clone https://github.com/microsoft/gs-spring-boot.git
-
Go to the directory that contains the sample code:
cd gs-spring-boot/complete
Test your app locally
-
Build the JAR file using Maven
mvn package
-
Once the web app has been created, change directory to the JAR file and start the web app
mvn spring-boot:run
-
Test the web app by browsing to http://localhost:8080 using a web browser. You should see the following message displayed: Greetings from Spring Boot!
Make a change
- Try it now, edit HelloController.java to change Greetings from Spring Boot! to something else.
-
Build the JAR file again using Maven (skip some unit tests)
mvn clean package -Dmaven.test.skip=true
- Follow step 2 and 3 in above Test your app locally section to reload the app and see the results.
I ran into an issue I have created my app