Category: Web
-

Cookie based authentication with Spring Security
In this article, I will show the cookie based authentication with Spring Security. I will authenticate a stateless application with the cookies. And I will show the differences with the JWT authentication.
-

Random Values in the Unit Tests of Java with Podam
In this article I will show how to write random values in the unit tests of Java with Podam. Podam is a library to write random values in all the fields of an input object to the services to test.
-

Integration Tests in Spring Boot with MockMvc, DBUnit and H2
How to write integration tests in Spring Boot with MockMvc. Then, I show how to write tests in Spring Boot with DBUnit and H2 against a database.
-

Tests in Spring Boot with JUnit 5 and Mockito
In this article, I will configure the tests in Spring Boot with JUnit5 and Mockito. I will also write some unit tests with JUnit 5 and Mockito.
-

Upload files with Spring Boot and MultipartFile
In this article, I will show how to upload files with Spring Boot using MultipartFile. I’m gonna also explain the best option to store the images, explaining what’s a CDN and what’s an NFS.
-

Exception Handler with Spring Boot
In this article I show how to create an Exception Handler with Spring Boot, creating an aspect and a custom exception in Java.
-

Liquibase on Maven with SQL files
In this article, I show the usage of Liquibase to manage the database migrations with SQL files. I also show how to configure Liquibase on Maven.
-

Project Lombok and Mapstruct with Spring Boot
In this article, I show the configuration and usage of two useful tools which are Project Lombok and Mapstruct with Spring Boot, to reduce a lot of code.
-

Spring JPA and database connection with Spring Boot
In this article, I show the Spring JPA configuration for the database connection with Spring Boot, and the entities and Spring Repositories creation to read the data.
-

Spring Security and JWT
In this post I show the usage of Spring Security with the JWT base authentication. For that, I use the HTTP filters and a service Provider for the creation and validation of the JWT.
