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
Spring Boot Call Stored Procedure With Spring Data @Procedure
Although most applications use SQL statements, we may need to call stored procedures instead. For instance, we could reuse existing stored procedures instead of crafting new codes. As a result, we do not need to create new test cases, and
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
Spring Boot Consul Distributed Configuration Example
This post shows an example of a Spring Boot application that consumes distributed configuration from a Consul instance in a local development environment setup. We’ll generate a Spring Boot project and then modify it a bit to access Consul. Requisites
Spring Boot, JPA/Hibernate for Java EE 6 Java Persistence API Developer Certified Expert 1Z0-898
If you are planning to take Java EE 6 Java Persistence API Developer Certified Expert (1Z0-898), this post is for you. It demonstrates how to create a sample application using Spring Boot, and JPA/Hibernate to aid in your study.
Render XML using Thymeleaf
This post demonstrates how to render an XML to a file from a given XML template using Spring Boot and Thymeleaf.
Spring Boot + Spring Security with Multiple Login Forms and User Types
I’m working on some personal project that handles 4 different user types (e.g., students, instructors, registrar employees, security personnel). Each user type are stored in a separate user table. With this, I require four (4) login forms.
Spring – Configurable Default Value for @Value
This post demonstrates how to use @Value that has both a configurable default value and a hard-coded final fallback value.
Using Mockito @InjectMocks with Constructor and Field Injections
There is a scenario to watch out for where we have class with a few instance variables of reference types but not all of them get initialized via a constructor. This post demonstrates shows how we could unknowingly miss initializing other mocks in a class and how to fix them.