Skip to content

alexmancheno/Spring-Boot-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Demo

This tutorial uses the information found in the Serving Web Content with Spring MVC tutorial and Building a RESTful Web Service tutorial.

If you're interesting in learning the Spring Framework in greater detail, checkout the guides found here and read about the core concepts here.

How to run

  1. Clone the repository:
git clone https://github.com/alexmancheno/Spring-Boot-Demo.git
  1. Change into the root of the application:
cd Spring-Boot-Demo
  1. Run the application using Maven:
mvn spring-boot:run
  1. Test your app by visiting the home page of the app:
http://localhost:8080
  1. Test the RESTful controller that returns JSON:
http://localhost:8080/greeting?name=John&major=ComputerScience

Note: if you don't have Maven installed, use the Maven wrapper instead. Example:

./mvnw 

If you need to grant permissions on Mac for the Maven wrapper:

chmod a+x mvnw

How to create and run JAR file

  1. Create the JAR using Maven:
mvn clean package
  1. Run the JAR file:
java -jar target/demo-0.0.1-SNAPSHOT.jar

About

A sample application using Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published