| Start |
|---|
| Installation or Setup Getting setup with Spring Boot for the first time is quite fast thanks to the hard work of the Spring Community. Prerequisites:
You don't need to have Maven and/or Gradle installed. The projects generated by the Spring Initializr (opens new window) come with a Maven Wrapper (command Open your web-browser to https://start.spring.io (opens new window) This is a launchpad for creating new Spring Boot applications for now we will go with the bare minimum. Feel free to switch from Maven to Gradle if that is your preferred build tool. Search for "Web" under "Search for dependencies" and add it. Click Generate Project! This will download a zip file called demo Feel free to extract this file wherever you want on your computer. If you select maven please navigate a command prompt to the base directory and issue a You should get a build success output:
Running your application: Now your Spring Boot application starts up. Navigate your web-browser to localhost:8080 Congrats! You just got your first Spring Boot application up and running. Now lets add a tiny bit of code so you can see it working. So use ctrl + c to exit your current running server. Navigate to: Good stuff now lets build and run the project again with Now navigate your web-browser to localhost:8080 Hello World! Congrats! We have just completed creating a Spring Boot Application and setup our first Controller to return "Hello World!" Welcome to the world of Spring Boot! |
| Simple Spring Boot web application using Gradle as build system This example assumes you have already installed Java and Gradle (opens new window). Use the following project structure:
Now you can run the Spring Boot web application with and access the published HTTP endpoint either using or your browser by opening localhost:8080/hello (opens new window). RemarksThis section provides an overview of what spring-boot is, and why a developer might want to use it. It should also mention any large subjects within spring-boot, and link out to the related topics. Since the Documentation for spring-boot is new, you may need to create initial versions of those related topics. |
Read Article
https://develop.horje.com/learn/1434/reference