Category: Spring
How to perform database schema versioning with Flyway and Spring?
- Natan Ferreira
- 0
- 57
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 MoreWhat is Garbage Collection in Java?
- Natan Ferreira
- 0
- 42
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 MoreHow to improve the performance of primitive types in Java’s Stream Api?
- Natan Ferreira
- 0
- 62
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 MoreWhat is Connection Pool?
- Natan Ferreira
- 0
- 102
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