Intro to Spring Boot

Code can be found here

This is a spring boot application which provides REST endpoints to perform CRUD operations on topics and related courses

The project comes with a wrapper for Maven mvnw

to create the jar simply run the following:

To start the application run the following:

This will start a tomcat server on port 8080

It will also start actuator on port 9001

And you can use a tool like Postman to make requests.

We are also using an embedded database Apache Derby

Requests

This project handles GET, POST, PUT and DELETE requests for topics and their courses

Here are a few example calls you can make:

Topic CRUD operations

  • get all
  • get particular topic
  • post topic

body:

  • put topic

make sure you pass an updated body

  • delete topic

Course CRUD operations

  • get all
  • get particular topic
  • post topic

body:

  • put topic

make sure you pass an updated body

  • delete topic

To view Actuator


Tagged in spring