我在 src/main/webapp/VAADIN/themes/mytheme/ 中有我的 VAADIN 应用程序的自定义主题,其中包含文件 mytheme.scss 和 styles.scss。当 web.xml 中的 vaadin productionMode 部署参数设置为 false 时,一切正常。当我将参数设置为 true 时,突然 Vaadin 找不到我的主题的资源并不断抱怨:
Requested resource [/VAADIN/themes/mytheme/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder
我没有 /WebContent 目录,而是 /webapp,因为它是一个 maven web-app 项目。我尝试将 VAADIN 文件夹放到:
src/main/resources
src/main/webapp
src/main/webapp/WEB-INF
但对生产模式没有任何作用。有什么建议吗?提前感谢您的帮助。