Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 738 Bytes

File metadata and controls

49 lines (36 loc) · 738 Bytes

Run Instructions

If you use Maven, you can run the application by using:

./mvnw spring-boot:run

Alternatively, you can build the JAR file with:

./mvnw clean package

And then run the JAR file:

java -jar target/rest_service-0.0.1-SNAPSHOT.jar

Viewing the greeting

Once the application is running, you can view the greeting by navigating to:

http://localhost:8080/greeting

You should see a JSON response similar to:

{
  "id": 1,
  "content": "Hello, World!"
}

You can also customize the greeting by adding a name parameter:

http://localhost:8080/greeting?name=Justin

This will return a response like:

{
  "id": 2,
  "content": "Hello, Justin!"
}