I am using Vaadin 14 with Spring Boot.
I have some images in src/main/resources/META-INF/resources/images/
that I can sucessfully display with Image image = new Image("images/image.png", "alt image text");
. I found out the path by trial and error.
When I generate new images in the same directory at runtime, I cannot access them unless I rebuild everything with mvn
. I guess this is because the old images are originally available via the .war
file and if I don’t regenerate that, new images are unavailable.
Two questions:
- Where is the path for the resources directory defined? Is this only valid for Vaadin or does Spring use the same? How are the resource paths for both related?
- How can I use
new Image(...)
to access images that are being generated during runtime without restartingmvn
? Does Vaadin provide a way for that or do I have to use static Spring resources? If so, how do I tell VaadinsImage
to use a Spring resource path?