Suppose our application needs to email in text or HTML format; how can we do that without changing a lot of codes? We use templates! Spring Boot makes it a lot easier working with Apache FreeMarker with FreeMarker Starter POMs.
KrakenD API Gateway – Quick Start With Docker
When we work on Microservices, we deal with many application services that work together to provide an IT service, e.g., an e-commerce solution. Sometimes we need to fuse these services easily into larger solutions with containerization like Docker and API
Headstart Framework: Traceability For RESTful Calls
We can start small with the Headstart Framework and leverage its traceability for RESTful calls for Microservices. In a nutshell, traceability means we associate a unique identifier to an individual request. Also, this identifier can group related requests forming a
Headstart Framework: Identity Access Management (IAM) Service
The general design of the Headstart Framework makes it flexible to implement an Identity Access Management (IAM) service. Then, we could use the service with both monolith or distributed applications. Also, we could turn a Headstart application into an Identity
Spring Boot Security Tests With PreAuth And WithMockUser
When we implement authorization in Spring Boot with Spring Security, for instance, using the PreAuth annotation, we should never skip automated tests for it. We could use the @PreAuth, among other annotations, to control authenticated users’ access to some methods
Headstart Framework: Flyway and Supported Databases
We have designed the Headstart framework to be database-agnostic to support major database products with the help of Flyway. To achieve this database agnosticism, Headstart uses Spring Data/Hibernate but relies on migration scripts for creating database tables. We run these
The Number of Entities In a Hibernate Persistence Context
One of my worries with Hibernate was the number of entities accumulating in a Persistence Context. If I were not careful, my codes could potentially store thousands of entities in a Persistence Context. Worse, these objects could stay in memory
Spring Boot Asynchronous Controller Without External Queues
This post shows how to create an asynchronous web controller or endpoint in Spring Boot (or Spring in general). The codes won’t use external queues of any kind. However, they’ll use ThreadPoolTaskExecutor to run codes in the background without having
Spring Boot Consul Service Discovery And Client Example
This post shows how to use Spring Boot Service Discovery with Consul. We’ll have two Spring Boot applications. One application registers itself with Consul. It then becomes discoverable to another application. Meanwhile, the other application does not register itself with
Chapter 2: Why You Should Learn Programming With Java
In the early 90s, Sun Microsystems developed and released the Java programming language. It is a general-purpose and high-level language that can run on various operating systems, like Windows, Mac OS, and UNIX platforms. This post gives an overview of