Issue
I want to display an image on Angular app through Spring boot REST service. The image file could be anywhere on the disk not necessarily in assets folder. How can I implement this?
Solution
You can set following property under application.yml (or properties) to expose static file to outside.After that you can access the file like HOST:PORT/IMAGE_NAME.EXTENSION
spring:
resources:
static-locations: file:<PATH TO THE FOLDER>
Answered By - Shan.M