My question seems to be a general problem but actually it is not.
We have a DEV environment, in which we have the FrontEnd running that is communicating with the BE. If the user is on the FE and gives inputs like name, surname, city and zipcode, then based on these inputs the Backend will generate an QR Code as png file.
This png file is saved locally in src/main/....
The problem: How can I access this file so that I can show the QR Code to the user in the FE.This image that is located on my HDD should be delivered to the FE.
What I have tried:
How to reference a local image in java?
Trying to cast an Image to a BufferedImage
ClassPathResource does not get the classpath
Nothing worked. The image won't shown.