Tag: Java
-
How to use Spring Cloud Config Server with Git and Vault

In this article I will show how to use Spring Cloud Config Server with two sources: Git and Vault. I will use Git for the common configuration and Vault for the critical information.
-
Tests Coverage with Jacoco, Unit and Integration Tests

In this article I show how to obtain the tests coverage with Jacoco, for both the unit and the integration tests. I show the configuration of the Surefire and Failsafe plugins to run the unit and integration tests separately. And finally I show how to use the Surefire and Failsafe plugins to feed Jacoco.
-
OAuth2 Authentication with Spring Security and Github

In this article I will show how to authenticate using the OAuth2 system with Spring Security and Github. For that, I will need to create a Github login application and connect it to my Spring Boot application with Spring Security to allow it to perform the necessary requests.
-
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.
-
How to use the Spring Cloud Gateway Filter for Authentication

In this article I will show the usage of the Spring Cloud Gateway filters for the authentication. I will start creating and describing a Spring Cloud Gateway project, what are the filters and how they work. Then, I will use them to perform the authentication of my microservices architecture.
-
How to implement a Service Discovery with Spring Cloud Eureka

In this article I will implement a Service Discovery with Spring Cloud Eureka. For that, I will create a Spring Boot microservice with Eureka Server and the others will use Eureka Client and Feign Client.
-
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.
