Hi,
I'm having trouble with combining both WebJars and static files using Spark 2.5.5. I've done some googling and it appears other people have found this problematic also.
Also this earlier topic in this group:
My initial project layout was like this:
src
+-main
+-java (Java packages below here)
+-resources
+-static
+-css
+-images
+-js
I set staticFileLocation to /META-INF/resources, and was able to see the webjars/ subdirectory there (although the jQuery webjar was excluded - presumably due to a conflict), but of course my static files were not there because they were not available at /META-INF/resources
I then tried an alternative layout:
src
+-main
+-java (Java packages below here)
+-resources
+-META-INF
+-resources
+-css
+-images
+-js
This led to my static files being available, but the webjars/ subdirectory was no longer there. I presume that the src/main/resources/META-INF/ path takes precedence over the webjars/ path?
Is there any clean/non-hacky way to combine webjars with static files in a Spark project?
Thanks,
Ashley