Home » Archives for Gilbert Lopez

Author Archives: Gilbert Lopez

Gilbert Lopez is an application developer and systems integration developer with experience building business solutions for large and medium-sized companies. He has worked on many Java EE projects. His roles have included lead developer, systems analyst, business analyst and consultant. Gilbert graduated from California State University in Los Angeles with a Bachelor of Science degree in Business.

Spring Boot and OAuth2 Tutorial

In this tutorial, we will show how to integrate OAuth2 with Spring Security in a Spring Boot application. 1. Introduction Many web applications use some mechanism for identifying a user, if for nothing more than to provide a personalized experience. Also, an authorization check may be required to determine if the user has the necessary access level to use the ...

Read More »

Spring Boot MockMVC Tutorial

In this article, we provide a tutorial about Spring Boot MockMVC. 1. Introduction As a software developer, you need to validate that your code is working correctly. You accomplish this by testing. There are different types of tests: Unit tests target a specific section of code, such as a methodIntegration tests verify that the interactions between your code and other ...

Read More »

Dependency Injection Java Example

In this article, we will examine Dependency Injection in Java and some dependency injection examples. You can also check this tutorial in the following video: Java Dependency Injection Tutorial – video 1. Introduction In a previous article, we explored the topic of Inversion of Control and how this design principle is appropriately suited for creating loosely coupled software applications. The ...

Read More »

Garbage Collection in Java

In this article, we will cover garbage collection in Java. We’ll look at the Garbage Collector and discuss the conditions that make an object eligible for collection. We’ll also explore the topics of object reachability and object cleanup. Finally, we’ll show how to call the garbage collector in our code. 1. Introduction When writing an application, you may need to ...

Read More »

Migrating from Java 8 to Java 13

In this article, we will demonstrate how to migrate an application from Java SE 8 to Java SE 13. 1. Introduction Oracle began a six-month release cadence for Java Standard Edition starting with Java 10. Instead of being major version releases, they are instead “feature releases”. This release cycle is in the spirit of Continuous Integration / Continuous Deployment and ...

Read More »

IoC in Spring Example

In this post, we will explain the IoC (Inversion of Control) and how it is applied in Spring. 1. Introduction Inversion of control is an OOP design principle for writing code that is loosely coupled. The objective is to outsource certain responsibilities typically performed by a class to an external entity, such as a framework or container. The result is ...

Read More »

Spring @AliasFor Annotation Example

In this example, we will show how to use the @AliasFor annotation in Spring. 1. Introduction Annotations are decorators that provide metadata about classes, methods, parameters or fields. Depending on the annotation, metadata may be processed at compile-time and/or runtime. Examples of annotations include: JUnit annotations (@Test, @Before, @After)JPA annotations (@Entity, @Table, @Id)Spring Framework annotations (@Controller, @Configuration, @Autowired) Meta-annotations are ...

Read More »

Introduction to Monolithic Architecture

In this article, we will discuss the characteristics of a monolithic architecture. 1. Introduction We’ve heard about microservices and how they allow for a more agile software development approach to developing applications. However, there are still many software projects that use a monolithic architecture when developing an application. In fact, many microservices projects started out as monolithic applications. Let’s take ...

Read More »

Spring Form Validation Example

In this example, we will show how to implement server-side form validation in a Spring MVC application. 1. Introduction Form validation is a basic requirement for web applications that accept data as input. For example, you may want to ensure that an email address or credit card number sent in a request is valid before processing the data. There are ...

Read More »

Spring Boot Bean Validation Example

In this example, we will demonstrate how to use Bean Validation in a Spring Boot REST application. 1. Introduction Data validation is a basic requirement for any application, especially for web applications that accept data as input. For example, you may want to ensure that an email address or credit card number sent in a request is valid. Before the ...

Read More »