java - 如何在 Vaadin 14 + Spring Boot 中构建工作 jar 文件?
问题描述
我试图将我的 Vaadin14 项目运行到生产环境中,但我的应用程序找不到任何 vaadin 流组件。我有一个默认的 application.properties 和 POM,并从这里下载了它https://vaadin.com/start/latest。我已经试过了,
删除节点模块 mvn clean mvn clean install -Pproduction mvn clean package -Pproduction
我得到这个错误
Failed to find the following imports in the `node_modules` tree:
- @vaadin/flow-frontend/contextMenuConnector-es6.js
- @vaadin/flow-frontend/comboBoxConnector.js
- @vaadin/flow-frontend/gridConnector.js
- @vaadin/flow-frontend/contextMenuConnector.js
- @vaadin/flow-frontend/flow-component-renderer.js
- @vaadin/flow-frontend/gridConnector-es6.js
- @vaadin/flow-frontend/comboBoxConnector-es6.js
- @vaadin/flow-frontend/vaadin-grid-flow-selection-column.js
如果构建失败,请检查是否安装了 npm 包。
修复构建删除node_modules
目录以重置模块。此外,您可以运行npm install
来修复node_modules
树结构。
TIA
解决方案
nvm 伙计们,已经找到了答案.. Vaadin 14.0.11v
将此添加到您的 application.properties
vaadin.productionMode = true <----- 在开发模式下注释此行
spring.servlet.multipart.enabled = false
推荐阅读
- reactjs - 状态更改后更新 React 子组件
- jquery - 如何使用 jQuery 向多个元素添加条件类?
- kotlin - 父类的初始化块中的空值
- http - HTTP协议中的get,post等HTTP方法需要什么?
- sitecore - 无法启动 Sitecore Indexing Manager
- python - remove charcaters from string
- luxon - 如何使用 luxon 库将毫秒转换为分钟
- c# - 在运行时从 Blazor 应用程序中动态加载的程序集呈现页面
- powershell - 如何从脚本块(作业)中检索变量值
- clips - 使用自定义比较器 CLIPS 对函数剪辑进行排序