Multiple Database Connection using Spring Data JPA

September 13, 2020 Joe

In this post, we will develop a simple Patient Management System using Spring Boot (spring-data-jpa), where the patient information is stored in a MySQL database and the medical record stored in a PostgreSQL database. The developed application should interact with both databases in real time and perform various database operations.

Read More..

Spring HATEOAS - Adding Pagination Links To RESTful API

June 14, 2020 Joe

When a RESTful API returns a pageable result, it is a good practice to return the required pagination links to enable the clients to easily navigate all the available resources.

In this post, we will look at how to achieve this using PagedResourcesAssembler.

Spring data provides the org.springframework.data.web.PagedResourcesAssembler class which is an implementation ofRepresentationModelAssembler, PagedModel>> interface.

Read More..

Hypermedia Driven REST API With Spring HATEOAS

May 24, 2020 Joe

A software application is said to be RESTful if the engine of the application state is driven by hypertext (hypermedia). which means that it allows an extensive cross referencing between related data and ensures further operations will depend on the state of the resource.

Read More..

Dependency Injection in Spring

April 7, 2020 Joe

In software engineering, traditionally, a custom piece of code controls its call to a reusable code or framework, however, with Inversion of control (IoC), it is the framework that calls into the custom piece of code

Inversion of control (IoC) is sometimes referred to as the "Hollywood Principle: Don't call us, we'll call you".  This implies that the application code does not control the creation of its dependencies.

Read More..