Blog

Dependency injection is a design pattern in which a component’s dependencies are supplied externally rather than being hardcoded within the component itself. In Spring, developers mainly use 3 different types of dependency injection: constructor-based, setter-based, and field-based. In this tutorial, we will see how to use Setter-based Dependency Injection to inject a UsersRepository into a…

Read More Setter-based Dependency Injection in Spring

Learning how to convert Java objects into JSON and vice versa can be very helpful for your work as a full-stack mobile app developer. In this blog post, I will share some code examples that will help you with the most common tasks you’ll encounter when working with JSON and Java. I will cover the…

Read More Convert Java into JSON and JSON into Java. All Possible Examples.

Maven is a popular build tool for Java projects. It helps you manage dependencies, build and test your projects, and package them for distribution. Keeping Maven up-to-date is important to take advantage of the latest bug fixes and new features. If you do not have Maven installed on your computer, then read How to install…

Read More Upgrading Maven on macOS

Spring is a popular Java-based framework for building applications. One of its core features is dependency injection, which is used to manage the relationships between objects and to make it easier to manage the dependencies in an application. In this tutorial, we will explore two of the main methods of dependency injection in Spring: constructor…

Read More Constructor vs Field Dependency Injection in Spring

This tutorial will teach you how to start your Spring Boot application on a random port number. Starting an application on a random port number is very helpful when you need to start multiple instances of the same Spring Boot application and then balance HTTP requests between the running instances. If you want to learn…

Read More Start Spring Boot App on a Random Port Number

In this article, we will learn about Many-to-Many relationships in JPA and how to implement them in a Spring Boot application. Let’s get started! @ManytoMany annotation A many-to-many relationship occurs when multiple records in one table are associated with multiple records in another table. The @ManyToMany annotation is used to define a many-valued association with…

Read More Many-to-Many Relationship in Spring Boot Rest with JPA

Dependency Injection is a design pattern that allows the separation of concerns in an application by removing the hard-coded dependencies between objects. In Dependency Injection, the objects are provided with their dependencies instead of having to hard-code them. This makes the application more flexible, maintainable, and easier to test. Spring Framework provides several ways to…

Read More Field-based Dependency Injection in Spring

In this tutorial, you will learn how to find the index of an element in a Python list. A list is an array. So if you are new to Python, treat the list the same as you treat an array in other programming languages. Python built-in index() function To find the index of an element…

Read More Python List index()

In this tutorial, you will learn how to download and start up Keycloak as a standalone server. What is Keycloak? Keycloak is an open-source identity and access management tool focusing on modern applications and services such as mobile applications, REST APIs, and single-page applications. How to Download Keycloak? To download the Keycloak go to the…

Read More Keycloak: Starting a Standalone Server