What folder structure should I have in my SpringBoot-2 project to get access to “frontend” folder?
Assume I have a class with annotation
@StyleSheet("mystyles.css")
When I run the app directly from Idea, without any .jar or .war building, I can see empty “mystyles.css” in frontend folder through the browser debugger.
But when I create my own file and put it in one of these folders
src/main/frontend
src/main/webapp/frontend
src/main/resources
src/main/resources/frontend
src/main/resources/webapp/frontend
src/main/resources/VAADIN/frontend
etc
my file does not appear as a resource for a browser
You should use the url @StyleSheet("frontend://styles/mystyles.css") to point to src/main/resources/META-INF/resources/frontend/styles which is the recommended location for Spring Boot apps that are packaged as jar.