Flyway and Spring

How to perform database schema versioning with Flyway and Spring?

Flyway is a tool used for database migration control. Migrations are executed automatically, and we also have a history of database modifications. Flyway supports many databases, but in this example, we will use MySQL. Requirements Project With this site, you can create your Spring project: https://start.spring.io To establish a connection with the database, we need…

Read More
Java

What is Garbage Collection in Java?

It is a process that manages memory in software written in Java. When running programs on the JVM (Java Virtual Machine), objects are created in the Heap memory. When these objects are no longer needed, the Garbage Collector will find unused objects and remove them from memory, helping to prevent memory leaks. We need to…

Read More
Java

How to improve the performance of primitive types in Java’s Stream Api?

Java’s Stream API facilitates code maintenance, is used with lambda expressions and functional paradigm. It offers many features such as filtering a list, among others. Let’s see an example. For this, I created a class called Product. I populated a list of products and created the following stream. My goal is to map the quantity,…

Read More
Connection Pool

What is Connection Pool?

Connection Pool is very important for improving the response time of applications. To discuss connection pool, it’s important to understand how database connections work in an application. Let’s use the example of a web application, an API. Without Connection Pool A request was made to the application to fetch some information, and in this example,…

Read More