【问题标题】:Spring boot with vaadin run jetty even though I use tomcat即使我使用 tomcat,使用 vaadin run jetty 的 Spring Boot
【发布时间】:2017-01-02 15:33:12
【问题描述】:

我尝试使用带有 Vaadin 7.7.0 的 Spring Boot。默认情况下,如果我不指定,spring boot 使用 tomcat。但是,我发现有一个日志如下:

2016-08-26 12:08:49.897  INFO 3240 --- [           main] e.j.JettyEmbeddedServletContainerFactory : Server initialized with port: 8080
2016-08-26 12:08:49.900  INFO 3240 --- [           main] org.eclipse.jetty.server.Server          : jetty-8.y.z-SNAPSHOT

我通过eclipse查看依赖,没有jetty。

这里是问题的依赖关系

这么强的版本怎么来的?

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client</artifactId>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiler</artifactId>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-push</artifactId>
</dependency>

通过remove检查后发现错误的码头来自

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiler</artifactId>
    <scope>provided</scope>
</dependency>

删除后可以添加

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <scope>provided</scope>
</dependency>

一切正常。

我不知道这个包裹发生了什么。是不是依赖冲突?

【问题讨论】:

  • 你是如何运行它的? jetty 可能只是您运行它的方式的(暂时)依赖项。
  • 嗨@cfrick 我刚刚发现问题来自&lt;artifactId&gt;vaadin-client-compiler&lt;/artifactId&gt; 删除后,一切正常。
  • 哦,对了,它只是用来为你创建一个小部件集(一些maven插件应该这样做)。

标签: spring-boot vaadin vaadin7 vaadin4spring


【解决方案1】:

Jetty 用于 Vaadin 的 Push 功能,已经包含在内。

【讨论】:

  • 这个码头来自&lt;artifactId&gt;vaadin-client-compiler&lt;/artifactId&gt;
猜你喜欢
  • 2015-06-14
  • 1970-01-01
  • 2014-09-12
  • 2018-07-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-26
  • 1970-01-01
相关资源
最近更新 更多