Develop the Mock Service
Develop a mock service for saving data to an in-memory database.
We'll cover the following
The mock service is a Spring JSON based controller that saves the data to an in-memory database.
add
function
Let’s start with a simple addition to the database. The design of the in-memory database is based on the Singleton pattern, which is implemented using enum
.
The identifier field starts at one and is incremented by one in each addition.
Get hands-on with 1400+ tech skills courses.