The best way to clean up test data with Spring and Hibernate

Introduction In this article, I’m going to show you the best way to clean up test data when using Spring and Hibernate. While it’s very common to use the @DataJpaTest annotation when implementing integration tests, in this blog post, you will see why you are better off avoiding using this annotation. Why I don’t use @DataJpaTest As explained by the manual, Spring Boot provides the @DataJpaTest…