Spring Boot + Vaadin, external images path

Hi,

I have spring boot + vaadin app. App is built as .jar.
Users will upload images into /images/ folder somewhere on server.

I tried something like this in many ways and locations:

        Image i2 = new Image("/images/0001.jpg", "Z2");

This one works, while I use Apache to serve images:

        Html i3 = new Html("<img src='http://localhost/images/0001.jpg' width=200px height=300px>");

Where I have to put that “images/” folder relative to .jar file?
i want to avoid using absolute URL paths with http and domain name.

Thanks in advance, M.

I suspect you’ll have to add resource handler for static files in Spring (if I understood your issue correctly). See: https://stackoverflow.com/questions/28556300/serving-static-resources-from-file-system-spring-boot-web