Tools used :

  • Spring Tool Suite 4 ( or Eclipse)
  • Spring Boot 2.4.5

Created a Spring Starter Project using STS, which under the hood redirects to Spring Initializer. Following starter dependencies will create a skeleton project that includes all the relevant JARs to build a Restful web application with MySQL database.

  • Spring web: for spring MVC
  • Spring Data JPA
  • MySQL Driver: to establish database connection
  • Lombok: to avoid repetitive code (getters, setters, constructors, etc..)

Here's how the pom.xml would look like after adding all the above dependencies.

Tools used :

  • Spring Tool Suite 4 ( or Eclipse)
  • Spring Boot 2.3.2

Start by creating a new spring boot application, and following are the dependencies you have to choose for a bare minimum project.

  • Spring web (for spring MVC)
  • Spring Data JPA
  • H2 Database

Have a glance at how pom.xml file would look after adding all the relevant dependencies.

Figure 1 : pom.xml

After spring starter project is created my first move is to come up with the Model class, which is "JournalEntry" in my case. Add all the fields, getters and setters as in the Figure 2.

We all know about the basic data structure, which is Array pretty well. And in java they are static. It means we have to allocate memory for the array ahead of time. The memory will define the number of elements that the array can hold. But what if we have know idea about the exact number of elements that we are going to insert before hand. Then the best thing is to have a dynamic array.

A dynamic array automatically grows when we try to make an insertion and there is no space left for the new item. A simple…

Spring XML Configuration using Setter Injection :

Pre-requisites :

  • Java 8 or above
  • Spring framework 5.0.0 RELEASE (5.X)
  • Eclipse IDE (spring sts-3.9.X.RELEASE IDE is preferred)
  • Apache maven as the build tool

You can find the total project implementation in my github repository. Check it out through this url :

First, create a Maven Project and select an archetype(or you can simply skip it by creating a simple project). Then provide suitable group Id and artifact Id. (Hope you know basics of maven :)). You’ll be ended up getting the following project hierarchy.

Vindya Gunawardana

Technology Enthusiast, Software Engineer, Java Lover

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store