我花了很大力气才把应用程序作为产品来运行。我在application.properties中添加了"vaadin.productionMode=true“,但是出现了错误"Failed to load content of './frontend/index.html'. It is required to have './frontend/index.html' file when using..."来了。当我在main/resources/META_INF/VAADIN/webapp中添加了带有https://vaadin.com/docs/latest/fusion/application/starting#default-bootstrap-template-and-entry-point中描述的内容的index.html之后,错误就消失了。日志文件告诉应用程序已经在生产模式中启动("Vaadin正在生产模式下运行。”)但是不幸的是,在has浏览器中什么也没有显示。
有谁有主意吗?
提前谢谢你,托马斯
发布于 2021-10-19 13:39:52
我参加聚会已经很晚了,但是除了设置vaadin.productionMode属性之外,您还记得运行Maven vaadin:build-frontend吗?(还有vaadin:prepare-frontend,但您的开发版本中可能已经有了。)
关于启用生产模式的文档:https://vaadin.com/docs/latest/flow/guide/production
https://stackoverflow.com/questions/68717189
复制相似问题