If we need to figure out the runtime configuration of a Spring web application that is deployed to a remote server, we need to the read the properties file found from the remote server. This is cumbersome. Luckily, there is a better way. This blog post describes how we can Write the runtime configuration to […] Read more
Spring Framework
Spring Framework has a good support for injecting property values found from properties files into bean or @Configuration classes. However, if we inject individual property values into these classes, we will face some problems. This blog post identifies these problems and describes how we can solve them. Let’s get started. If you use Spring Boot, […] Read more
This year I greeted Christmas in a different fashion: I was a part of the Java Advent Calendar. Let's boot up for Christmas: Spring Boot is an opinionated framework that simplifies the development of Spring applications. It frees us from the slavery of complex configuration files and helps us to create standalone Spring applications that […] Read more
Before we can create an application that uses Spring Data JPA, we need to get the required dependencies. This blog post identifies the required components and describes how we can get them by using Maven. Let's get started. Additional Reading: If you are not familiar with Spring Data JPA, you should read the following blog […] Read more
Creating repositories that use the Java Persistence API is a cumbersome process that takes a lot of time and requires a lot of boilerplate code. We can eliminate some boilerplate code by following these steps: Create an abstract base repository class that provides CRUD operations for entities. Create the concrete repository class that extends the […] Read more
When we are writing integration tests for a function that saves information to the database, we have to verify that the correct information is saved to the database. If our application uses Spring Framework, we can use Spring Test DbUnit and DbUnit for this purpose. However, it is very hard to verify that the correct […] Read more