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
Spring Framework
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
If we are writing integration tests for an application that uses Spring Framework, we can integrate DbUnit with the Spring testing framework by using Spring Test DbUnit. However, this integration is not problem free. Often we have to insert null values to the database before our tests are run or verify that the value saved […] Read more
I have written about the challenges of writing unit tests for applications which use Spring Social 1.1.0 and provided one solution for it. Although unit testing is valuable, it doesn’t really tell us if our application is working correctly. That is why we have to write integration tests for it. This blog post helps us […] Read more
I have been planning to write a Spring testing book for some time now. About a month ago I tried to create a table of contents for the book. I failed miserably. The problem was that although I know what should be in the book, I found it hard to write my thoughts down. I […] Read more