How to access a resource file in src/main/resources/ folder in Spring Boot

In this blog post we will see different ways to access resource file in src/main/resources folder in Spring Boot. 1) Using ResourceLoader 2) Using Resource 3) Using ClassPathResource 4) Using ClassLoader Note : In above code example, the path should always start with “/” 5) Using ContextClassLoader Sourcecode for blog post can be downloaded from…

Running Single Integration Test or Method Using Maven

In this blog post we will see how to run single Integration test or method when using Maven as build tool and maven failsafe plugin to run integration tests. Running Integration Tests You can use following command to run all the integration tests mvn verify Running a Single Test IDE’s like IntelliJ Idea and Eclipse…