简体   繁体   English

如何在 Vaadin 14 + Spring Boot 中构建一个有效的 jar 文件?

[英]How to build a working jar file in Vaadin 14 + Spring Boot?

Im trying to run my Vaadin14 project to production and my application cant find any vaadin flow components.我试图将我的 Vaadin14 项目运行到生产环境中,但我的应用程序找不到任何 vaadin 流组件。 I have a default application.properties and POM, and downloaded it from here https://vaadin.com/start/latest .我有一个默认的 application.properties 和 POM,并从这里下载了它https://vaadin.com/start/latest I already have tried,我已经试过了,

delete node modules mvn clean mvn clean install -Pproduction mvn clean package -Pproduction删除节点模块 mvn clean mvn clean install -Pproduction mvn clean package -Pproduction

and I get this error我得到这个错误

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

If the build fails, check that npm packages are installed.如果构建失败,请检查是否安装了 npm 包。

To fix the build remove node_modules directory to reset modules.要修复构建删除node_modules目录以重置模块。 In addition you may run npm install to fix node_modules tree structure.此外,您可以运行npm install来修复node_modules树结构。

TIA TIA

nvm guys, already found the answer.. Vaadin 14.0.11v nvm 伙计们,已经找到了答案.. Vaadin 14.0.11v

add this to your application.properties将此添加到您的 application.properties

vaadin.productionMode = true <----- comment this line when in dev mode vaadin.productionMode = true <----- 在开发模式下注释此行

spring.servlet.multipart.enabled = false spring.servlet.multipart.enabled = false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM