My application is a Java/maven application using spring boot.
I have csv files in main/resources that I read to load data when my application starts. I have other files in test/resources which are loaded as well. The files in test/resources seem to get loaded when I run a build. The files in main/resources do not. I get errors that the resource could not be loaded.
What configurations are available to load these files when running tests in the bitbucket pipeline?
The same maven build runs fine on my local machine.
Hi Laran,
I don't know exactly how you are accessing to the resource csv files. I recommend you use the ResourceLoader Sprint implementation to access the file. Here, you can see a tutorial on how to do it: https://smarterco.de/java-load-file-from-classpath-in-spring-boot/
Regards,
Raul
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.