Servlet创建一个新的Vaadin

Servlet创建一个新的Vaadin

本文介绍了使用不带Spring/CDI的纯Java Servlet创建一个新的Vaadin Flow 16/17项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起始页.Vaadin#Vaadin_Flow"rel =" nofollow noreferrer> Vaadin流已更改.该页面现在提供仅针对 Spring Boot 配置的新项目.该页面的先前版本为"Plain Java Servlet"提供了一个选项.以及Spring/ CDI .

Vaadin文档建议手动使用Maven原型.但是 com.vaadin…的Maven存储库似乎针对Vaadin 8及更早版本,而针对Vaadin 10及更高版本没有.

学习Maven的Vaadin页面显示了一个使用 viritin-vaadin-flow-archetype 作为原型.但是 Viritin 是第三方项目,会添加我目前不需要的库./p>

➥是否有一条仅使用普通Java Servlet即可在Jetty或Tomcat上运行而无需Spring/CDI的方式来启动新的Vaadin 16项目的途径?(或Vaadin 17预发布)

还是Vaadin Ltd公司决定现在仅支持Spring?(那将是最不幸的.)

解决方案

至少是Maven原型 vaadin-archetype-application 似乎适用于v16以下的版本:

  mvn原型:generate -DarchetypeGroupId = com.vaadin -DarchetypeArtifactId = vaadin-archetype-application -DarchetypeVersion = LATEST 

我应该更新该教程...谢谢您的提示.

The starter page for Vaadin Flow has changed. That page now offers new projects configured only for Spring Boot. The previous version of this page offered an option for "Plain Java Servlet" as well as Spring/CDI.

The Vaadin documentation suggests using a Maven archetype manually. But the Maven repositories for com.vaadin… appear to be aimed at Vaadin 8 and earlier, with none for Vaadin 10 and later.

The Vaadin page on learning Maven shows an example using viritin-vaadin-flow-archetype as an archetype. But Viritin is a third-party project, and would add libraries I do not presently need.

➥ Is there an avenue to start a new Vaadin 16 project using only plain Java Servlets to be run on Jetty or Tomcat without Spring/CDI? (or Vaadin 17 pre-release)

Or has the Vaadin Ltd company decided to support only Spring now? (That would be most unfortunate.)

解决方案

At least the Maven archetype vaadin-archetype-application seems to be working for versions up to v16:

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=LATEST

I should update that tutorial... thanks for the hint on this.

这篇关于使用不带Spring/CDI的纯Java Servlet创建一个新的Vaadin Flow 16/17项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 20:55