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.

  1. Clone the Spring Boot Getting Started sample project to your local machine:

    git clone https://github.com/microsoft/gs-spring-boot.git
    
  2. Go to the directory that contains the sample code:

    cd gs-spring-boot/complete
    

Test your app locally

  1. Build the JAR file using Maven

    mvn package
    
  2. Once the web app has been created, change directory to the JAR file and start the web app

    mvn spring-boot:run
    
  3. 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!

    Greeting from Spring

Make a change

  1. Try it now, edit HelloController.java to change Greetings from Spring Boot! to something else.
  2. Build the JAR file again using Maven (skip some unit tests)

    mvn clean package -Dmaven.test.skip=true
    
  3. 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